generated-configure.sh revision 2511:ed112fe8a11d
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
707GCOV_ENABLED
708ZIP_EXTERNAL_DEBUG_SYMBOLS
709COPY_DEBUG_SYMBOLS
710COMPILE_WITH_DEBUG_SYMBOLS
711CFLAGS_WARNINGS_ARE_ERRORS
712BUILD_CC_DISABLE_WARNING_PREFIX
713DISABLE_WARNING_PREFIX
714WARNINGS_AS_ERRORS
715COMPILER_SUPPORTS_TARGET_BITS_FLAG
716LDFLAGS_TESTEXE
717LDFLAGS_TESTLIB
718CXXFLAGS_TESTEXE
719CXXFLAGS_TESTLIB
720CFLAGS_TESTEXE
721CFLAGS_TESTLIB
722OPENJDK_BUILD_JVM_LIBS
723OPENJDK_BUILD_JVM_ASFLAGS
724OPENJDK_BUILD_JVM_LDFLAGS
725OPENJDK_BUILD_JVM_CFLAGS
726OPENJDK_BUILD_LDFLAGS_HASH_STYLE
727OPENJDK_BUILD_LDFLAGS_CXX_JDK
728OPENJDK_BUILD_JDKEXE_LIBS
729OPENJDK_BUILD_JDKLIB_LIBS
730OPENJDK_BUILD_LDFLAGS_JDKEXE
731OPENJDK_BUILD_LDFLAGS_JDKLIB
732OPENJDK_BUILD_CXXFLAGS_JDKEXE
733OPENJDK_BUILD_CXXFLAGS_JDKLIB
734OPENJDK_BUILD_CFLAGS_JDKEXE
735OPENJDK_BUILD_CFLAGS_JDKLIB
736OPENJDK_BUILD_CXXSTD_CXXFLAG
737JVM_LIBS
738JVM_ASFLAGS
739JVM_LDFLAGS
740JVM_CFLAGS
741LDFLAGS_HASH_STYLE
742LDFLAGS_CXX_JDK
743JDKEXE_LIBS
744JDKLIB_LIBS
745LDFLAGS_JDKEXE
746LDFLAGS_JDKLIB
747CXXFLAGS_JDKEXE
748CXXFLAGS_JDKLIB
749CFLAGS_JDKEXE
750CFLAGS_JDKLIB
751MACOSX_VERSION_MIN
752CXXSTD_CXXFLAG
753JDK_ARCH_ABI_PROP_NAME
754CXX_O_FLAG_SIZE
755CXX_O_FLAG_NONE
756CXX_O_FLAG_DEBUG
757CXX_O_FLAG_NORM
758CXX_O_FLAG_HI
759CXX_O_FLAG_HIGHEST
760CXX_O_FLAG_HIGHEST_JVM
761C_O_FLAG_SIZE
762C_O_FLAG_NONE
763C_O_FLAG_DEBUG
764C_O_FLAG_NORM
765C_O_FLAG_HI
766C_O_FLAG_HIGHEST
767C_O_FLAG_HIGHEST_JVM
768JVM_CFLAGS_SYMBOLS
769CXXFLAGS_DEBUG_SYMBOLS
770CFLAGS_DEBUG_SYMBOLS
771CXX_FLAG_DEPS
772C_FLAG_DEPS
773SHARED_LIBRARY_FLAGS
774SET_SHARED_LIBRARY_MAPFILE
775SET_SHARED_LIBRARY_NAME
776SET_SHARED_LIBRARY_ORIGIN
777SET_EXECUTABLE_ORIGIN
778CXX_FLAG_REORDER
779C_FLAG_REORDER
780JVM_RCFLAGS
781RC_FLAGS
782AR_OUT_OPTION
783LD_OUT_OPTION
784EXE_OUT_OPTION
785CC_OUT_OPTION
786STRIPFLAGS
787ARFLAGS
788COMPILER_BINDCMD_FILE_FLAG
789COMPILER_COMMAND_FILE_FLAG
790COMPILER_TARGET_BITS_FLAG
791JT_HOME
792JTREGEXE
793HOTSPOT_TOOLCHAIN_TYPE
794USING_BROKEN_SUSE_LD
795PACKAGE_PATH
796BUILD_AS
797BUILD_LDCXX
798BUILD_LD
799BUILD_STRIP
800BUILD_OBJCOPY
801BUILD_AR
802BUILD_NM
803BUILD_CXX
804BUILD_CC
805BUILD_SYSROOT_LDFLAGS
806BUILD_SYSROOT_CFLAGS
807ac_ct_OBJDUMP
808OBJDUMP
809ac_ct_OBJCOPY
810OBJCOPY
811ac_ct_NM
812ac_ct_STRIP
813GNM
814NM
815STRIP
816MSBUILD
817DUMPBIN
818RC
819MT
820LIPO
821ac_ct_AR
822AR
823AS
824LDCXX
825LD
826CXXCPP
827CPP
828CXX_VERSION_NUMBER
829CC_VERSION_NUMBER
830ac_ct_CXX
831CXXFLAGS
832CXX
833TOOLCHAIN_PATH_CXX
834POTENTIAL_CXX
835OBJEXT
836EXEEXT
837ac_ct_CC
838CPPFLAGS
839LDFLAGS
840CFLAGS
841CC
842TOOLCHAIN_PATH_CC
843POTENTIAL_CC
844TOOLCHAIN_VERSION
845VS_LIB
846VS_INCLUDE
847VS_PATH
848CYGWIN_LINK
849SYSROOT_LDFLAGS
850SYSROOT_CFLAGS
851EXTRA_LDFLAGS
852EXTRA_CXXFLAGS
853EXTRA_CFLAGS
854EXE_SUFFIX
855OBJ_SUFFIX
856STATIC_LIBRARY
857SHARED_LIBRARY
858STATIC_LIBRARY_SUFFIX
859SHARED_LIBRARY_SUFFIX
860LIBRARY_PREFIX
861TOOLCHAIN_TYPE
862STATIC_BUILD
863IMPORT_MODULES_MAKE
864IMPORT_MODULES_SRC
865IMPORT_MODULES_MAN
866IMPORT_MODULES_LEGAL
867IMPORT_MODULES_CONF
868IMPORT_MODULES_LIBS
869IMPORT_MODULES_CMDS
870IMPORT_MODULES_CLASSES
871BUILD_OUTPUT
872JDK_TOPDIR
873NASHORN_TOPDIR
874HOTSPOT_TOPDIR
875JAXWS_TOPDIR
876JAXP_TOPDIR
877CORBA_TOPDIR
878LANGTOOLS_TOPDIR
879EXTERNAL_BUILDJDK
880BUILD_JDK
881CREATE_BUILDJDK
882JLINK
883JMOD
884JAVAC_FLAGS
885BOOT_JDK_MODULAR
886BOOT_JDK_SOURCETARGET
887JARSIGNER
888JAR
889JAVAH
890JAVAC
891JAVA
892BOOT_JDK
893JAVA_CHECK
894JAVAC_CHECK
895VERSION_IS_GA
896VERSION_SHORT
897VERSION_STRING
898VERSION_NUMBER_FOUR_POSITIONS
899VERSION_NUMBER
900VERSION_OPT
901VERSION_BUILD
902VERSION_PRE
903VERSION_PATCH
904VERSION_SECURITY
905VERSION_MINOR
906VERSION_MAJOR
907MACOSX_BUNDLE_ID_BASE
908MACOSX_BUNDLE_NAME_BASE
909HOTSPOT_VM_DISTRO
910COMPANY_NAME
911JDK_RC_PLATFORM_NAME
912PRODUCT_SUFFIX
913PRODUCT_NAME
914LAUNCHER_NAME
915JLINK_KEEP_PACKAGED_MODULES
916COPYRIGHT_YEAR
917COMPRESS_JARS
918INCLUDE_SA
919UNLIMITED_CRYPTO
920CACERTS_FILE
921ENABLE_HEADLESS_ONLY
922DEFAULT_MAKE_TARGET
923OS_VERSION_MICRO
924OS_VERSION_MINOR
925OS_VERSION_MAJOR
926PKG_CONFIG
927BASH_ARGS
928SETFILE
929CODESIGN
930XATTR
931DSYMUTIL
932IS_GNU_TIME
933PATCH
934DTRACE
935TIME
936STAT
937HG
938READELF
939OTOOL
940LDD
941ZIPEXE
942UNZIP
943TAR_SUPPORTS_TRANSFORM
944TAR_INCLUDE_PARAM
945TAR_CREATE_EXTRA_PARAM
946TAR_TYPE
947FIND_DELETE
948OUTPUT_SYNC
949OUTPUT_SYNC_SUPPORTED
950CHECK_TOOLSDIR_MAKE
951CHECK_TOOLSDIR_GMAKE
952CHECK_MAKE
953CHECK_GMAKE
954MAKE
955PKGHANDLER
956CONFIGURESUPPORT_OUTPUTDIR
957OUTPUT_ROOT
958CONF_NAME
959SPEC
960SDKROOT
961XCODEBUILD
962JVM_VARIANT_MAIN
963VALID_JVM_VARIANTS
964JVM_VARIANTS
965DEBUG_LEVEL
966HOTSPOT_DEBUG_LEVEL
967JDK_VARIANT
968USERNAME
969CANONICAL_TOPDIR
970ORIGINAL_TOPDIR
971TOPDIR
972PATH_SEP
973HOTSPOT_BUILD_CPU_DEFINE
974HOTSPOT_BUILD_CPU_ARCH
975HOTSPOT_BUILD_CPU
976HOTSPOT_BUILD_OS_TYPE
977HOTSPOT_BUILD_OS
978OPENJDK_BUILD_BUNDLE_PLATFORM
979OPENJDK_BUILD_OS_EXPORT_DIR
980OPENJDK_BUILD_CPU_OSARCH
981OPENJDK_BUILD_CPU_ISADIR
982OPENJDK_BUILD_CPU_LEGACY_LIB
983OPENJDK_BUILD_CPU_LEGACY
984HOTSPOT_TARGET_CPU_DEFINE
985HOTSPOT_TARGET_CPU_ARCH
986HOTSPOT_TARGET_CPU
987HOTSPOT_TARGET_OS_TYPE
988HOTSPOT_TARGET_OS
989DEFINE_CROSS_COMPILE_ARCH
990OPENJDK_TARGET_BUNDLE_PLATFORM
991OPENJDK_TARGET_OS_EXPORT_DIR
992OPENJDK_TARGET_CPU_OSARCH
993OPENJDK_TARGET_CPU_ISADIR
994OPENJDK_TARGET_CPU_LEGACY_LIB
995OPENJDK_TARGET_CPU_LEGACY
996REQUIRED_OS_VERSION
997REQUIRED_OS_NAME
998COMPILE_TYPE
999OPENJDK_TARGET_CPU_ENDIAN
1000OPENJDK_TARGET_CPU_BITS
1001OPENJDK_TARGET_CPU_ARCH
1002OPENJDK_TARGET_CPU
1003OPENJDK_TARGET_OS_ENV
1004OPENJDK_TARGET_OS_TYPE
1005OPENJDK_TARGET_OS
1006OPENJDK_BUILD_CPU_ENDIAN
1007OPENJDK_BUILD_CPU_BITS
1008OPENJDK_BUILD_CPU_ARCH
1009OPENJDK_BUILD_CPU
1010OPENJDK_BUILD_OS_ENV
1011OPENJDK_BUILD_OS_TYPE
1012OPENJDK_BUILD_OS
1013OPENJDK_BUILD_AUTOCONF_NAME
1014OPENJDK_TARGET_AUTOCONF_NAME
1015target_os
1016target_vendor
1017target_cpu
1018target
1019host_os
1020host_vendor
1021host_cpu
1022host
1023build_os
1024build_vendor
1025build_cpu
1026build
1027NICE
1028CPIO
1029DF
1030READLINK
1031CYGPATH
1032SED
1033FGREP
1034EGREP
1035GREP
1036AWK
1037XARGS
1038WHICH
1039WC
1040UNIQ
1041UNAME
1042TR
1043TOUCH
1044TEE
1045TAR
1046TAIL
1047SORT
1048SH
1049RMDIR
1050RM
1051PRINTF
1052NAWK
1053MV
1054MKTEMP
1055MKDIR
1056LS
1057LN
1058GZIP
1059GUNZIP
1060HEAD
1061FIND
1062FILE
1063EXPR
1064ECHO
1065DIRNAME
1066DIFF
1067DATE
1068CUT
1069CP
1070COMM
1071CMP
1072CHMOD
1073CAT
1074BASH
1075BASENAME
1076DATE_WHEN_CONFIGURED
1077ORIGINAL_PATH
1078CONFIGURE_COMMAND_LINE
1079target_alias
1080host_alias
1081build_alias
1082LIBS
1083ECHO_T
1084ECHO_N
1085ECHO_C
1086DEFS
1087mandir
1088localedir
1089libdir
1090psdir
1091pdfdir
1092dvidir
1093htmldir
1094infodir
1095docdir
1096oldincludedir
1097includedir
1098localstatedir
1099sharedstatedir
1100sysconfdir
1101datadir
1102datarootdir
1103libexecdir
1104sbindir
1105bindir
1106program_transform_name
1107prefix
1108exec_prefix
1109PACKAGE_URL
1110PACKAGE_BUGREPORT
1111PACKAGE_STRING
1112PACKAGE_VERSION
1113PACKAGE_TARNAME
1114PACKAGE_NAME
1115PATH_SEPARATOR
1116SHELL'
1117ac_subst_files=''
1118ac_user_opts='
1119enable_option_checking
1120with_target_bits
1121enable_openjdk_only
1122with_custom_make_dir
1123with_jdk_variant
1124enable_debug
1125with_debug_level
1126with_jvm_variants
1127with_cpu_port
1128with_devkit
1129with_sys_root
1130with_sysroot
1131with_tools_dir
1132with_toolchain_path
1133with_extra_path
1134with_sdk_name
1135with_conf_name
1136with_output_sync
1137with_default_make_target
1138enable_headless_only
1139with_cacerts_file
1140enable_unlimited_crypto
1141with_copyright_year
1142enable_keep_packaged_modules
1143with_milestone
1144with_update_version
1145with_user_release_suffix
1146with_build_number
1147with_version_string
1148with_version_pre
1149with_version_opt
1150with_version_build
1151with_version_major
1152with_version_minor
1153with_version_security
1154with_version_patch
1155with_boot_jdk
1156with_build_jdk
1157with_add_source_root
1158with_override_source_root
1159with_adds_and_overrides
1160with_override_langtools
1161with_override_corba
1162with_override_jaxp
1163with_override_jaxws
1164with_override_hotspot
1165with_override_nashorn
1166with_override_jdk
1167with_import_hotspot
1168with_import_modules
1169enable_static_build
1170with_toolchain_type
1171with_extra_cflags
1172with_extra_cxxflags
1173with_extra_ldflags
1174with_toolchain_version
1175with_build_devkit
1176with_jtreg
1177with_abi_profile
1178enable_warnings_as_errors
1179with_native_debug_symbols
1180enable_debug_symbols
1181enable_zip_debug_info
1182enable_native_coverage
1183enable_dtrace
1184enable_aot
1185enable_hotspot_gtest
1186with_stdc__lib
1187with_msvcr_dll
1188with_msvcp_dll
1189with_x
1190with_cups
1191with_cups_include
1192with_freetype
1193with_freetype_include
1194with_freetype_lib
1195with_freetype_src
1196enable_freetype_bundling
1197with_alsa
1198with_alsa_include
1199with_alsa_lib
1200with_libffi
1201with_libffi_include
1202with_libffi_lib
1203enable_libffi_bundling
1204with_libjpeg
1205with_giflib
1206with_libpng
1207with_zlib
1208with_lcms
1209with_dxsdk
1210with_dxsdk_lib
1211with_dxsdk_include
1212with_libelf
1213with_libelf_include
1214with_libelf_lib
1215with_jvm_features
1216with_jvm_interpreter
1217enable_jtreg_failure_handler
1218enable_generate_classlist
1219with_num_cores
1220with_memory_size
1221with_jobs
1222with_test_jobs
1223with_boot_jdk_jvmargs
1224with_sjavac_server_java
1225enable_sjavac
1226enable_javac_server
1227enable_icecc
1228enable_precompiled_headers
1229enable_ccache
1230with_ccache_dir
1231'
1232      ac_precious_vars='build_alias
1233host_alias
1234target_alias
1235BASENAME
1236BASH
1237CAT
1238CHMOD
1239CMP
1240COMM
1241CP
1242CUT
1243DATE
1244DIFF
1245DIRNAME
1246ECHO
1247EXPR
1248FILE
1249FIND
1250HEAD
1251GUNZIP
1252GZIP
1253LN
1254LS
1255MKDIR
1256MKTEMP
1257MV
1258NAWK
1259PRINTF
1260RM
1261RMDIR
1262SH
1263SORT
1264TAIL
1265TAR
1266TEE
1267TOUCH
1268TR
1269UNAME
1270UNIQ
1271WC
1272WHICH
1273XARGS
1274AWK
1275GREP
1276EGREP
1277FGREP
1278SED
1279CYGPATH
1280READLINK
1281DF
1282CPIO
1283NICE
1284MAKE
1285UNZIP
1286ZIPEXE
1287LDD
1288OTOOL
1289READELF
1290HG
1291STAT
1292TIME
1293DTRACE
1294PATCH
1295DSYMUTIL
1296XATTR
1297CODESIGN
1298SETFILE
1299PKG_CONFIG
1300JAVA
1301JAVAC
1302JAVAH
1303JAR
1304JARSIGNER
1305CC
1306CFLAGS
1307LDFLAGS
1308LIBS
1309CPPFLAGS
1310CXX
1311CXXFLAGS
1312CCC
1313CPP
1314CXXCPP
1315AS
1316AR
1317LIPO
1318STRIP
1319NM
1320GNM
1321OBJCOPY
1322OBJDUMP
1323BUILD_CC
1324BUILD_CXX
1325BUILD_NM
1326BUILD_AR
1327BUILD_OBJCOPY
1328BUILD_STRIP
1329JTREGEXE
1330XMKMF
1331FREETYPE_CFLAGS
1332FREETYPE_LIBS
1333ALSA_CFLAGS
1334ALSA_LIBS
1335LIBFFI_CFLAGS
1336LIBFFI_LIBS
1337PNG_CFLAGS
1338PNG_LIBS
1339LCMS_CFLAGS
1340LCMS_LIBS
1341ELF_CFLAGS
1342ELF_LIBS
1343ICECC_CMD
1344ICECC_CREATE_ENV
1345ICECC_WRAPPER
1346CCACHE'
1347
1348
1349# Initialize some variables set by options.
1350ac_init_help=
1351ac_init_version=false
1352ac_unrecognized_opts=
1353ac_unrecognized_sep=
1354# The variables have the same names as the options, with
1355# dashes changed to underlines.
1356cache_file=/dev/null
1357exec_prefix=NONE
1358no_create=
1359no_recursion=
1360prefix=NONE
1361program_prefix=NONE
1362program_suffix=NONE
1363program_transform_name=s,x,x,
1364silent=
1365site=
1366srcdir=
1367verbose=
1368x_includes=NONE
1369x_libraries=NONE
1370
1371# Installation directory options.
1372# These are left unexpanded so users can "make install exec_prefix=/foo"
1373# and all the variables that are supposed to be based on exec_prefix
1374# by default will actually change.
1375# Use braces instead of parens because sh, perl, etc. also accept them.
1376# (The list follows the same order as the GNU Coding Standards.)
1377bindir='${exec_prefix}/bin'
1378sbindir='${exec_prefix}/sbin'
1379libexecdir='${exec_prefix}/libexec'
1380datarootdir='${prefix}/share'
1381datadir='${datarootdir}'
1382sysconfdir='${prefix}/etc'
1383sharedstatedir='${prefix}/com'
1384localstatedir='${prefix}/var'
1385includedir='${prefix}/include'
1386oldincludedir='/usr/include'
1387docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1388infodir='${datarootdir}/info'
1389htmldir='${docdir}'
1390dvidir='${docdir}'
1391pdfdir='${docdir}'
1392psdir='${docdir}'
1393libdir='${exec_prefix}/lib'
1394localedir='${datarootdir}/locale'
1395mandir='${datarootdir}/man'
1396
1397ac_prev=
1398ac_dashdash=
1399for ac_option
1400do
1401  # If the previous option needs an argument, assign it.
1402  if test -n "$ac_prev"; then
1403    eval $ac_prev=\$ac_option
1404    ac_prev=
1405    continue
1406  fi
1407
1408  case $ac_option in
1409  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1410  *=)   ac_optarg= ;;
1411  *)    ac_optarg=yes ;;
1412  esac
1413
1414  # Accept the important Cygnus configure options, so we can diagnose typos.
1415
1416  case $ac_dashdash$ac_option in
1417  --)
1418    ac_dashdash=yes ;;
1419
1420  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1421    ac_prev=bindir ;;
1422  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1423    bindir=$ac_optarg ;;
1424
1425  -build | --build | --buil | --bui | --bu)
1426    ac_prev=build_alias ;;
1427  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1428    build_alias=$ac_optarg ;;
1429
1430  -cache-file | --cache-file | --cache-fil | --cache-fi \
1431  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1432    ac_prev=cache_file ;;
1433  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1434  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1435    cache_file=$ac_optarg ;;
1436
1437  --config-cache | -C)
1438    cache_file=config.cache ;;
1439
1440  -datadir | --datadir | --datadi | --datad)
1441    ac_prev=datadir ;;
1442  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1443    datadir=$ac_optarg ;;
1444
1445  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1446  | --dataroo | --dataro | --datar)
1447    ac_prev=datarootdir ;;
1448  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1449  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1450    datarootdir=$ac_optarg ;;
1451
1452  -disable-* | --disable-*)
1453    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1454    # Reject names that are not valid shell variable names.
1455    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1456      as_fn_error $? "invalid feature name: $ac_useropt"
1457    ac_useropt_orig=$ac_useropt
1458    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1459    case $ac_user_opts in
1460      *"
1461"enable_$ac_useropt"
1462"*) ;;
1463      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1464	 ac_unrecognized_sep=', ';;
1465    esac
1466    eval enable_$ac_useropt=no ;;
1467
1468  -docdir | --docdir | --docdi | --doc | --do)
1469    ac_prev=docdir ;;
1470  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1471    docdir=$ac_optarg ;;
1472
1473  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1474    ac_prev=dvidir ;;
1475  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1476    dvidir=$ac_optarg ;;
1477
1478  -enable-* | --enable-*)
1479    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1480    # Reject names that are not valid shell variable names.
1481    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1482      as_fn_error $? "invalid feature name: $ac_useropt"
1483    ac_useropt_orig=$ac_useropt
1484    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1485    case $ac_user_opts in
1486      *"
1487"enable_$ac_useropt"
1488"*) ;;
1489      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1490	 ac_unrecognized_sep=', ';;
1491    esac
1492    eval enable_$ac_useropt=\$ac_optarg ;;
1493
1494  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1495  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1496  | --exec | --exe | --ex)
1497    ac_prev=exec_prefix ;;
1498  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1499  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1500  | --exec=* | --exe=* | --ex=*)
1501    exec_prefix=$ac_optarg ;;
1502
1503  -gas | --gas | --ga | --g)
1504    # Obsolete; use --with-gas.
1505    with_gas=yes ;;
1506
1507  -help | --help | --hel | --he | -h)
1508    ac_init_help=long ;;
1509  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1510    ac_init_help=recursive ;;
1511  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1512    ac_init_help=short ;;
1513
1514  -host | --host | --hos | --ho)
1515    ac_prev=host_alias ;;
1516  -host=* | --host=* | --hos=* | --ho=*)
1517    host_alias=$ac_optarg ;;
1518
1519  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1520    ac_prev=htmldir ;;
1521  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1522  | --ht=*)
1523    htmldir=$ac_optarg ;;
1524
1525  -includedir | --includedir | --includedi | --included | --include \
1526  | --includ | --inclu | --incl | --inc)
1527    ac_prev=includedir ;;
1528  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1529  | --includ=* | --inclu=* | --incl=* | --inc=*)
1530    includedir=$ac_optarg ;;
1531
1532  -infodir | --infodir | --infodi | --infod | --info | --inf)
1533    ac_prev=infodir ;;
1534  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1535    infodir=$ac_optarg ;;
1536
1537  -libdir | --libdir | --libdi | --libd)
1538    ac_prev=libdir ;;
1539  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1540    libdir=$ac_optarg ;;
1541
1542  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1543  | --libexe | --libex | --libe)
1544    ac_prev=libexecdir ;;
1545  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1546  | --libexe=* | --libex=* | --libe=*)
1547    libexecdir=$ac_optarg ;;
1548
1549  -localedir | --localedir | --localedi | --localed | --locale)
1550    ac_prev=localedir ;;
1551  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1552    localedir=$ac_optarg ;;
1553
1554  -localstatedir | --localstatedir | --localstatedi | --localstated \
1555  | --localstate | --localstat | --localsta | --localst | --locals)
1556    ac_prev=localstatedir ;;
1557  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1558  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1559    localstatedir=$ac_optarg ;;
1560
1561  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1562    ac_prev=mandir ;;
1563  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1564    mandir=$ac_optarg ;;
1565
1566  -nfp | --nfp | --nf)
1567    # Obsolete; use --without-fp.
1568    with_fp=no ;;
1569
1570  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1571  | --no-cr | --no-c | -n)
1572    no_create=yes ;;
1573
1574  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1575  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1576    no_recursion=yes ;;
1577
1578  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1579  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1580  | --oldin | --oldi | --old | --ol | --o)
1581    ac_prev=oldincludedir ;;
1582  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1583  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1584  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1585    oldincludedir=$ac_optarg ;;
1586
1587  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1588    ac_prev=prefix ;;
1589  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1590    prefix=$ac_optarg ;;
1591
1592  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1593  | --program-pre | --program-pr | --program-p)
1594    ac_prev=program_prefix ;;
1595  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1596  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1597    program_prefix=$ac_optarg ;;
1598
1599  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1600  | --program-suf | --program-su | --program-s)
1601    ac_prev=program_suffix ;;
1602  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1603  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1604    program_suffix=$ac_optarg ;;
1605
1606  -program-transform-name | --program-transform-name \
1607  | --program-transform-nam | --program-transform-na \
1608  | --program-transform-n | --program-transform- \
1609  | --program-transform | --program-transfor \
1610  | --program-transfo | --program-transf \
1611  | --program-trans | --program-tran \
1612  | --progr-tra | --program-tr | --program-t)
1613    ac_prev=program_transform_name ;;
1614  -program-transform-name=* | --program-transform-name=* \
1615  | --program-transform-nam=* | --program-transform-na=* \
1616  | --program-transform-n=* | --program-transform-=* \
1617  | --program-transform=* | --program-transfor=* \
1618  | --program-transfo=* | --program-transf=* \
1619  | --program-trans=* | --program-tran=* \
1620  | --progr-tra=* | --program-tr=* | --program-t=*)
1621    program_transform_name=$ac_optarg ;;
1622
1623  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1624    ac_prev=pdfdir ;;
1625  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1626    pdfdir=$ac_optarg ;;
1627
1628  -psdir | --psdir | --psdi | --psd | --ps)
1629    ac_prev=psdir ;;
1630  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1631    psdir=$ac_optarg ;;
1632
1633  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1634  | -silent | --silent | --silen | --sile | --sil)
1635    silent=yes ;;
1636
1637  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1638    ac_prev=sbindir ;;
1639  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1640  | --sbi=* | --sb=*)
1641    sbindir=$ac_optarg ;;
1642
1643  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1644  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1645  | --sharedst | --shareds | --shared | --share | --shar \
1646  | --sha | --sh)
1647    ac_prev=sharedstatedir ;;
1648  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1649  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1650  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1651  | --sha=* | --sh=*)
1652    sharedstatedir=$ac_optarg ;;
1653
1654  -site | --site | --sit)
1655    ac_prev=site ;;
1656  -site=* | --site=* | --sit=*)
1657    site=$ac_optarg ;;
1658
1659  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1660    ac_prev=srcdir ;;
1661  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1662    srcdir=$ac_optarg ;;
1663
1664  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1665  | --syscon | --sysco | --sysc | --sys | --sy)
1666    ac_prev=sysconfdir ;;
1667  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1668  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1669    sysconfdir=$ac_optarg ;;
1670
1671  -target | --target | --targe | --targ | --tar | --ta | --t)
1672    ac_prev=target_alias ;;
1673  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1674    target_alias=$ac_optarg ;;
1675
1676  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1677    verbose=yes ;;
1678
1679  -version | --version | --versio | --versi | --vers | -V)
1680    ac_init_version=: ;;
1681
1682  -with-* | --with-*)
1683    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1684    # Reject names that are not valid shell variable names.
1685    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1686      as_fn_error $? "invalid package name: $ac_useropt"
1687    ac_useropt_orig=$ac_useropt
1688    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1689    case $ac_user_opts in
1690      *"
1691"with_$ac_useropt"
1692"*) ;;
1693      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1694	 ac_unrecognized_sep=', ';;
1695    esac
1696    eval with_$ac_useropt=\$ac_optarg ;;
1697
1698  -without-* | --without-*)
1699    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1700    # Reject names that are not valid shell variable names.
1701    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1702      as_fn_error $? "invalid package name: $ac_useropt"
1703    ac_useropt_orig=$ac_useropt
1704    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1705    case $ac_user_opts in
1706      *"
1707"with_$ac_useropt"
1708"*) ;;
1709      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1710	 ac_unrecognized_sep=', ';;
1711    esac
1712    eval with_$ac_useropt=no ;;
1713
1714  --x)
1715    # Obsolete; use --with-x.
1716    with_x=yes ;;
1717
1718  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1719  | --x-incl | --x-inc | --x-in | --x-i)
1720    ac_prev=x_includes ;;
1721  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1722  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1723    x_includes=$ac_optarg ;;
1724
1725  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1726  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1727    ac_prev=x_libraries ;;
1728  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1729  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1730    x_libraries=$ac_optarg ;;
1731
1732  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1733Try \`$0 --help' for more information"
1734    ;;
1735
1736  *=*)
1737    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1738    # Reject names that are not valid shell variable names.
1739    case $ac_envvar in #(
1740      '' | [0-9]* | *[!_$as_cr_alnum]* )
1741      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1742    esac
1743    eval $ac_envvar=\$ac_optarg
1744    export $ac_envvar ;;
1745
1746  *)
1747    # FIXME: should be removed in autoconf 3.0.
1748    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1749    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1750      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1751    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1752    ;;
1753
1754  esac
1755done
1756
1757if test -n "$ac_prev"; then
1758  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1759  as_fn_error $? "missing argument to $ac_option"
1760fi
1761
1762if test -n "$ac_unrecognized_opts"; then
1763  case $enable_option_checking in
1764    no) ;;
1765    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1766    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1767  esac
1768fi
1769
1770# Check all directory arguments for consistency.
1771for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1772		datadir sysconfdir sharedstatedir localstatedir includedir \
1773		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1774		libdir localedir mandir
1775do
1776  eval ac_val=\$$ac_var
1777  # Remove trailing slashes.
1778  case $ac_val in
1779    */ )
1780      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1781      eval $ac_var=\$ac_val;;
1782  esac
1783  # Be sure to have absolute directory names.
1784  case $ac_val in
1785    [\\/$]* | ?:[\\/]* )  continue;;
1786    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1787  esac
1788  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1789done
1790
1791# There might be people who depend on the old broken behavior: `$host'
1792# used to hold the argument of --host etc.
1793# FIXME: To remove some day.
1794build=$build_alias
1795host=$host_alias
1796target=$target_alias
1797
1798# FIXME: To remove some day.
1799if test "x$host_alias" != x; then
1800  if test "x$build_alias" = x; then
1801    cross_compiling=maybe
1802  elif test "x$build_alias" != "x$host_alias"; then
1803    cross_compiling=yes
1804  fi
1805fi
1806
1807ac_tool_prefix=
1808test -n "$host_alias" && ac_tool_prefix=$host_alias-
1809
1810test "$silent" = yes && exec 6>/dev/null
1811
1812
1813ac_pwd=`pwd` && test -n "$ac_pwd" &&
1814ac_ls_di=`ls -di .` &&
1815ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1816  as_fn_error $? "working directory cannot be determined"
1817test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1818  as_fn_error $? "pwd does not report name of working directory"
1819
1820
1821# Find the source files, if location was not specified.
1822if test -z "$srcdir"; then
1823  ac_srcdir_defaulted=yes
1824  # Try the directory containing this script, then the parent directory.
1825  ac_confdir=`$as_dirname -- "$as_myself" ||
1826$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1827	 X"$as_myself" : 'X\(//\)[^/]' \| \
1828	 X"$as_myself" : 'X\(//\)$' \| \
1829	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1830$as_echo X"$as_myself" |
1831    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1832	    s//\1/
1833	    q
1834	  }
1835	  /^X\(\/\/\)[^/].*/{
1836	    s//\1/
1837	    q
1838	  }
1839	  /^X\(\/\/\)$/{
1840	    s//\1/
1841	    q
1842	  }
1843	  /^X\(\/\).*/{
1844	    s//\1/
1845	    q
1846	  }
1847	  s/.*/./; q'`
1848  srcdir=$ac_confdir
1849  if test ! -r "$srcdir/$ac_unique_file"; then
1850    srcdir=..
1851  fi
1852else
1853  ac_srcdir_defaulted=no
1854fi
1855if test ! -r "$srcdir/$ac_unique_file"; then
1856  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1857  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1858fi
1859ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1860ac_abs_confdir=`(
1861	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1862	pwd)`
1863# When building in place, set srcdir=.
1864if test "$ac_abs_confdir" = "$ac_pwd"; then
1865  srcdir=.
1866fi
1867# Remove unnecessary trailing slashes from srcdir.
1868# Double slashes in file names in object file debugging info
1869# mess up M-x gdb in Emacs.
1870case $srcdir in
1871*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1872esac
1873for ac_var in $ac_precious_vars; do
1874  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1875  eval ac_env_${ac_var}_value=\$${ac_var}
1876  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1877  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1878done
1879
1880#
1881# Report the --help message.
1882#
1883if test "$ac_init_help" = "long"; then
1884  # Omit some internal or obsolete options to make the list less imposing.
1885  # This message is too long to be a string in the A/UX 3.1 sh.
1886  cat <<_ACEOF
1887\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1888
1889Usage: $0 [OPTION]... [VAR=VALUE]...
1890
1891To assign environment variables (e.g., CC, CFLAGS...), specify them as
1892VAR=VALUE.  See below for descriptions of some of the useful variables.
1893
1894Defaults for the options are specified in brackets.
1895
1896Configuration:
1897  -h, --help              display this help and exit
1898      --help=short        display options specific to this package
1899      --help=recursive    display the short help of all the included packages
1900  -V, --version           display version information and exit
1901  -q, --quiet, --silent   do not print \`checking ...' messages
1902      --cache-file=FILE   cache test results in FILE [disabled]
1903  -C, --config-cache      alias for \`--cache-file=config.cache'
1904  -n, --no-create         do not create output files
1905      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1906
1907Installation directories:
1908  --prefix=PREFIX         install architecture-independent files in PREFIX
1909                          [$ac_default_prefix]
1910  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1911                          [PREFIX]
1912
1913By default, \`make install' will install all the files in
1914\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1915an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1916for instance \`--prefix=\$HOME'.
1917
1918For better control, use the options below.
1919
1920Fine tuning of the installation directories:
1921  --bindir=DIR            user executables [EPREFIX/bin]
1922  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1923  --libexecdir=DIR        program executables [EPREFIX/libexec]
1924  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1925  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1926  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1927  --libdir=DIR            object code libraries [EPREFIX/lib]
1928  --includedir=DIR        C header files [PREFIX/include]
1929  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1930  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1931  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1932  --infodir=DIR           info documentation [DATAROOTDIR/info]
1933  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1934  --mandir=DIR            man documentation [DATAROOTDIR/man]
1935  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1936  --htmldir=DIR           html documentation [DOCDIR]
1937  --dvidir=DIR            dvi documentation [DOCDIR]
1938  --pdfdir=DIR            pdf documentation [DOCDIR]
1939  --psdir=DIR             ps documentation [DOCDIR]
1940_ACEOF
1941
1942  cat <<\_ACEOF
1943
1944X features:
1945  --x-includes=DIR    X include files are in DIR
1946  --x-libraries=DIR   X library files are in DIR
1947
1948System types:
1949  --build=BUILD     configure for building on BUILD [guessed]
1950  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1951  --target=TARGET   configure for building compilers for TARGET [HOST]
1952_ACEOF
1953fi
1954
1955if test -n "$ac_init_help"; then
1956  case $ac_init_help in
1957     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1958   esac
1959  cat <<\_ACEOF
1960
1961Optional Features:
1962  --disable-option-checking  ignore unrecognized --enable/--with options
1963  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1964  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1965  --enable-openjdk-only   suppress building custom source even if present
1966                          [disabled]
1967  --enable-debug          set the debug level to fastdebug (shorthand for
1968                          --with-debug-level=fastdebug) [disabled]
1969  --enable-headless-only  only build headless (no GUI) support [disabled]
1970  --disable-unlimited-crypto
1971                          Disable unlimited crypto policy [enabled]
1972  --disable-keep-packaged-modules
1973                          Do not keep packaged modules in jdk image [enable]
1974  --enable-static-build   enable static library build [disabled]
1975  --disable-warnings-as-errors
1976                          do not consider native warnings to be an error
1977                          [enabled]
1978  --enable-debug-symbols  Deprecated. Option is kept for backwards
1979                          compatibility and is ignored
1980  --enable-zip-debug-info Deprecated. Option is kept for backwards
1981                          compatibility and is ignored
1982  --enable-native-coverage
1983                          enable native compilation with code coverage
1984                          data[disabled]
1985  --enable-dtrace[=yes/no/auto]
1986                          enable dtrace. Default is auto, where dtrace is
1987                          enabled if all dependencies are present.
1988  --enable-aot[=yes/no/auto]
1989                          enable ahead of time compilation feature. Default is
1990                          auto, where aot is enabled if all dependencies are
1991                          present.
1992  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1993  --disable-freetype-bundling
1994                          disable bundling of the freetype library with the
1995                          build result [enabled on Windows or when using
1996                          --with-freetype, disabled otherwise]
1997  --enable-libffi-bundling
1998                          enable bundling of libffi.so to make the built JDK
1999                          runnable on more systems
2000  --enable-jtreg-failure-handler
2001                          forces build of the jtreg failure handler to be
2002                          enabled, missing dependencies become fatal errors.
2003                          Default is auto, where the failure handler is built
2004                          if all dependencies are present and otherwise just
2005                          disabled.
2006  --disable-generate-classlist
2007                          forces enabling or disabling of the generation of a
2008                          CDS classlist at build time. Default is to generate
2009                          it when either the server or client JVMs are built.
2010  --enable-sjavac         use sjavac to do fast incremental compiles
2011                          [disabled]
2012  --disable-javac-server  disable javac server [enabled]
2013  --enable-icecc          enable distribted compilation of native code using
2014                          icecc/icecream [disabled]
2015  --disable-precompiled-headers
2016                          disable using precompiled headers when compiling C++
2017                          [enabled]
2018  --enable-ccache         enable using ccache to speed up recompilations
2019                          [disabled]
2020
2021Optional Packages:
2022  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2023  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2024  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2025                          support it), e.g. --with-target-bits=32 [guessed]
2026  --with-custom-make-dir  Deprecated. Option is kept for backwards
2027                          compatibility and is ignored
2028  --with-jdk-variant      JDK variant to build (normal) [normal]
2029  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2030                          optimized) [release]
2031  --with-jvm-variants     JVM variants (separated by commas) to build
2032                          (server,client,minimal,core,zero,zeroshark,custom)
2033                          [server]
2034  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2035                          (arm64,aarch64) [aarch64]
2036  --with-devkit           use this devkit for compilers, tools and resources
2037  --with-sys-root         alias for --with-sysroot for backwards compatability
2038  --with-sysroot          use this directory as sysroot
2039  --with-tools-dir        alias for --with-toolchain-path for backwards
2040                          compatibility
2041  --with-toolchain-path   prepend these directories when searching for
2042                          toolchain binaries (compilers etc)
2043  --with-extra-path       prepend these directories to the default path
2044  --with-sdk-name         use the platform SDK of the given name. [macosx]
2045  --with-conf-name        use this as the name of the configuration [generated
2046                          from important configuration options]
2047  --with-output-sync      set make output sync type if supported by make.
2048                          [recurse]
2049  --with-default-make-target
2050                          set the default make target [exploded-image]
2051  --with-cacerts-file     specify alternative cacerts file
2052  --with-copyright-year   Set copyright year value for build [current year]
2053  --with-milestone        Deprecated. Option is kept for backwards
2054                          compatibility and is ignored
2055  --with-update-version   Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-user-release-suffix
2058                          Deprecated. Option is kept for backwards
2059                          compatibility and is ignored
2060  --with-build-number     Deprecated. Option is kept for backwards
2061                          compatibility and is ignored
2062  --with-version-string   Set version string [calculated]
2063  --with-version-pre      Set the base part of the version 'PRE' field
2064                          (pre-release identifier) ['internal']
2065  --with-version-opt      Set version 'OPT' field (build metadata)
2066                          [<timestamp>.<user>.<dirname>]
2067  --with-version-build    Set version 'BUILD' field (build number) [not
2068                          specified]
2069  --with-version-major    Set version 'MAJOR' field (first number) [current
2070                          source value]
2071  --with-version-minor    Set version 'MINOR' field (second number) [current
2072                          source value]
2073  --with-version-security Set version 'SECURITY' field (third number) [current
2074                          source value]
2075  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2076                          specified]
2077  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2078  --with-build-jdk        path to JDK of same version as is being built[the
2079                          newly built JDK]
2080  --with-add-source-root  Deprecated. Option is kept for backwards
2081                          compatibility and is ignored
2082  --with-override-source-root
2083                          Deprecated. Option is kept for backwards
2084                          compatibility and is ignored
2085  --with-adds-and-overrides
2086                          Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-override-langtools
2089                          Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-override-corba   Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-jaxp    Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-jaxws   Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-hotspot Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-nashorn Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-jdk     Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-import_hotspot   Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-import-modules   import a set of prebuilt modules either as a zip
2106                          file or an exploded directory
2107  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2108                          to show possible values [platform dependent]
2109  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2110  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2111  --with-extra-ldflags    extra flags to be used when linking jdk
2112  --with-toolchain-version
2113                          the version of the toolchain to look for, use
2114                          '--help' to show possible values [platform
2115                          dependent]
2116  --with-build-devkit     Devkit to use for the build platform toolchain
2117  --with-jtreg            Regression Test Harness [probed]
2118  --with-abi-profile      specify ABI profile for ARM builds
2119                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2120                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2121                          [toolchain dependent]
2122  --with-native-debug-symbols
2123                          set the native debug symbol configuration (none,
2124                          internal, external, zipped) [varying]
2125  --with-stdc++lib=<static>,<dynamic>,<default>
2126                          force linking of the C++ runtime on Linux to either
2127                          static or dynamic, default is static with dynamic as
2128                          fallback
2129  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2130                          (Windows only) [probed]
2131  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2132                          (Windows only) [probed]
2133  --with-x                use the X Window System
2134  --with-cups             specify prefix directory for the cups package
2135                          (expecting the headers under PATH/include)
2136  --with-cups-include     specify directory for the cups include files
2137  --with-freetype         specify prefix directory for the freetype package
2138                          (expecting the libraries under PATH/lib and the
2139                          headers under PATH/include)
2140  --with-freetype-include specify directory for the freetype include files
2141  --with-freetype-lib     specify directory for the freetype library
2142  --with-freetype-src     specify directory with freetype sources to
2143                          automatically build the library (experimental,
2144                          Windows-only)
2145  --with-alsa             specify prefix directory for the alsa package
2146                          (expecting the libraries under PATH/lib and the
2147                          headers under PATH/include)
2148  --with-alsa-include     specify directory for the alsa include files
2149  --with-alsa-lib         specify directory for the alsa library
2150  --with-libffi           specify prefix directory for the libffi package
2151                          (expecting the libraries under PATH/lib and the
2152                          headers under PATH/include)
2153  --with-libffi-include   specify directory for the libffi include files
2154  --with-libffi-lib       specify directory for the libffi library
2155  --with-libjpeg          use libjpeg from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-giflib           use giflib from build system or OpenJDK source
2158                          (system, bundled) [bundled]
2159  --with-libpng           use libpng from build system or OpenJDK source
2160                          (system, bundled) [bundled]
2161  --with-zlib             use zlib from build system or OpenJDK source
2162                          (system, bundled) [bundled]
2163  --with-lcms             use lcms2 from build system or OpenJDK source
2164                          (system, bundled) [bundled]
2165  --with-dxsdk            Deprecated. Option is kept for backwards
2166                          compatibility and is ignored
2167  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2168                          compatibility and is ignored
2169  --with-dxsdk-include    Deprecated. Option is kept for backwards
2170                          compatibility and is ignored
2171  --with-libelf           specify prefix directory for the libelf package
2172                          (expecting the libraries under PATH/lib and the
2173                          headers under PATH/include)
2174  --with-libelf-include   specify directory for the libelf include files
2175  --with-libelf-lib       specify directory for the libelf library
2176  --with-jvm-features     additional JVM features to enable (separated by
2177                          comma), use '--help' to show possible values [none]
2178  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2179                          compatibility and is ignored
2180  --with-num-cores        number of cores in the build system, e.g.
2181                          --with-num-cores=8 [probed]
2182  --with-memory-size      memory (in MB) available in the build system, e.g.
2183                          --with-memory-size=1024 [probed]
2184  --with-jobs             number of parallel jobs to let make run [calculated
2185                          based on cores and memory]
2186  --with-test-jobs        number of parallel tests jobs to run [based on build
2187                          jobs]
2188  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2189                          invocations of boot JDK, overriding the default
2190                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2191                          -enableassertions"
2192  --with-sjavac-server-java
2193                          use this java binary for running the sjavac
2194                          background server [Boot JDK java]
2195  --with-ccache-dir       where to store ccache files [~/.ccache]
2196
2197Some influential environment variables:
2198  BASENAME    Override default value for BASENAME
2199  BASH        Override default value for BASH
2200  CAT         Override default value for CAT
2201  CHMOD       Override default value for CHMOD
2202  CMP         Override default value for CMP
2203  COMM        Override default value for COMM
2204  CP          Override default value for CP
2205  CUT         Override default value for CUT
2206  DATE        Override default value for DATE
2207  DIFF        Override default value for DIFF
2208  DIRNAME     Override default value for DIRNAME
2209  ECHO        Override default value for ECHO
2210  EXPR        Override default value for EXPR
2211  FILE        Override default value for FILE
2212  FIND        Override default value for FIND
2213  HEAD        Override default value for HEAD
2214  GUNZIP      Override default value for GUNZIP
2215  GZIP        Override default value for GZIP
2216  LN          Override default value for LN
2217  LS          Override default value for LS
2218  MKDIR       Override default value for MKDIR
2219  MKTEMP      Override default value for MKTEMP
2220  MV          Override default value for MV
2221  NAWK        Override default value for NAWK
2222  PRINTF      Override default value for PRINTF
2223  RM          Override default value for RM
2224  RMDIR       Override default value for RMDIR
2225  SH          Override default value for SH
2226  SORT        Override default value for SORT
2227  TAIL        Override default value for TAIL
2228  TAR         Override default value for TAR
2229  TEE         Override default value for TEE
2230  TOUCH       Override default value for TOUCH
2231  TR          Override default value for TR
2232  UNAME       Override default value for UNAME
2233  UNIQ        Override default value for UNIQ
2234  WC          Override default value for WC
2235  WHICH       Override default value for WHICH
2236  XARGS       Override default value for XARGS
2237  AWK         Override default value for AWK
2238  GREP        Override default value for GREP
2239  EGREP       Override default value for EGREP
2240  FGREP       Override default value for FGREP
2241  SED         Override default value for SED
2242  CYGPATH     Override default value for CYGPATH
2243  READLINK    Override default value for READLINK
2244  DF          Override default value for DF
2245  CPIO        Override default value for CPIO
2246  NICE        Override default value for NICE
2247  MAKE        Override default value for MAKE
2248  UNZIP       Override default value for UNZIP
2249  ZIPEXE      Override default value for ZIPEXE
2250  LDD         Override default value for LDD
2251  OTOOL       Override default value for OTOOL
2252  READELF     Override default value for READELF
2253  HG          Override default value for HG
2254  STAT        Override default value for STAT
2255  TIME        Override default value for TIME
2256  DTRACE      Override default value for DTRACE
2257  PATCH       Override default value for PATCH
2258  DSYMUTIL    Override default value for DSYMUTIL
2259  XATTR       Override default value for XATTR
2260  CODESIGN    Override default value for CODESIGN
2261  SETFILE     Override default value for SETFILE
2262  PKG_CONFIG  path to pkg-config utility
2263  JAVA        Override default value for JAVA
2264  JAVAC       Override default value for JAVAC
2265  JAVAH       Override default value for JAVAH
2266  JAR         Override default value for JAR
2267  JARSIGNER   Override default value for JARSIGNER
2268  CC          C compiler command
2269  CFLAGS      C compiler flags
2270  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2271              nonstandard directory <lib dir>
2272  LIBS        libraries to pass to the linker, e.g. -l<library>
2273  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2274              you have headers in a nonstandard directory <include dir>
2275  CXX         C++ compiler command
2276  CXXFLAGS    C++ compiler flags
2277  CPP         C preprocessor
2278  CXXCPP      C++ preprocessor
2279  AS          Override default value for AS
2280  AR          Override default value for AR
2281  LIPO        Override default value for LIPO
2282  STRIP       Override default value for STRIP
2283  NM          Override default value for NM
2284  GNM         Override default value for GNM
2285  OBJCOPY     Override default value for OBJCOPY
2286  OBJDUMP     Override default value for OBJDUMP
2287  BUILD_CC    Override default value for BUILD_CC
2288  BUILD_CXX   Override default value for BUILD_CXX
2289  BUILD_NM    Override default value for BUILD_NM
2290  BUILD_AR    Override default value for BUILD_AR
2291  BUILD_OBJCOPY
2292              Override default value for BUILD_OBJCOPY
2293  BUILD_STRIP Override default value for BUILD_STRIP
2294  JTREGEXE    Override default value for JTREGEXE
2295  XMKMF       Path to xmkmf, Makefile generator for X Window System
2296  FREETYPE_CFLAGS
2297              C compiler flags for FREETYPE, overriding pkg-config
2298  FREETYPE_LIBS
2299              linker flags for FREETYPE, overriding pkg-config
2300  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2301  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2302  LIBFFI_CFLAGS
2303              C compiler flags for LIBFFI, overriding pkg-config
2304  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2305  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2306  PNG_LIBS    linker flags for PNG, overriding pkg-config
2307  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2308  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2309  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2310  ELF_LIBS    linker flags for ELF, overriding pkg-config
2311  ICECC_CMD   Override default value for ICECC_CMD
2312  ICECC_CREATE_ENV
2313              Override default value for ICECC_CREATE_ENV
2314  ICECC_WRAPPER
2315              Override default value for ICECC_WRAPPER
2316  CCACHE      Override default value for CCACHE
2317
2318Use these variables to override the choices made by `configure' or to help
2319it to find libraries and programs with nonstandard names/locations.
2320
2321Report bugs to <build-dev@openjdk.java.net>.
2322OpenJDK home page: <http://openjdk.java.net>.
2323_ACEOF
2324ac_status=$?
2325fi
2326
2327if test "$ac_init_help" = "recursive"; then
2328  # If there are subdirs, report their specific --help.
2329  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2330    test -d "$ac_dir" ||
2331      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2332      continue
2333    ac_builddir=.
2334
2335case "$ac_dir" in
2336.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2337*)
2338  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2339  # A ".." for each directory in $ac_dir_suffix.
2340  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2341  case $ac_top_builddir_sub in
2342  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2343  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2344  esac ;;
2345esac
2346ac_abs_top_builddir=$ac_pwd
2347ac_abs_builddir=$ac_pwd$ac_dir_suffix
2348# for backward compatibility:
2349ac_top_builddir=$ac_top_build_prefix
2350
2351case $srcdir in
2352  .)  # We are building in place.
2353    ac_srcdir=.
2354    ac_top_srcdir=$ac_top_builddir_sub
2355    ac_abs_top_srcdir=$ac_pwd ;;
2356  [\\/]* | ?:[\\/]* )  # Absolute name.
2357    ac_srcdir=$srcdir$ac_dir_suffix;
2358    ac_top_srcdir=$srcdir
2359    ac_abs_top_srcdir=$srcdir ;;
2360  *) # Relative name.
2361    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2362    ac_top_srcdir=$ac_top_build_prefix$srcdir
2363    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2364esac
2365ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2366
2367    cd "$ac_dir" || { ac_status=$?; continue; }
2368    # Check for guested configure.
2369    if test -f "$ac_srcdir/configure.gnu"; then
2370      echo &&
2371      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2372    elif test -f "$ac_srcdir/configure"; then
2373      echo &&
2374      $SHELL "$ac_srcdir/configure" --help=recursive
2375    else
2376      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2377    fi || ac_status=$?
2378    cd "$ac_pwd" || { ac_status=$?; break; }
2379  done
2380fi
2381
2382test -n "$ac_init_help" && exit $ac_status
2383if $ac_init_version; then
2384  cat <<\_ACEOF
2385OpenJDK configure jdk9
2386generated by GNU Autoconf 2.69
2387
2388Copyright (C) 2012 Free Software Foundation, Inc.
2389This configure script is free software; the Free Software Foundation
2390gives unlimited permission to copy, distribute and modify it.
2391_ACEOF
2392  exit
2393fi
2394
2395## ------------------------ ##
2396## Autoconf initialization. ##
2397## ------------------------ ##
2398
2399# ac_fn_c_try_compile LINENO
2400# --------------------------
2401# Try to compile conftest.$ac_ext, and return whether this succeeded.
2402ac_fn_c_try_compile ()
2403{
2404  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2405  rm -f conftest.$ac_objext
2406  if { { ac_try="$ac_compile"
2407case "(($ac_try" in
2408  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2409  *) ac_try_echo=$ac_try;;
2410esac
2411eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2412$as_echo "$ac_try_echo"; } >&5
2413  (eval "$ac_compile") 2>conftest.err
2414  ac_status=$?
2415  if test -s conftest.err; then
2416    grep -v '^ *+' conftest.err >conftest.er1
2417    cat conftest.er1 >&5
2418    mv -f conftest.er1 conftest.err
2419  fi
2420  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2421  test $ac_status = 0; } && {
2422	 test -z "$ac_c_werror_flag" ||
2423	 test ! -s conftest.err
2424       } && test -s conftest.$ac_objext; then :
2425  ac_retval=0
2426else
2427  $as_echo "$as_me: failed program was:" >&5
2428sed 's/^/| /' conftest.$ac_ext >&5
2429
2430	ac_retval=1
2431fi
2432  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2433  as_fn_set_status $ac_retval
2434
2435} # ac_fn_c_try_compile
2436
2437# ac_fn_cxx_try_compile LINENO
2438# ----------------------------
2439# Try to compile conftest.$ac_ext, and return whether this succeeded.
2440ac_fn_cxx_try_compile ()
2441{
2442  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2443  rm -f conftest.$ac_objext
2444  if { { ac_try="$ac_compile"
2445case "(($ac_try" in
2446  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2447  *) ac_try_echo=$ac_try;;
2448esac
2449eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2450$as_echo "$ac_try_echo"; } >&5
2451  (eval "$ac_compile") 2>conftest.err
2452  ac_status=$?
2453  if test -s conftest.err; then
2454    grep -v '^ *+' conftest.err >conftest.er1
2455    cat conftest.er1 >&5
2456    mv -f conftest.er1 conftest.err
2457  fi
2458  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2459  test $ac_status = 0; } && {
2460	 test -z "$ac_cxx_werror_flag" ||
2461	 test ! -s conftest.err
2462       } && test -s conftest.$ac_objext; then :
2463  ac_retval=0
2464else
2465  $as_echo "$as_me: failed program was:" >&5
2466sed 's/^/| /' conftest.$ac_ext >&5
2467
2468	ac_retval=1
2469fi
2470  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2471  as_fn_set_status $ac_retval
2472
2473} # ac_fn_cxx_try_compile
2474
2475# ac_fn_c_try_cpp LINENO
2476# ----------------------
2477# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2478ac_fn_c_try_cpp ()
2479{
2480  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2481  if { { ac_try="$ac_cpp conftest.$ac_ext"
2482case "(($ac_try" in
2483  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2484  *) ac_try_echo=$ac_try;;
2485esac
2486eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2487$as_echo "$ac_try_echo"; } >&5
2488  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2489  ac_status=$?
2490  if test -s conftest.err; then
2491    grep -v '^ *+' conftest.err >conftest.er1
2492    cat conftest.er1 >&5
2493    mv -f conftest.er1 conftest.err
2494  fi
2495  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2496  test $ac_status = 0; } > conftest.i && {
2497	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2498	 test ! -s conftest.err
2499       }; then :
2500  ac_retval=0
2501else
2502  $as_echo "$as_me: failed program was:" >&5
2503sed 's/^/| /' conftest.$ac_ext >&5
2504
2505    ac_retval=1
2506fi
2507  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2508  as_fn_set_status $ac_retval
2509
2510} # ac_fn_c_try_cpp
2511
2512# ac_fn_cxx_try_cpp LINENO
2513# ------------------------
2514# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2515ac_fn_cxx_try_cpp ()
2516{
2517  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2518  if { { ac_try="$ac_cpp conftest.$ac_ext"
2519case "(($ac_try" in
2520  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2521  *) ac_try_echo=$ac_try;;
2522esac
2523eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2524$as_echo "$ac_try_echo"; } >&5
2525  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2526  ac_status=$?
2527  if test -s conftest.err; then
2528    grep -v '^ *+' conftest.err >conftest.er1
2529    cat conftest.er1 >&5
2530    mv -f conftest.er1 conftest.err
2531  fi
2532  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2533  test $ac_status = 0; } > conftest.i && {
2534	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2535	 test ! -s conftest.err
2536       }; then :
2537  ac_retval=0
2538else
2539  $as_echo "$as_me: failed program was:" >&5
2540sed 's/^/| /' conftest.$ac_ext >&5
2541
2542    ac_retval=1
2543fi
2544  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2545  as_fn_set_status $ac_retval
2546
2547} # ac_fn_cxx_try_cpp
2548
2549# ac_fn_c_try_link LINENO
2550# -----------------------
2551# Try to link conftest.$ac_ext, and return whether this succeeded.
2552ac_fn_c_try_link ()
2553{
2554  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2555  rm -f conftest.$ac_objext conftest$ac_exeext
2556  if { { ac_try="$ac_link"
2557case "(($ac_try" in
2558  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2559  *) ac_try_echo=$ac_try;;
2560esac
2561eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2562$as_echo "$ac_try_echo"; } >&5
2563  (eval "$ac_link") 2>conftest.err
2564  ac_status=$?
2565  if test -s conftest.err; then
2566    grep -v '^ *+' conftest.err >conftest.er1
2567    cat conftest.er1 >&5
2568    mv -f conftest.er1 conftest.err
2569  fi
2570  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2571  test $ac_status = 0; } && {
2572	 test -z "$ac_c_werror_flag" ||
2573	 test ! -s conftest.err
2574       } && test -s conftest$ac_exeext && {
2575	 test "$cross_compiling" = yes ||
2576	 test -x conftest$ac_exeext
2577       }; then :
2578  ac_retval=0
2579else
2580  $as_echo "$as_me: failed program was:" >&5
2581sed 's/^/| /' conftest.$ac_ext >&5
2582
2583	ac_retval=1
2584fi
2585  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2586  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2587  # interfere with the next link command; also delete a directory that is
2588  # left behind by Apple's compiler.  We do this before executing the actions.
2589  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2590  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2591  as_fn_set_status $ac_retval
2592
2593} # ac_fn_c_try_link
2594
2595# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2596# ---------------------------------------------------------
2597# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2598# the include files in INCLUDES and setting the cache variable VAR
2599# accordingly.
2600ac_fn_cxx_check_header_mongrel ()
2601{
2602  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2603  if eval \${$3+:} false; then :
2604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2605$as_echo_n "checking for $2... " >&6; }
2606if eval \${$3+:} false; then :
2607  $as_echo_n "(cached) " >&6
2608fi
2609eval ac_res=\$$3
2610	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2611$as_echo "$ac_res" >&6; }
2612else
2613  # Is the header compilable?
2614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2615$as_echo_n "checking $2 usability... " >&6; }
2616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2617/* end confdefs.h.  */
2618$4
2619#include <$2>
2620_ACEOF
2621if ac_fn_cxx_try_compile "$LINENO"; then :
2622  ac_header_compiler=yes
2623else
2624  ac_header_compiler=no
2625fi
2626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2628$as_echo "$ac_header_compiler" >&6; }
2629
2630# Is the header present?
2631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2632$as_echo_n "checking $2 presence... " >&6; }
2633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2634/* end confdefs.h.  */
2635#include <$2>
2636_ACEOF
2637if ac_fn_cxx_try_cpp "$LINENO"; then :
2638  ac_header_preproc=yes
2639else
2640  ac_header_preproc=no
2641fi
2642rm -f conftest.err conftest.i conftest.$ac_ext
2643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2644$as_echo "$ac_header_preproc" >&6; }
2645
2646# So?  What about this header?
2647case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2648  yes:no: )
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2650$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2652$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2653    ;;
2654  no:yes:* )
2655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2656$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2657    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2658$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2659    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2660$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2661    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2662$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2663    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2664$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2665( $as_echo "## ----------------------------------------- ##
2666## Report this to build-dev@openjdk.java.net ##
2667## ----------------------------------------- ##"
2668     ) | sed "s/^/$as_me: WARNING:     /" >&2
2669    ;;
2670esac
2671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2672$as_echo_n "checking for $2... " >&6; }
2673if eval \${$3+:} false; then :
2674  $as_echo_n "(cached) " >&6
2675else
2676  eval "$3=\$ac_header_compiler"
2677fi
2678eval ac_res=\$$3
2679	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2680$as_echo "$ac_res" >&6; }
2681fi
2682  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2683
2684} # ac_fn_cxx_check_header_mongrel
2685
2686# ac_fn_cxx_try_run LINENO
2687# ------------------------
2688# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2689# that executables *can* be run.
2690ac_fn_cxx_try_run ()
2691{
2692  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2693  if { { ac_try="$ac_link"
2694case "(($ac_try" in
2695  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2696  *) ac_try_echo=$ac_try;;
2697esac
2698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2699$as_echo "$ac_try_echo"; } >&5
2700  (eval "$ac_link") 2>&5
2701  ac_status=$?
2702  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2703  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2704  { { case "(($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_try") 2>&5
2711  ac_status=$?
2712  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2713  test $ac_status = 0; }; }; then :
2714  ac_retval=0
2715else
2716  $as_echo "$as_me: program exited with status $ac_status" >&5
2717       $as_echo "$as_me: failed program was:" >&5
2718sed 's/^/| /' conftest.$ac_ext >&5
2719
2720       ac_retval=$ac_status
2721fi
2722  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2723  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2724  as_fn_set_status $ac_retval
2725
2726} # ac_fn_cxx_try_run
2727
2728# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2729# ---------------------------------------------------------
2730# Tests whether HEADER exists and can be compiled using the include files in
2731# INCLUDES, setting the cache variable VAR accordingly.
2732ac_fn_cxx_check_header_compile ()
2733{
2734  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2736$as_echo_n "checking for $2... " >&6; }
2737if eval \${$3+:} false; then :
2738  $as_echo_n "(cached) " >&6
2739else
2740  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2741/* end confdefs.h.  */
2742$4
2743#include <$2>
2744_ACEOF
2745if ac_fn_cxx_try_compile "$LINENO"; then :
2746  eval "$3=yes"
2747else
2748  eval "$3=no"
2749fi
2750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2751fi
2752eval ac_res=\$$3
2753	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2754$as_echo "$ac_res" >&6; }
2755  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2756
2757} # ac_fn_cxx_check_header_compile
2758
2759# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2760# ----------------------------------------------
2761# Tries to find the compile-time value of EXPR in a program that includes
2762# INCLUDES, setting VAR accordingly. Returns whether the value could be
2763# computed
2764ac_fn_cxx_compute_int ()
2765{
2766  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2767  if test "$cross_compiling" = yes; then
2768    # Depending upon the size, compute the lo and hi bounds.
2769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2770/* end confdefs.h.  */
2771$4
2772int
2773main ()
2774{
2775static int test_array [1 - 2 * !(($2) >= 0)];
2776test_array [0] = 0;
2777return test_array [0];
2778
2779  ;
2780  return 0;
2781}
2782_ACEOF
2783if ac_fn_cxx_try_compile "$LINENO"; then :
2784  ac_lo=0 ac_mid=0
2785  while :; do
2786    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2787/* end confdefs.h.  */
2788$4
2789int
2790main ()
2791{
2792static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2793test_array [0] = 0;
2794return test_array [0];
2795
2796  ;
2797  return 0;
2798}
2799_ACEOF
2800if ac_fn_cxx_try_compile "$LINENO"; then :
2801  ac_hi=$ac_mid; break
2802else
2803  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2804			if test $ac_lo -le $ac_mid; then
2805			  ac_lo= ac_hi=
2806			  break
2807			fi
2808			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2809fi
2810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2811  done
2812else
2813  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2814/* end confdefs.h.  */
2815$4
2816int
2817main ()
2818{
2819static int test_array [1 - 2 * !(($2) < 0)];
2820test_array [0] = 0;
2821return test_array [0];
2822
2823  ;
2824  return 0;
2825}
2826_ACEOF
2827if ac_fn_cxx_try_compile "$LINENO"; then :
2828  ac_hi=-1 ac_mid=-1
2829  while :; do
2830    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2831/* end confdefs.h.  */
2832$4
2833int
2834main ()
2835{
2836static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2837test_array [0] = 0;
2838return test_array [0];
2839
2840  ;
2841  return 0;
2842}
2843_ACEOF
2844if ac_fn_cxx_try_compile "$LINENO"; then :
2845  ac_lo=$ac_mid; break
2846else
2847  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2848			if test $ac_mid -le $ac_hi; then
2849			  ac_lo= ac_hi=
2850			  break
2851			fi
2852			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2853fi
2854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2855  done
2856else
2857  ac_lo= ac_hi=
2858fi
2859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2860fi
2861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2862# Binary search between lo and hi bounds.
2863while test "x$ac_lo" != "x$ac_hi"; do
2864  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2865  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2866/* end confdefs.h.  */
2867$4
2868int
2869main ()
2870{
2871static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2872test_array [0] = 0;
2873return test_array [0];
2874
2875  ;
2876  return 0;
2877}
2878_ACEOF
2879if ac_fn_cxx_try_compile "$LINENO"; then :
2880  ac_hi=$ac_mid
2881else
2882  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2883fi
2884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2885done
2886case $ac_lo in #((
2887?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2888'') ac_retval=1 ;;
2889esac
2890  else
2891    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2892/* end confdefs.h.  */
2893$4
2894static long int longval () { return $2; }
2895static unsigned long int ulongval () { return $2; }
2896#include <stdio.h>
2897#include <stdlib.h>
2898int
2899main ()
2900{
2901
2902  FILE *f = fopen ("conftest.val", "w");
2903  if (! f)
2904    return 1;
2905  if (($2) < 0)
2906    {
2907      long int i = longval ();
2908      if (i != ($2))
2909	return 1;
2910      fprintf (f, "%ld", i);
2911    }
2912  else
2913    {
2914      unsigned long int i = ulongval ();
2915      if (i != ($2))
2916	return 1;
2917      fprintf (f, "%lu", i);
2918    }
2919  /* Do not output a trailing newline, as this causes \r\n confusion
2920     on some platforms.  */
2921  return ferror (f) || fclose (f) != 0;
2922
2923  ;
2924  return 0;
2925}
2926_ACEOF
2927if ac_fn_cxx_try_run "$LINENO"; then :
2928  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2929else
2930  ac_retval=1
2931fi
2932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2933  conftest.$ac_objext conftest.beam conftest.$ac_ext
2934rm -f conftest.val
2935
2936  fi
2937  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2938  as_fn_set_status $ac_retval
2939
2940} # ac_fn_cxx_compute_int
2941
2942# ac_fn_cxx_try_link LINENO
2943# -------------------------
2944# Try to link conftest.$ac_ext, and return whether this succeeded.
2945ac_fn_cxx_try_link ()
2946{
2947  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2948  rm -f conftest.$ac_objext conftest$ac_exeext
2949  if { { ac_try="$ac_link"
2950case "(($ac_try" in
2951  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2952  *) ac_try_echo=$ac_try;;
2953esac
2954eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2955$as_echo "$ac_try_echo"; } >&5
2956  (eval "$ac_link") 2>conftest.err
2957  ac_status=$?
2958  if test -s conftest.err; then
2959    grep -v '^ *+' conftest.err >conftest.er1
2960    cat conftest.er1 >&5
2961    mv -f conftest.er1 conftest.err
2962  fi
2963  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2964  test $ac_status = 0; } && {
2965	 test -z "$ac_cxx_werror_flag" ||
2966	 test ! -s conftest.err
2967       } && test -s conftest$ac_exeext && {
2968	 test "$cross_compiling" = yes ||
2969	 test -x conftest$ac_exeext
2970       }; then :
2971  ac_retval=0
2972else
2973  $as_echo "$as_me: failed program was:" >&5
2974sed 's/^/| /' conftest.$ac_ext >&5
2975
2976	ac_retval=1
2977fi
2978  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2979  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2980  # interfere with the next link command; also delete a directory that is
2981  # left behind by Apple's compiler.  We do this before executing the actions.
2982  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2983  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2984  as_fn_set_status $ac_retval
2985
2986} # ac_fn_cxx_try_link
2987
2988# ac_fn_cxx_check_func LINENO FUNC VAR
2989# ------------------------------------
2990# Tests whether FUNC exists, setting the cache variable VAR accordingly
2991ac_fn_cxx_check_func ()
2992{
2993  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2995$as_echo_n "checking for $2... " >&6; }
2996if eval \${$3+:} false; then :
2997  $as_echo_n "(cached) " >&6
2998else
2999  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3000/* end confdefs.h.  */
3001/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3002   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3003#define $2 innocuous_$2
3004
3005/* System header to define __stub macros and hopefully few prototypes,
3006    which can conflict with char $2 (); below.
3007    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3008    <limits.h> exists even on freestanding compilers.  */
3009
3010#ifdef __STDC__
3011# include <limits.h>
3012#else
3013# include <assert.h>
3014#endif
3015
3016#undef $2
3017
3018/* Override any GCC internal prototype to avoid an error.
3019   Use char because int might match the return type of a GCC
3020   builtin and then its argument prototype would still apply.  */
3021#ifdef __cplusplus
3022extern "C"
3023#endif
3024char $2 ();
3025/* The GNU C library defines this for functions which it implements
3026    to always fail with ENOSYS.  Some functions are actually named
3027    something starting with __ and the normal name is an alias.  */
3028#if defined __stub_$2 || defined __stub___$2
3029choke me
3030#endif
3031
3032int
3033main ()
3034{
3035return $2 ();
3036  ;
3037  return 0;
3038}
3039_ACEOF
3040if ac_fn_cxx_try_link "$LINENO"; then :
3041  eval "$3=yes"
3042else
3043  eval "$3=no"
3044fi
3045rm -f core conftest.err conftest.$ac_objext \
3046    conftest$ac_exeext conftest.$ac_ext
3047fi
3048eval ac_res=\$$3
3049	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3050$as_echo "$ac_res" >&6; }
3051  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3052
3053} # ac_fn_cxx_check_func
3054
3055# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3056# -------------------------------------------------------
3057# Tests whether HEADER exists and can be compiled using the include files in
3058# INCLUDES, setting the cache variable VAR accordingly.
3059ac_fn_c_check_header_compile ()
3060{
3061  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3062  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3063$as_echo_n "checking for $2... " >&6; }
3064if eval \${$3+:} false; then :
3065  $as_echo_n "(cached) " >&6
3066else
3067  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3068/* end confdefs.h.  */
3069$4
3070#include <$2>
3071_ACEOF
3072if ac_fn_c_try_compile "$LINENO"; then :
3073  eval "$3=yes"
3074else
3075  eval "$3=no"
3076fi
3077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3078fi
3079eval ac_res=\$$3
3080	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3081$as_echo "$ac_res" >&6; }
3082  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3083
3084} # ac_fn_c_check_header_compile
3085cat >config.log <<_ACEOF
3086This file contains any messages produced by compilers while
3087running configure, to aid debugging if configure makes a mistake.
3088
3089It was created by OpenJDK $as_me jdk9, which was
3090generated by GNU Autoconf 2.69.  Invocation command line was
3091
3092  $ $0 $@
3093
3094_ACEOF
3095exec 5>>config.log
3096{
3097cat <<_ASUNAME
3098## --------- ##
3099## Platform. ##
3100## --------- ##
3101
3102hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3103uname -m = `(uname -m) 2>/dev/null || echo unknown`
3104uname -r = `(uname -r) 2>/dev/null || echo unknown`
3105uname -s = `(uname -s) 2>/dev/null || echo unknown`
3106uname -v = `(uname -v) 2>/dev/null || echo unknown`
3107
3108/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3109/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3110
3111/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3112/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3113/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3114/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3115/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3116/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3117/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3118
3119_ASUNAME
3120
3121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3122for as_dir in $PATH
3123do
3124  IFS=$as_save_IFS
3125  test -z "$as_dir" && as_dir=.
3126    $as_echo "PATH: $as_dir"
3127  done
3128IFS=$as_save_IFS
3129
3130} >&5
3131
3132cat >&5 <<_ACEOF
3133
3134
3135## ----------- ##
3136## Core tests. ##
3137## ----------- ##
3138
3139_ACEOF
3140
3141
3142# Keep a trace of the command line.
3143# Strip out --no-create and --no-recursion so they do not pile up.
3144# Strip out --silent because we don't want to record it for future runs.
3145# Also quote any args containing shell meta-characters.
3146# Make two passes to allow for proper duplicate-argument suppression.
3147ac_configure_args=
3148ac_configure_args0=
3149ac_configure_args1=
3150ac_must_keep_next=false
3151for ac_pass in 1 2
3152do
3153  for ac_arg
3154  do
3155    case $ac_arg in
3156    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3157    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3158    | -silent | --silent | --silen | --sile | --sil)
3159      continue ;;
3160    *\'*)
3161      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3162    esac
3163    case $ac_pass in
3164    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3165    2)
3166      as_fn_append ac_configure_args1 " '$ac_arg'"
3167      if test $ac_must_keep_next = true; then
3168	ac_must_keep_next=false # Got value, back to normal.
3169      else
3170	case $ac_arg in
3171	  *=* | --config-cache | -C | -disable-* | --disable-* \
3172	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3173	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3174	  | -with-* | --with-* | -without-* | --without-* | --x)
3175	    case "$ac_configure_args0 " in
3176	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3177	    esac
3178	    ;;
3179	  -* ) ac_must_keep_next=true ;;
3180	esac
3181      fi
3182      as_fn_append ac_configure_args " '$ac_arg'"
3183      ;;
3184    esac
3185  done
3186done
3187{ ac_configure_args0=; unset ac_configure_args0;}
3188{ ac_configure_args1=; unset ac_configure_args1;}
3189
3190# When interrupted or exit'd, cleanup temporary files, and complete
3191# config.log.  We remove comments because anyway the quotes in there
3192# would cause problems or look ugly.
3193# WARNING: Use '\'' to represent an apostrophe within the trap.
3194# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3195trap 'exit_status=$?
3196  # Save into config.log some information that might help in debugging.
3197  {
3198    echo
3199
3200    $as_echo "## ---------------- ##
3201## Cache variables. ##
3202## ---------------- ##"
3203    echo
3204    # The following way of writing the cache mishandles newlines in values,
3205(
3206  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3207    eval ac_val=\$$ac_var
3208    case $ac_val in #(
3209    *${as_nl}*)
3210      case $ac_var in #(
3211      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3212$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3213      esac
3214      case $ac_var in #(
3215      _ | IFS | as_nl) ;; #(
3216      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3217      *) { eval $ac_var=; unset $ac_var;} ;;
3218      esac ;;
3219    esac
3220  done
3221  (set) 2>&1 |
3222    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3223    *${as_nl}ac_space=\ *)
3224      sed -n \
3225	"s/'\''/'\''\\\\'\'''\''/g;
3226	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3227      ;; #(
3228    *)
3229      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3230      ;;
3231    esac |
3232    sort
3233)
3234    echo
3235
3236    $as_echo "## ----------------- ##
3237## Output variables. ##
3238## ----------------- ##"
3239    echo
3240    for ac_var in $ac_subst_vars
3241    do
3242      eval ac_val=\$$ac_var
3243      case $ac_val in
3244      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3245      esac
3246      $as_echo "$ac_var='\''$ac_val'\''"
3247    done | sort
3248    echo
3249
3250    if test -n "$ac_subst_files"; then
3251      $as_echo "## ------------------- ##
3252## File substitutions. ##
3253## ------------------- ##"
3254      echo
3255      for ac_var in $ac_subst_files
3256      do
3257	eval ac_val=\$$ac_var
3258	case $ac_val in
3259	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3260	esac
3261	$as_echo "$ac_var='\''$ac_val'\''"
3262      done | sort
3263      echo
3264    fi
3265
3266    if test -s confdefs.h; then
3267      $as_echo "## ----------- ##
3268## confdefs.h. ##
3269## ----------- ##"
3270      echo
3271      cat confdefs.h
3272      echo
3273    fi
3274    test "$ac_signal" != 0 &&
3275      $as_echo "$as_me: caught signal $ac_signal"
3276    $as_echo "$as_me: exit $exit_status"
3277  } >&5
3278  rm -f core *.core core.conftest.* &&
3279    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3280    exit $exit_status
3281' 0
3282for ac_signal in 1 2 13 15; do
3283  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3284done
3285ac_signal=0
3286
3287# confdefs.h avoids OS command line length limits that DEFS can exceed.
3288rm -f -r conftest* confdefs.h
3289
3290$as_echo "/* confdefs.h */" > confdefs.h
3291
3292# Predefined preprocessor variables.
3293
3294cat >>confdefs.h <<_ACEOF
3295#define PACKAGE_NAME "$PACKAGE_NAME"
3296_ACEOF
3297
3298cat >>confdefs.h <<_ACEOF
3299#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3300_ACEOF
3301
3302cat >>confdefs.h <<_ACEOF
3303#define PACKAGE_VERSION "$PACKAGE_VERSION"
3304_ACEOF
3305
3306cat >>confdefs.h <<_ACEOF
3307#define PACKAGE_STRING "$PACKAGE_STRING"
3308_ACEOF
3309
3310cat >>confdefs.h <<_ACEOF
3311#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3312_ACEOF
3313
3314cat >>confdefs.h <<_ACEOF
3315#define PACKAGE_URL "$PACKAGE_URL"
3316_ACEOF
3317
3318
3319# Let the site file select an alternate cache file if it wants to.
3320# Prefer an explicitly selected file to automatically selected ones.
3321ac_site_file1=NONE
3322ac_site_file2=NONE
3323if test -n "$CONFIG_SITE"; then
3324  # We do not want a PATH search for config.site.
3325  case $CONFIG_SITE in #((
3326    -*)  ac_site_file1=./$CONFIG_SITE;;
3327    */*) ac_site_file1=$CONFIG_SITE;;
3328    *)   ac_site_file1=./$CONFIG_SITE;;
3329  esac
3330elif test "x$prefix" != xNONE; then
3331  ac_site_file1=$prefix/share/config.site
3332  ac_site_file2=$prefix/etc/config.site
3333else
3334  ac_site_file1=$ac_default_prefix/share/config.site
3335  ac_site_file2=$ac_default_prefix/etc/config.site
3336fi
3337for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3338do
3339  test "x$ac_site_file" = xNONE && continue
3340  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3341    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3342$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3343    sed 's/^/| /' "$ac_site_file" >&5
3344    . "$ac_site_file" \
3345      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3346$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3347as_fn_error $? "failed to load site script $ac_site_file
3348See \`config.log' for more details" "$LINENO" 5; }
3349  fi
3350done
3351
3352if test -r "$cache_file"; then
3353  # Some versions of bash will fail to source /dev/null (special files
3354  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3355  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3356    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3357$as_echo "$as_me: loading cache $cache_file" >&6;}
3358    case $cache_file in
3359      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3360      *)                      . "./$cache_file";;
3361    esac
3362  fi
3363else
3364  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3365$as_echo "$as_me: creating cache $cache_file" >&6;}
3366  >$cache_file
3367fi
3368
3369# Check that the precious variables saved in the cache have kept the same
3370# value.
3371ac_cache_corrupted=false
3372for ac_var in $ac_precious_vars; do
3373  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3374  eval ac_new_set=\$ac_env_${ac_var}_set
3375  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3376  eval ac_new_val=\$ac_env_${ac_var}_value
3377  case $ac_old_set,$ac_new_set in
3378    set,)
3379      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3380$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3381      ac_cache_corrupted=: ;;
3382    ,set)
3383      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3384$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3385      ac_cache_corrupted=: ;;
3386    ,);;
3387    *)
3388      if test "x$ac_old_val" != "x$ac_new_val"; then
3389	# differences in whitespace do not lead to failure.
3390	ac_old_val_w=`echo x $ac_old_val`
3391	ac_new_val_w=`echo x $ac_new_val`
3392	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3393	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3394$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3395	  ac_cache_corrupted=:
3396	else
3397	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3398$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3399	  eval $ac_var=\$ac_old_val
3400	fi
3401	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3402$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3403	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3404$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3405      fi;;
3406  esac
3407  # Pass precious variables to config.status.
3408  if test "$ac_new_set" = set; then
3409    case $ac_new_val in
3410    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3411    *) ac_arg=$ac_var=$ac_new_val ;;
3412    esac
3413    case " $ac_configure_args " in
3414      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3415      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3416    esac
3417  fi
3418done
3419if $ac_cache_corrupted; then
3420  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3421$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3422  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3423$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3424  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3425fi
3426## -------------------- ##
3427## Main body of script. ##
3428## -------------------- ##
3429
3430ac_ext=c
3431ac_cpp='$CPP $CPPFLAGS'
3432ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3433ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3434ac_compiler_gnu=$ac_cv_c_compiler_gnu
3435
3436
3437
3438ac_aux_dir=
3439for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3440  if test -f "$ac_dir/install-sh"; then
3441    ac_aux_dir=$ac_dir
3442    ac_install_sh="$ac_aux_dir/install-sh -c"
3443    break
3444  elif test -f "$ac_dir/install.sh"; then
3445    ac_aux_dir=$ac_dir
3446    ac_install_sh="$ac_aux_dir/install.sh -c"
3447    break
3448  elif test -f "$ac_dir/shtool"; then
3449    ac_aux_dir=$ac_dir
3450    ac_install_sh="$ac_aux_dir/shtool install -c"
3451    break
3452  fi
3453done
3454if test -z "$ac_aux_dir"; then
3455  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
3456fi
3457
3458# These three variables are undocumented and unsupported,
3459# and are intended to be withdrawn in a future Autoconf release.
3460# They can cause serious problems if a builder's source tree is in a directory
3461# whose full name contains unusual characters.
3462ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3463ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3464ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3465
3466
3467# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3468
3469#
3470# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3471# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3472#
3473# This code is free software; you can redistribute it and/or modify it
3474# under the terms of the GNU General Public License version 2 only, as
3475# published by the Free Software Foundation.  Oracle designates this
3476# particular file as subject to the "Classpath" exception as provided
3477# by Oracle in the LICENSE file that accompanied this code.
3478#
3479# This code is distributed in the hope that it will be useful, but WITHOUT
3480# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3481# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3482# version 2 for more details (a copy is included in the LICENSE file that
3483# accompanied this code).
3484#
3485# You should have received a copy of the GNU General Public License version
3486# 2 along with this work; if not, write to the Free Software Foundation,
3487# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3488#
3489# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3490# or visit www.oracle.com if you need additional information or have any
3491# questions.
3492#
3493
3494#
3495# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3496#
3497# This program is free software; you can redistribute it and/or modify
3498# it under the terms of the GNU General Public License as published by
3499# the Free Software Foundation; either version 2 of the License, or
3500# (at your option) any later version.
3501#
3502# This program is distributed in the hope that it will be useful, but
3503# WITHOUT ANY WARRANTY; without even the implied warranty of
3504# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3505# General Public License for more details.
3506#
3507# You should have received a copy of the GNU General Public License
3508# along with this program; if not, write to the Free Software
3509# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3510#
3511# As a special exception to the GNU General Public License, if you
3512# distribute this file as part of a program that contains a
3513# configuration script generated by Autoconf, you may include it under
3514# the same distribution terms that you use for the rest of that program.
3515
3516# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3517# ----------------------------------
3518# PKG_PROG_PKG_CONFIG
3519
3520# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3521#
3522# Check to see whether a particular set of modules exists.  Similar
3523# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3524#
3525#
3526# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3527# this or PKG_CHECK_MODULES is called, or make sure to call
3528# PKG_CHECK_EXISTS manually
3529# --------------------------------------------------------------
3530
3531
3532
3533# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3534# ---------------------------------------------
3535# _PKG_CONFIG
3536
3537# _PKG_SHORT_ERRORS_SUPPORTED
3538# -----------------------------
3539# _PKG_SHORT_ERRORS_SUPPORTED
3540
3541
3542# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3543# [ACTION-IF-NOT-FOUND])
3544#
3545#
3546# Note that if there is a possibility the first call to
3547# PKG_CHECK_MODULES might not happen, you should be sure to include an
3548# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3549#
3550#
3551# --------------------------------------------------------------
3552# PKG_CHECK_MODULES
3553
3554
3555# Include these first...
3556#
3557# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3558# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3559#
3560# This code is free software; you can redistribute it and/or modify it
3561# under the terms of the GNU General Public License version 2 only, as
3562# published by the Free Software Foundation.  Oracle designates this
3563# particular file as subject to the "Classpath" exception as provided
3564# by Oracle in the LICENSE file that accompanied this code.
3565#
3566# This code is distributed in the hope that it will be useful, but WITHOUT
3567# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3568# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3569# version 2 for more details (a copy is included in the LICENSE file that
3570# accompanied this code).
3571#
3572# You should have received a copy of the GNU General Public License version
3573# 2 along with this work; if not, write to the Free Software Foundation,
3574# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3575#
3576# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3577# or visit www.oracle.com if you need additional information or have any
3578# questions.
3579#
3580
3581# Create a function/macro that takes a series of named arguments. The call is
3582# similar to AC_DEFUN, but the setup of the function looks like this:
3583# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3584# ... do something
3585#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3586# ])
3587# A star (*) in front of a named argument means that it is required and it's
3588# presence will be verified. To pass e.g. the first value as a normal indexed
3589# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3590# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3591# "ARG_FOO".
3592#
3593# The generated function can be called like this:
3594# MYFUNC(FOO: [foo-val],
3595#     BAR: [
3596#         $ECHO hello world
3597#     ])
3598# Note that the argument value must start on the same line as the argument name.
3599#
3600# Argument 1: Name of the function to define
3601# Argument 2: List of legal named arguments, with a * prefix for required arguments
3602# Argument 3: Argument array to treat as named, typically $@
3603# Argument 4: The main function body
3604
3605
3606# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3607# If so, then append $1 to $2 \
3608# Also set JVM_ARG_OK to true/false depending on outcome.
3609
3610
3611# Appends a string to a path variable, only adding the : when needed.
3612
3613
3614# Prepends a string to a path variable, only adding the : when needed.
3615
3616
3617# This will make sure the given variable points to a full and proper
3618# path. This means:
3619# 1) There will be no spaces in the path. On unix platforms,
3620#    spaces in the path will result in an error. On Windows,
3621#    the path will be rewritten using short-style to be space-free.
3622# 2) The path will be absolute, and it will be in unix-style (on
3623#     cygwin).
3624# $1: The name of the variable to fix
3625
3626
3627# This will make sure the given variable points to a executable
3628# with a full and proper 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# Any arguments given to the executable is preserved.
3635# If the input variable does not have a directory specification, then
3636# it need to be in the PATH.
3637# $1: The name of the variable to fix
3638
3639
3640
3641
3642# Register a --with argument but mark it as deprecated
3643# $1: The name of the with argument to deprecate, not including --with-
3644
3645
3646# Register a --enable argument but mark it as deprecated
3647# $1: The name of the with argument to deprecate, not including --enable-
3648# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3649# $3: Messages to user.
3650
3651
3652
3653
3654# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3655# $1: variable to check
3656
3657
3658# Check that there are no unprocessed overridden variables left.
3659# If so, they are an incorrect argument and we will exit with an error.
3660
3661
3662# Setup a tool for the given variable. If correctly specified by the user,
3663# use that value, otherwise search for the tool using the supplied code snippet.
3664# $1: variable to set
3665# $2: code snippet to call to look for the tool
3666# $3: code snippet to call if variable was used to find tool
3667
3668
3669# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3670# $1: variable to set
3671# $2: executable name (or list of names) to look for
3672# $3: [path]
3673
3674
3675# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3676# $1: variable to set
3677# $2: executable name (or list of names) to look for
3678
3679
3680# Like BASIC_PATH_PROGS but fails if no tool was found.
3681# $1: variable to set
3682# $2: executable name (or list of names) to look for
3683# $3: [path]
3684
3685
3686# Like BASIC_SETUP_TOOL but fails if no tool was found.
3687# $1: variable to set
3688# $2: autoconf macro to call to look for the special tool
3689
3690
3691# Setup the most fundamental tools that relies on not much else to set up,
3692# but is used by much of the early bootstrap code.
3693
3694
3695# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3696
3697
3698# Evaluates platform specific overrides for devkit variables.
3699# $1: Name of variable
3700
3701
3702
3703
3704
3705
3706#%%% Simple tools %%%
3707
3708# Check if we have found a usable version of make
3709# $1: the path to a potential make binary (or empty)
3710# $2: the description on how we found this
3711
3712
3713
3714
3715# Goes looking for a usable version of GNU make.
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726# Check if build directory is on local disk. If not possible to determine,
3727# we prefer to claim it's local.
3728# Argument 1: directory to test
3729# Argument 2: what to do if it is on local disk
3730# Argument 3: what to do otherwise (remote disk or failure)
3731
3732
3733# Check that source files have basic read permissions set. This might
3734# not be the case in cygwin in certain conditions.
3735
3736
3737
3738
3739# Check for support for specific options in bash
3740
3741
3742################################################################################
3743#
3744# Default make target
3745#
3746
3747
3748# Code to run after AC_OUTPUT
3749
3750
3751#
3752# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3753# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3754#
3755# This code is free software; you can redistribute it and/or modify it
3756# under the terms of the GNU General Public License version 2 only, as
3757# published by the Free Software Foundation.  Oracle designates this
3758# particular file as subject to the "Classpath" exception as provided
3759# by Oracle in the LICENSE file that accompanied this code.
3760#
3761# This code is distributed in the hope that it will be useful, but WITHOUT
3762# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3763# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3764# version 2 for more details (a copy is included in the LICENSE file that
3765# accompanied this code).
3766#
3767# You should have received a copy of the GNU General Public License version
3768# 2 along with this work; if not, write to the Free Software Foundation,
3769# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3770#
3771# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3772# or visit www.oracle.com if you need additional information or have any
3773# questions.
3774#
3775
3776
3777
3778
3779
3780# Helper function which possibly converts a path using DOS-style short mode.
3781# If so, the updated path is stored in $new_path.
3782# $1: The path to check
3783
3784
3785# Helper function which possibly converts a path using DOS-style short mode.
3786# If so, the updated path is stored in $new_path.
3787# $1: The path to check
3788
3789
3790# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3791# and could probably be heavily simplified. However, all changes in this
3792# area tend to need lot of testing in different scenarios, and in lack of
3793# proper unit testing, cleaning this up has not been deemed worth the effort
3794# at the moment.
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3805
3806
3807
3808
3809# ... then the rest
3810#
3811# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3812# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3813#
3814# This code is free software; you can redistribute it and/or modify it
3815# under the terms of the GNU General Public License version 2 only, as
3816# published by the Free Software Foundation.  Oracle designates this
3817# particular file as subject to the "Classpath" exception as provided
3818# by Oracle in the LICENSE file that accompanied this code.
3819#
3820# This code is distributed in the hope that it will be useful, but WITHOUT
3821# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3822# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3823# version 2 for more details (a copy is included in the LICENSE file that
3824# accompanied this code).
3825#
3826# You should have received a copy of the GNU General Public License version
3827# 2 along with this work; if not, write to the Free Software Foundation,
3828# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3829#
3830# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3831# or visit www.oracle.com if you need additional information or have any
3832# questions.
3833#
3834
3835########################################################################
3836# This file handles detection of the Boot JDK. The Boot JDK detection
3837# process has been developed as a response to solve a complex real-world
3838# problem. Initially, it was simple, but it has grown as platform after
3839# platform, idiosyncracy after idiosyncracy has been supported.
3840#
3841# The basic idea is this:
3842# 1) You need an acceptable *) JDK to use as a Boot JDK
3843# 2) There are several ways to locate a JDK, that are mostly platform
3844#    dependent **)
3845# 3) You can have multiple JDKs installed
3846# 4) If possible, configure should try to dig out an acceptable JDK
3847#    automatically, without having to resort to command-line options
3848#
3849# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3850#     javac) and not a JRE, etc.
3851#
3852# **) On Windows we typically use a well-known path.
3853#     On MacOSX we typically use the tool java_home.
3854#     On Linux we typically find javac in the $PATH, and then follow a
3855#     chain of symlinks that often ends up in a real JDK.
3856#
3857# This leads to the code where we check in different ways to locate a
3858# JDK, and if one is found, check if it is acceptable. If not, we print
3859# our reasons for rejecting it (useful when debugging non-working
3860# configure situations) and continue checking the next one.
3861########################################################################
3862
3863# Execute the check given as argument, and verify the result
3864# If the Boot JDK was previously found, do nothing
3865# $1 A command line (typically autoconf macro) to execute
3866
3867
3868# Test: Is bootjdk explicitly set by command line arguments?
3869
3870
3871# Test: Is $JAVA_HOME set?
3872
3873
3874# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3875
3876
3877# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3878# $1: Argument to the java_home binary (optional)
3879
3880
3881# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3882
3883
3884# Look for a jdk in the given path. If there are multiple, try to select the newest.
3885# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3886# $1 = Path to directory containing jdk installations.
3887# $2 = String to append to the found JDK directory to get the proper JDK home
3888
3889
3890# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3891# environmental variable as base for where to look.
3892# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3893
3894
3895# Test: Is there a JDK installed in default, well-known locations?
3896
3897
3898# Check that a command-line tool in the Boot JDK is correct
3899# $1 = name of variable to assign
3900# $2 = name of binary
3901
3902
3903###############################################################################
3904#
3905# We need a Boot JDK to bootstrap the build.
3906#
3907
3908
3909
3910
3911
3912# BUILD_JDK: the location of the latest JDK that can run
3913#   on the host system and supports the target class file version
3914#   generated in this JDK build.  This variable should only be
3915#   used after the launchers are built.
3916#
3917
3918# Execute the check given as argument, and verify the result.
3919# If the JDK was previously found, do nothing.
3920# $1 A command line (typically autoconf macro) to execute
3921
3922
3923# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3924# is different than the host system doing the build (e.g. cross-compilation),
3925# a special BUILD_JDK is built as part of the build process.  An external
3926# prebuilt BUILD_JDK can also be supplied.
3927
3928
3929#
3930# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3931# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3932#
3933# This code is free software; you can redistribute it and/or modify it
3934# under the terms of the GNU General Public License version 2 only, as
3935# published by the Free Software Foundation.  Oracle designates this
3936# particular file as subject to the "Classpath" exception as provided
3937# by Oracle in the LICENSE file that accompanied this code.
3938#
3939# This code is distributed in the hope that it will be useful, but WITHOUT
3940# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3941# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3942# version 2 for more details (a copy is included in the LICENSE file that
3943# accompanied this code).
3944#
3945# You should have received a copy of the GNU General Public License version
3946# 2 along with this work; if not, write to the Free Software Foundation,
3947# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3948#
3949# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3950# or visit www.oracle.com if you need additional information or have any
3951# questions.
3952#
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970################################################################################
3971#
3972# Runs icecc-create-env once and prints the error if it fails
3973#
3974# $1: arguments to icecc-create-env
3975# $2: log file
3976#
3977
3978
3979################################################################################
3980#
3981# Optionally enable distributed compilation of native code using icecc/icecream
3982#
3983
3984
3985
3986
3987
3988
3989
3990#
3991# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3992# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3993#
3994# This code is free software; you can redistribute it and/or modify it
3995# under the terms of the GNU General Public License version 2 only, as
3996# published by the Free Software Foundation.  Oracle designates this
3997# particular file as subject to the "Classpath" exception as provided
3998# by Oracle in the LICENSE file that accompanied this code.
3999#
4000# This code is distributed in the hope that it will be useful, but WITHOUT
4001# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4002# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4003# version 2 for more details (a copy is included in the LICENSE file that
4004# accompanied this code).
4005#
4006# You should have received a copy of the GNU General Public License version
4007# 2 along with this work; if not, write to the Free Software Foundation,
4008# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4009#
4010# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4011# or visit www.oracle.com if you need additional information or have any
4012# questions.
4013#
4014
4015################################################################################
4016#
4017# Setup ABI profile (for arm)
4018#
4019
4020
4021# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4022# corresponding configure arguments instead
4023
4024
4025# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4026# that configure can use them while detecting compilers.
4027# TOOLCHAIN_TYPE is available here.
4028# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4029
4030
4031
4032
4033
4034
4035# Documentation on common flags used for solstudio in HIGHEST.
4036#
4037# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4038#          done with care, there are some assumptions below that need to
4039#          be understood about the use of pointers, and IEEE behavior.
4040#
4041# -fns: Use non-standard floating point mode (not IEEE 754)
4042# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4043# -fsingle: Use single precision floating point with 'float'
4044# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4045#   (Source with excessing pointer casting and data access with mixed
4046#    pointer types are not recommended)
4047# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4048#   (If you expect perfect errno behavior, do not use this)
4049# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4050# -xrestrict: Pointer parameters to functions do not overlap
4051#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4052#    If you pass in multiple pointers to the same data, do not use this)
4053# -xlibmil: Inline some library routines
4054#   (If you expect perfect errno behavior, do not use this)
4055# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4056#   (If you expect perfect errno behavior, do not use this)
4057#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4058
4059    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4060    # Bug?
4061    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4062    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4063    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4064    #fi
4065
4066
4067
4068
4069
4070
4071################################################################################
4072# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4073#      conditionals against.
4074# $2 - Optional prefix for each variable defined.
4075
4076
4077# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4078#                                  IF_FALSE: [RUN-IF-FALSE])
4079# ------------------------------------------------------------
4080# Check that the C compiler supports an argument
4081
4082
4083
4084
4085# FLAGS_CXX_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_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4094#                                IF_FALSE: [RUN-IF-FALSE])
4095# ------------------------------------------------------------
4096# Check that the C and C++ compilers support an argument
4097
4098
4099
4100
4101# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4102#                                   IF_FALSE: [RUN-IF-FALSE])
4103# ------------------------------------------------------------
4104# Check that the linker support an argument
4105
4106
4107
4108
4109
4110
4111# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4112# Arguments:
4113# $1 - Optional prefix for each variable defined.
4114
4115
4116#
4117# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4118# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4119#
4120# This code is free software; you can redistribute it and/or modify it
4121# under the terms of the GNU General Public License version 2 only, as
4122# published by the Free Software Foundation.  Oracle designates this
4123# particular file as subject to the "Classpath" exception as provided
4124# by Oracle in the LICENSE file that accompanied this code.
4125#
4126# This code is distributed in the hope that it will be useful, but WITHOUT
4127# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4128# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4129# version 2 for more details (a copy is included in the LICENSE file that
4130# accompanied this code).
4131#
4132# You should have received a copy of the GNU General Public License version
4133# 2 along with this work; if not, write to the Free Software Foundation,
4134# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4135#
4136# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4137# or visit www.oracle.com if you need additional information or have any
4138# questions.
4139#
4140
4141
4142
4143
4144
4145cygwin_help() {
4146  case $1 in
4147    unzip)
4148      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4149      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4150      ;;
4151    zip)
4152      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4153      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4154      ;;
4155    make)
4156      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4157      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4158      ;;
4159    freetype)
4160      HELP_MSG="
4161The freetype library can now be build during the configure process.
4162Download the freetype sources and unpack them into an arbitrary directory:
4163
4164wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4165tar -xzf freetype-2.5.3.tar.gz
4166
4167Then run configure with '--with-freetype-src=<freetype_src>'. This will
4168automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4169builds or into '<freetype_src>/lib32' for 32-bit builds.
4170Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4171and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4172
4173Alternatively you can unpack the sources like this to use the default directory:
4174
4175tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4176      ;;
4177  esac
4178}
4179
4180msys_help() {
4181  PKGHANDLER_COMMAND=""
4182}
4183
4184apt_help() {
4185  case $1 in
4186    reduced)
4187      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4188    devkit)
4189      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4190    openjdk)
4191      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4192    alsa)
4193      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4194    cups)
4195      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4196    freetype)
4197      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4198    ffi)
4199      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4200    x11)
4201      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4202    ccache)
4203      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4204    dtrace)
4205      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4206    elf)
4207      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4208  esac
4209}
4210
4211yum_help() {
4212  case $1 in
4213    devkit)
4214      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4215    openjdk)
4216      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4217    alsa)
4218      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4219    cups)
4220      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4221    freetype)
4222      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4223    x11)
4224      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4225    ccache)
4226      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4227    elf)
4228      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4229  esac
4230}
4231
4232brew_help() {
4233  case $1 in
4234    openjdk)
4235      PKGHANDLER_COMMAND="brew cask install java" ;;
4236    freetype)
4237      PKGHANDLER_COMMAND="brew install freetype" ;;
4238    ccache)
4239      PKGHANDLER_COMMAND="brew install ccache" ;;
4240  esac
4241}
4242
4243port_help() {
4244  PKGHANDLER_COMMAND=""
4245}
4246
4247pkgutil_help() {
4248  PKGHANDLER_COMMAND=""
4249}
4250
4251pkgadd_help() {
4252  PKGHANDLER_COMMAND=""
4253}
4254
4255# This function will check if we're called from the "configure" wrapper while
4256# printing --help. If so, we will print out additional information that can
4257# only be extracted within the autoconf script, and then exit. This must be
4258# called at the very beginning in configure.ac.
4259
4260
4261
4262
4263
4264
4265#
4266# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4267# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4268#
4269# This code is free software; you can redistribute it and/or modify it
4270# under the terms of the GNU General Public License version 2 only, as
4271# published by the Free Software Foundation.  Oracle designates this
4272# particular file as subject to the "Classpath" exception as provided
4273# by Oracle in the LICENSE file that accompanied this code.
4274#
4275# This code is distributed in the hope that it will be useful, but WITHOUT
4276# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4277# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4278# version 2 for more details (a copy is included in the LICENSE file that
4279# accompanied this code).
4280#
4281# You should have received a copy of the GNU General Public License version
4282# 2 along with this work; if not, write to the Free Software Foundation,
4283# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4284#
4285# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4286# or visit www.oracle.com if you need additional information or have any
4287# questions.
4288#
4289
4290# All valid JVM features, regardless of platform
4291VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4292    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4293    static-build link-time-opt aot"
4294
4295# All valid JVM variants
4296VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4297
4298###############################################################################
4299# Check if the specified JVM variant should be built. To be used in shell if
4300# constructs, like this:
4301# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4302#
4303# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4304
4305# Definition kept in one line to allow inlining in if statements.
4306# Additional [] needed to keep m4 from mangling shell constructs.
4307
4308
4309###############################################################################
4310# Check if the specified JVM features are explicitly enabled. To be used in
4311# shell if constructs, like this:
4312# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4313#
4314# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4315
4316# Definition kept in one line to allow inlining in if statements.
4317# Additional [] needed to keep m4 from mangling shell constructs.
4318
4319
4320###############################################################################
4321# Check which variants of the JVM that we want to build. Available variants are:
4322#   server: normal interpreter, and a tiered C1/C2 compiler
4323#   client: normal interpreter, and C1 (no C2 compiler)
4324#   minimal: reduced form of client with optional features stripped out
4325#   core: normal interpreter only, no compiler
4326#   zero: C++ based interpreter only, no compiler
4327#   zeroshark: C++ based interpreter, and a llvm-based compiler
4328#   custom: baseline JVM with no default features
4329#
4330
4331
4332###############################################################################
4333# Check if dtrace should be enabled and has all prerequisites present.
4334#
4335
4336
4337################################################################################
4338# Check if AOT should be enabled
4339#
4340
4341
4342###############################################################################
4343# Set up all JVM features for each JVM variant.
4344#
4345
4346
4347###############################################################################
4348# Validate JVM features once all setup is complete, including custom setup.
4349#
4350
4351
4352################################################################################
4353#
4354# Specify which sources will be used to build the 64-bit ARM port
4355#
4356# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4357# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4358#
4359
4360
4361
4362################################################################################
4363# Check if gtest should be built
4364#
4365
4366
4367#
4368# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4369# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4370#
4371# This code is free software; you can redistribute it and/or modify it
4372# under the terms of the GNU General Public License version 2 only, as
4373# published by the Free Software Foundation.  Oracle designates this
4374# particular file as subject to the "Classpath" exception as provided
4375# by Oracle in the LICENSE file that accompanied this code.
4376#
4377# This code is distributed in the hope that it will be useful, but WITHOUT
4378# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4379# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4380# version 2 for more details (a copy is included in the LICENSE file that
4381# accompanied this code).
4382#
4383# You should have received a copy of the GNU General Public License version
4384# 2 along with this work; if not, write to the Free Software Foundation,
4385# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4386#
4387# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4388# or visit www.oracle.com if you need additional information or have any
4389# questions.
4390#
4391
4392###############################################################################
4393# Check which variant of the JDK that we want to build.
4394# Currently we have:
4395#    normal:   standard edition
4396# but the custom make system may add other variants
4397#
4398# Effectively the JDK variant gives a name to a specific set of
4399# modules to compile into the JDK.
4400
4401
4402###############################################################################
4403# Set the debug level
4404#    release: no debug information, all optimizations, no asserts.
4405#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4406#    fastdebug: debug information (-g), all optimizations, all asserts
4407#    slowdebug: debug information (-g), no optimizations, all asserts
4408
4409
4410###############################################################################
4411#
4412# Should we build only OpenJDK even if closed sources are present?
4413#
4414
4415
4416
4417
4418###############################################################################
4419#
4420# Enable or disable the elliptic curve crypto implementation
4421#
4422
4423
4424
4425
4426################################################################################
4427#
4428# Gcov coverage data for hotspot
4429#
4430
4431
4432################################################################################
4433#
4434# Static build support.  When enabled will generate static
4435# libraries instead of shared libraries for all JDK libs.
4436#
4437
4438
4439################################################################################
4440#
4441# jlink options.
4442# We always keep packaged modules in JDK image.
4443#
4444
4445
4446################################################################################
4447#
4448# Check if building of the jtreg failure handler should be enabled.
4449#
4450
4451
4452################################################################################
4453#
4454# Enable or disable generation of the classlist at build time
4455#
4456
4457
4458#
4459# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4460# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4461#
4462# This code is free software; you can redistribute it and/or modify it
4463# under the terms of the GNU General Public License version 2 only, as
4464# published by the Free Software Foundation.  Oracle designates this
4465# particular file as subject to the "Classpath" exception as provided
4466# by Oracle in the LICENSE file that accompanied this code.
4467#
4468# This code is distributed in the hope that it will be useful, but WITHOUT
4469# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4470# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4471# version 2 for more details (a copy is included in the LICENSE file that
4472# accompanied this code).
4473#
4474# You should have received a copy of the GNU General Public License version
4475# 2 along with this work; if not, write to the Free Software Foundation,
4476# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4477#
4478# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4479# or visit www.oracle.com if you need additional information or have any
4480# questions.
4481#
4482
4483###############################################################################
4484#
4485# Setup version numbers
4486#
4487
4488# Verify that a given string represents a valid version number, and assign it
4489# to a variable.
4490
4491# Argument 1: the variable to assign to
4492# Argument 2: the value given by the user
4493
4494
4495
4496
4497#
4498# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4499# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4500#
4501# This code is free software; you can redistribute it and/or modify it
4502# under the terms of the GNU General Public License version 2 only, as
4503# published by the Free Software Foundation.  Oracle designates this
4504# particular file as subject to the "Classpath" exception as provided
4505# by Oracle in the LICENSE file that accompanied this code.
4506#
4507# This code is distributed in the hope that it will be useful, but WITHOUT
4508# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4509# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4510# version 2 for more details (a copy is included in the LICENSE file that
4511# accompanied this code).
4512#
4513# You should have received a copy of the GNU General Public License version
4514# 2 along with this work; if not, write to the Free Software Foundation,
4515# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4516#
4517# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4518# or visit www.oracle.com if you need additional information or have any
4519# questions.
4520#
4521
4522# Major library component reside in separate files.
4523#
4524# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4525# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4526#
4527# This code is free software; you can redistribute it and/or modify it
4528# under the terms of the GNU General Public License version 2 only, as
4529# published by the Free Software Foundation.  Oracle designates this
4530# particular file as subject to the "Classpath" exception as provided
4531# by Oracle in the LICENSE file that accompanied this code.
4532#
4533# This code is distributed in the hope that it will be useful, but WITHOUT
4534# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4535# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4536# version 2 for more details (a copy is included in the LICENSE file that
4537# accompanied this code).
4538#
4539# You should have received a copy of the GNU General Public License version
4540# 2 along with this work; if not, write to the Free Software Foundation,
4541# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4542#
4543# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4544# or visit www.oracle.com if you need additional information or have any
4545# questions.
4546#
4547
4548################################################################################
4549# Setup alsa (Advanced Linux Sound Architecture)
4550################################################################################
4551
4552
4553#
4554# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4555# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4556#
4557# This code is free software; you can redistribute it and/or modify it
4558# under the terms of the GNU General Public License version 2 only, as
4559# published by the Free Software Foundation.  Oracle designates this
4560# particular file as subject to the "Classpath" exception as provided
4561# by Oracle in the LICENSE file that accompanied this code.
4562#
4563# This code is distributed in the hope that it will be useful, but WITHOUT
4564# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4565# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4566# version 2 for more details (a copy is included in the LICENSE file that
4567# accompanied this code).
4568#
4569# You should have received a copy of the GNU General Public License version
4570# 2 along with this work; if not, write to the Free Software Foundation,
4571# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4572#
4573# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4574# or visit www.oracle.com if you need additional information or have any
4575# questions.
4576#
4577
4578################################################################################
4579# Setup bundled libraries.
4580#
4581# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4582# OpenJDK repository. Default is to use these libraries as bundled, but they
4583# might be replaced by en external version by the user.
4584################################################################################
4585
4586
4587################################################################################
4588# Setup libjpeg
4589################################################################################
4590
4591
4592################################################################################
4593# Setup giflib
4594################################################################################
4595
4596
4597################################################################################
4598# Setup libpng
4599################################################################################
4600
4601
4602################################################################################
4603# Setup zlib
4604################################################################################
4605
4606
4607################################################################################
4608# Setup lcms (Little CMS)
4609################################################################################
4610
4611
4612#
4613# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4614# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4615#
4616# This code is free software; you can redistribute it and/or modify it
4617# under the terms of the GNU General Public License version 2 only, as
4618# published by the Free Software Foundation.  Oracle designates this
4619# particular file as subject to the "Classpath" exception as provided
4620# by Oracle in the LICENSE file that accompanied this code.
4621#
4622# This code is distributed in the hope that it will be useful, but WITHOUT
4623# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4624# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4625# version 2 for more details (a copy is included in the LICENSE file that
4626# accompanied this code).
4627#
4628# You should have received a copy of the GNU General Public License version
4629# 2 along with this work; if not, write to the Free Software Foundation,
4630# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4631#
4632# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4633# or visit www.oracle.com if you need additional information or have any
4634# questions.
4635#
4636
4637################################################################################
4638# Setup cups (Common Unix Printing System)
4639################################################################################
4640
4641
4642#
4643# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4644# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4645#
4646# This code is free software; you can redistribute it and/or modify it
4647# under the terms of the GNU General Public License version 2 only, as
4648# published by the Free Software Foundation.  Oracle designates this
4649# particular file as subject to the "Classpath" exception as provided
4650# by Oracle in the LICENSE file that accompanied this code.
4651#
4652# This code is distributed in the hope that it will be useful, but WITHOUT
4653# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4654# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4655# version 2 for more details (a copy is included in the LICENSE file that
4656# accompanied this code).
4657#
4658# You should have received a copy of the GNU General Public License version
4659# 2 along with this work; if not, write to the Free Software Foundation,
4660# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4661#
4662# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4663# or visit www.oracle.com if you need additional information or have any
4664# questions.
4665#
4666
4667################################################################################
4668# Setup libffi (Foreign Function Interface)
4669################################################################################
4670
4671
4672#
4673# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4674# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4675#
4676# This code is free software; you can redistribute it and/or modify it
4677# under the terms of the GNU General Public License version 2 only, as
4678# published by the Free Software Foundation.  Oracle designates this
4679# particular file as subject to the "Classpath" exception as provided
4680# by Oracle in the LICENSE file that accompanied this code.
4681#
4682# This code is distributed in the hope that it will be useful, but WITHOUT
4683# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4684# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4685# version 2 for more details (a copy is included in the LICENSE file that
4686# accompanied this code).
4687#
4688# You should have received a copy of the GNU General Public License version
4689# 2 along with this work; if not, write to the Free Software Foundation,
4690# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4691#
4692# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4693# or visit www.oracle.com if you need additional information or have any
4694# questions.
4695#
4696
4697################################################################################
4698# Build the freetype lib from source
4699################################################################################
4700
4701
4702################################################################################
4703# Check if a potential freeype library match is correct and usable
4704################################################################################
4705
4706
4707################################################################################
4708# Setup freetype (The FreeType2 font rendering library)
4709################################################################################
4710
4711
4712#
4713# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4714# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4715#
4716# This code is free software; you can redistribute it and/or modify it
4717# under the terms of the GNU General Public License version 2 only, as
4718# published by the Free Software Foundation.  Oracle designates this
4719# particular file as subject to the "Classpath" exception as provided
4720# by Oracle in the LICENSE file that accompanied this code.
4721#
4722# This code is distributed in the hope that it will be useful, but WITHOUT
4723# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4724# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4725# version 2 for more details (a copy is included in the LICENSE file that
4726# accompanied this code).
4727#
4728# You should have received a copy of the GNU General Public License version
4729# 2 along with this work; if not, write to the Free Software Foundation,
4730# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4731#
4732# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4733# or visit www.oracle.com if you need additional information or have any
4734# questions.
4735#
4736
4737################################################################################
4738# Setup the standard C/C++ runtime libraries.
4739#
4740# Most importantly, determine if stdc++ should be linked statically or
4741# dynamically.
4742################################################################################
4743
4744
4745#
4746# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4747# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4748#
4749# This code is free software; you can redistribute it and/or modify it
4750# under the terms of the GNU General Public License version 2 only, as
4751# published by the Free Software Foundation.  Oracle designates this
4752# particular file as subject to the "Classpath" exception as provided
4753# by Oracle in the LICENSE file that accompanied this code.
4754#
4755# This code is distributed in the hope that it will be useful, but WITHOUT
4756# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4757# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4758# version 2 for more details (a copy is included in the LICENSE file that
4759# accompanied this code).
4760#
4761# You should have received a copy of the GNU General Public License version
4762# 2 along with this work; if not, write to the Free Software Foundation,
4763# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4764#
4765# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4766# or visit www.oracle.com if you need additional information or have any
4767# questions.
4768#
4769
4770################################################################################
4771# Setup X11 Windows system
4772################################################################################
4773
4774
4775#
4776# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4777# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4778#
4779# This code is free software; you can redistribute it and/or modify it
4780# under the terms of the GNU General Public License version 2 only, as
4781# published by the Free Software Foundation.  Oracle designates this
4782# particular file as subject to the "Classpath" exception as provided
4783# by Oracle in the LICENSE file that accompanied this code.
4784#
4785# This code is distributed in the hope that it will be useful, but WITHOUT
4786# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4787# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4788# version 2 for more details (a copy is included in the LICENSE file that
4789# accompanied this code).
4790#
4791# You should have received a copy of the GNU General Public License version
4792# 2 along with this work; if not, write to the Free Software Foundation,
4793# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4794#
4795# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4796# or visit www.oracle.com if you need additional information or have any
4797# questions.
4798#
4799
4800################################################################################
4801# Setup libelf (ELF library)
4802################################################################################
4803
4804
4805
4806################################################################################
4807# Determine which libraries are needed for this configuration
4808################################################################################
4809
4810
4811################################################################################
4812# Parse library options, and setup needed libraries
4813################################################################################
4814
4815
4816################################################################################
4817# Setup llvm (Low-Level VM)
4818################################################################################
4819
4820
4821################################################################################
4822# Setup various libraries, typically small system libraries
4823################################################################################
4824
4825
4826################################################################################
4827# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4828# redistribute it in the test image.
4829################################################################################
4830
4831
4832
4833#
4834# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4835# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4836#
4837# This code is free software; you can redistribute it and/or modify it
4838# under the terms of the GNU General Public License version 2 only, as
4839# published by the Free Software Foundation.  Oracle designates this
4840# particular file as subject to the "Classpath" exception as provided
4841# by Oracle in the LICENSE file that accompanied this code.
4842#
4843# This code is distributed in the hope that it will be useful, but WITHOUT
4844# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4845# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4846# version 2 for more details (a copy is included in the LICENSE file that
4847# accompanied this code).
4848#
4849# You should have received a copy of the GNU General Public License version
4850# 2 along with this work; if not, write to the Free Software Foundation,
4851# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4852#
4853# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4854# or visit www.oracle.com if you need additional information or have any
4855# questions.
4856#
4857
4858# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4859# Converts autoconf style CPU name to OpenJDK style, into
4860# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4861
4862
4863# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4864# Converts autoconf style OS name to OpenJDK style, into
4865# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4866
4867
4868# Expects $host_os $host_cpu $build_os and $build_cpu
4869# and $with_target_bits to have been setup!
4870#
4871# Translate the standard triplet(quadruplet) definition
4872# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4873# OPENJDK_BUILD_OS, etc.
4874
4875
4876# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4877# accordingly. Must be done after setting up build and target system, but before
4878# doing anything else with these values.
4879
4880
4881# Setup the legacy variables, for controlling the old makefiles.
4882#
4883
4884
4885# $1 - Either TARGET or BUILD to setup the variables for.
4886
4887
4888
4889
4890#%%% Build and target systems %%%
4891
4892
4893
4894
4895# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4896# Add -mX to various FLAGS variables.
4897
4898
4899
4900
4901
4902
4903#
4904# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4905# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4906#
4907# This code is free software; you can redistribute it and/or modify it
4908# under the terms of the GNU General Public License version 2 only, as
4909# published by the Free Software Foundation.  Oracle designates this
4910# particular file as subject to the "Classpath" exception as provided
4911# by Oracle in the LICENSE file that accompanied this code.
4912#
4913# This code is distributed in the hope that it will be useful, but WITHOUT
4914# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4915# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4916# version 2 for more details (a copy is included in the LICENSE file that
4917# accompanied this code).
4918#
4919# You should have received a copy of the GNU General Public License version
4920# 2 along with this work; if not, write to the Free Software Foundation,
4921# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4922#
4923# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4924# or visit www.oracle.com if you need additional information or have any
4925# questions.
4926#
4927
4928
4929
4930
4931
4932
4933
4934################################################################################
4935# Define a mechanism for importing extra prebuilt modules
4936#
4937
4938
4939
4940#
4941# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4942# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4943#
4944# This code is free software; you can redistribute it and/or modify it
4945# under the terms of the GNU General Public License version 2 only, as
4946# published by the Free Software Foundation.  Oracle designates this
4947# particular file as subject to the "Classpath" exception as provided
4948# by Oracle in the LICENSE file that accompanied this code.
4949#
4950# This code is distributed in the hope that it will be useful, but WITHOUT
4951# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4952# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4953# version 2 for more details (a copy is included in the LICENSE file that
4954# accompanied this code).
4955#
4956# You should have received a copy of the GNU General Public License version
4957# 2 along with this work; if not, write to the Free Software Foundation,
4958# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4959#
4960# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4961# or visit www.oracle.com if you need additional information or have any
4962# questions.
4963#
4964
4965########################################################################
4966# This file is responsible for detecting, verifying and setting up the
4967# toolchain, i.e. the compiler, linker and related utilities. It will setup
4968# proper paths to the binaries, but it will not setup any flags.
4969#
4970# The binaries used is determined by the toolchain type, which is the family of
4971# compilers and related tools that are used.
4972########################################################################
4973
4974
4975# All valid toolchains, regardless of platform (used by help.m4)
4976VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4977
4978# These toolchains are valid on different platforms
4979VALID_TOOLCHAINS_linux="gcc clang"
4980VALID_TOOLCHAINS_solaris="solstudio"
4981VALID_TOOLCHAINS_macosx="gcc clang"
4982VALID_TOOLCHAINS_aix="xlc"
4983VALID_TOOLCHAINS_windows="microsoft"
4984
4985# Toolchain descriptions
4986TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4987TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4988TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4989TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4990TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4991
4992# Minimum supported versions, empty means unspecified
4993TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4994TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4995TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4996TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4997TOOLCHAIN_MINIMUM_VERSION_xlc=""
4998
4999# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5000# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5001# $1 - optional variable prefix for compiler and version variables (BUILD_)
5002# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5003
5004
5005# Check if the configured compiler (C and C++) is of a specific version or
5006# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5007#
5008# Arguments:
5009#   VERSION:   The version string to check against the found version
5010#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5011#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5012#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5013
5014
5015
5016
5017# Setup a number of variables describing how native output files are
5018# named on this platform/toolchain.
5019
5020
5021# Determine which toolchain type to use, and make sure it is valid for this
5022# platform. Setup various information about the selected toolchain.
5023
5024
5025# Before we start detecting the toolchain executables, we might need some
5026# special setup, e.g. additional paths etc.
5027
5028
5029# Restore path, etc
5030
5031
5032# Check if a compiler is of the toolchain type we expect, and save the version
5033# information from it. If the compiler does not match the expected type,
5034# this function will abort using AC_MSG_ERROR. If it matches, the version will
5035# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5036# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5037#
5038# $1 = compiler to test (CC or CXX)
5039# $2 = human readable name of compiler (C or C++)
5040
5041
5042# Try to locate the given C or C++ compiler in the path, or otherwise.
5043#
5044# $1 = compiler to test (CC or CXX)
5045# $2 = human readable name of compiler (C or C++)
5046# $3 = list of compiler names to search for
5047
5048
5049# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5050# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5051# archiver (AR). Verify that the compilers are correct according to the
5052# toolchain type.
5053
5054
5055# Setup additional tools that is considered a part of the toolchain, but not the
5056# core part. Many of these are highly platform-specific and do not exist,
5057# and/or are not needed on all platforms.
5058
5059
5060# Setup the build tools (i.e, the compiler and linker used to build programs
5061# that should be run on the build platform, not the target platform, as a build
5062# helper). Since the non-cross-compile case uses the normal, target compilers
5063# for this, we can only do this after these have been setup.
5064
5065
5066# Do some additional checks on the detected tools.
5067
5068
5069# Setup the JTReg Regression Test Harness.
5070
5071
5072#
5073# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5074# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5075#
5076# This code is free software; you can redistribute it and/or modify it
5077# under the terms of the GNU General Public License version 2 only, as
5078# published by the Free Software Foundation.  Oracle designates this
5079# particular file as subject to the "Classpath" exception as provided
5080# by Oracle in the LICENSE file that accompanied this code.
5081#
5082# This code is distributed in the hope that it will be useful, but WITHOUT
5083# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5084# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5085# version 2 for more details (a copy is included in the LICENSE file that
5086# accompanied this code).
5087#
5088# You should have received a copy of the GNU General Public License version
5089# 2 along with this work; if not, write to the Free Software Foundation,
5090# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5091#
5092# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5093# or visit www.oracle.com if you need additional information or have any
5094# questions.
5095#
5096
5097################################################################################
5098# The order of these defines the priority by which we try to find them.
5099VALID_VS_VERSIONS="2013 2012 2010"
5100
5101VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5102VS_VERSION_INTERNAL_2010=100
5103VS_MSVCR_2010=msvcr100.dll
5104# We don't use msvcp on Visual Studio 2010
5105#VS_MSVCP_2010=msvcp100.dll
5106VS_ENVVAR_2010="VS100COMNTOOLS"
5107VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5108VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5109VS_VS_PLATFORM_NAME_2010="v100"
5110VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5111
5112VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5113VS_VERSION_INTERNAL_2012=110
5114VS_MSVCR_2012=msvcr110.dll
5115VS_MSVCP_2012=msvcp110.dll
5116VS_ENVVAR_2012="VS110COMNTOOLS"
5117VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5118VS_SDK_INSTALLDIR_2012=
5119VS_VS_PLATFORM_NAME_2012="v110"
5120VS_SDK_PLATFORM_NAME_2012=
5121
5122VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5123VS_VERSION_INTERNAL_2013=120
5124VS_MSVCR_2013=msvcr120.dll
5125VS_MSVCP_2013=msvcp120.dll
5126VS_ENVVAR_2013="VS120COMNTOOLS"
5127VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5128VS_SDK_INSTALLDIR_2013=
5129VS_VS_PLATFORM_NAME_2013="v120"
5130VS_SDK_PLATFORM_NAME_2013=
5131
5132################################################################################
5133
5134
5135
5136################################################################################
5137
5138
5139
5140################################################################################
5141# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5142# build environment and assigns it to VS_ENV_CMD
5143
5144
5145################################################################################
5146
5147
5148
5149################################################################################
5150# Check if the VS env variables were setup prior to running configure.
5151# If not, then find vcvarsall.bat and run it automatically, and integrate
5152# the set env variables into the spec file.
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167# This line needs to be here, verbatim, after all includes and the dummy hook
5168# definitions. It is replaced with custom functionality when building
5169# custom sources.
5170#CUSTOM_AUTOCONF_INCLUDE
5171
5172# Do not change or remove the following line, it is needed for consistency checks:
5173DATE_WHEN_GENERATED=1487032350
5174
5175###############################################################################
5176#
5177# Initialization / Boot-strapping
5178#
5179# The bootstrapping process needs to solve the "chicken or the egg" problem,
5180# thus it jumps back and forth, each time gaining something needed later on.
5181#
5182###############################################################################
5183
5184# If we are requested to print additional help, do that and then exit.
5185# This must be the very first call.
5186
5187  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5188
5189    # Print available toolchains
5190    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5191    $PRINTF "Which are valid to use depends on the build platform.\n"
5192    for toolchain in $VALID_TOOLCHAINS_all; do
5193      # Use indirect variable referencing
5194      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5195      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5196      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5197    done
5198    $PRINTF "\n"
5199
5200    # Print available jvm features
5201    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5202    $PRINTF "Which are valid to use depends on the target platform.\n  "
5203    $PRINTF "%s " $VALID_JVM_FEATURES
5204    $PRINTF "\n"
5205
5206    # And now exit directly
5207    exit 0
5208  fi
5209
5210
5211# Basic initialization that must happen first of all in the normal process.
5212
5213  # Save the original command line. This is passed to us by the wrapper configure script.
5214
5215  # Save the path variable before it gets changed
5216  ORIGINAL_PATH="$PATH"
5217
5218  DATE_WHEN_CONFIGURED=`LANG=C date`
5219
5220  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5221$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5222  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5223$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5224
5225
5226  # Start with tools that do not need have cross compilation support
5227  # and can be expected to be found in the default PATH. These tools are
5228  # used by configure.
5229
5230  # First are all the simple required tools.
5231
5232
5233
5234  # Publish this variable in the help.
5235
5236
5237  if [ -z "${BASENAME+x}" ]; then
5238    # The variable is not set by user, try to locate tool using the code snippet
5239    for ac_prog in basename
5240do
5241  # Extract the first word of "$ac_prog", so it can be a program name with args.
5242set dummy $ac_prog; ac_word=$2
5243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5244$as_echo_n "checking for $ac_word... " >&6; }
5245if ${ac_cv_path_BASENAME+:} false; then :
5246  $as_echo_n "(cached) " >&6
5247else
5248  case $BASENAME in
5249  [\\/]* | ?:[\\/]*)
5250  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5251  ;;
5252  *)
5253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5254for as_dir in $PATH
5255do
5256  IFS=$as_save_IFS
5257  test -z "$as_dir" && as_dir=.
5258    for ac_exec_ext in '' $ac_executable_extensions; do
5259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5260    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5262    break 2
5263  fi
5264done
5265  done
5266IFS=$as_save_IFS
5267
5268  ;;
5269esac
5270fi
5271BASENAME=$ac_cv_path_BASENAME
5272if test -n "$BASENAME"; then
5273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5274$as_echo "$BASENAME" >&6; }
5275else
5276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5277$as_echo "no" >&6; }
5278fi
5279
5280
5281  test -n "$BASENAME" && break
5282done
5283
5284  else
5285    # The variable is set, but is it from the command line or the environment?
5286
5287    # Try to remove the string !BASENAME! from our list.
5288    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5289    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5290      # If it failed, the variable was not from the command line. Ignore it,
5291      # but warn the user (except for BASH, which is always set by the calling BASH).
5292      if test "xBASENAME" != xBASH; then
5293        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5294$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5295      fi
5296      # Try to locate tool using the code snippet
5297      for ac_prog in basename
5298do
5299  # Extract the first word of "$ac_prog", so it can be a program name with args.
5300set dummy $ac_prog; ac_word=$2
5301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5302$as_echo_n "checking for $ac_word... " >&6; }
5303if ${ac_cv_path_BASENAME+:} false; then :
5304  $as_echo_n "(cached) " >&6
5305else
5306  case $BASENAME in
5307  [\\/]* | ?:[\\/]*)
5308  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5309  ;;
5310  *)
5311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5312for as_dir in $PATH
5313do
5314  IFS=$as_save_IFS
5315  test -z "$as_dir" && as_dir=.
5316    for ac_exec_ext in '' $ac_executable_extensions; do
5317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5318    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5320    break 2
5321  fi
5322done
5323  done
5324IFS=$as_save_IFS
5325
5326  ;;
5327esac
5328fi
5329BASENAME=$ac_cv_path_BASENAME
5330if test -n "$BASENAME"; then
5331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5332$as_echo "$BASENAME" >&6; }
5333else
5334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5335$as_echo "no" >&6; }
5336fi
5337
5338
5339  test -n "$BASENAME" && break
5340done
5341
5342    else
5343      # If it succeeded, then it was overridden by the user. We will use it
5344      # for the tool.
5345
5346      # First remove it from the list of overridden variables, so we can test
5347      # for unknown variables in the end.
5348      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5349
5350      # Check if we try to supply an empty value
5351      if test "x$BASENAME" = x; then
5352        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5353$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5355$as_echo_n "checking for BASENAME... " >&6; }
5356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5357$as_echo "disabled" >&6; }
5358      else
5359        # Check if the provided tool contains a complete path.
5360        tool_specified="$BASENAME"
5361        tool_basename="${tool_specified##*/}"
5362        if test "x$tool_basename" = "x$tool_specified"; then
5363          # A command without a complete path is provided, search $PATH.
5364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5365$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5366          # Extract the first word of "$tool_basename", so it can be a program name with args.
5367set dummy $tool_basename; ac_word=$2
5368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5369$as_echo_n "checking for $ac_word... " >&6; }
5370if ${ac_cv_path_BASENAME+:} false; then :
5371  $as_echo_n "(cached) " >&6
5372else
5373  case $BASENAME in
5374  [\\/]* | ?:[\\/]*)
5375  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5376  ;;
5377  *)
5378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5379for as_dir in $PATH
5380do
5381  IFS=$as_save_IFS
5382  test -z "$as_dir" && as_dir=.
5383    for ac_exec_ext in '' $ac_executable_extensions; do
5384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5385    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5387    break 2
5388  fi
5389done
5390  done
5391IFS=$as_save_IFS
5392
5393  ;;
5394esac
5395fi
5396BASENAME=$ac_cv_path_BASENAME
5397if test -n "$BASENAME"; then
5398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5399$as_echo "$BASENAME" >&6; }
5400else
5401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5402$as_echo "no" >&6; }
5403fi
5404
5405
5406          if test "x$BASENAME" = x; then
5407            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5408          fi
5409        else
5410          # Otherwise we believe it is a complete path. Use it as it is.
5411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5412$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5413          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5414$as_echo_n "checking for BASENAME... " >&6; }
5415          if test ! -x "$tool_specified"; then
5416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5417$as_echo "not found" >&6; }
5418            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5419          fi
5420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5421$as_echo "$tool_specified" >&6; }
5422        fi
5423      fi
5424    fi
5425
5426  fi
5427
5428
5429
5430  if test "x$BASENAME" = x; then
5431    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5432  fi
5433
5434
5435
5436
5437
5438  # Publish this variable in the help.
5439
5440
5441  if [ -z "${BASH+x}" ]; then
5442    # The variable is not set by user, try to locate tool using the code snippet
5443    for ac_prog in bash
5444do
5445  # Extract the first word of "$ac_prog", so it can be a program name with args.
5446set dummy $ac_prog; ac_word=$2
5447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5448$as_echo_n "checking for $ac_word... " >&6; }
5449if ${ac_cv_path_BASH+:} false; then :
5450  $as_echo_n "(cached) " >&6
5451else
5452  case $BASH in
5453  [\\/]* | ?:[\\/]*)
5454  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5455  ;;
5456  *)
5457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5458for as_dir in $PATH
5459do
5460  IFS=$as_save_IFS
5461  test -z "$as_dir" && as_dir=.
5462    for ac_exec_ext in '' $ac_executable_extensions; do
5463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5464    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5466    break 2
5467  fi
5468done
5469  done
5470IFS=$as_save_IFS
5471
5472  ;;
5473esac
5474fi
5475BASH=$ac_cv_path_BASH
5476if test -n "$BASH"; then
5477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5478$as_echo "$BASH" >&6; }
5479else
5480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5481$as_echo "no" >&6; }
5482fi
5483
5484
5485  test -n "$BASH" && break
5486done
5487
5488  else
5489    # The variable is set, but is it from the command line or the environment?
5490
5491    # Try to remove the string !BASH! from our list.
5492    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5493    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5494      # If it failed, the variable was not from the command line. Ignore it,
5495      # but warn the user (except for BASH, which is always set by the calling BASH).
5496      if test "xBASH" != xBASH; then
5497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5498$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5499      fi
5500      # Try to locate tool using the code snippet
5501      for ac_prog in bash
5502do
5503  # Extract the first word of "$ac_prog", so it can be a program name with args.
5504set dummy $ac_prog; ac_word=$2
5505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5506$as_echo_n "checking for $ac_word... " >&6; }
5507if ${ac_cv_path_BASH+:} false; then :
5508  $as_echo_n "(cached) " >&6
5509else
5510  case $BASH in
5511  [\\/]* | ?:[\\/]*)
5512  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5513  ;;
5514  *)
5515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5516for as_dir in $PATH
5517do
5518  IFS=$as_save_IFS
5519  test -z "$as_dir" && as_dir=.
5520    for ac_exec_ext in '' $ac_executable_extensions; do
5521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5522    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5524    break 2
5525  fi
5526done
5527  done
5528IFS=$as_save_IFS
5529
5530  ;;
5531esac
5532fi
5533BASH=$ac_cv_path_BASH
5534if test -n "$BASH"; then
5535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5536$as_echo "$BASH" >&6; }
5537else
5538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5539$as_echo "no" >&6; }
5540fi
5541
5542
5543  test -n "$BASH" && break
5544done
5545
5546    else
5547      # If it succeeded, then it was overridden by the user. We will use it
5548      # for the tool.
5549
5550      # First remove it from the list of overridden variables, so we can test
5551      # for unknown variables in the end.
5552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5553
5554      # Check if we try to supply an empty value
5555      if test "x$BASH" = x; then
5556        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5557$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5559$as_echo_n "checking for BASH... " >&6; }
5560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5561$as_echo "disabled" >&6; }
5562      else
5563        # Check if the provided tool contains a complete path.
5564        tool_specified="$BASH"
5565        tool_basename="${tool_specified##*/}"
5566        if test "x$tool_basename" = "x$tool_specified"; then
5567          # A command without a complete path is provided, search $PATH.
5568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5569$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5570          # Extract the first word of "$tool_basename", so it can be a program name with args.
5571set dummy $tool_basename; ac_word=$2
5572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5573$as_echo_n "checking for $ac_word... " >&6; }
5574if ${ac_cv_path_BASH+:} false; then :
5575  $as_echo_n "(cached) " >&6
5576else
5577  case $BASH in
5578  [\\/]* | ?:[\\/]*)
5579  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5580  ;;
5581  *)
5582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5583for as_dir in $PATH
5584do
5585  IFS=$as_save_IFS
5586  test -z "$as_dir" && as_dir=.
5587    for ac_exec_ext in '' $ac_executable_extensions; do
5588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5589    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5591    break 2
5592  fi
5593done
5594  done
5595IFS=$as_save_IFS
5596
5597  ;;
5598esac
5599fi
5600BASH=$ac_cv_path_BASH
5601if test -n "$BASH"; then
5602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5603$as_echo "$BASH" >&6; }
5604else
5605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5606$as_echo "no" >&6; }
5607fi
5608
5609
5610          if test "x$BASH" = x; then
5611            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5612          fi
5613        else
5614          # Otherwise we believe it is a complete path. Use it as it is.
5615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5616$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5617          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5618$as_echo_n "checking for BASH... " >&6; }
5619          if test ! -x "$tool_specified"; then
5620            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5621$as_echo "not found" >&6; }
5622            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5623          fi
5624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5625$as_echo "$tool_specified" >&6; }
5626        fi
5627      fi
5628    fi
5629
5630  fi
5631
5632
5633
5634  if test "x$BASH" = x; then
5635    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5636  fi
5637
5638
5639
5640
5641
5642  # Publish this variable in the help.
5643
5644
5645  if [ -z "${CAT+x}" ]; then
5646    # The variable is not set by user, try to locate tool using the code snippet
5647    for ac_prog in cat
5648do
5649  # Extract the first word of "$ac_prog", so it can be a program name with args.
5650set dummy $ac_prog; ac_word=$2
5651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5652$as_echo_n "checking for $ac_word... " >&6; }
5653if ${ac_cv_path_CAT+:} false; then :
5654  $as_echo_n "(cached) " >&6
5655else
5656  case $CAT in
5657  [\\/]* | ?:[\\/]*)
5658  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5659  ;;
5660  *)
5661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5662for as_dir in $PATH
5663do
5664  IFS=$as_save_IFS
5665  test -z "$as_dir" && as_dir=.
5666    for ac_exec_ext in '' $ac_executable_extensions; do
5667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5668    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5670    break 2
5671  fi
5672done
5673  done
5674IFS=$as_save_IFS
5675
5676  ;;
5677esac
5678fi
5679CAT=$ac_cv_path_CAT
5680if test -n "$CAT"; then
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5682$as_echo "$CAT" >&6; }
5683else
5684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5685$as_echo "no" >&6; }
5686fi
5687
5688
5689  test -n "$CAT" && break
5690done
5691
5692  else
5693    # The variable is set, but is it from the command line or the environment?
5694
5695    # Try to remove the string !CAT! from our list.
5696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5698      # If it failed, the variable was not from the command line. Ignore it,
5699      # but warn the user (except for BASH, which is always set by the calling BASH).
5700      if test "xCAT" != xBASH; then
5701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5702$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5703      fi
5704      # Try to locate tool using the code snippet
5705      for ac_prog in cat
5706do
5707  # Extract the first word of "$ac_prog", so it can be a program name with args.
5708set dummy $ac_prog; ac_word=$2
5709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710$as_echo_n "checking for $ac_word... " >&6; }
5711if ${ac_cv_path_CAT+:} false; then :
5712  $as_echo_n "(cached) " >&6
5713else
5714  case $CAT in
5715  [\\/]* | ?:[\\/]*)
5716  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5717  ;;
5718  *)
5719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720for as_dir in $PATH
5721do
5722  IFS=$as_save_IFS
5723  test -z "$as_dir" && as_dir=.
5724    for ac_exec_ext in '' $ac_executable_extensions; do
5725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5726    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5728    break 2
5729  fi
5730done
5731  done
5732IFS=$as_save_IFS
5733
5734  ;;
5735esac
5736fi
5737CAT=$ac_cv_path_CAT
5738if test -n "$CAT"; then
5739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5740$as_echo "$CAT" >&6; }
5741else
5742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743$as_echo "no" >&6; }
5744fi
5745
5746
5747  test -n "$CAT" && break
5748done
5749
5750    else
5751      # If it succeeded, then it was overridden by the user. We will use it
5752      # for the tool.
5753
5754      # First remove it from the list of overridden variables, so we can test
5755      # for unknown variables in the end.
5756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5757
5758      # Check if we try to supply an empty value
5759      if test "x$CAT" = x; then
5760        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5761$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5763$as_echo_n "checking for CAT... " >&6; }
5764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5765$as_echo "disabled" >&6; }
5766      else
5767        # Check if the provided tool contains a complete path.
5768        tool_specified="$CAT"
5769        tool_basename="${tool_specified##*/}"
5770        if test "x$tool_basename" = "x$tool_specified"; then
5771          # A command without a complete path is provided, search $PATH.
5772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5773$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5774          # Extract the first word of "$tool_basename", so it can be a program name with args.
5775set dummy $tool_basename; ac_word=$2
5776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5777$as_echo_n "checking for $ac_word... " >&6; }
5778if ${ac_cv_path_CAT+:} false; then :
5779  $as_echo_n "(cached) " >&6
5780else
5781  case $CAT in
5782  [\\/]* | ?:[\\/]*)
5783  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5784  ;;
5785  *)
5786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5787for as_dir in $PATH
5788do
5789  IFS=$as_save_IFS
5790  test -z "$as_dir" && as_dir=.
5791    for ac_exec_ext in '' $ac_executable_extensions; do
5792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5793    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5795    break 2
5796  fi
5797done
5798  done
5799IFS=$as_save_IFS
5800
5801  ;;
5802esac
5803fi
5804CAT=$ac_cv_path_CAT
5805if test -n "$CAT"; then
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5807$as_echo "$CAT" >&6; }
5808else
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810$as_echo "no" >&6; }
5811fi
5812
5813
5814          if test "x$CAT" = x; then
5815            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5816          fi
5817        else
5818          # Otherwise we believe it is a complete path. Use it as it is.
5819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5820$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5822$as_echo_n "checking for CAT... " >&6; }
5823          if test ! -x "$tool_specified"; then
5824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5825$as_echo "not found" >&6; }
5826            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5827          fi
5828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5829$as_echo "$tool_specified" >&6; }
5830        fi
5831      fi
5832    fi
5833
5834  fi
5835
5836
5837
5838  if test "x$CAT" = x; then
5839    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5840  fi
5841
5842
5843
5844
5845
5846  # Publish this variable in the help.
5847
5848
5849  if [ -z "${CHMOD+x}" ]; then
5850    # The variable is not set by user, try to locate tool using the code snippet
5851    for ac_prog in chmod
5852do
5853  # Extract the first word of "$ac_prog", so it can be a program name with args.
5854set dummy $ac_prog; ac_word=$2
5855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5856$as_echo_n "checking for $ac_word... " >&6; }
5857if ${ac_cv_path_CHMOD+:} false; then :
5858  $as_echo_n "(cached) " >&6
5859else
5860  case $CHMOD in
5861  [\\/]* | ?:[\\/]*)
5862  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5863  ;;
5864  *)
5865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5866for as_dir in $PATH
5867do
5868  IFS=$as_save_IFS
5869  test -z "$as_dir" && as_dir=.
5870    for ac_exec_ext in '' $ac_executable_extensions; do
5871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5872    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5874    break 2
5875  fi
5876done
5877  done
5878IFS=$as_save_IFS
5879
5880  ;;
5881esac
5882fi
5883CHMOD=$ac_cv_path_CHMOD
5884if test -n "$CHMOD"; then
5885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5886$as_echo "$CHMOD" >&6; }
5887else
5888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5889$as_echo "no" >&6; }
5890fi
5891
5892
5893  test -n "$CHMOD" && break
5894done
5895
5896  else
5897    # The variable is set, but is it from the command line or the environment?
5898
5899    # Try to remove the string !CHMOD! from our list.
5900    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5901    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5902      # If it failed, the variable was not from the command line. Ignore it,
5903      # but warn the user (except for BASH, which is always set by the calling BASH).
5904      if test "xCHMOD" != xBASH; then
5905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5906$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5907      fi
5908      # Try to locate tool using the code snippet
5909      for ac_prog in chmod
5910do
5911  # Extract the first word of "$ac_prog", so it can be a program name with args.
5912set dummy $ac_prog; ac_word=$2
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914$as_echo_n "checking for $ac_word... " >&6; }
5915if ${ac_cv_path_CHMOD+:} false; then :
5916  $as_echo_n "(cached) " >&6
5917else
5918  case $CHMOD in
5919  [\\/]* | ?:[\\/]*)
5920  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5921  ;;
5922  *)
5923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924for as_dir in $PATH
5925do
5926  IFS=$as_save_IFS
5927  test -z "$as_dir" && as_dir=.
5928    for ac_exec_ext in '' $ac_executable_extensions; do
5929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5930    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5932    break 2
5933  fi
5934done
5935  done
5936IFS=$as_save_IFS
5937
5938  ;;
5939esac
5940fi
5941CHMOD=$ac_cv_path_CHMOD
5942if test -n "$CHMOD"; then
5943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5944$as_echo "$CHMOD" >&6; }
5945else
5946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5947$as_echo "no" >&6; }
5948fi
5949
5950
5951  test -n "$CHMOD" && break
5952done
5953
5954    else
5955      # If it succeeded, then it was overridden by the user. We will use it
5956      # for the tool.
5957
5958      # First remove it from the list of overridden variables, so we can test
5959      # for unknown variables in the end.
5960      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5961
5962      # Check if we try to supply an empty value
5963      if test "x$CHMOD" = x; then
5964        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5965$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5967$as_echo_n "checking for CHMOD... " >&6; }
5968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5969$as_echo "disabled" >&6; }
5970      else
5971        # Check if the provided tool contains a complete path.
5972        tool_specified="$CHMOD"
5973        tool_basename="${tool_specified##*/}"
5974        if test "x$tool_basename" = "x$tool_specified"; then
5975          # A command without a complete path is provided, search $PATH.
5976          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5977$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5978          # Extract the first word of "$tool_basename", so it can be a program name with args.
5979set dummy $tool_basename; ac_word=$2
5980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5981$as_echo_n "checking for $ac_word... " >&6; }
5982if ${ac_cv_path_CHMOD+:} false; then :
5983  $as_echo_n "(cached) " >&6
5984else
5985  case $CHMOD in
5986  [\\/]* | ?:[\\/]*)
5987  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5988  ;;
5989  *)
5990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991for as_dir in $PATH
5992do
5993  IFS=$as_save_IFS
5994  test -z "$as_dir" && as_dir=.
5995    for ac_exec_ext in '' $ac_executable_extensions; do
5996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5997    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5999    break 2
6000  fi
6001done
6002  done
6003IFS=$as_save_IFS
6004
6005  ;;
6006esac
6007fi
6008CHMOD=$ac_cv_path_CHMOD
6009if test -n "$CHMOD"; then
6010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6011$as_echo "$CHMOD" >&6; }
6012else
6013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6014$as_echo "no" >&6; }
6015fi
6016
6017
6018          if test "x$CHMOD" = x; then
6019            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6020          fi
6021        else
6022          # Otherwise we believe it is a complete path. Use it as it is.
6023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6024$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6025          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6026$as_echo_n "checking for CHMOD... " >&6; }
6027          if test ! -x "$tool_specified"; then
6028            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6029$as_echo "not found" >&6; }
6030            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6031          fi
6032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6033$as_echo "$tool_specified" >&6; }
6034        fi
6035      fi
6036    fi
6037
6038  fi
6039
6040
6041
6042  if test "x$CHMOD" = x; then
6043    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6044  fi
6045
6046
6047
6048
6049
6050  # Publish this variable in the help.
6051
6052
6053  if [ -z "${CMP+x}" ]; then
6054    # The variable is not set by user, try to locate tool using the code snippet
6055    for ac_prog in cmp
6056do
6057  # Extract the first word of "$ac_prog", so it can be a program name with args.
6058set dummy $ac_prog; ac_word=$2
6059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6060$as_echo_n "checking for $ac_word... " >&6; }
6061if ${ac_cv_path_CMP+:} false; then :
6062  $as_echo_n "(cached) " >&6
6063else
6064  case $CMP in
6065  [\\/]* | ?:[\\/]*)
6066  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6067  ;;
6068  *)
6069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6070for as_dir in $PATH
6071do
6072  IFS=$as_save_IFS
6073  test -z "$as_dir" && as_dir=.
6074    for ac_exec_ext in '' $ac_executable_extensions; do
6075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6076    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6078    break 2
6079  fi
6080done
6081  done
6082IFS=$as_save_IFS
6083
6084  ;;
6085esac
6086fi
6087CMP=$ac_cv_path_CMP
6088if test -n "$CMP"; then
6089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6090$as_echo "$CMP" >&6; }
6091else
6092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6093$as_echo "no" >&6; }
6094fi
6095
6096
6097  test -n "$CMP" && break
6098done
6099
6100  else
6101    # The variable is set, but is it from the command line or the environment?
6102
6103    # Try to remove the string !CMP! from our list.
6104    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6105    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6106      # If it failed, the variable was not from the command line. Ignore it,
6107      # but warn the user (except for BASH, which is always set by the calling BASH).
6108      if test "xCMP" != xBASH; then
6109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6110$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6111      fi
6112      # Try to locate tool using the code snippet
6113      for ac_prog in cmp
6114do
6115  # Extract the first word of "$ac_prog", so it can be a program name with args.
6116set dummy $ac_prog; ac_word=$2
6117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6118$as_echo_n "checking for $ac_word... " >&6; }
6119if ${ac_cv_path_CMP+:} false; then :
6120  $as_echo_n "(cached) " >&6
6121else
6122  case $CMP in
6123  [\\/]* | ?:[\\/]*)
6124  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6125  ;;
6126  *)
6127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6128for as_dir in $PATH
6129do
6130  IFS=$as_save_IFS
6131  test -z "$as_dir" && as_dir=.
6132    for ac_exec_ext in '' $ac_executable_extensions; do
6133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6134    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6136    break 2
6137  fi
6138done
6139  done
6140IFS=$as_save_IFS
6141
6142  ;;
6143esac
6144fi
6145CMP=$ac_cv_path_CMP
6146if test -n "$CMP"; then
6147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6148$as_echo "$CMP" >&6; }
6149else
6150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6151$as_echo "no" >&6; }
6152fi
6153
6154
6155  test -n "$CMP" && break
6156done
6157
6158    else
6159      # If it succeeded, then it was overridden by the user. We will use it
6160      # for the tool.
6161
6162      # First remove it from the list of overridden variables, so we can test
6163      # for unknown variables in the end.
6164      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6165
6166      # Check if we try to supply an empty value
6167      if test "x$CMP" = x; then
6168        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6169$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6171$as_echo_n "checking for CMP... " >&6; }
6172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6173$as_echo "disabled" >&6; }
6174      else
6175        # Check if the provided tool contains a complete path.
6176        tool_specified="$CMP"
6177        tool_basename="${tool_specified##*/}"
6178        if test "x$tool_basename" = "x$tool_specified"; then
6179          # A command without a complete path is provided, search $PATH.
6180          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6181$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6182          # Extract the first word of "$tool_basename", so it can be a program name with args.
6183set dummy $tool_basename; ac_word=$2
6184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6185$as_echo_n "checking for $ac_word... " >&6; }
6186if ${ac_cv_path_CMP+:} false; then :
6187  $as_echo_n "(cached) " >&6
6188else
6189  case $CMP in
6190  [\\/]* | ?:[\\/]*)
6191  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6192  ;;
6193  *)
6194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6195for as_dir in $PATH
6196do
6197  IFS=$as_save_IFS
6198  test -z "$as_dir" && as_dir=.
6199    for ac_exec_ext in '' $ac_executable_extensions; do
6200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6201    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6203    break 2
6204  fi
6205done
6206  done
6207IFS=$as_save_IFS
6208
6209  ;;
6210esac
6211fi
6212CMP=$ac_cv_path_CMP
6213if test -n "$CMP"; then
6214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6215$as_echo "$CMP" >&6; }
6216else
6217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6218$as_echo "no" >&6; }
6219fi
6220
6221
6222          if test "x$CMP" = x; then
6223            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6224          fi
6225        else
6226          # Otherwise we believe it is a complete path. Use it as it is.
6227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6228$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6229          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6230$as_echo_n "checking for CMP... " >&6; }
6231          if test ! -x "$tool_specified"; then
6232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6233$as_echo "not found" >&6; }
6234            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6235          fi
6236          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6237$as_echo "$tool_specified" >&6; }
6238        fi
6239      fi
6240    fi
6241
6242  fi
6243
6244
6245
6246  if test "x$CMP" = x; then
6247    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6248  fi
6249
6250
6251
6252
6253
6254  # Publish this variable in the help.
6255
6256
6257  if [ -z "${COMM+x}" ]; then
6258    # The variable is not set by user, try to locate tool using the code snippet
6259    for ac_prog in comm
6260do
6261  # Extract the first word of "$ac_prog", so it can be a program name with args.
6262set dummy $ac_prog; ac_word=$2
6263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6264$as_echo_n "checking for $ac_word... " >&6; }
6265if ${ac_cv_path_COMM+:} false; then :
6266  $as_echo_n "(cached) " >&6
6267else
6268  case $COMM in
6269  [\\/]* | ?:[\\/]*)
6270  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6271  ;;
6272  *)
6273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6274for as_dir in $PATH
6275do
6276  IFS=$as_save_IFS
6277  test -z "$as_dir" && as_dir=.
6278    for ac_exec_ext in '' $ac_executable_extensions; do
6279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6280    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6282    break 2
6283  fi
6284done
6285  done
6286IFS=$as_save_IFS
6287
6288  ;;
6289esac
6290fi
6291COMM=$ac_cv_path_COMM
6292if test -n "$COMM"; then
6293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6294$as_echo "$COMM" >&6; }
6295else
6296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6297$as_echo "no" >&6; }
6298fi
6299
6300
6301  test -n "$COMM" && break
6302done
6303
6304  else
6305    # The variable is set, but is it from the command line or the environment?
6306
6307    # Try to remove the string !COMM! from our list.
6308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6310      # If it failed, the variable was not from the command line. Ignore it,
6311      # but warn the user (except for BASH, which is always set by the calling BASH).
6312      if test "xCOMM" != xBASH; then
6313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6314$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6315      fi
6316      # Try to locate tool using the code snippet
6317      for ac_prog in comm
6318do
6319  # Extract the first word of "$ac_prog", so it can be a program name with args.
6320set dummy $ac_prog; ac_word=$2
6321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6322$as_echo_n "checking for $ac_word... " >&6; }
6323if ${ac_cv_path_COMM+:} false; then :
6324  $as_echo_n "(cached) " >&6
6325else
6326  case $COMM in
6327  [\\/]* | ?:[\\/]*)
6328  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6329  ;;
6330  *)
6331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6332for as_dir in $PATH
6333do
6334  IFS=$as_save_IFS
6335  test -z "$as_dir" && as_dir=.
6336    for ac_exec_ext in '' $ac_executable_extensions; do
6337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6338    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6340    break 2
6341  fi
6342done
6343  done
6344IFS=$as_save_IFS
6345
6346  ;;
6347esac
6348fi
6349COMM=$ac_cv_path_COMM
6350if test -n "$COMM"; then
6351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6352$as_echo "$COMM" >&6; }
6353else
6354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6355$as_echo "no" >&6; }
6356fi
6357
6358
6359  test -n "$COMM" && break
6360done
6361
6362    else
6363      # If it succeeded, then it was overridden by the user. We will use it
6364      # for the tool.
6365
6366      # First remove it from the list of overridden variables, so we can test
6367      # for unknown variables in the end.
6368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6369
6370      # Check if we try to supply an empty value
6371      if test "x$COMM" = x; then
6372        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6373$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6375$as_echo_n "checking for COMM... " >&6; }
6376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6377$as_echo "disabled" >&6; }
6378      else
6379        # Check if the provided tool contains a complete path.
6380        tool_specified="$COMM"
6381        tool_basename="${tool_specified##*/}"
6382        if test "x$tool_basename" = "x$tool_specified"; then
6383          # A command without a complete path is provided, search $PATH.
6384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6385$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6386          # Extract the first word of "$tool_basename", so it can be a program name with args.
6387set dummy $tool_basename; ac_word=$2
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6389$as_echo_n "checking for $ac_word... " >&6; }
6390if ${ac_cv_path_COMM+:} false; then :
6391  $as_echo_n "(cached) " >&6
6392else
6393  case $COMM in
6394  [\\/]* | ?:[\\/]*)
6395  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6396  ;;
6397  *)
6398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6399for as_dir in $PATH
6400do
6401  IFS=$as_save_IFS
6402  test -z "$as_dir" && as_dir=.
6403    for ac_exec_ext in '' $ac_executable_extensions; do
6404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6405    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6407    break 2
6408  fi
6409done
6410  done
6411IFS=$as_save_IFS
6412
6413  ;;
6414esac
6415fi
6416COMM=$ac_cv_path_COMM
6417if test -n "$COMM"; then
6418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6419$as_echo "$COMM" >&6; }
6420else
6421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422$as_echo "no" >&6; }
6423fi
6424
6425
6426          if test "x$COMM" = x; then
6427            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6428          fi
6429        else
6430          # Otherwise we believe it is a complete path. Use it as it is.
6431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6432$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6433          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6434$as_echo_n "checking for COMM... " >&6; }
6435          if test ! -x "$tool_specified"; then
6436            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6437$as_echo "not found" >&6; }
6438            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6439          fi
6440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6441$as_echo "$tool_specified" >&6; }
6442        fi
6443      fi
6444    fi
6445
6446  fi
6447
6448
6449
6450  if test "x$COMM" = x; then
6451    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6452  fi
6453
6454
6455
6456
6457
6458  # Publish this variable in the help.
6459
6460
6461  if [ -z "${CP+x}" ]; then
6462    # The variable is not set by user, try to locate tool using the code snippet
6463    for ac_prog in cp
6464do
6465  # Extract the first word of "$ac_prog", so it can be a program name with args.
6466set dummy $ac_prog; ac_word=$2
6467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6468$as_echo_n "checking for $ac_word... " >&6; }
6469if ${ac_cv_path_CP+:} false; then :
6470  $as_echo_n "(cached) " >&6
6471else
6472  case $CP in
6473  [\\/]* | ?:[\\/]*)
6474  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6475  ;;
6476  *)
6477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6478for as_dir in $PATH
6479do
6480  IFS=$as_save_IFS
6481  test -z "$as_dir" && as_dir=.
6482    for ac_exec_ext in '' $ac_executable_extensions; do
6483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6484    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6486    break 2
6487  fi
6488done
6489  done
6490IFS=$as_save_IFS
6491
6492  ;;
6493esac
6494fi
6495CP=$ac_cv_path_CP
6496if test -n "$CP"; then
6497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6498$as_echo "$CP" >&6; }
6499else
6500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6501$as_echo "no" >&6; }
6502fi
6503
6504
6505  test -n "$CP" && break
6506done
6507
6508  else
6509    # The variable is set, but is it from the command line or the environment?
6510
6511    # Try to remove the string !CP! from our list.
6512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6514      # If it failed, the variable was not from the command line. Ignore it,
6515      # but warn the user (except for BASH, which is always set by the calling BASH).
6516      if test "xCP" != xBASH; then
6517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6518$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6519      fi
6520      # Try to locate tool using the code snippet
6521      for ac_prog in cp
6522do
6523  # Extract the first word of "$ac_prog", so it can be a program name with args.
6524set dummy $ac_prog; ac_word=$2
6525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6526$as_echo_n "checking for $ac_word... " >&6; }
6527if ${ac_cv_path_CP+:} false; then :
6528  $as_echo_n "(cached) " >&6
6529else
6530  case $CP in
6531  [\\/]* | ?:[\\/]*)
6532  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6533  ;;
6534  *)
6535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6536for as_dir in $PATH
6537do
6538  IFS=$as_save_IFS
6539  test -z "$as_dir" && as_dir=.
6540    for ac_exec_ext in '' $ac_executable_extensions; do
6541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6542    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6544    break 2
6545  fi
6546done
6547  done
6548IFS=$as_save_IFS
6549
6550  ;;
6551esac
6552fi
6553CP=$ac_cv_path_CP
6554if test -n "$CP"; then
6555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6556$as_echo "$CP" >&6; }
6557else
6558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559$as_echo "no" >&6; }
6560fi
6561
6562
6563  test -n "$CP" && break
6564done
6565
6566    else
6567      # If it succeeded, then it was overridden by the user. We will use it
6568      # for the tool.
6569
6570      # First remove it from the list of overridden variables, so we can test
6571      # for unknown variables in the end.
6572      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6573
6574      # Check if we try to supply an empty value
6575      if test "x$CP" = x; then
6576        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6577$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6579$as_echo_n "checking for CP... " >&6; }
6580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6581$as_echo "disabled" >&6; }
6582      else
6583        # Check if the provided tool contains a complete path.
6584        tool_specified="$CP"
6585        tool_basename="${tool_specified##*/}"
6586        if test "x$tool_basename" = "x$tool_specified"; then
6587          # A command without a complete path is provided, search $PATH.
6588          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6589$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6590          # Extract the first word of "$tool_basename", so it can be a program name with args.
6591set dummy $tool_basename; ac_word=$2
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6593$as_echo_n "checking for $ac_word... " >&6; }
6594if ${ac_cv_path_CP+:} false; then :
6595  $as_echo_n "(cached) " >&6
6596else
6597  case $CP in
6598  [\\/]* | ?:[\\/]*)
6599  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6600  ;;
6601  *)
6602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6603for as_dir in $PATH
6604do
6605  IFS=$as_save_IFS
6606  test -z "$as_dir" && as_dir=.
6607    for ac_exec_ext in '' $ac_executable_extensions; do
6608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6609    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6611    break 2
6612  fi
6613done
6614  done
6615IFS=$as_save_IFS
6616
6617  ;;
6618esac
6619fi
6620CP=$ac_cv_path_CP
6621if test -n "$CP"; then
6622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6623$as_echo "$CP" >&6; }
6624else
6625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6626$as_echo "no" >&6; }
6627fi
6628
6629
6630          if test "x$CP" = x; then
6631            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6632          fi
6633        else
6634          # Otherwise we believe it is a complete path. Use it as it is.
6635          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6636$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6637          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6638$as_echo_n "checking for CP... " >&6; }
6639          if test ! -x "$tool_specified"; then
6640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6641$as_echo "not found" >&6; }
6642            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6643          fi
6644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6645$as_echo "$tool_specified" >&6; }
6646        fi
6647      fi
6648    fi
6649
6650  fi
6651
6652
6653
6654  if test "x$CP" = x; then
6655    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6656  fi
6657
6658
6659
6660
6661
6662  # Publish this variable in the help.
6663
6664
6665  if [ -z "${CUT+x}" ]; then
6666    # The variable is not set by user, try to locate tool using the code snippet
6667    for ac_prog in cut
6668do
6669  # Extract the first word of "$ac_prog", so it can be a program name with args.
6670set dummy $ac_prog; ac_word=$2
6671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6672$as_echo_n "checking for $ac_word... " >&6; }
6673if ${ac_cv_path_CUT+:} false; then :
6674  $as_echo_n "(cached) " >&6
6675else
6676  case $CUT in
6677  [\\/]* | ?:[\\/]*)
6678  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6679  ;;
6680  *)
6681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6682for as_dir in $PATH
6683do
6684  IFS=$as_save_IFS
6685  test -z "$as_dir" && as_dir=.
6686    for ac_exec_ext in '' $ac_executable_extensions; do
6687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6688    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6690    break 2
6691  fi
6692done
6693  done
6694IFS=$as_save_IFS
6695
6696  ;;
6697esac
6698fi
6699CUT=$ac_cv_path_CUT
6700if test -n "$CUT"; then
6701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6702$as_echo "$CUT" >&6; }
6703else
6704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6705$as_echo "no" >&6; }
6706fi
6707
6708
6709  test -n "$CUT" && break
6710done
6711
6712  else
6713    # The variable is set, but is it from the command line or the environment?
6714
6715    # Try to remove the string !CUT! from our list.
6716    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6717    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6718      # If it failed, the variable was not from the command line. Ignore it,
6719      # but warn the user (except for BASH, which is always set by the calling BASH).
6720      if test "xCUT" != xBASH; then
6721        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6722$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6723      fi
6724      # Try to locate tool using the code snippet
6725      for ac_prog in cut
6726do
6727  # Extract the first word of "$ac_prog", so it can be a program name with args.
6728set dummy $ac_prog; ac_word=$2
6729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6730$as_echo_n "checking for $ac_word... " >&6; }
6731if ${ac_cv_path_CUT+:} false; then :
6732  $as_echo_n "(cached) " >&6
6733else
6734  case $CUT in
6735  [\\/]* | ?:[\\/]*)
6736  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6737  ;;
6738  *)
6739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6740for as_dir in $PATH
6741do
6742  IFS=$as_save_IFS
6743  test -z "$as_dir" && as_dir=.
6744    for ac_exec_ext in '' $ac_executable_extensions; do
6745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6746    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6748    break 2
6749  fi
6750done
6751  done
6752IFS=$as_save_IFS
6753
6754  ;;
6755esac
6756fi
6757CUT=$ac_cv_path_CUT
6758if test -n "$CUT"; then
6759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6760$as_echo "$CUT" >&6; }
6761else
6762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6763$as_echo "no" >&6; }
6764fi
6765
6766
6767  test -n "$CUT" && break
6768done
6769
6770    else
6771      # If it succeeded, then it was overridden by the user. We will use it
6772      # for the tool.
6773
6774      # First remove it from the list of overridden variables, so we can test
6775      # for unknown variables in the end.
6776      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6777
6778      # Check if we try to supply an empty value
6779      if test "x$CUT" = x; then
6780        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6781$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6783$as_echo_n "checking for CUT... " >&6; }
6784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6785$as_echo "disabled" >&6; }
6786      else
6787        # Check if the provided tool contains a complete path.
6788        tool_specified="$CUT"
6789        tool_basename="${tool_specified##*/}"
6790        if test "x$tool_basename" = "x$tool_specified"; then
6791          # A command without a complete path is provided, search $PATH.
6792          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6793$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6794          # Extract the first word of "$tool_basename", so it can be a program name with args.
6795set dummy $tool_basename; ac_word=$2
6796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6797$as_echo_n "checking for $ac_word... " >&6; }
6798if ${ac_cv_path_CUT+:} false; then :
6799  $as_echo_n "(cached) " >&6
6800else
6801  case $CUT in
6802  [\\/]* | ?:[\\/]*)
6803  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6804  ;;
6805  *)
6806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6807for as_dir in $PATH
6808do
6809  IFS=$as_save_IFS
6810  test -z "$as_dir" && as_dir=.
6811    for ac_exec_ext in '' $ac_executable_extensions; do
6812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6813    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6815    break 2
6816  fi
6817done
6818  done
6819IFS=$as_save_IFS
6820
6821  ;;
6822esac
6823fi
6824CUT=$ac_cv_path_CUT
6825if test -n "$CUT"; then
6826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6827$as_echo "$CUT" >&6; }
6828else
6829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6830$as_echo "no" >&6; }
6831fi
6832
6833
6834          if test "x$CUT" = x; then
6835            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6836          fi
6837        else
6838          # Otherwise we believe it is a complete path. Use it as it is.
6839          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6840$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6841          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6842$as_echo_n "checking for CUT... " >&6; }
6843          if test ! -x "$tool_specified"; then
6844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6845$as_echo "not found" >&6; }
6846            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6847          fi
6848          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6849$as_echo "$tool_specified" >&6; }
6850        fi
6851      fi
6852    fi
6853
6854  fi
6855
6856
6857
6858  if test "x$CUT" = x; then
6859    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6860  fi
6861
6862
6863
6864
6865
6866  # Publish this variable in the help.
6867
6868
6869  if [ -z "${DATE+x}" ]; then
6870    # The variable is not set by user, try to locate tool using the code snippet
6871    for ac_prog in date
6872do
6873  # Extract the first word of "$ac_prog", so it can be a program name with args.
6874set dummy $ac_prog; ac_word=$2
6875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6876$as_echo_n "checking for $ac_word... " >&6; }
6877if ${ac_cv_path_DATE+:} false; then :
6878  $as_echo_n "(cached) " >&6
6879else
6880  case $DATE in
6881  [\\/]* | ?:[\\/]*)
6882  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6883  ;;
6884  *)
6885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6886for as_dir in $PATH
6887do
6888  IFS=$as_save_IFS
6889  test -z "$as_dir" && as_dir=.
6890    for ac_exec_ext in '' $ac_executable_extensions; do
6891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6892    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6894    break 2
6895  fi
6896done
6897  done
6898IFS=$as_save_IFS
6899
6900  ;;
6901esac
6902fi
6903DATE=$ac_cv_path_DATE
6904if test -n "$DATE"; then
6905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6906$as_echo "$DATE" >&6; }
6907else
6908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6909$as_echo "no" >&6; }
6910fi
6911
6912
6913  test -n "$DATE" && break
6914done
6915
6916  else
6917    # The variable is set, but is it from the command line or the environment?
6918
6919    # Try to remove the string !DATE! from our list.
6920    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6921    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6922      # If it failed, the variable was not from the command line. Ignore it,
6923      # but warn the user (except for BASH, which is always set by the calling BASH).
6924      if test "xDATE" != xBASH; then
6925        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6926$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6927      fi
6928      # Try to locate tool using the code snippet
6929      for ac_prog in date
6930do
6931  # Extract the first word of "$ac_prog", so it can be a program name with args.
6932set dummy $ac_prog; ac_word=$2
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6934$as_echo_n "checking for $ac_word... " >&6; }
6935if ${ac_cv_path_DATE+:} false; then :
6936  $as_echo_n "(cached) " >&6
6937else
6938  case $DATE in
6939  [\\/]* | ?:[\\/]*)
6940  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6941  ;;
6942  *)
6943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6944for as_dir in $PATH
6945do
6946  IFS=$as_save_IFS
6947  test -z "$as_dir" && as_dir=.
6948    for ac_exec_ext in '' $ac_executable_extensions; do
6949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6950    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6952    break 2
6953  fi
6954done
6955  done
6956IFS=$as_save_IFS
6957
6958  ;;
6959esac
6960fi
6961DATE=$ac_cv_path_DATE
6962if test -n "$DATE"; then
6963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6964$as_echo "$DATE" >&6; }
6965else
6966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6967$as_echo "no" >&6; }
6968fi
6969
6970
6971  test -n "$DATE" && break
6972done
6973
6974    else
6975      # If it succeeded, then it was overridden by the user. We will use it
6976      # for the tool.
6977
6978      # First remove it from the list of overridden variables, so we can test
6979      # for unknown variables in the end.
6980      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6981
6982      # Check if we try to supply an empty value
6983      if test "x$DATE" = x; then
6984        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6985$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6986        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6987$as_echo_n "checking for DATE... " >&6; }
6988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6989$as_echo "disabled" >&6; }
6990      else
6991        # Check if the provided tool contains a complete path.
6992        tool_specified="$DATE"
6993        tool_basename="${tool_specified##*/}"
6994        if test "x$tool_basename" = "x$tool_specified"; then
6995          # A command without a complete path is provided, search $PATH.
6996          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6997$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6998          # Extract the first word of "$tool_basename", so it can be a program name with args.
6999set dummy $tool_basename; ac_word=$2
7000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7001$as_echo_n "checking for $ac_word... " >&6; }
7002if ${ac_cv_path_DATE+:} false; then :
7003  $as_echo_n "(cached) " >&6
7004else
7005  case $DATE in
7006  [\\/]* | ?:[\\/]*)
7007  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7008  ;;
7009  *)
7010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7011for as_dir in $PATH
7012do
7013  IFS=$as_save_IFS
7014  test -z "$as_dir" && as_dir=.
7015    for ac_exec_ext in '' $ac_executable_extensions; do
7016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7017    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7019    break 2
7020  fi
7021done
7022  done
7023IFS=$as_save_IFS
7024
7025  ;;
7026esac
7027fi
7028DATE=$ac_cv_path_DATE
7029if test -n "$DATE"; then
7030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7031$as_echo "$DATE" >&6; }
7032else
7033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7034$as_echo "no" >&6; }
7035fi
7036
7037
7038          if test "x$DATE" = x; then
7039            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7040          fi
7041        else
7042          # Otherwise we believe it is a complete path. Use it as it is.
7043          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7044$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7045          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7046$as_echo_n "checking for DATE... " >&6; }
7047          if test ! -x "$tool_specified"; then
7048            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7049$as_echo "not found" >&6; }
7050            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7051          fi
7052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7053$as_echo "$tool_specified" >&6; }
7054        fi
7055      fi
7056    fi
7057
7058  fi
7059
7060
7061
7062  if test "x$DATE" = x; then
7063    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7064  fi
7065
7066
7067
7068
7069
7070  # Publish this variable in the help.
7071
7072
7073  if [ -z "${DIFF+x}" ]; then
7074    # The variable is not set by user, try to locate tool using the code snippet
7075    for ac_prog in gdiff diff
7076do
7077  # Extract the first word of "$ac_prog", so it can be a program name with args.
7078set dummy $ac_prog; ac_word=$2
7079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7080$as_echo_n "checking for $ac_word... " >&6; }
7081if ${ac_cv_path_DIFF+:} false; then :
7082  $as_echo_n "(cached) " >&6
7083else
7084  case $DIFF in
7085  [\\/]* | ?:[\\/]*)
7086  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7087  ;;
7088  *)
7089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7090for as_dir in $PATH
7091do
7092  IFS=$as_save_IFS
7093  test -z "$as_dir" && as_dir=.
7094    for ac_exec_ext in '' $ac_executable_extensions; do
7095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7096    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7098    break 2
7099  fi
7100done
7101  done
7102IFS=$as_save_IFS
7103
7104  ;;
7105esac
7106fi
7107DIFF=$ac_cv_path_DIFF
7108if test -n "$DIFF"; then
7109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7110$as_echo "$DIFF" >&6; }
7111else
7112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7113$as_echo "no" >&6; }
7114fi
7115
7116
7117  test -n "$DIFF" && break
7118done
7119
7120  else
7121    # The variable is set, but is it from the command line or the environment?
7122
7123    # Try to remove the string !DIFF! from our list.
7124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7126      # If it failed, the variable was not from the command line. Ignore it,
7127      # but warn the user (except for BASH, which is always set by the calling BASH).
7128      if test "xDIFF" != xBASH; then
7129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7130$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7131      fi
7132      # Try to locate tool using the code snippet
7133      for ac_prog in gdiff diff
7134do
7135  # Extract the first word of "$ac_prog", so it can be a program name with args.
7136set dummy $ac_prog; ac_word=$2
7137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7138$as_echo_n "checking for $ac_word... " >&6; }
7139if ${ac_cv_path_DIFF+:} false; then :
7140  $as_echo_n "(cached) " >&6
7141else
7142  case $DIFF in
7143  [\\/]* | ?:[\\/]*)
7144  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7145  ;;
7146  *)
7147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7148for as_dir in $PATH
7149do
7150  IFS=$as_save_IFS
7151  test -z "$as_dir" && as_dir=.
7152    for ac_exec_ext in '' $ac_executable_extensions; do
7153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7154    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7156    break 2
7157  fi
7158done
7159  done
7160IFS=$as_save_IFS
7161
7162  ;;
7163esac
7164fi
7165DIFF=$ac_cv_path_DIFF
7166if test -n "$DIFF"; then
7167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7168$as_echo "$DIFF" >&6; }
7169else
7170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7171$as_echo "no" >&6; }
7172fi
7173
7174
7175  test -n "$DIFF" && break
7176done
7177
7178    else
7179      # If it succeeded, then it was overridden by the user. We will use it
7180      # for the tool.
7181
7182      # First remove it from the list of overridden variables, so we can test
7183      # for unknown variables in the end.
7184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7185
7186      # Check if we try to supply an empty value
7187      if test "x$DIFF" = x; then
7188        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7189$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7191$as_echo_n "checking for DIFF... " >&6; }
7192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7193$as_echo "disabled" >&6; }
7194      else
7195        # Check if the provided tool contains a complete path.
7196        tool_specified="$DIFF"
7197        tool_basename="${tool_specified##*/}"
7198        if test "x$tool_basename" = "x$tool_specified"; then
7199          # A command without a complete path is provided, search $PATH.
7200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7201$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7202          # Extract the first word of "$tool_basename", so it can be a program name with args.
7203set dummy $tool_basename; ac_word=$2
7204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7205$as_echo_n "checking for $ac_word... " >&6; }
7206if ${ac_cv_path_DIFF+:} false; then :
7207  $as_echo_n "(cached) " >&6
7208else
7209  case $DIFF in
7210  [\\/]* | ?:[\\/]*)
7211  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7212  ;;
7213  *)
7214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7215for as_dir in $PATH
7216do
7217  IFS=$as_save_IFS
7218  test -z "$as_dir" && as_dir=.
7219    for ac_exec_ext in '' $ac_executable_extensions; do
7220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7221    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7223    break 2
7224  fi
7225done
7226  done
7227IFS=$as_save_IFS
7228
7229  ;;
7230esac
7231fi
7232DIFF=$ac_cv_path_DIFF
7233if test -n "$DIFF"; then
7234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7235$as_echo "$DIFF" >&6; }
7236else
7237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7238$as_echo "no" >&6; }
7239fi
7240
7241
7242          if test "x$DIFF" = x; then
7243            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7244          fi
7245        else
7246          # Otherwise we believe it is a complete path. Use it as it is.
7247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7248$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7249          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7250$as_echo_n "checking for DIFF... " >&6; }
7251          if test ! -x "$tool_specified"; then
7252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7253$as_echo "not found" >&6; }
7254            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7255          fi
7256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7257$as_echo "$tool_specified" >&6; }
7258        fi
7259      fi
7260    fi
7261
7262  fi
7263
7264
7265
7266  if test "x$DIFF" = x; then
7267    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7268  fi
7269
7270
7271
7272
7273
7274  # Publish this variable in the help.
7275
7276
7277  if [ -z "${DIRNAME+x}" ]; then
7278    # The variable is not set by user, try to locate tool using the code snippet
7279    for ac_prog in dirname
7280do
7281  # Extract the first word of "$ac_prog", so it can be a program name with args.
7282set dummy $ac_prog; ac_word=$2
7283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7284$as_echo_n "checking for $ac_word... " >&6; }
7285if ${ac_cv_path_DIRNAME+:} false; then :
7286  $as_echo_n "(cached) " >&6
7287else
7288  case $DIRNAME in
7289  [\\/]* | ?:[\\/]*)
7290  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7291  ;;
7292  *)
7293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7294for as_dir in $PATH
7295do
7296  IFS=$as_save_IFS
7297  test -z "$as_dir" && as_dir=.
7298    for ac_exec_ext in '' $ac_executable_extensions; do
7299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7300    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7302    break 2
7303  fi
7304done
7305  done
7306IFS=$as_save_IFS
7307
7308  ;;
7309esac
7310fi
7311DIRNAME=$ac_cv_path_DIRNAME
7312if test -n "$DIRNAME"; then
7313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7314$as_echo "$DIRNAME" >&6; }
7315else
7316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7317$as_echo "no" >&6; }
7318fi
7319
7320
7321  test -n "$DIRNAME" && break
7322done
7323
7324  else
7325    # The variable is set, but is it from the command line or the environment?
7326
7327    # Try to remove the string !DIRNAME! from our list.
7328    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7329    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7330      # If it failed, the variable was not from the command line. Ignore it,
7331      # but warn the user (except for BASH, which is always set by the calling BASH).
7332      if test "xDIRNAME" != xBASH; then
7333        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7334$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7335      fi
7336      # Try to locate tool using the code snippet
7337      for ac_prog in dirname
7338do
7339  # Extract the first word of "$ac_prog", so it can be a program name with args.
7340set dummy $ac_prog; ac_word=$2
7341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7342$as_echo_n "checking for $ac_word... " >&6; }
7343if ${ac_cv_path_DIRNAME+:} false; then :
7344  $as_echo_n "(cached) " >&6
7345else
7346  case $DIRNAME in
7347  [\\/]* | ?:[\\/]*)
7348  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7349  ;;
7350  *)
7351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7352for as_dir in $PATH
7353do
7354  IFS=$as_save_IFS
7355  test -z "$as_dir" && as_dir=.
7356    for ac_exec_ext in '' $ac_executable_extensions; do
7357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7358    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7360    break 2
7361  fi
7362done
7363  done
7364IFS=$as_save_IFS
7365
7366  ;;
7367esac
7368fi
7369DIRNAME=$ac_cv_path_DIRNAME
7370if test -n "$DIRNAME"; then
7371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7372$as_echo "$DIRNAME" >&6; }
7373else
7374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7375$as_echo "no" >&6; }
7376fi
7377
7378
7379  test -n "$DIRNAME" && break
7380done
7381
7382    else
7383      # If it succeeded, then it was overridden by the user. We will use it
7384      # for the tool.
7385
7386      # First remove it from the list of overridden variables, so we can test
7387      # for unknown variables in the end.
7388      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7389
7390      # Check if we try to supply an empty value
7391      if test "x$DIRNAME" = x; then
7392        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7393$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7394        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7395$as_echo_n "checking for DIRNAME... " >&6; }
7396        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7397$as_echo "disabled" >&6; }
7398      else
7399        # Check if the provided tool contains a complete path.
7400        tool_specified="$DIRNAME"
7401        tool_basename="${tool_specified##*/}"
7402        if test "x$tool_basename" = "x$tool_specified"; then
7403          # A command without a complete path is provided, search $PATH.
7404          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7405$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7406          # Extract the first word of "$tool_basename", so it can be a program name with args.
7407set dummy $tool_basename; ac_word=$2
7408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7409$as_echo_n "checking for $ac_word... " >&6; }
7410if ${ac_cv_path_DIRNAME+:} false; then :
7411  $as_echo_n "(cached) " >&6
7412else
7413  case $DIRNAME in
7414  [\\/]* | ?:[\\/]*)
7415  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7416  ;;
7417  *)
7418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7419for as_dir in $PATH
7420do
7421  IFS=$as_save_IFS
7422  test -z "$as_dir" && as_dir=.
7423    for ac_exec_ext in '' $ac_executable_extensions; do
7424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7425    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7427    break 2
7428  fi
7429done
7430  done
7431IFS=$as_save_IFS
7432
7433  ;;
7434esac
7435fi
7436DIRNAME=$ac_cv_path_DIRNAME
7437if test -n "$DIRNAME"; then
7438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7439$as_echo "$DIRNAME" >&6; }
7440else
7441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7442$as_echo "no" >&6; }
7443fi
7444
7445
7446          if test "x$DIRNAME" = x; then
7447            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7448          fi
7449        else
7450          # Otherwise we believe it is a complete path. Use it as it is.
7451          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7452$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7453          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7454$as_echo_n "checking for DIRNAME... " >&6; }
7455          if test ! -x "$tool_specified"; then
7456            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7457$as_echo "not found" >&6; }
7458            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7459          fi
7460          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7461$as_echo "$tool_specified" >&6; }
7462        fi
7463      fi
7464    fi
7465
7466  fi
7467
7468
7469
7470  if test "x$DIRNAME" = x; then
7471    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7472  fi
7473
7474
7475
7476
7477
7478  # Publish this variable in the help.
7479
7480
7481  if [ -z "${ECHO+x}" ]; then
7482    # The variable is not set by user, try to locate tool using the code snippet
7483    for ac_prog in echo
7484do
7485  # Extract the first word of "$ac_prog", so it can be a program name with args.
7486set dummy $ac_prog; ac_word=$2
7487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7488$as_echo_n "checking for $ac_word... " >&6; }
7489if ${ac_cv_path_ECHO+:} false; then :
7490  $as_echo_n "(cached) " >&6
7491else
7492  case $ECHO in
7493  [\\/]* | ?:[\\/]*)
7494  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7495  ;;
7496  *)
7497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7498for as_dir in $PATH
7499do
7500  IFS=$as_save_IFS
7501  test -z "$as_dir" && as_dir=.
7502    for ac_exec_ext in '' $ac_executable_extensions; do
7503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7504    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7506    break 2
7507  fi
7508done
7509  done
7510IFS=$as_save_IFS
7511
7512  ;;
7513esac
7514fi
7515ECHO=$ac_cv_path_ECHO
7516if test -n "$ECHO"; then
7517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7518$as_echo "$ECHO" >&6; }
7519else
7520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7521$as_echo "no" >&6; }
7522fi
7523
7524
7525  test -n "$ECHO" && break
7526done
7527
7528  else
7529    # The variable is set, but is it from the command line or the environment?
7530
7531    # Try to remove the string !ECHO! from our list.
7532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7534      # If it failed, the variable was not from the command line. Ignore it,
7535      # but warn the user (except for BASH, which is always set by the calling BASH).
7536      if test "xECHO" != xBASH; then
7537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7538$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7539      fi
7540      # Try to locate tool using the code snippet
7541      for ac_prog in echo
7542do
7543  # Extract the first word of "$ac_prog", so it can be a program name with args.
7544set dummy $ac_prog; ac_word=$2
7545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7546$as_echo_n "checking for $ac_word... " >&6; }
7547if ${ac_cv_path_ECHO+:} false; then :
7548  $as_echo_n "(cached) " >&6
7549else
7550  case $ECHO in
7551  [\\/]* | ?:[\\/]*)
7552  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7553  ;;
7554  *)
7555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7556for as_dir in $PATH
7557do
7558  IFS=$as_save_IFS
7559  test -z "$as_dir" && as_dir=.
7560    for ac_exec_ext in '' $ac_executable_extensions; do
7561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7562    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7564    break 2
7565  fi
7566done
7567  done
7568IFS=$as_save_IFS
7569
7570  ;;
7571esac
7572fi
7573ECHO=$ac_cv_path_ECHO
7574if test -n "$ECHO"; then
7575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7576$as_echo "$ECHO" >&6; }
7577else
7578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7579$as_echo "no" >&6; }
7580fi
7581
7582
7583  test -n "$ECHO" && break
7584done
7585
7586    else
7587      # If it succeeded, then it was overridden by the user. We will use it
7588      # for the tool.
7589
7590      # First remove it from the list of overridden variables, so we can test
7591      # for unknown variables in the end.
7592      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7593
7594      # Check if we try to supply an empty value
7595      if test "x$ECHO" = x; then
7596        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7597$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7598        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7599$as_echo_n "checking for ECHO... " >&6; }
7600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7601$as_echo "disabled" >&6; }
7602      else
7603        # Check if the provided tool contains a complete path.
7604        tool_specified="$ECHO"
7605        tool_basename="${tool_specified##*/}"
7606        if test "x$tool_basename" = "x$tool_specified"; then
7607          # A command without a complete path is provided, search $PATH.
7608          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7609$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7610          # Extract the first word of "$tool_basename", so it can be a program name with args.
7611set dummy $tool_basename; ac_word=$2
7612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7613$as_echo_n "checking for $ac_word... " >&6; }
7614if ${ac_cv_path_ECHO+:} false; then :
7615  $as_echo_n "(cached) " >&6
7616else
7617  case $ECHO in
7618  [\\/]* | ?:[\\/]*)
7619  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7620  ;;
7621  *)
7622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7623for as_dir in $PATH
7624do
7625  IFS=$as_save_IFS
7626  test -z "$as_dir" && as_dir=.
7627    for ac_exec_ext in '' $ac_executable_extensions; do
7628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7629    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7631    break 2
7632  fi
7633done
7634  done
7635IFS=$as_save_IFS
7636
7637  ;;
7638esac
7639fi
7640ECHO=$ac_cv_path_ECHO
7641if test -n "$ECHO"; then
7642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7643$as_echo "$ECHO" >&6; }
7644else
7645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7646$as_echo "no" >&6; }
7647fi
7648
7649
7650          if test "x$ECHO" = x; then
7651            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7652          fi
7653        else
7654          # Otherwise we believe it is a complete path. Use it as it is.
7655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7656$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7657          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7658$as_echo_n "checking for ECHO... " >&6; }
7659          if test ! -x "$tool_specified"; then
7660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7661$as_echo "not found" >&6; }
7662            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7663          fi
7664          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7665$as_echo "$tool_specified" >&6; }
7666        fi
7667      fi
7668    fi
7669
7670  fi
7671
7672
7673
7674  if test "x$ECHO" = x; then
7675    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7676  fi
7677
7678
7679
7680
7681
7682  # Publish this variable in the help.
7683
7684
7685  if [ -z "${EXPR+x}" ]; then
7686    # The variable is not set by user, try to locate tool using the code snippet
7687    for ac_prog in expr
7688do
7689  # Extract the first word of "$ac_prog", so it can be a program name with args.
7690set dummy $ac_prog; ac_word=$2
7691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7692$as_echo_n "checking for $ac_word... " >&6; }
7693if ${ac_cv_path_EXPR+:} false; then :
7694  $as_echo_n "(cached) " >&6
7695else
7696  case $EXPR in
7697  [\\/]* | ?:[\\/]*)
7698  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7699  ;;
7700  *)
7701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7702for as_dir in $PATH
7703do
7704  IFS=$as_save_IFS
7705  test -z "$as_dir" && as_dir=.
7706    for ac_exec_ext in '' $ac_executable_extensions; do
7707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7708    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7710    break 2
7711  fi
7712done
7713  done
7714IFS=$as_save_IFS
7715
7716  ;;
7717esac
7718fi
7719EXPR=$ac_cv_path_EXPR
7720if test -n "$EXPR"; then
7721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7722$as_echo "$EXPR" >&6; }
7723else
7724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7725$as_echo "no" >&6; }
7726fi
7727
7728
7729  test -n "$EXPR" && break
7730done
7731
7732  else
7733    # The variable is set, but is it from the command line or the environment?
7734
7735    # Try to remove the string !EXPR! from our list.
7736    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7737    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7738      # If it failed, the variable was not from the command line. Ignore it,
7739      # but warn the user (except for BASH, which is always set by the calling BASH).
7740      if test "xEXPR" != xBASH; then
7741        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7742$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7743      fi
7744      # Try to locate tool using the code snippet
7745      for ac_prog in expr
7746do
7747  # Extract the first word of "$ac_prog", so it can be a program name with args.
7748set dummy $ac_prog; ac_word=$2
7749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7750$as_echo_n "checking for $ac_word... " >&6; }
7751if ${ac_cv_path_EXPR+:} false; then :
7752  $as_echo_n "(cached) " >&6
7753else
7754  case $EXPR in
7755  [\\/]* | ?:[\\/]*)
7756  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7757  ;;
7758  *)
7759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7760for as_dir in $PATH
7761do
7762  IFS=$as_save_IFS
7763  test -z "$as_dir" && as_dir=.
7764    for ac_exec_ext in '' $ac_executable_extensions; do
7765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7766    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7768    break 2
7769  fi
7770done
7771  done
7772IFS=$as_save_IFS
7773
7774  ;;
7775esac
7776fi
7777EXPR=$ac_cv_path_EXPR
7778if test -n "$EXPR"; then
7779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7780$as_echo "$EXPR" >&6; }
7781else
7782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7783$as_echo "no" >&6; }
7784fi
7785
7786
7787  test -n "$EXPR" && break
7788done
7789
7790    else
7791      # If it succeeded, then it was overridden by the user. We will use it
7792      # for the tool.
7793
7794      # First remove it from the list of overridden variables, so we can test
7795      # for unknown variables in the end.
7796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7797
7798      # Check if we try to supply an empty value
7799      if test "x$EXPR" = x; then
7800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7801$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7803$as_echo_n "checking for EXPR... " >&6; }
7804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7805$as_echo "disabled" >&6; }
7806      else
7807        # Check if the provided tool contains a complete path.
7808        tool_specified="$EXPR"
7809        tool_basename="${tool_specified##*/}"
7810        if test "x$tool_basename" = "x$tool_specified"; then
7811          # A command without a complete path is provided, search $PATH.
7812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7813$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7814          # Extract the first word of "$tool_basename", so it can be a program name with args.
7815set dummy $tool_basename; ac_word=$2
7816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7817$as_echo_n "checking for $ac_word... " >&6; }
7818if ${ac_cv_path_EXPR+:} false; then :
7819  $as_echo_n "(cached) " >&6
7820else
7821  case $EXPR in
7822  [\\/]* | ?:[\\/]*)
7823  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7824  ;;
7825  *)
7826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7827for as_dir in $PATH
7828do
7829  IFS=$as_save_IFS
7830  test -z "$as_dir" && as_dir=.
7831    for ac_exec_ext in '' $ac_executable_extensions; do
7832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7833    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7835    break 2
7836  fi
7837done
7838  done
7839IFS=$as_save_IFS
7840
7841  ;;
7842esac
7843fi
7844EXPR=$ac_cv_path_EXPR
7845if test -n "$EXPR"; then
7846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7847$as_echo "$EXPR" >&6; }
7848else
7849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7850$as_echo "no" >&6; }
7851fi
7852
7853
7854          if test "x$EXPR" = x; then
7855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7856          fi
7857        else
7858          # Otherwise we believe it is a complete path. Use it as it is.
7859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7860$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7862$as_echo_n "checking for EXPR... " >&6; }
7863          if test ! -x "$tool_specified"; then
7864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7865$as_echo "not found" >&6; }
7866            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7867          fi
7868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7869$as_echo "$tool_specified" >&6; }
7870        fi
7871      fi
7872    fi
7873
7874  fi
7875
7876
7877
7878  if test "x$EXPR" = x; then
7879    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7880  fi
7881
7882
7883
7884
7885
7886  # Publish this variable in the help.
7887
7888
7889  if [ -z "${FILE+x}" ]; then
7890    # The variable is not set by user, try to locate tool using the code snippet
7891    for ac_prog in file
7892do
7893  # Extract the first word of "$ac_prog", so it can be a program name with args.
7894set dummy $ac_prog; ac_word=$2
7895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7896$as_echo_n "checking for $ac_word... " >&6; }
7897if ${ac_cv_path_FILE+:} false; then :
7898  $as_echo_n "(cached) " >&6
7899else
7900  case $FILE in
7901  [\\/]* | ?:[\\/]*)
7902  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7903  ;;
7904  *)
7905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7906for as_dir in $PATH
7907do
7908  IFS=$as_save_IFS
7909  test -z "$as_dir" && as_dir=.
7910    for ac_exec_ext in '' $ac_executable_extensions; do
7911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7912    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7914    break 2
7915  fi
7916done
7917  done
7918IFS=$as_save_IFS
7919
7920  ;;
7921esac
7922fi
7923FILE=$ac_cv_path_FILE
7924if test -n "$FILE"; then
7925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7926$as_echo "$FILE" >&6; }
7927else
7928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7929$as_echo "no" >&6; }
7930fi
7931
7932
7933  test -n "$FILE" && break
7934done
7935
7936  else
7937    # The variable is set, but is it from the command line or the environment?
7938
7939    # Try to remove the string !FILE! from our list.
7940    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7941    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7942      # If it failed, the variable was not from the command line. Ignore it,
7943      # but warn the user (except for BASH, which is always set by the calling BASH).
7944      if test "xFILE" != xBASH; then
7945        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7946$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7947      fi
7948      # Try to locate tool using the code snippet
7949      for ac_prog in file
7950do
7951  # Extract the first word of "$ac_prog", so it can be a program name with args.
7952set dummy $ac_prog; ac_word=$2
7953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7954$as_echo_n "checking for $ac_word... " >&6; }
7955if ${ac_cv_path_FILE+:} false; then :
7956  $as_echo_n "(cached) " >&6
7957else
7958  case $FILE in
7959  [\\/]* | ?:[\\/]*)
7960  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7961  ;;
7962  *)
7963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7964for as_dir in $PATH
7965do
7966  IFS=$as_save_IFS
7967  test -z "$as_dir" && as_dir=.
7968    for ac_exec_ext in '' $ac_executable_extensions; do
7969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7970    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7972    break 2
7973  fi
7974done
7975  done
7976IFS=$as_save_IFS
7977
7978  ;;
7979esac
7980fi
7981FILE=$ac_cv_path_FILE
7982if test -n "$FILE"; then
7983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7984$as_echo "$FILE" >&6; }
7985else
7986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7987$as_echo "no" >&6; }
7988fi
7989
7990
7991  test -n "$FILE" && break
7992done
7993
7994    else
7995      # If it succeeded, then it was overridden by the user. We will use it
7996      # for the tool.
7997
7998      # First remove it from the list of overridden variables, so we can test
7999      # for unknown variables in the end.
8000      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8001
8002      # Check if we try to supply an empty value
8003      if test "x$FILE" = x; then
8004        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8005$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8006        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8007$as_echo_n "checking for FILE... " >&6; }
8008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8009$as_echo "disabled" >&6; }
8010      else
8011        # Check if the provided tool contains a complete path.
8012        tool_specified="$FILE"
8013        tool_basename="${tool_specified##*/}"
8014        if test "x$tool_basename" = "x$tool_specified"; then
8015          # A command without a complete path is provided, search $PATH.
8016          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8017$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8018          # Extract the first word of "$tool_basename", so it can be a program name with args.
8019set dummy $tool_basename; ac_word=$2
8020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8021$as_echo_n "checking for $ac_word... " >&6; }
8022if ${ac_cv_path_FILE+:} false; then :
8023  $as_echo_n "(cached) " >&6
8024else
8025  case $FILE in
8026  [\\/]* | ?:[\\/]*)
8027  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8028  ;;
8029  *)
8030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8031for as_dir in $PATH
8032do
8033  IFS=$as_save_IFS
8034  test -z "$as_dir" && as_dir=.
8035    for ac_exec_ext in '' $ac_executable_extensions; do
8036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8037    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8039    break 2
8040  fi
8041done
8042  done
8043IFS=$as_save_IFS
8044
8045  ;;
8046esac
8047fi
8048FILE=$ac_cv_path_FILE
8049if test -n "$FILE"; then
8050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8051$as_echo "$FILE" >&6; }
8052else
8053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8054$as_echo "no" >&6; }
8055fi
8056
8057
8058          if test "x$FILE" = x; then
8059            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8060          fi
8061        else
8062          # Otherwise we believe it is a complete path. Use it as it is.
8063          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8064$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8065          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8066$as_echo_n "checking for FILE... " >&6; }
8067          if test ! -x "$tool_specified"; then
8068            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8069$as_echo "not found" >&6; }
8070            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8071          fi
8072          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8073$as_echo "$tool_specified" >&6; }
8074        fi
8075      fi
8076    fi
8077
8078  fi
8079
8080
8081
8082  if test "x$FILE" = x; then
8083    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8084  fi
8085
8086
8087
8088
8089
8090  # Publish this variable in the help.
8091
8092
8093  if [ -z "${FIND+x}" ]; then
8094    # The variable is not set by user, try to locate tool using the code snippet
8095    for ac_prog in find
8096do
8097  # Extract the first word of "$ac_prog", so it can be a program name with args.
8098set dummy $ac_prog; ac_word=$2
8099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8100$as_echo_n "checking for $ac_word... " >&6; }
8101if ${ac_cv_path_FIND+:} false; then :
8102  $as_echo_n "(cached) " >&6
8103else
8104  case $FIND in
8105  [\\/]* | ?:[\\/]*)
8106  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8107  ;;
8108  *)
8109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8110for as_dir in $PATH
8111do
8112  IFS=$as_save_IFS
8113  test -z "$as_dir" && as_dir=.
8114    for ac_exec_ext in '' $ac_executable_extensions; do
8115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8116    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8118    break 2
8119  fi
8120done
8121  done
8122IFS=$as_save_IFS
8123
8124  ;;
8125esac
8126fi
8127FIND=$ac_cv_path_FIND
8128if test -n "$FIND"; then
8129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8130$as_echo "$FIND" >&6; }
8131else
8132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8133$as_echo "no" >&6; }
8134fi
8135
8136
8137  test -n "$FIND" && break
8138done
8139
8140  else
8141    # The variable is set, but is it from the command line or the environment?
8142
8143    # Try to remove the string !FIND! from our list.
8144    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8145    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8146      # If it failed, the variable was not from the command line. Ignore it,
8147      # but warn the user (except for BASH, which is always set by the calling BASH).
8148      if test "xFIND" != xBASH; then
8149        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8150$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8151      fi
8152      # Try to locate tool using the code snippet
8153      for ac_prog in find
8154do
8155  # Extract the first word of "$ac_prog", so it can be a program name with args.
8156set dummy $ac_prog; ac_word=$2
8157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8158$as_echo_n "checking for $ac_word... " >&6; }
8159if ${ac_cv_path_FIND+:} false; then :
8160  $as_echo_n "(cached) " >&6
8161else
8162  case $FIND in
8163  [\\/]* | ?:[\\/]*)
8164  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8165  ;;
8166  *)
8167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8168for as_dir in $PATH
8169do
8170  IFS=$as_save_IFS
8171  test -z "$as_dir" && as_dir=.
8172    for ac_exec_ext in '' $ac_executable_extensions; do
8173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8174    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8176    break 2
8177  fi
8178done
8179  done
8180IFS=$as_save_IFS
8181
8182  ;;
8183esac
8184fi
8185FIND=$ac_cv_path_FIND
8186if test -n "$FIND"; then
8187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8188$as_echo "$FIND" >&6; }
8189else
8190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8191$as_echo "no" >&6; }
8192fi
8193
8194
8195  test -n "$FIND" && break
8196done
8197
8198    else
8199      # If it succeeded, then it was overridden by the user. We will use it
8200      # for the tool.
8201
8202      # First remove it from the list of overridden variables, so we can test
8203      # for unknown variables in the end.
8204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8205
8206      # Check if we try to supply an empty value
8207      if test "x$FIND" = x; then
8208        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8209$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8210        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8211$as_echo_n "checking for FIND... " >&6; }
8212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8213$as_echo "disabled" >&6; }
8214      else
8215        # Check if the provided tool contains a complete path.
8216        tool_specified="$FIND"
8217        tool_basename="${tool_specified##*/}"
8218        if test "x$tool_basename" = "x$tool_specified"; then
8219          # A command without a complete path is provided, search $PATH.
8220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8221$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8222          # Extract the first word of "$tool_basename", so it can be a program name with args.
8223set dummy $tool_basename; ac_word=$2
8224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8225$as_echo_n "checking for $ac_word... " >&6; }
8226if ${ac_cv_path_FIND+:} false; then :
8227  $as_echo_n "(cached) " >&6
8228else
8229  case $FIND in
8230  [\\/]* | ?:[\\/]*)
8231  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8232  ;;
8233  *)
8234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8235for as_dir in $PATH
8236do
8237  IFS=$as_save_IFS
8238  test -z "$as_dir" && as_dir=.
8239    for ac_exec_ext in '' $ac_executable_extensions; do
8240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8241    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8243    break 2
8244  fi
8245done
8246  done
8247IFS=$as_save_IFS
8248
8249  ;;
8250esac
8251fi
8252FIND=$ac_cv_path_FIND
8253if test -n "$FIND"; then
8254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8255$as_echo "$FIND" >&6; }
8256else
8257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8258$as_echo "no" >&6; }
8259fi
8260
8261
8262          if test "x$FIND" = x; then
8263            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8264          fi
8265        else
8266          # Otherwise we believe it is a complete path. Use it as it is.
8267          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8268$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8269          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8270$as_echo_n "checking for FIND... " >&6; }
8271          if test ! -x "$tool_specified"; then
8272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8273$as_echo "not found" >&6; }
8274            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8275          fi
8276          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8277$as_echo "$tool_specified" >&6; }
8278        fi
8279      fi
8280    fi
8281
8282  fi
8283
8284
8285
8286  if test "x$FIND" = x; then
8287    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8288  fi
8289
8290
8291
8292
8293
8294  # Publish this variable in the help.
8295
8296
8297  if [ -z "${HEAD+x}" ]; then
8298    # The variable is not set by user, try to locate tool using the code snippet
8299    for ac_prog in head
8300do
8301  # Extract the first word of "$ac_prog", so it can be a program name with args.
8302set dummy $ac_prog; ac_word=$2
8303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8304$as_echo_n "checking for $ac_word... " >&6; }
8305if ${ac_cv_path_HEAD+:} false; then :
8306  $as_echo_n "(cached) " >&6
8307else
8308  case $HEAD in
8309  [\\/]* | ?:[\\/]*)
8310  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8311  ;;
8312  *)
8313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8314for as_dir in $PATH
8315do
8316  IFS=$as_save_IFS
8317  test -z "$as_dir" && as_dir=.
8318    for ac_exec_ext in '' $ac_executable_extensions; do
8319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8320    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8322    break 2
8323  fi
8324done
8325  done
8326IFS=$as_save_IFS
8327
8328  ;;
8329esac
8330fi
8331HEAD=$ac_cv_path_HEAD
8332if test -n "$HEAD"; then
8333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8334$as_echo "$HEAD" >&6; }
8335else
8336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8337$as_echo "no" >&6; }
8338fi
8339
8340
8341  test -n "$HEAD" && break
8342done
8343
8344  else
8345    # The variable is set, but is it from the command line or the environment?
8346
8347    # Try to remove the string !HEAD! from our list.
8348    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8349    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8350      # If it failed, the variable was not from the command line. Ignore it,
8351      # but warn the user (except for BASH, which is always set by the calling BASH).
8352      if test "xHEAD" != xBASH; then
8353        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8354$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8355      fi
8356      # Try to locate tool using the code snippet
8357      for ac_prog in head
8358do
8359  # Extract the first word of "$ac_prog", so it can be a program name with args.
8360set dummy $ac_prog; ac_word=$2
8361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8362$as_echo_n "checking for $ac_word... " >&6; }
8363if ${ac_cv_path_HEAD+:} false; then :
8364  $as_echo_n "(cached) " >&6
8365else
8366  case $HEAD in
8367  [\\/]* | ?:[\\/]*)
8368  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8369  ;;
8370  *)
8371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8372for as_dir in $PATH
8373do
8374  IFS=$as_save_IFS
8375  test -z "$as_dir" && as_dir=.
8376    for ac_exec_ext in '' $ac_executable_extensions; do
8377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8378    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8380    break 2
8381  fi
8382done
8383  done
8384IFS=$as_save_IFS
8385
8386  ;;
8387esac
8388fi
8389HEAD=$ac_cv_path_HEAD
8390if test -n "$HEAD"; then
8391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8392$as_echo "$HEAD" >&6; }
8393else
8394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8395$as_echo "no" >&6; }
8396fi
8397
8398
8399  test -n "$HEAD" && break
8400done
8401
8402    else
8403      # If it succeeded, then it was overridden by the user. We will use it
8404      # for the tool.
8405
8406      # First remove it from the list of overridden variables, so we can test
8407      # for unknown variables in the end.
8408      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8409
8410      # Check if we try to supply an empty value
8411      if test "x$HEAD" = x; then
8412        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8413$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8414        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8415$as_echo_n "checking for HEAD... " >&6; }
8416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8417$as_echo "disabled" >&6; }
8418      else
8419        # Check if the provided tool contains a complete path.
8420        tool_specified="$HEAD"
8421        tool_basename="${tool_specified##*/}"
8422        if test "x$tool_basename" = "x$tool_specified"; then
8423          # A command without a complete path is provided, search $PATH.
8424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8425$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8426          # Extract the first word of "$tool_basename", so it can be a program name with args.
8427set dummy $tool_basename; ac_word=$2
8428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8429$as_echo_n "checking for $ac_word... " >&6; }
8430if ${ac_cv_path_HEAD+:} false; then :
8431  $as_echo_n "(cached) " >&6
8432else
8433  case $HEAD in
8434  [\\/]* | ?:[\\/]*)
8435  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8436  ;;
8437  *)
8438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8439for as_dir in $PATH
8440do
8441  IFS=$as_save_IFS
8442  test -z "$as_dir" && as_dir=.
8443    for ac_exec_ext in '' $ac_executable_extensions; do
8444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8445    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8447    break 2
8448  fi
8449done
8450  done
8451IFS=$as_save_IFS
8452
8453  ;;
8454esac
8455fi
8456HEAD=$ac_cv_path_HEAD
8457if test -n "$HEAD"; then
8458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8459$as_echo "$HEAD" >&6; }
8460else
8461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8462$as_echo "no" >&6; }
8463fi
8464
8465
8466          if test "x$HEAD" = x; then
8467            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8468          fi
8469        else
8470          # Otherwise we believe it is a complete path. Use it as it is.
8471          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8472$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8473          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8474$as_echo_n "checking for HEAD... " >&6; }
8475          if test ! -x "$tool_specified"; then
8476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8477$as_echo "not found" >&6; }
8478            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8479          fi
8480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8481$as_echo "$tool_specified" >&6; }
8482        fi
8483      fi
8484    fi
8485
8486  fi
8487
8488
8489
8490  if test "x$HEAD" = x; then
8491    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8492  fi
8493
8494
8495
8496
8497
8498  # Publish this variable in the help.
8499
8500
8501  if [ -z "${GUNZIP+x}" ]; then
8502    # The variable is not set by user, try to locate tool using the code snippet
8503    for ac_prog in gunzip
8504do
8505  # Extract the first word of "$ac_prog", so it can be a program name with args.
8506set dummy $ac_prog; ac_word=$2
8507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8508$as_echo_n "checking for $ac_word... " >&6; }
8509if ${ac_cv_path_GUNZIP+:} false; then :
8510  $as_echo_n "(cached) " >&6
8511else
8512  case $GUNZIP in
8513  [\\/]* | ?:[\\/]*)
8514  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8515  ;;
8516  *)
8517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8518for as_dir in $PATH
8519do
8520  IFS=$as_save_IFS
8521  test -z "$as_dir" && as_dir=.
8522    for ac_exec_ext in '' $ac_executable_extensions; do
8523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8524    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8526    break 2
8527  fi
8528done
8529  done
8530IFS=$as_save_IFS
8531
8532  ;;
8533esac
8534fi
8535GUNZIP=$ac_cv_path_GUNZIP
8536if test -n "$GUNZIP"; then
8537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8538$as_echo "$GUNZIP" >&6; }
8539else
8540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8541$as_echo "no" >&6; }
8542fi
8543
8544
8545  test -n "$GUNZIP" && break
8546done
8547
8548  else
8549    # The variable is set, but is it from the command line or the environment?
8550
8551    # Try to remove the string !GUNZIP! from our list.
8552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8554      # If it failed, the variable was not from the command line. Ignore it,
8555      # but warn the user (except for BASH, which is always set by the calling BASH).
8556      if test "xGUNZIP" != xBASH; then
8557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8558$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8559      fi
8560      # Try to locate tool using the code snippet
8561      for ac_prog in gunzip
8562do
8563  # Extract the first word of "$ac_prog", so it can be a program name with args.
8564set dummy $ac_prog; ac_word=$2
8565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8566$as_echo_n "checking for $ac_word... " >&6; }
8567if ${ac_cv_path_GUNZIP+:} false; then :
8568  $as_echo_n "(cached) " >&6
8569else
8570  case $GUNZIP in
8571  [\\/]* | ?:[\\/]*)
8572  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8573  ;;
8574  *)
8575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8576for as_dir in $PATH
8577do
8578  IFS=$as_save_IFS
8579  test -z "$as_dir" && as_dir=.
8580    for ac_exec_ext in '' $ac_executable_extensions; do
8581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8582    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8584    break 2
8585  fi
8586done
8587  done
8588IFS=$as_save_IFS
8589
8590  ;;
8591esac
8592fi
8593GUNZIP=$ac_cv_path_GUNZIP
8594if test -n "$GUNZIP"; then
8595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8596$as_echo "$GUNZIP" >&6; }
8597else
8598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8599$as_echo "no" >&6; }
8600fi
8601
8602
8603  test -n "$GUNZIP" && break
8604done
8605
8606    else
8607      # If it succeeded, then it was overridden by the user. We will use it
8608      # for the tool.
8609
8610      # First remove it from the list of overridden variables, so we can test
8611      # for unknown variables in the end.
8612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8613
8614      # Check if we try to supply an empty value
8615      if test "x$GUNZIP" = x; then
8616        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8617$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8619$as_echo_n "checking for GUNZIP... " >&6; }
8620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8621$as_echo "disabled" >&6; }
8622      else
8623        # Check if the provided tool contains a complete path.
8624        tool_specified="$GUNZIP"
8625        tool_basename="${tool_specified##*/}"
8626        if test "x$tool_basename" = "x$tool_specified"; then
8627          # A command without a complete path is provided, search $PATH.
8628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8629$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8630          # Extract the first word of "$tool_basename", so it can be a program name with args.
8631set dummy $tool_basename; ac_word=$2
8632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8633$as_echo_n "checking for $ac_word... " >&6; }
8634if ${ac_cv_path_GUNZIP+:} false; then :
8635  $as_echo_n "(cached) " >&6
8636else
8637  case $GUNZIP in
8638  [\\/]* | ?:[\\/]*)
8639  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8640  ;;
8641  *)
8642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8643for as_dir in $PATH
8644do
8645  IFS=$as_save_IFS
8646  test -z "$as_dir" && as_dir=.
8647    for ac_exec_ext in '' $ac_executable_extensions; do
8648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8649    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8651    break 2
8652  fi
8653done
8654  done
8655IFS=$as_save_IFS
8656
8657  ;;
8658esac
8659fi
8660GUNZIP=$ac_cv_path_GUNZIP
8661if test -n "$GUNZIP"; then
8662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8663$as_echo "$GUNZIP" >&6; }
8664else
8665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8666$as_echo "no" >&6; }
8667fi
8668
8669
8670          if test "x$GUNZIP" = x; then
8671            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8672          fi
8673        else
8674          # Otherwise we believe it is a complete path. Use it as it is.
8675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8676$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8677          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8678$as_echo_n "checking for GUNZIP... " >&6; }
8679          if test ! -x "$tool_specified"; then
8680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8681$as_echo "not found" >&6; }
8682            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8683          fi
8684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8685$as_echo "$tool_specified" >&6; }
8686        fi
8687      fi
8688    fi
8689
8690  fi
8691
8692
8693
8694  if test "x$GUNZIP" = x; then
8695    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8696  fi
8697
8698
8699
8700
8701
8702  # Publish this variable in the help.
8703
8704
8705  if [ -z "${GZIP+x}" ]; then
8706    # The variable is not set by user, try to locate tool using the code snippet
8707    for ac_prog in pigz gzip
8708do
8709  # Extract the first word of "$ac_prog", so it can be a program name with args.
8710set dummy $ac_prog; ac_word=$2
8711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8712$as_echo_n "checking for $ac_word... " >&6; }
8713if ${ac_cv_path_GZIP+:} false; then :
8714  $as_echo_n "(cached) " >&6
8715else
8716  case $GZIP in
8717  [\\/]* | ?:[\\/]*)
8718  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8719  ;;
8720  *)
8721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8722for as_dir in $PATH
8723do
8724  IFS=$as_save_IFS
8725  test -z "$as_dir" && as_dir=.
8726    for ac_exec_ext in '' $ac_executable_extensions; do
8727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8728    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8730    break 2
8731  fi
8732done
8733  done
8734IFS=$as_save_IFS
8735
8736  ;;
8737esac
8738fi
8739GZIP=$ac_cv_path_GZIP
8740if test -n "$GZIP"; then
8741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8742$as_echo "$GZIP" >&6; }
8743else
8744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8745$as_echo "no" >&6; }
8746fi
8747
8748
8749  test -n "$GZIP" && break
8750done
8751
8752  else
8753    # The variable is set, but is it from the command line or the environment?
8754
8755    # Try to remove the string !GZIP! from our list.
8756    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8757    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8758      # If it failed, the variable was not from the command line. Ignore it,
8759      # but warn the user (except for BASH, which is always set by the calling BASH).
8760      if test "xGZIP" != xBASH; then
8761        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8762$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8763      fi
8764      # Try to locate tool using the code snippet
8765      for ac_prog in pigz gzip
8766do
8767  # Extract the first word of "$ac_prog", so it can be a program name with args.
8768set dummy $ac_prog; ac_word=$2
8769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8770$as_echo_n "checking for $ac_word... " >&6; }
8771if ${ac_cv_path_GZIP+:} false; then :
8772  $as_echo_n "(cached) " >&6
8773else
8774  case $GZIP in
8775  [\\/]* | ?:[\\/]*)
8776  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8777  ;;
8778  *)
8779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8780for as_dir in $PATH
8781do
8782  IFS=$as_save_IFS
8783  test -z "$as_dir" && as_dir=.
8784    for ac_exec_ext in '' $ac_executable_extensions; do
8785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8786    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8788    break 2
8789  fi
8790done
8791  done
8792IFS=$as_save_IFS
8793
8794  ;;
8795esac
8796fi
8797GZIP=$ac_cv_path_GZIP
8798if test -n "$GZIP"; then
8799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8800$as_echo "$GZIP" >&6; }
8801else
8802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8803$as_echo "no" >&6; }
8804fi
8805
8806
8807  test -n "$GZIP" && break
8808done
8809
8810    else
8811      # If it succeeded, then it was overridden by the user. We will use it
8812      # for the tool.
8813
8814      # First remove it from the list of overridden variables, so we can test
8815      # for unknown variables in the end.
8816      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8817
8818      # Check if we try to supply an empty value
8819      if test "x$GZIP" = x; then
8820        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8821$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8822        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8823$as_echo_n "checking for GZIP... " >&6; }
8824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8825$as_echo "disabled" >&6; }
8826      else
8827        # Check if the provided tool contains a complete path.
8828        tool_specified="$GZIP"
8829        tool_basename="${tool_specified##*/}"
8830        if test "x$tool_basename" = "x$tool_specified"; then
8831          # A command without a complete path is provided, search $PATH.
8832          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8833$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8834          # Extract the first word of "$tool_basename", so it can be a program name with args.
8835set dummy $tool_basename; ac_word=$2
8836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8837$as_echo_n "checking for $ac_word... " >&6; }
8838if ${ac_cv_path_GZIP+:} false; then :
8839  $as_echo_n "(cached) " >&6
8840else
8841  case $GZIP in
8842  [\\/]* | ?:[\\/]*)
8843  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8844  ;;
8845  *)
8846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8847for as_dir in $PATH
8848do
8849  IFS=$as_save_IFS
8850  test -z "$as_dir" && as_dir=.
8851    for ac_exec_ext in '' $ac_executable_extensions; do
8852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8853    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8855    break 2
8856  fi
8857done
8858  done
8859IFS=$as_save_IFS
8860
8861  ;;
8862esac
8863fi
8864GZIP=$ac_cv_path_GZIP
8865if test -n "$GZIP"; then
8866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8867$as_echo "$GZIP" >&6; }
8868else
8869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8870$as_echo "no" >&6; }
8871fi
8872
8873
8874          if test "x$GZIP" = x; then
8875            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8876          fi
8877        else
8878          # Otherwise we believe it is a complete path. Use it as it is.
8879          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8880$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8881          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8882$as_echo_n "checking for GZIP... " >&6; }
8883          if test ! -x "$tool_specified"; then
8884            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8885$as_echo "not found" >&6; }
8886            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8887          fi
8888          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8889$as_echo "$tool_specified" >&6; }
8890        fi
8891      fi
8892    fi
8893
8894  fi
8895
8896
8897
8898  if test "x$GZIP" = x; then
8899    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8900  fi
8901
8902
8903
8904
8905
8906  # Publish this variable in the help.
8907
8908
8909  if [ -z "${LN+x}" ]; then
8910    # The variable is not set by user, try to locate tool using the code snippet
8911    for ac_prog in ln
8912do
8913  # Extract the first word of "$ac_prog", so it can be a program name with args.
8914set dummy $ac_prog; ac_word=$2
8915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8916$as_echo_n "checking for $ac_word... " >&6; }
8917if ${ac_cv_path_LN+:} false; then :
8918  $as_echo_n "(cached) " >&6
8919else
8920  case $LN in
8921  [\\/]* | ?:[\\/]*)
8922  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8923  ;;
8924  *)
8925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8926for as_dir in $PATH
8927do
8928  IFS=$as_save_IFS
8929  test -z "$as_dir" && as_dir=.
8930    for ac_exec_ext in '' $ac_executable_extensions; do
8931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8932    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8934    break 2
8935  fi
8936done
8937  done
8938IFS=$as_save_IFS
8939
8940  ;;
8941esac
8942fi
8943LN=$ac_cv_path_LN
8944if test -n "$LN"; then
8945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8946$as_echo "$LN" >&6; }
8947else
8948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8949$as_echo "no" >&6; }
8950fi
8951
8952
8953  test -n "$LN" && break
8954done
8955
8956  else
8957    # The variable is set, but is it from the command line or the environment?
8958
8959    # Try to remove the string !LN! from our list.
8960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8962      # If it failed, the variable was not from the command line. Ignore it,
8963      # but warn the user (except for BASH, which is always set by the calling BASH).
8964      if test "xLN" != xBASH; then
8965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8966$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8967      fi
8968      # Try to locate tool using the code snippet
8969      for ac_prog in ln
8970do
8971  # Extract the first word of "$ac_prog", so it can be a program name with args.
8972set dummy $ac_prog; ac_word=$2
8973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8974$as_echo_n "checking for $ac_word... " >&6; }
8975if ${ac_cv_path_LN+:} false; then :
8976  $as_echo_n "(cached) " >&6
8977else
8978  case $LN in
8979  [\\/]* | ?:[\\/]*)
8980  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8981  ;;
8982  *)
8983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8984for as_dir in $PATH
8985do
8986  IFS=$as_save_IFS
8987  test -z "$as_dir" && as_dir=.
8988    for ac_exec_ext in '' $ac_executable_extensions; do
8989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8990    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8992    break 2
8993  fi
8994done
8995  done
8996IFS=$as_save_IFS
8997
8998  ;;
8999esac
9000fi
9001LN=$ac_cv_path_LN
9002if test -n "$LN"; then
9003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9004$as_echo "$LN" >&6; }
9005else
9006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9007$as_echo "no" >&6; }
9008fi
9009
9010
9011  test -n "$LN" && break
9012done
9013
9014    else
9015      # If it succeeded, then it was overridden by the user. We will use it
9016      # for the tool.
9017
9018      # First remove it from the list of overridden variables, so we can test
9019      # for unknown variables in the end.
9020      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9021
9022      # Check if we try to supply an empty value
9023      if test "x$LN" = x; then
9024        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9025$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9027$as_echo_n "checking for LN... " >&6; }
9028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9029$as_echo "disabled" >&6; }
9030      else
9031        # Check if the provided tool contains a complete path.
9032        tool_specified="$LN"
9033        tool_basename="${tool_specified##*/}"
9034        if test "x$tool_basename" = "x$tool_specified"; then
9035          # A command without a complete path is provided, search $PATH.
9036          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9037$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9038          # Extract the first word of "$tool_basename", so it can be a program name with args.
9039set dummy $tool_basename; ac_word=$2
9040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9041$as_echo_n "checking for $ac_word... " >&6; }
9042if ${ac_cv_path_LN+:} false; then :
9043  $as_echo_n "(cached) " >&6
9044else
9045  case $LN in
9046  [\\/]* | ?:[\\/]*)
9047  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9048  ;;
9049  *)
9050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9051for as_dir in $PATH
9052do
9053  IFS=$as_save_IFS
9054  test -z "$as_dir" && as_dir=.
9055    for ac_exec_ext in '' $ac_executable_extensions; do
9056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9057    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9059    break 2
9060  fi
9061done
9062  done
9063IFS=$as_save_IFS
9064
9065  ;;
9066esac
9067fi
9068LN=$ac_cv_path_LN
9069if test -n "$LN"; then
9070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9071$as_echo "$LN" >&6; }
9072else
9073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9074$as_echo "no" >&6; }
9075fi
9076
9077
9078          if test "x$LN" = x; then
9079            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9080          fi
9081        else
9082          # Otherwise we believe it is a complete path. Use it as it is.
9083          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9084$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9085          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9086$as_echo_n "checking for LN... " >&6; }
9087          if test ! -x "$tool_specified"; then
9088            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9089$as_echo "not found" >&6; }
9090            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9091          fi
9092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9093$as_echo "$tool_specified" >&6; }
9094        fi
9095      fi
9096    fi
9097
9098  fi
9099
9100
9101
9102  if test "x$LN" = x; then
9103    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9104  fi
9105
9106
9107
9108
9109
9110  # Publish this variable in the help.
9111
9112
9113  if [ -z "${LS+x}" ]; then
9114    # The variable is not set by user, try to locate tool using the code snippet
9115    for ac_prog in ls
9116do
9117  # Extract the first word of "$ac_prog", so it can be a program name with args.
9118set dummy $ac_prog; ac_word=$2
9119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9120$as_echo_n "checking for $ac_word... " >&6; }
9121if ${ac_cv_path_LS+:} false; then :
9122  $as_echo_n "(cached) " >&6
9123else
9124  case $LS in
9125  [\\/]* | ?:[\\/]*)
9126  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9127  ;;
9128  *)
9129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9130for as_dir in $PATH
9131do
9132  IFS=$as_save_IFS
9133  test -z "$as_dir" && as_dir=.
9134    for ac_exec_ext in '' $ac_executable_extensions; do
9135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9136    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9138    break 2
9139  fi
9140done
9141  done
9142IFS=$as_save_IFS
9143
9144  ;;
9145esac
9146fi
9147LS=$ac_cv_path_LS
9148if test -n "$LS"; then
9149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9150$as_echo "$LS" >&6; }
9151else
9152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153$as_echo "no" >&6; }
9154fi
9155
9156
9157  test -n "$LS" && break
9158done
9159
9160  else
9161    # The variable is set, but is it from the command line or the environment?
9162
9163    # Try to remove the string !LS! from our list.
9164    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9165    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9166      # If it failed, the variable was not from the command line. Ignore it,
9167      # but warn the user (except for BASH, which is always set by the calling BASH).
9168      if test "xLS" != xBASH; then
9169        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9170$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9171      fi
9172      # Try to locate tool using the code snippet
9173      for ac_prog in ls
9174do
9175  # Extract the first word of "$ac_prog", so it can be a program name with args.
9176set dummy $ac_prog; ac_word=$2
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9178$as_echo_n "checking for $ac_word... " >&6; }
9179if ${ac_cv_path_LS+:} false; then :
9180  $as_echo_n "(cached) " >&6
9181else
9182  case $LS in
9183  [\\/]* | ?:[\\/]*)
9184  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9185  ;;
9186  *)
9187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9188for as_dir in $PATH
9189do
9190  IFS=$as_save_IFS
9191  test -z "$as_dir" && as_dir=.
9192    for ac_exec_ext in '' $ac_executable_extensions; do
9193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9194    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9196    break 2
9197  fi
9198done
9199  done
9200IFS=$as_save_IFS
9201
9202  ;;
9203esac
9204fi
9205LS=$ac_cv_path_LS
9206if test -n "$LS"; then
9207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9208$as_echo "$LS" >&6; }
9209else
9210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9211$as_echo "no" >&6; }
9212fi
9213
9214
9215  test -n "$LS" && break
9216done
9217
9218    else
9219      # If it succeeded, then it was overridden by the user. We will use it
9220      # for the tool.
9221
9222      # First remove it from the list of overridden variables, so we can test
9223      # for unknown variables in the end.
9224      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9225
9226      # Check if we try to supply an empty value
9227      if test "x$LS" = x; then
9228        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9229$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9231$as_echo_n "checking for LS... " >&6; }
9232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9233$as_echo "disabled" >&6; }
9234      else
9235        # Check if the provided tool contains a complete path.
9236        tool_specified="$LS"
9237        tool_basename="${tool_specified##*/}"
9238        if test "x$tool_basename" = "x$tool_specified"; then
9239          # A command without a complete path is provided, search $PATH.
9240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9241$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9242          # Extract the first word of "$tool_basename", so it can be a program name with args.
9243set dummy $tool_basename; ac_word=$2
9244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9245$as_echo_n "checking for $ac_word... " >&6; }
9246if ${ac_cv_path_LS+:} false; then :
9247  $as_echo_n "(cached) " >&6
9248else
9249  case $LS in
9250  [\\/]* | ?:[\\/]*)
9251  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9252  ;;
9253  *)
9254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9255for as_dir in $PATH
9256do
9257  IFS=$as_save_IFS
9258  test -z "$as_dir" && as_dir=.
9259    for ac_exec_ext in '' $ac_executable_extensions; do
9260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9261    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9263    break 2
9264  fi
9265done
9266  done
9267IFS=$as_save_IFS
9268
9269  ;;
9270esac
9271fi
9272LS=$ac_cv_path_LS
9273if test -n "$LS"; then
9274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9275$as_echo "$LS" >&6; }
9276else
9277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9278$as_echo "no" >&6; }
9279fi
9280
9281
9282          if test "x$LS" = x; then
9283            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9284          fi
9285        else
9286          # Otherwise we believe it is a complete path. Use it as it is.
9287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9288$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9289          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9290$as_echo_n "checking for LS... " >&6; }
9291          if test ! -x "$tool_specified"; then
9292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9293$as_echo "not found" >&6; }
9294            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9295          fi
9296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9297$as_echo "$tool_specified" >&6; }
9298        fi
9299      fi
9300    fi
9301
9302  fi
9303
9304
9305
9306  if test "x$LS" = x; then
9307    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9308  fi
9309
9310
9311
9312
9313
9314  # Publish this variable in the help.
9315
9316
9317  if [ -z "${MKDIR+x}" ]; then
9318    # The variable is not set by user, try to locate tool using the code snippet
9319    for ac_prog in mkdir
9320do
9321  # Extract the first word of "$ac_prog", so it can be a program name with args.
9322set dummy $ac_prog; ac_word=$2
9323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9324$as_echo_n "checking for $ac_word... " >&6; }
9325if ${ac_cv_path_MKDIR+:} false; then :
9326  $as_echo_n "(cached) " >&6
9327else
9328  case $MKDIR in
9329  [\\/]* | ?:[\\/]*)
9330  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9331  ;;
9332  *)
9333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9334for as_dir in $PATH
9335do
9336  IFS=$as_save_IFS
9337  test -z "$as_dir" && as_dir=.
9338    for ac_exec_ext in '' $ac_executable_extensions; do
9339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9340    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9342    break 2
9343  fi
9344done
9345  done
9346IFS=$as_save_IFS
9347
9348  ;;
9349esac
9350fi
9351MKDIR=$ac_cv_path_MKDIR
9352if test -n "$MKDIR"; then
9353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9354$as_echo "$MKDIR" >&6; }
9355else
9356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9357$as_echo "no" >&6; }
9358fi
9359
9360
9361  test -n "$MKDIR" && break
9362done
9363
9364  else
9365    # The variable is set, but is it from the command line or the environment?
9366
9367    # Try to remove the string !MKDIR! from our list.
9368    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9369    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9370      # If it failed, the variable was not from the command line. Ignore it,
9371      # but warn the user (except for BASH, which is always set by the calling BASH).
9372      if test "xMKDIR" != xBASH; then
9373        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9374$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9375      fi
9376      # Try to locate tool using the code snippet
9377      for ac_prog in mkdir
9378do
9379  # Extract the first word of "$ac_prog", so it can be a program name with args.
9380set dummy $ac_prog; ac_word=$2
9381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9382$as_echo_n "checking for $ac_word... " >&6; }
9383if ${ac_cv_path_MKDIR+:} false; then :
9384  $as_echo_n "(cached) " >&6
9385else
9386  case $MKDIR in
9387  [\\/]* | ?:[\\/]*)
9388  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9389  ;;
9390  *)
9391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9392for as_dir in $PATH
9393do
9394  IFS=$as_save_IFS
9395  test -z "$as_dir" && as_dir=.
9396    for ac_exec_ext in '' $ac_executable_extensions; do
9397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9398    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9400    break 2
9401  fi
9402done
9403  done
9404IFS=$as_save_IFS
9405
9406  ;;
9407esac
9408fi
9409MKDIR=$ac_cv_path_MKDIR
9410if test -n "$MKDIR"; then
9411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9412$as_echo "$MKDIR" >&6; }
9413else
9414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9415$as_echo "no" >&6; }
9416fi
9417
9418
9419  test -n "$MKDIR" && break
9420done
9421
9422    else
9423      # If it succeeded, then it was overridden by the user. We will use it
9424      # for the tool.
9425
9426      # First remove it from the list of overridden variables, so we can test
9427      # for unknown variables in the end.
9428      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9429
9430      # Check if we try to supply an empty value
9431      if test "x$MKDIR" = x; then
9432        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9433$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9435$as_echo_n "checking for MKDIR... " >&6; }
9436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9437$as_echo "disabled" >&6; }
9438      else
9439        # Check if the provided tool contains a complete path.
9440        tool_specified="$MKDIR"
9441        tool_basename="${tool_specified##*/}"
9442        if test "x$tool_basename" = "x$tool_specified"; then
9443          # A command without a complete path is provided, search $PATH.
9444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9445$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9446          # Extract the first word of "$tool_basename", so it can be a program name with args.
9447set dummy $tool_basename; ac_word=$2
9448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9449$as_echo_n "checking for $ac_word... " >&6; }
9450if ${ac_cv_path_MKDIR+:} false; then :
9451  $as_echo_n "(cached) " >&6
9452else
9453  case $MKDIR in
9454  [\\/]* | ?:[\\/]*)
9455  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9456  ;;
9457  *)
9458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9459for as_dir in $PATH
9460do
9461  IFS=$as_save_IFS
9462  test -z "$as_dir" && as_dir=.
9463    for ac_exec_ext in '' $ac_executable_extensions; do
9464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9465    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9467    break 2
9468  fi
9469done
9470  done
9471IFS=$as_save_IFS
9472
9473  ;;
9474esac
9475fi
9476MKDIR=$ac_cv_path_MKDIR
9477if test -n "$MKDIR"; then
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9479$as_echo "$MKDIR" >&6; }
9480else
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482$as_echo "no" >&6; }
9483fi
9484
9485
9486          if test "x$MKDIR" = x; then
9487            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9488          fi
9489        else
9490          # Otherwise we believe it is a complete path. Use it as it is.
9491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9492$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9493          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9494$as_echo_n "checking for MKDIR... " >&6; }
9495          if test ! -x "$tool_specified"; then
9496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9497$as_echo "not found" >&6; }
9498            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9499          fi
9500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9501$as_echo "$tool_specified" >&6; }
9502        fi
9503      fi
9504    fi
9505
9506  fi
9507
9508
9509
9510  if test "x$MKDIR" = x; then
9511    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9512  fi
9513
9514
9515
9516
9517
9518  # Publish this variable in the help.
9519
9520
9521  if [ -z "${MKTEMP+x}" ]; then
9522    # The variable is not set by user, try to locate tool using the code snippet
9523    for ac_prog in mktemp
9524do
9525  # Extract the first word of "$ac_prog", so it can be a program name with args.
9526set dummy $ac_prog; ac_word=$2
9527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9528$as_echo_n "checking for $ac_word... " >&6; }
9529if ${ac_cv_path_MKTEMP+:} false; then :
9530  $as_echo_n "(cached) " >&6
9531else
9532  case $MKTEMP in
9533  [\\/]* | ?:[\\/]*)
9534  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9535  ;;
9536  *)
9537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9538for as_dir in $PATH
9539do
9540  IFS=$as_save_IFS
9541  test -z "$as_dir" && as_dir=.
9542    for ac_exec_ext in '' $ac_executable_extensions; do
9543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9544    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9546    break 2
9547  fi
9548done
9549  done
9550IFS=$as_save_IFS
9551
9552  ;;
9553esac
9554fi
9555MKTEMP=$ac_cv_path_MKTEMP
9556if test -n "$MKTEMP"; then
9557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9558$as_echo "$MKTEMP" >&6; }
9559else
9560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9561$as_echo "no" >&6; }
9562fi
9563
9564
9565  test -n "$MKTEMP" && break
9566done
9567
9568  else
9569    # The variable is set, but is it from the command line or the environment?
9570
9571    # Try to remove the string !MKTEMP! from our list.
9572    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9573    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9574      # If it failed, the variable was not from the command line. Ignore it,
9575      # but warn the user (except for BASH, which is always set by the calling BASH).
9576      if test "xMKTEMP" != xBASH; then
9577        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9578$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9579      fi
9580      # Try to locate tool using the code snippet
9581      for ac_prog in mktemp
9582do
9583  # Extract the first word of "$ac_prog", so it can be a program name with args.
9584set dummy $ac_prog; ac_word=$2
9585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9586$as_echo_n "checking for $ac_word... " >&6; }
9587if ${ac_cv_path_MKTEMP+:} false; then :
9588  $as_echo_n "(cached) " >&6
9589else
9590  case $MKTEMP in
9591  [\\/]* | ?:[\\/]*)
9592  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9593  ;;
9594  *)
9595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9596for as_dir in $PATH
9597do
9598  IFS=$as_save_IFS
9599  test -z "$as_dir" && as_dir=.
9600    for ac_exec_ext in '' $ac_executable_extensions; do
9601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9602    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9604    break 2
9605  fi
9606done
9607  done
9608IFS=$as_save_IFS
9609
9610  ;;
9611esac
9612fi
9613MKTEMP=$ac_cv_path_MKTEMP
9614if test -n "$MKTEMP"; then
9615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9616$as_echo "$MKTEMP" >&6; }
9617else
9618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9619$as_echo "no" >&6; }
9620fi
9621
9622
9623  test -n "$MKTEMP" && break
9624done
9625
9626    else
9627      # If it succeeded, then it was overridden by the user. We will use it
9628      # for the tool.
9629
9630      # First remove it from the list of overridden variables, so we can test
9631      # for unknown variables in the end.
9632      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9633
9634      # Check if we try to supply an empty value
9635      if test "x$MKTEMP" = x; then
9636        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9637$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9638        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9639$as_echo_n "checking for MKTEMP... " >&6; }
9640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9641$as_echo "disabled" >&6; }
9642      else
9643        # Check if the provided tool contains a complete path.
9644        tool_specified="$MKTEMP"
9645        tool_basename="${tool_specified##*/}"
9646        if test "x$tool_basename" = "x$tool_specified"; then
9647          # A command without a complete path is provided, search $PATH.
9648          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9649$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9650          # Extract the first word of "$tool_basename", so it can be a program name with args.
9651set dummy $tool_basename; ac_word=$2
9652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9653$as_echo_n "checking for $ac_word... " >&6; }
9654if ${ac_cv_path_MKTEMP+:} false; then :
9655  $as_echo_n "(cached) " >&6
9656else
9657  case $MKTEMP in
9658  [\\/]* | ?:[\\/]*)
9659  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9660  ;;
9661  *)
9662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9663for as_dir in $PATH
9664do
9665  IFS=$as_save_IFS
9666  test -z "$as_dir" && as_dir=.
9667    for ac_exec_ext in '' $ac_executable_extensions; do
9668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9669    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9671    break 2
9672  fi
9673done
9674  done
9675IFS=$as_save_IFS
9676
9677  ;;
9678esac
9679fi
9680MKTEMP=$ac_cv_path_MKTEMP
9681if test -n "$MKTEMP"; then
9682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9683$as_echo "$MKTEMP" >&6; }
9684else
9685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9686$as_echo "no" >&6; }
9687fi
9688
9689
9690          if test "x$MKTEMP" = x; then
9691            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9692          fi
9693        else
9694          # Otherwise we believe it is a complete path. Use it as it is.
9695          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9696$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9697          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9698$as_echo_n "checking for MKTEMP... " >&6; }
9699          if test ! -x "$tool_specified"; then
9700            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9701$as_echo "not found" >&6; }
9702            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9703          fi
9704          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9705$as_echo "$tool_specified" >&6; }
9706        fi
9707      fi
9708    fi
9709
9710  fi
9711
9712
9713
9714  if test "x$MKTEMP" = x; then
9715    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9716  fi
9717
9718
9719
9720
9721
9722  # Publish this variable in the help.
9723
9724
9725  if [ -z "${MV+x}" ]; then
9726    # The variable is not set by user, try to locate tool using the code snippet
9727    for ac_prog in mv
9728do
9729  # Extract the first word of "$ac_prog", so it can be a program name with args.
9730set dummy $ac_prog; ac_word=$2
9731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9732$as_echo_n "checking for $ac_word... " >&6; }
9733if ${ac_cv_path_MV+:} false; then :
9734  $as_echo_n "(cached) " >&6
9735else
9736  case $MV in
9737  [\\/]* | ?:[\\/]*)
9738  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9739  ;;
9740  *)
9741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9742for as_dir in $PATH
9743do
9744  IFS=$as_save_IFS
9745  test -z "$as_dir" && as_dir=.
9746    for ac_exec_ext in '' $ac_executable_extensions; do
9747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9748    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9750    break 2
9751  fi
9752done
9753  done
9754IFS=$as_save_IFS
9755
9756  ;;
9757esac
9758fi
9759MV=$ac_cv_path_MV
9760if test -n "$MV"; then
9761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9762$as_echo "$MV" >&6; }
9763else
9764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9765$as_echo "no" >&6; }
9766fi
9767
9768
9769  test -n "$MV" && break
9770done
9771
9772  else
9773    # The variable is set, but is it from the command line or the environment?
9774
9775    # Try to remove the string !MV! from our list.
9776    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9777    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9778      # If it failed, the variable was not from the command line. Ignore it,
9779      # but warn the user (except for BASH, which is always set by the calling BASH).
9780      if test "xMV" != xBASH; then
9781        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9782$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9783      fi
9784      # Try to locate tool using the code snippet
9785      for ac_prog in mv
9786do
9787  # Extract the first word of "$ac_prog", so it can be a program name with args.
9788set dummy $ac_prog; ac_word=$2
9789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9790$as_echo_n "checking for $ac_word... " >&6; }
9791if ${ac_cv_path_MV+:} false; then :
9792  $as_echo_n "(cached) " >&6
9793else
9794  case $MV in
9795  [\\/]* | ?:[\\/]*)
9796  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9797  ;;
9798  *)
9799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9800for as_dir in $PATH
9801do
9802  IFS=$as_save_IFS
9803  test -z "$as_dir" && as_dir=.
9804    for ac_exec_ext in '' $ac_executable_extensions; do
9805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9806    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9808    break 2
9809  fi
9810done
9811  done
9812IFS=$as_save_IFS
9813
9814  ;;
9815esac
9816fi
9817MV=$ac_cv_path_MV
9818if test -n "$MV"; then
9819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9820$as_echo "$MV" >&6; }
9821else
9822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9823$as_echo "no" >&6; }
9824fi
9825
9826
9827  test -n "$MV" && break
9828done
9829
9830    else
9831      # If it succeeded, then it was overridden by the user. We will use it
9832      # for the tool.
9833
9834      # First remove it from the list of overridden variables, so we can test
9835      # for unknown variables in the end.
9836      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9837
9838      # Check if we try to supply an empty value
9839      if test "x$MV" = x; then
9840        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9841$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9843$as_echo_n "checking for MV... " >&6; }
9844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9845$as_echo "disabled" >&6; }
9846      else
9847        # Check if the provided tool contains a complete path.
9848        tool_specified="$MV"
9849        tool_basename="${tool_specified##*/}"
9850        if test "x$tool_basename" = "x$tool_specified"; then
9851          # A command without a complete path is provided, search $PATH.
9852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9853$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9854          # Extract the first word of "$tool_basename", so it can be a program name with args.
9855set dummy $tool_basename; ac_word=$2
9856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9857$as_echo_n "checking for $ac_word... " >&6; }
9858if ${ac_cv_path_MV+:} false; then :
9859  $as_echo_n "(cached) " >&6
9860else
9861  case $MV in
9862  [\\/]* | ?:[\\/]*)
9863  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9864  ;;
9865  *)
9866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9867for as_dir in $PATH
9868do
9869  IFS=$as_save_IFS
9870  test -z "$as_dir" && as_dir=.
9871    for ac_exec_ext in '' $ac_executable_extensions; do
9872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9873    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9875    break 2
9876  fi
9877done
9878  done
9879IFS=$as_save_IFS
9880
9881  ;;
9882esac
9883fi
9884MV=$ac_cv_path_MV
9885if test -n "$MV"; then
9886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9887$as_echo "$MV" >&6; }
9888else
9889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9890$as_echo "no" >&6; }
9891fi
9892
9893
9894          if test "x$MV" = x; then
9895            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9896          fi
9897        else
9898          # Otherwise we believe it is a complete path. Use it as it is.
9899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9900$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9901          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9902$as_echo_n "checking for MV... " >&6; }
9903          if test ! -x "$tool_specified"; then
9904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9905$as_echo "not found" >&6; }
9906            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9907          fi
9908          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9909$as_echo "$tool_specified" >&6; }
9910        fi
9911      fi
9912    fi
9913
9914  fi
9915
9916
9917
9918  if test "x$MV" = x; then
9919    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9920  fi
9921
9922
9923
9924
9925
9926  # Publish this variable in the help.
9927
9928
9929  if [ -z "${NAWK+x}" ]; then
9930    # The variable is not set by user, try to locate tool using the code snippet
9931    for ac_prog in nawk gawk awk
9932do
9933  # Extract the first word of "$ac_prog", so it can be a program name with args.
9934set dummy $ac_prog; ac_word=$2
9935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9936$as_echo_n "checking for $ac_word... " >&6; }
9937if ${ac_cv_path_NAWK+:} false; then :
9938  $as_echo_n "(cached) " >&6
9939else
9940  case $NAWK in
9941  [\\/]* | ?:[\\/]*)
9942  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9943  ;;
9944  *)
9945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9946for as_dir in $PATH
9947do
9948  IFS=$as_save_IFS
9949  test -z "$as_dir" && as_dir=.
9950    for ac_exec_ext in '' $ac_executable_extensions; do
9951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9952    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9954    break 2
9955  fi
9956done
9957  done
9958IFS=$as_save_IFS
9959
9960  ;;
9961esac
9962fi
9963NAWK=$ac_cv_path_NAWK
9964if test -n "$NAWK"; then
9965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9966$as_echo "$NAWK" >&6; }
9967else
9968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9969$as_echo "no" >&6; }
9970fi
9971
9972
9973  test -n "$NAWK" && break
9974done
9975
9976  else
9977    # The variable is set, but is it from the command line or the environment?
9978
9979    # Try to remove the string !NAWK! from our list.
9980    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9981    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9982      # If it failed, the variable was not from the command line. Ignore it,
9983      # but warn the user (except for BASH, which is always set by the calling BASH).
9984      if test "xNAWK" != xBASH; then
9985        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9986$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9987      fi
9988      # Try to locate tool using the code snippet
9989      for ac_prog in nawk gawk awk
9990do
9991  # Extract the first word of "$ac_prog", so it can be a program name with args.
9992set dummy $ac_prog; ac_word=$2
9993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9994$as_echo_n "checking for $ac_word... " >&6; }
9995if ${ac_cv_path_NAWK+:} false; then :
9996  $as_echo_n "(cached) " >&6
9997else
9998  case $NAWK in
9999  [\\/]* | ?:[\\/]*)
10000  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10001  ;;
10002  *)
10003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10004for as_dir in $PATH
10005do
10006  IFS=$as_save_IFS
10007  test -z "$as_dir" && as_dir=.
10008    for ac_exec_ext in '' $ac_executable_extensions; do
10009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10010    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10012    break 2
10013  fi
10014done
10015  done
10016IFS=$as_save_IFS
10017
10018  ;;
10019esac
10020fi
10021NAWK=$ac_cv_path_NAWK
10022if test -n "$NAWK"; then
10023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10024$as_echo "$NAWK" >&6; }
10025else
10026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10027$as_echo "no" >&6; }
10028fi
10029
10030
10031  test -n "$NAWK" && break
10032done
10033
10034    else
10035      # If it succeeded, then it was overridden by the user. We will use it
10036      # for the tool.
10037
10038      # First remove it from the list of overridden variables, so we can test
10039      # for unknown variables in the end.
10040      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10041
10042      # Check if we try to supply an empty value
10043      if test "x$NAWK" = x; then
10044        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10045$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10047$as_echo_n "checking for NAWK... " >&6; }
10048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10049$as_echo "disabled" >&6; }
10050      else
10051        # Check if the provided tool contains a complete path.
10052        tool_specified="$NAWK"
10053        tool_basename="${tool_specified##*/}"
10054        if test "x$tool_basename" = "x$tool_specified"; then
10055          # A command without a complete path is provided, search $PATH.
10056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10057$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10058          # Extract the first word of "$tool_basename", so it can be a program name with args.
10059set dummy $tool_basename; ac_word=$2
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10061$as_echo_n "checking for $ac_word... " >&6; }
10062if ${ac_cv_path_NAWK+:} false; then :
10063  $as_echo_n "(cached) " >&6
10064else
10065  case $NAWK in
10066  [\\/]* | ?:[\\/]*)
10067  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10068  ;;
10069  *)
10070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10071for as_dir in $PATH
10072do
10073  IFS=$as_save_IFS
10074  test -z "$as_dir" && as_dir=.
10075    for ac_exec_ext in '' $ac_executable_extensions; do
10076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10077    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10079    break 2
10080  fi
10081done
10082  done
10083IFS=$as_save_IFS
10084
10085  ;;
10086esac
10087fi
10088NAWK=$ac_cv_path_NAWK
10089if test -n "$NAWK"; then
10090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10091$as_echo "$NAWK" >&6; }
10092else
10093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10094$as_echo "no" >&6; }
10095fi
10096
10097
10098          if test "x$NAWK" = x; then
10099            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10100          fi
10101        else
10102          # Otherwise we believe it is a complete path. Use it as it is.
10103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10104$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10105          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10106$as_echo_n "checking for NAWK... " >&6; }
10107          if test ! -x "$tool_specified"; then
10108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10109$as_echo "not found" >&6; }
10110            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10111          fi
10112          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10113$as_echo "$tool_specified" >&6; }
10114        fi
10115      fi
10116    fi
10117
10118  fi
10119
10120
10121
10122  if test "x$NAWK" = x; then
10123    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10124  fi
10125
10126
10127
10128
10129
10130  # Publish this variable in the help.
10131
10132
10133  if [ -z "${PRINTF+x}" ]; then
10134    # The variable is not set by user, try to locate tool using the code snippet
10135    for ac_prog in printf
10136do
10137  # Extract the first word of "$ac_prog", so it can be a program name with args.
10138set dummy $ac_prog; ac_word=$2
10139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10140$as_echo_n "checking for $ac_word... " >&6; }
10141if ${ac_cv_path_PRINTF+:} false; then :
10142  $as_echo_n "(cached) " >&6
10143else
10144  case $PRINTF in
10145  [\\/]* | ?:[\\/]*)
10146  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10147  ;;
10148  *)
10149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10150for as_dir in $PATH
10151do
10152  IFS=$as_save_IFS
10153  test -z "$as_dir" && as_dir=.
10154    for ac_exec_ext in '' $ac_executable_extensions; do
10155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10156    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10158    break 2
10159  fi
10160done
10161  done
10162IFS=$as_save_IFS
10163
10164  ;;
10165esac
10166fi
10167PRINTF=$ac_cv_path_PRINTF
10168if test -n "$PRINTF"; then
10169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10170$as_echo "$PRINTF" >&6; }
10171else
10172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10173$as_echo "no" >&6; }
10174fi
10175
10176
10177  test -n "$PRINTF" && break
10178done
10179
10180  else
10181    # The variable is set, but is it from the command line or the environment?
10182
10183    # Try to remove the string !PRINTF! from our list.
10184    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10185    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10186      # If it failed, the variable was not from the command line. Ignore it,
10187      # but warn the user (except for BASH, which is always set by the calling BASH).
10188      if test "xPRINTF" != xBASH; then
10189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10190$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10191      fi
10192      # Try to locate tool using the code snippet
10193      for ac_prog in printf
10194do
10195  # Extract the first word of "$ac_prog", so it can be a program name with args.
10196set dummy $ac_prog; ac_word=$2
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10198$as_echo_n "checking for $ac_word... " >&6; }
10199if ${ac_cv_path_PRINTF+:} false; then :
10200  $as_echo_n "(cached) " >&6
10201else
10202  case $PRINTF in
10203  [\\/]* | ?:[\\/]*)
10204  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10205  ;;
10206  *)
10207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10208for as_dir in $PATH
10209do
10210  IFS=$as_save_IFS
10211  test -z "$as_dir" && as_dir=.
10212    for ac_exec_ext in '' $ac_executable_extensions; do
10213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10214    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10216    break 2
10217  fi
10218done
10219  done
10220IFS=$as_save_IFS
10221
10222  ;;
10223esac
10224fi
10225PRINTF=$ac_cv_path_PRINTF
10226if test -n "$PRINTF"; then
10227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10228$as_echo "$PRINTF" >&6; }
10229else
10230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10231$as_echo "no" >&6; }
10232fi
10233
10234
10235  test -n "$PRINTF" && break
10236done
10237
10238    else
10239      # If it succeeded, then it was overridden by the user. We will use it
10240      # for the tool.
10241
10242      # First remove it from the list of overridden variables, so we can test
10243      # for unknown variables in the end.
10244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10245
10246      # Check if we try to supply an empty value
10247      if test "x$PRINTF" = x; then
10248        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10249$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10251$as_echo_n "checking for PRINTF... " >&6; }
10252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10253$as_echo "disabled" >&6; }
10254      else
10255        # Check if the provided tool contains a complete path.
10256        tool_specified="$PRINTF"
10257        tool_basename="${tool_specified##*/}"
10258        if test "x$tool_basename" = "x$tool_specified"; then
10259          # A command without a complete path is provided, search $PATH.
10260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10261$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10262          # Extract the first word of "$tool_basename", so it can be a program name with args.
10263set dummy $tool_basename; ac_word=$2
10264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10265$as_echo_n "checking for $ac_word... " >&6; }
10266if ${ac_cv_path_PRINTF+:} false; then :
10267  $as_echo_n "(cached) " >&6
10268else
10269  case $PRINTF in
10270  [\\/]* | ?:[\\/]*)
10271  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10272  ;;
10273  *)
10274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10275for as_dir in $PATH
10276do
10277  IFS=$as_save_IFS
10278  test -z "$as_dir" && as_dir=.
10279    for ac_exec_ext in '' $ac_executable_extensions; do
10280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10281    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10283    break 2
10284  fi
10285done
10286  done
10287IFS=$as_save_IFS
10288
10289  ;;
10290esac
10291fi
10292PRINTF=$ac_cv_path_PRINTF
10293if test -n "$PRINTF"; then
10294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10295$as_echo "$PRINTF" >&6; }
10296else
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
10299fi
10300
10301
10302          if test "x$PRINTF" = x; then
10303            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10304          fi
10305        else
10306          # Otherwise we believe it is a complete path. Use it as it is.
10307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10308$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10309          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10310$as_echo_n "checking for PRINTF... " >&6; }
10311          if test ! -x "$tool_specified"; then
10312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10313$as_echo "not found" >&6; }
10314            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10315          fi
10316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10317$as_echo "$tool_specified" >&6; }
10318        fi
10319      fi
10320    fi
10321
10322  fi
10323
10324
10325
10326  if test "x$PRINTF" = x; then
10327    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10328  fi
10329
10330
10331
10332
10333
10334  # Publish this variable in the help.
10335
10336
10337  if [ -z "${RM+x}" ]; then
10338    # The variable is not set by user, try to locate tool using the code snippet
10339    for ac_prog in rm
10340do
10341  # Extract the first word of "$ac_prog", so it can be a program name with args.
10342set dummy $ac_prog; ac_word=$2
10343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10344$as_echo_n "checking for $ac_word... " >&6; }
10345if ${ac_cv_path_RM+:} false; then :
10346  $as_echo_n "(cached) " >&6
10347else
10348  case $RM in
10349  [\\/]* | ?:[\\/]*)
10350  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10351  ;;
10352  *)
10353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10354for as_dir in $PATH
10355do
10356  IFS=$as_save_IFS
10357  test -z "$as_dir" && as_dir=.
10358    for ac_exec_ext in '' $ac_executable_extensions; do
10359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10360    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10362    break 2
10363  fi
10364done
10365  done
10366IFS=$as_save_IFS
10367
10368  ;;
10369esac
10370fi
10371RM=$ac_cv_path_RM
10372if test -n "$RM"; then
10373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10374$as_echo "$RM" >&6; }
10375else
10376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10377$as_echo "no" >&6; }
10378fi
10379
10380
10381  test -n "$RM" && break
10382done
10383
10384  else
10385    # The variable is set, but is it from the command line or the environment?
10386
10387    # Try to remove the string !RM! from our list.
10388    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10389    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10390      # If it failed, the variable was not from the command line. Ignore it,
10391      # but warn the user (except for BASH, which is always set by the calling BASH).
10392      if test "xRM" != xBASH; then
10393        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10394$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10395      fi
10396      # Try to locate tool using the code snippet
10397      for ac_prog in rm
10398do
10399  # Extract the first word of "$ac_prog", so it can be a program name with args.
10400set dummy $ac_prog; ac_word=$2
10401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10402$as_echo_n "checking for $ac_word... " >&6; }
10403if ${ac_cv_path_RM+:} false; then :
10404  $as_echo_n "(cached) " >&6
10405else
10406  case $RM in
10407  [\\/]* | ?:[\\/]*)
10408  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10409  ;;
10410  *)
10411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10412for as_dir in $PATH
10413do
10414  IFS=$as_save_IFS
10415  test -z "$as_dir" && as_dir=.
10416    for ac_exec_ext in '' $ac_executable_extensions; do
10417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10418    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10420    break 2
10421  fi
10422done
10423  done
10424IFS=$as_save_IFS
10425
10426  ;;
10427esac
10428fi
10429RM=$ac_cv_path_RM
10430if test -n "$RM"; then
10431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10432$as_echo "$RM" >&6; }
10433else
10434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10435$as_echo "no" >&6; }
10436fi
10437
10438
10439  test -n "$RM" && break
10440done
10441
10442    else
10443      # If it succeeded, then it was overridden by the user. We will use it
10444      # for the tool.
10445
10446      # First remove it from the list of overridden variables, so we can test
10447      # for unknown variables in the end.
10448      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10449
10450      # Check if we try to supply an empty value
10451      if test "x$RM" = x; then
10452        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10453$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10454        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10455$as_echo_n "checking for RM... " >&6; }
10456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10457$as_echo "disabled" >&6; }
10458      else
10459        # Check if the provided tool contains a complete path.
10460        tool_specified="$RM"
10461        tool_basename="${tool_specified##*/}"
10462        if test "x$tool_basename" = "x$tool_specified"; then
10463          # A command without a complete path is provided, search $PATH.
10464          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10465$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10466          # Extract the first word of "$tool_basename", so it can be a program name with args.
10467set dummy $tool_basename; ac_word=$2
10468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10469$as_echo_n "checking for $ac_word... " >&6; }
10470if ${ac_cv_path_RM+:} false; then :
10471  $as_echo_n "(cached) " >&6
10472else
10473  case $RM in
10474  [\\/]* | ?:[\\/]*)
10475  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10476  ;;
10477  *)
10478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10479for as_dir in $PATH
10480do
10481  IFS=$as_save_IFS
10482  test -z "$as_dir" && as_dir=.
10483    for ac_exec_ext in '' $ac_executable_extensions; do
10484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10485    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10487    break 2
10488  fi
10489done
10490  done
10491IFS=$as_save_IFS
10492
10493  ;;
10494esac
10495fi
10496RM=$ac_cv_path_RM
10497if test -n "$RM"; then
10498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10499$as_echo "$RM" >&6; }
10500else
10501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10502$as_echo "no" >&6; }
10503fi
10504
10505
10506          if test "x$RM" = x; then
10507            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10508          fi
10509        else
10510          # Otherwise we believe it is a complete path. Use it as it is.
10511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10512$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10513          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10514$as_echo_n "checking for RM... " >&6; }
10515          if test ! -x "$tool_specified"; then
10516            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10517$as_echo "not found" >&6; }
10518            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10519          fi
10520          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10521$as_echo "$tool_specified" >&6; }
10522        fi
10523      fi
10524    fi
10525
10526  fi
10527
10528
10529
10530  if test "x$RM" = x; then
10531    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10532  fi
10533
10534
10535
10536
10537
10538  # Publish this variable in the help.
10539
10540
10541  if [ -z "${RMDIR+x}" ]; then
10542    # The variable is not set by user, try to locate tool using the code snippet
10543    for ac_prog in rmdir
10544do
10545  # Extract the first word of "$ac_prog", so it can be a program name with args.
10546set dummy $ac_prog; ac_word=$2
10547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10548$as_echo_n "checking for $ac_word... " >&6; }
10549if ${ac_cv_path_RMDIR+:} false; then :
10550  $as_echo_n "(cached) " >&6
10551else
10552  case $RMDIR in
10553  [\\/]* | ?:[\\/]*)
10554  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10555  ;;
10556  *)
10557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10558for as_dir in $PATH
10559do
10560  IFS=$as_save_IFS
10561  test -z "$as_dir" && as_dir=.
10562    for ac_exec_ext in '' $ac_executable_extensions; do
10563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10564    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10566    break 2
10567  fi
10568done
10569  done
10570IFS=$as_save_IFS
10571
10572  ;;
10573esac
10574fi
10575RMDIR=$ac_cv_path_RMDIR
10576if test -n "$RMDIR"; then
10577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10578$as_echo "$RMDIR" >&6; }
10579else
10580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10581$as_echo "no" >&6; }
10582fi
10583
10584
10585  test -n "$RMDIR" && break
10586done
10587
10588  else
10589    # The variable is set, but is it from the command line or the environment?
10590
10591    # Try to remove the string !RMDIR! from our list.
10592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10594      # If it failed, the variable was not from the command line. Ignore it,
10595      # but warn the user (except for BASH, which is always set by the calling BASH).
10596      if test "xRMDIR" != xBASH; then
10597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10598$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10599      fi
10600      # Try to locate tool using the code snippet
10601      for ac_prog in rmdir
10602do
10603  # Extract the first word of "$ac_prog", so it can be a program name with args.
10604set dummy $ac_prog; ac_word=$2
10605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10606$as_echo_n "checking for $ac_word... " >&6; }
10607if ${ac_cv_path_RMDIR+:} false; then :
10608  $as_echo_n "(cached) " >&6
10609else
10610  case $RMDIR in
10611  [\\/]* | ?:[\\/]*)
10612  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10613  ;;
10614  *)
10615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10616for as_dir in $PATH
10617do
10618  IFS=$as_save_IFS
10619  test -z "$as_dir" && as_dir=.
10620    for ac_exec_ext in '' $ac_executable_extensions; do
10621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10622    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10624    break 2
10625  fi
10626done
10627  done
10628IFS=$as_save_IFS
10629
10630  ;;
10631esac
10632fi
10633RMDIR=$ac_cv_path_RMDIR
10634if test -n "$RMDIR"; then
10635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10636$as_echo "$RMDIR" >&6; }
10637else
10638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10639$as_echo "no" >&6; }
10640fi
10641
10642
10643  test -n "$RMDIR" && break
10644done
10645
10646    else
10647      # If it succeeded, then it was overridden by the user. We will use it
10648      # for the tool.
10649
10650      # First remove it from the list of overridden variables, so we can test
10651      # for unknown variables in the end.
10652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10653
10654      # Check if we try to supply an empty value
10655      if test "x$RMDIR" = x; then
10656        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10657$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10659$as_echo_n "checking for RMDIR... " >&6; }
10660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10661$as_echo "disabled" >&6; }
10662      else
10663        # Check if the provided tool contains a complete path.
10664        tool_specified="$RMDIR"
10665        tool_basename="${tool_specified##*/}"
10666        if test "x$tool_basename" = "x$tool_specified"; then
10667          # A command without a complete path is provided, search $PATH.
10668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10669$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10670          # Extract the first word of "$tool_basename", so it can be a program name with args.
10671set dummy $tool_basename; ac_word=$2
10672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10673$as_echo_n "checking for $ac_word... " >&6; }
10674if ${ac_cv_path_RMDIR+:} false; then :
10675  $as_echo_n "(cached) " >&6
10676else
10677  case $RMDIR in
10678  [\\/]* | ?:[\\/]*)
10679  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10680  ;;
10681  *)
10682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10683for as_dir in $PATH
10684do
10685  IFS=$as_save_IFS
10686  test -z "$as_dir" && as_dir=.
10687    for ac_exec_ext in '' $ac_executable_extensions; do
10688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10689    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10691    break 2
10692  fi
10693done
10694  done
10695IFS=$as_save_IFS
10696
10697  ;;
10698esac
10699fi
10700RMDIR=$ac_cv_path_RMDIR
10701if test -n "$RMDIR"; then
10702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10703$as_echo "$RMDIR" >&6; }
10704else
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10706$as_echo "no" >&6; }
10707fi
10708
10709
10710          if test "x$RMDIR" = x; then
10711            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10712          fi
10713        else
10714          # Otherwise we believe it is a complete path. Use it as it is.
10715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10716$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10717          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10718$as_echo_n "checking for RMDIR... " >&6; }
10719          if test ! -x "$tool_specified"; then
10720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10721$as_echo "not found" >&6; }
10722            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10723          fi
10724          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10725$as_echo "$tool_specified" >&6; }
10726        fi
10727      fi
10728    fi
10729
10730  fi
10731
10732
10733
10734  if test "x$RMDIR" = x; then
10735    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10736  fi
10737
10738
10739
10740
10741
10742  # Publish this variable in the help.
10743
10744
10745  if [ -z "${SH+x}" ]; then
10746    # The variable is not set by user, try to locate tool using the code snippet
10747    for ac_prog in sh
10748do
10749  # Extract the first word of "$ac_prog", so it can be a program name with args.
10750set dummy $ac_prog; ac_word=$2
10751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10752$as_echo_n "checking for $ac_word... " >&6; }
10753if ${ac_cv_path_SH+:} false; then :
10754  $as_echo_n "(cached) " >&6
10755else
10756  case $SH in
10757  [\\/]* | ?:[\\/]*)
10758  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10759  ;;
10760  *)
10761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10762for as_dir in $PATH
10763do
10764  IFS=$as_save_IFS
10765  test -z "$as_dir" && as_dir=.
10766    for ac_exec_ext in '' $ac_executable_extensions; do
10767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10768    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10770    break 2
10771  fi
10772done
10773  done
10774IFS=$as_save_IFS
10775
10776  ;;
10777esac
10778fi
10779SH=$ac_cv_path_SH
10780if test -n "$SH"; then
10781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10782$as_echo "$SH" >&6; }
10783else
10784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10785$as_echo "no" >&6; }
10786fi
10787
10788
10789  test -n "$SH" && break
10790done
10791
10792  else
10793    # The variable is set, but is it from the command line or the environment?
10794
10795    # Try to remove the string !SH! from our list.
10796    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10797    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10798      # If it failed, the variable was not from the command line. Ignore it,
10799      # but warn the user (except for BASH, which is always set by the calling BASH).
10800      if test "xSH" != xBASH; then
10801        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10802$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10803      fi
10804      # Try to locate tool using the code snippet
10805      for ac_prog in sh
10806do
10807  # Extract the first word of "$ac_prog", so it can be a program name with args.
10808set dummy $ac_prog; ac_word=$2
10809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10810$as_echo_n "checking for $ac_word... " >&6; }
10811if ${ac_cv_path_SH+:} false; then :
10812  $as_echo_n "(cached) " >&6
10813else
10814  case $SH in
10815  [\\/]* | ?:[\\/]*)
10816  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10817  ;;
10818  *)
10819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10820for as_dir in $PATH
10821do
10822  IFS=$as_save_IFS
10823  test -z "$as_dir" && as_dir=.
10824    for ac_exec_ext in '' $ac_executable_extensions; do
10825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10826    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10828    break 2
10829  fi
10830done
10831  done
10832IFS=$as_save_IFS
10833
10834  ;;
10835esac
10836fi
10837SH=$ac_cv_path_SH
10838if test -n "$SH"; then
10839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10840$as_echo "$SH" >&6; }
10841else
10842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10843$as_echo "no" >&6; }
10844fi
10845
10846
10847  test -n "$SH" && break
10848done
10849
10850    else
10851      # If it succeeded, then it was overridden by the user. We will use it
10852      # for the tool.
10853
10854      # First remove it from the list of overridden variables, so we can test
10855      # for unknown variables in the end.
10856      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10857
10858      # Check if we try to supply an empty value
10859      if test "x$SH" = x; then
10860        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10861$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10862        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10863$as_echo_n "checking for SH... " >&6; }
10864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10865$as_echo "disabled" >&6; }
10866      else
10867        # Check if the provided tool contains a complete path.
10868        tool_specified="$SH"
10869        tool_basename="${tool_specified##*/}"
10870        if test "x$tool_basename" = "x$tool_specified"; then
10871          # A command without a complete path is provided, search $PATH.
10872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10873$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10874          # Extract the first word of "$tool_basename", so it can be a program name with args.
10875set dummy $tool_basename; ac_word=$2
10876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10877$as_echo_n "checking for $ac_word... " >&6; }
10878if ${ac_cv_path_SH+:} false; then :
10879  $as_echo_n "(cached) " >&6
10880else
10881  case $SH in
10882  [\\/]* | ?:[\\/]*)
10883  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10884  ;;
10885  *)
10886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10887for as_dir in $PATH
10888do
10889  IFS=$as_save_IFS
10890  test -z "$as_dir" && as_dir=.
10891    for ac_exec_ext in '' $ac_executable_extensions; do
10892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10893    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10895    break 2
10896  fi
10897done
10898  done
10899IFS=$as_save_IFS
10900
10901  ;;
10902esac
10903fi
10904SH=$ac_cv_path_SH
10905if test -n "$SH"; then
10906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10907$as_echo "$SH" >&6; }
10908else
10909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10910$as_echo "no" >&6; }
10911fi
10912
10913
10914          if test "x$SH" = x; then
10915            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10916          fi
10917        else
10918          # Otherwise we believe it is a complete path. Use it as it is.
10919          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10920$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10921          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10922$as_echo_n "checking for SH... " >&6; }
10923          if test ! -x "$tool_specified"; then
10924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10925$as_echo "not found" >&6; }
10926            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10927          fi
10928          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10929$as_echo "$tool_specified" >&6; }
10930        fi
10931      fi
10932    fi
10933
10934  fi
10935
10936
10937
10938  if test "x$SH" = x; then
10939    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10940  fi
10941
10942
10943
10944
10945
10946  # Publish this variable in the help.
10947
10948
10949  if [ -z "${SORT+x}" ]; then
10950    # The variable is not set by user, try to locate tool using the code snippet
10951    for ac_prog in sort
10952do
10953  # Extract the first word of "$ac_prog", so it can be a program name with args.
10954set dummy $ac_prog; ac_word=$2
10955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10956$as_echo_n "checking for $ac_word... " >&6; }
10957if ${ac_cv_path_SORT+:} false; then :
10958  $as_echo_n "(cached) " >&6
10959else
10960  case $SORT in
10961  [\\/]* | ?:[\\/]*)
10962  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10963  ;;
10964  *)
10965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10966for as_dir in $PATH
10967do
10968  IFS=$as_save_IFS
10969  test -z "$as_dir" && as_dir=.
10970    for ac_exec_ext in '' $ac_executable_extensions; do
10971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10972    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10974    break 2
10975  fi
10976done
10977  done
10978IFS=$as_save_IFS
10979
10980  ;;
10981esac
10982fi
10983SORT=$ac_cv_path_SORT
10984if test -n "$SORT"; then
10985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10986$as_echo "$SORT" >&6; }
10987else
10988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10989$as_echo "no" >&6; }
10990fi
10991
10992
10993  test -n "$SORT" && break
10994done
10995
10996  else
10997    # The variable is set, but is it from the command line or the environment?
10998
10999    # Try to remove the string !SORT! from our list.
11000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11002      # If it failed, the variable was not from the command line. Ignore it,
11003      # but warn the user (except for BASH, which is always set by the calling BASH).
11004      if test "xSORT" != xBASH; then
11005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11006$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11007      fi
11008      # Try to locate tool using the code snippet
11009      for ac_prog in sort
11010do
11011  # Extract the first word of "$ac_prog", so it can be a program name with args.
11012set dummy $ac_prog; ac_word=$2
11013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11014$as_echo_n "checking for $ac_word... " >&6; }
11015if ${ac_cv_path_SORT+:} false; then :
11016  $as_echo_n "(cached) " >&6
11017else
11018  case $SORT in
11019  [\\/]* | ?:[\\/]*)
11020  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11021  ;;
11022  *)
11023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11024for as_dir in $PATH
11025do
11026  IFS=$as_save_IFS
11027  test -z "$as_dir" && as_dir=.
11028    for ac_exec_ext in '' $ac_executable_extensions; do
11029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11030    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11032    break 2
11033  fi
11034done
11035  done
11036IFS=$as_save_IFS
11037
11038  ;;
11039esac
11040fi
11041SORT=$ac_cv_path_SORT
11042if test -n "$SORT"; then
11043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11044$as_echo "$SORT" >&6; }
11045else
11046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11047$as_echo "no" >&6; }
11048fi
11049
11050
11051  test -n "$SORT" && break
11052done
11053
11054    else
11055      # If it succeeded, then it was overridden by the user. We will use it
11056      # for the tool.
11057
11058      # First remove it from the list of overridden variables, so we can test
11059      # for unknown variables in the end.
11060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11061
11062      # Check if we try to supply an empty value
11063      if test "x$SORT" = x; then
11064        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11065$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11067$as_echo_n "checking for SORT... " >&6; }
11068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11069$as_echo "disabled" >&6; }
11070      else
11071        # Check if the provided tool contains a complete path.
11072        tool_specified="$SORT"
11073        tool_basename="${tool_specified##*/}"
11074        if test "x$tool_basename" = "x$tool_specified"; then
11075          # A command without a complete path is provided, search $PATH.
11076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11077$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11078          # Extract the first word of "$tool_basename", so it can be a program name with args.
11079set dummy $tool_basename; ac_word=$2
11080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11081$as_echo_n "checking for $ac_word... " >&6; }
11082if ${ac_cv_path_SORT+:} false; then :
11083  $as_echo_n "(cached) " >&6
11084else
11085  case $SORT in
11086  [\\/]* | ?:[\\/]*)
11087  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11088  ;;
11089  *)
11090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11091for as_dir in $PATH
11092do
11093  IFS=$as_save_IFS
11094  test -z "$as_dir" && as_dir=.
11095    for ac_exec_ext in '' $ac_executable_extensions; do
11096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11097    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11099    break 2
11100  fi
11101done
11102  done
11103IFS=$as_save_IFS
11104
11105  ;;
11106esac
11107fi
11108SORT=$ac_cv_path_SORT
11109if test -n "$SORT"; then
11110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11111$as_echo "$SORT" >&6; }
11112else
11113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11114$as_echo "no" >&6; }
11115fi
11116
11117
11118          if test "x$SORT" = x; then
11119            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11120          fi
11121        else
11122          # Otherwise we believe it is a complete path. Use it as it is.
11123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11124$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11125          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11126$as_echo_n "checking for SORT... " >&6; }
11127          if test ! -x "$tool_specified"; then
11128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11129$as_echo "not found" >&6; }
11130            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11131          fi
11132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11133$as_echo "$tool_specified" >&6; }
11134        fi
11135      fi
11136    fi
11137
11138  fi
11139
11140
11141
11142  if test "x$SORT" = x; then
11143    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11144  fi
11145
11146
11147
11148
11149
11150  # Publish this variable in the help.
11151
11152
11153  if [ -z "${TAIL+x}" ]; then
11154    # The variable is not set by user, try to locate tool using the code snippet
11155    for ac_prog in tail
11156do
11157  # Extract the first word of "$ac_prog", so it can be a program name with args.
11158set dummy $ac_prog; ac_word=$2
11159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11160$as_echo_n "checking for $ac_word... " >&6; }
11161if ${ac_cv_path_TAIL+:} false; then :
11162  $as_echo_n "(cached) " >&6
11163else
11164  case $TAIL in
11165  [\\/]* | ?:[\\/]*)
11166  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11167  ;;
11168  *)
11169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11170for as_dir in $PATH
11171do
11172  IFS=$as_save_IFS
11173  test -z "$as_dir" && as_dir=.
11174    for ac_exec_ext in '' $ac_executable_extensions; do
11175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11176    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11178    break 2
11179  fi
11180done
11181  done
11182IFS=$as_save_IFS
11183
11184  ;;
11185esac
11186fi
11187TAIL=$ac_cv_path_TAIL
11188if test -n "$TAIL"; then
11189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11190$as_echo "$TAIL" >&6; }
11191else
11192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11193$as_echo "no" >&6; }
11194fi
11195
11196
11197  test -n "$TAIL" && break
11198done
11199
11200  else
11201    # The variable is set, but is it from the command line or the environment?
11202
11203    # Try to remove the string !TAIL! from our list.
11204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11206      # If it failed, the variable was not from the command line. Ignore it,
11207      # but warn the user (except for BASH, which is always set by the calling BASH).
11208      if test "xTAIL" != xBASH; then
11209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11210$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11211      fi
11212      # Try to locate tool using the code snippet
11213      for ac_prog in tail
11214do
11215  # Extract the first word of "$ac_prog", so it can be a program name with args.
11216set dummy $ac_prog; ac_word=$2
11217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11218$as_echo_n "checking for $ac_word... " >&6; }
11219if ${ac_cv_path_TAIL+:} false; then :
11220  $as_echo_n "(cached) " >&6
11221else
11222  case $TAIL in
11223  [\\/]* | ?:[\\/]*)
11224  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11225  ;;
11226  *)
11227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11228for as_dir in $PATH
11229do
11230  IFS=$as_save_IFS
11231  test -z "$as_dir" && as_dir=.
11232    for ac_exec_ext in '' $ac_executable_extensions; do
11233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11234    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11236    break 2
11237  fi
11238done
11239  done
11240IFS=$as_save_IFS
11241
11242  ;;
11243esac
11244fi
11245TAIL=$ac_cv_path_TAIL
11246if test -n "$TAIL"; then
11247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11248$as_echo "$TAIL" >&6; }
11249else
11250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11251$as_echo "no" >&6; }
11252fi
11253
11254
11255  test -n "$TAIL" && break
11256done
11257
11258    else
11259      # If it succeeded, then it was overridden by the user. We will use it
11260      # for the tool.
11261
11262      # First remove it from the list of overridden variables, so we can test
11263      # for unknown variables in the end.
11264      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11265
11266      # Check if we try to supply an empty value
11267      if test "x$TAIL" = x; then
11268        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11269$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11271$as_echo_n "checking for TAIL... " >&6; }
11272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11273$as_echo "disabled" >&6; }
11274      else
11275        # Check if the provided tool contains a complete path.
11276        tool_specified="$TAIL"
11277        tool_basename="${tool_specified##*/}"
11278        if test "x$tool_basename" = "x$tool_specified"; then
11279          # A command without a complete path is provided, search $PATH.
11280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11281$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11282          # Extract the first word of "$tool_basename", so it can be a program name with args.
11283set dummy $tool_basename; ac_word=$2
11284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11285$as_echo_n "checking for $ac_word... " >&6; }
11286if ${ac_cv_path_TAIL+:} false; then :
11287  $as_echo_n "(cached) " >&6
11288else
11289  case $TAIL in
11290  [\\/]* | ?:[\\/]*)
11291  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11292  ;;
11293  *)
11294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11295for as_dir in $PATH
11296do
11297  IFS=$as_save_IFS
11298  test -z "$as_dir" && as_dir=.
11299    for ac_exec_ext in '' $ac_executable_extensions; do
11300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11301    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11303    break 2
11304  fi
11305done
11306  done
11307IFS=$as_save_IFS
11308
11309  ;;
11310esac
11311fi
11312TAIL=$ac_cv_path_TAIL
11313if test -n "$TAIL"; then
11314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11315$as_echo "$TAIL" >&6; }
11316else
11317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11318$as_echo "no" >&6; }
11319fi
11320
11321
11322          if test "x$TAIL" = x; then
11323            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11324          fi
11325        else
11326          # Otherwise we believe it is a complete path. Use it as it is.
11327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11328$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11329          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11330$as_echo_n "checking for TAIL... " >&6; }
11331          if test ! -x "$tool_specified"; then
11332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11333$as_echo "not found" >&6; }
11334            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11335          fi
11336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11337$as_echo "$tool_specified" >&6; }
11338        fi
11339      fi
11340    fi
11341
11342  fi
11343
11344
11345
11346  if test "x$TAIL" = x; then
11347    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11348  fi
11349
11350
11351
11352
11353
11354  # Publish this variable in the help.
11355
11356
11357  if [ -z "${TAR+x}" ]; then
11358    # The variable is not set by user, try to locate tool using the code snippet
11359    for ac_prog in gtar tar
11360do
11361  # Extract the first word of "$ac_prog", so it can be a program name with args.
11362set dummy $ac_prog; ac_word=$2
11363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11364$as_echo_n "checking for $ac_word... " >&6; }
11365if ${ac_cv_path_TAR+:} false; then :
11366  $as_echo_n "(cached) " >&6
11367else
11368  case $TAR in
11369  [\\/]* | ?:[\\/]*)
11370  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11371  ;;
11372  *)
11373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11374for as_dir in $PATH
11375do
11376  IFS=$as_save_IFS
11377  test -z "$as_dir" && as_dir=.
11378    for ac_exec_ext in '' $ac_executable_extensions; do
11379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11380    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11382    break 2
11383  fi
11384done
11385  done
11386IFS=$as_save_IFS
11387
11388  ;;
11389esac
11390fi
11391TAR=$ac_cv_path_TAR
11392if test -n "$TAR"; then
11393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11394$as_echo "$TAR" >&6; }
11395else
11396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11397$as_echo "no" >&6; }
11398fi
11399
11400
11401  test -n "$TAR" && break
11402done
11403
11404  else
11405    # The variable is set, but is it from the command line or the environment?
11406
11407    # Try to remove the string !TAR! from our list.
11408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11410      # If it failed, the variable was not from the command line. Ignore it,
11411      # but warn the user (except for BASH, which is always set by the calling BASH).
11412      if test "xTAR" != xBASH; then
11413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11414$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11415      fi
11416      # Try to locate tool using the code snippet
11417      for ac_prog in gtar tar
11418do
11419  # Extract the first word of "$ac_prog", so it can be a program name with args.
11420set dummy $ac_prog; ac_word=$2
11421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11422$as_echo_n "checking for $ac_word... " >&6; }
11423if ${ac_cv_path_TAR+:} false; then :
11424  $as_echo_n "(cached) " >&6
11425else
11426  case $TAR in
11427  [\\/]* | ?:[\\/]*)
11428  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11429  ;;
11430  *)
11431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11432for as_dir in $PATH
11433do
11434  IFS=$as_save_IFS
11435  test -z "$as_dir" && as_dir=.
11436    for ac_exec_ext in '' $ac_executable_extensions; do
11437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11438    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11440    break 2
11441  fi
11442done
11443  done
11444IFS=$as_save_IFS
11445
11446  ;;
11447esac
11448fi
11449TAR=$ac_cv_path_TAR
11450if test -n "$TAR"; then
11451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11452$as_echo "$TAR" >&6; }
11453else
11454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11455$as_echo "no" >&6; }
11456fi
11457
11458
11459  test -n "$TAR" && break
11460done
11461
11462    else
11463      # If it succeeded, then it was overridden by the user. We will use it
11464      # for the tool.
11465
11466      # First remove it from the list of overridden variables, so we can test
11467      # for unknown variables in the end.
11468      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11469
11470      # Check if we try to supply an empty value
11471      if test "x$TAR" = x; then
11472        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11473$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11474        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11475$as_echo_n "checking for TAR... " >&6; }
11476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11477$as_echo "disabled" >&6; }
11478      else
11479        # Check if the provided tool contains a complete path.
11480        tool_specified="$TAR"
11481        tool_basename="${tool_specified##*/}"
11482        if test "x$tool_basename" = "x$tool_specified"; then
11483          # A command without a complete path is provided, search $PATH.
11484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11485$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11486          # Extract the first word of "$tool_basename", so it can be a program name with args.
11487set dummy $tool_basename; ac_word=$2
11488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11489$as_echo_n "checking for $ac_word... " >&6; }
11490if ${ac_cv_path_TAR+:} false; then :
11491  $as_echo_n "(cached) " >&6
11492else
11493  case $TAR in
11494  [\\/]* | ?:[\\/]*)
11495  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11496  ;;
11497  *)
11498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11499for as_dir in $PATH
11500do
11501  IFS=$as_save_IFS
11502  test -z "$as_dir" && as_dir=.
11503    for ac_exec_ext in '' $ac_executable_extensions; do
11504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11505    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11507    break 2
11508  fi
11509done
11510  done
11511IFS=$as_save_IFS
11512
11513  ;;
11514esac
11515fi
11516TAR=$ac_cv_path_TAR
11517if test -n "$TAR"; then
11518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11519$as_echo "$TAR" >&6; }
11520else
11521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11522$as_echo "no" >&6; }
11523fi
11524
11525
11526          if test "x$TAR" = x; then
11527            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11528          fi
11529        else
11530          # Otherwise we believe it is a complete path. Use it as it is.
11531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11532$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11533          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11534$as_echo_n "checking for TAR... " >&6; }
11535          if test ! -x "$tool_specified"; then
11536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11537$as_echo "not found" >&6; }
11538            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11539          fi
11540          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11541$as_echo "$tool_specified" >&6; }
11542        fi
11543      fi
11544    fi
11545
11546  fi
11547
11548
11549
11550  if test "x$TAR" = x; then
11551    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11552  fi
11553
11554
11555
11556
11557
11558  # Publish this variable in the help.
11559
11560
11561  if [ -z "${TEE+x}" ]; then
11562    # The variable is not set by user, try to locate tool using the code snippet
11563    for ac_prog in tee
11564do
11565  # Extract the first word of "$ac_prog", so it can be a program name with args.
11566set dummy $ac_prog; ac_word=$2
11567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11568$as_echo_n "checking for $ac_word... " >&6; }
11569if ${ac_cv_path_TEE+:} false; then :
11570  $as_echo_n "(cached) " >&6
11571else
11572  case $TEE in
11573  [\\/]* | ?:[\\/]*)
11574  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11575  ;;
11576  *)
11577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11578for as_dir in $PATH
11579do
11580  IFS=$as_save_IFS
11581  test -z "$as_dir" && as_dir=.
11582    for ac_exec_ext in '' $ac_executable_extensions; do
11583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11584    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11586    break 2
11587  fi
11588done
11589  done
11590IFS=$as_save_IFS
11591
11592  ;;
11593esac
11594fi
11595TEE=$ac_cv_path_TEE
11596if test -n "$TEE"; then
11597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11598$as_echo "$TEE" >&6; }
11599else
11600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11601$as_echo "no" >&6; }
11602fi
11603
11604
11605  test -n "$TEE" && break
11606done
11607
11608  else
11609    # The variable is set, but is it from the command line or the environment?
11610
11611    # Try to remove the string !TEE! from our list.
11612    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11613    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11614      # If it failed, the variable was not from the command line. Ignore it,
11615      # but warn the user (except for BASH, which is always set by the calling BASH).
11616      if test "xTEE" != xBASH; then
11617        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11618$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11619      fi
11620      # Try to locate tool using the code snippet
11621      for ac_prog in tee
11622do
11623  # Extract the first word of "$ac_prog", so it can be a program name with args.
11624set dummy $ac_prog; ac_word=$2
11625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11626$as_echo_n "checking for $ac_word... " >&6; }
11627if ${ac_cv_path_TEE+:} false; then :
11628  $as_echo_n "(cached) " >&6
11629else
11630  case $TEE in
11631  [\\/]* | ?:[\\/]*)
11632  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11633  ;;
11634  *)
11635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11636for as_dir in $PATH
11637do
11638  IFS=$as_save_IFS
11639  test -z "$as_dir" && as_dir=.
11640    for ac_exec_ext in '' $ac_executable_extensions; do
11641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11642    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11644    break 2
11645  fi
11646done
11647  done
11648IFS=$as_save_IFS
11649
11650  ;;
11651esac
11652fi
11653TEE=$ac_cv_path_TEE
11654if test -n "$TEE"; then
11655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11656$as_echo "$TEE" >&6; }
11657else
11658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11659$as_echo "no" >&6; }
11660fi
11661
11662
11663  test -n "$TEE" && break
11664done
11665
11666    else
11667      # If it succeeded, then it was overridden by the user. We will use it
11668      # for the tool.
11669
11670      # First remove it from the list of overridden variables, so we can test
11671      # for unknown variables in the end.
11672      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11673
11674      # Check if we try to supply an empty value
11675      if test "x$TEE" = x; then
11676        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11677$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11679$as_echo_n "checking for TEE... " >&6; }
11680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11681$as_echo "disabled" >&6; }
11682      else
11683        # Check if the provided tool contains a complete path.
11684        tool_specified="$TEE"
11685        tool_basename="${tool_specified##*/}"
11686        if test "x$tool_basename" = "x$tool_specified"; then
11687          # A command without a complete path is provided, search $PATH.
11688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11689$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11690          # Extract the first word of "$tool_basename", so it can be a program name with args.
11691set dummy $tool_basename; ac_word=$2
11692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11693$as_echo_n "checking for $ac_word... " >&6; }
11694if ${ac_cv_path_TEE+:} false; then :
11695  $as_echo_n "(cached) " >&6
11696else
11697  case $TEE in
11698  [\\/]* | ?:[\\/]*)
11699  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11700  ;;
11701  *)
11702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11703for as_dir in $PATH
11704do
11705  IFS=$as_save_IFS
11706  test -z "$as_dir" && as_dir=.
11707    for ac_exec_ext in '' $ac_executable_extensions; do
11708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11709    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11711    break 2
11712  fi
11713done
11714  done
11715IFS=$as_save_IFS
11716
11717  ;;
11718esac
11719fi
11720TEE=$ac_cv_path_TEE
11721if test -n "$TEE"; then
11722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11723$as_echo "$TEE" >&6; }
11724else
11725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11726$as_echo "no" >&6; }
11727fi
11728
11729
11730          if test "x$TEE" = x; then
11731            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11732          fi
11733        else
11734          # Otherwise we believe it is a complete path. Use it as it is.
11735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11736$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11737          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11738$as_echo_n "checking for TEE... " >&6; }
11739          if test ! -x "$tool_specified"; then
11740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11741$as_echo "not found" >&6; }
11742            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11743          fi
11744          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11745$as_echo "$tool_specified" >&6; }
11746        fi
11747      fi
11748    fi
11749
11750  fi
11751
11752
11753
11754  if test "x$TEE" = x; then
11755    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11756  fi
11757
11758
11759
11760
11761
11762  # Publish this variable in the help.
11763
11764
11765  if [ -z "${TOUCH+x}" ]; then
11766    # The variable is not set by user, try to locate tool using the code snippet
11767    for ac_prog in touch
11768do
11769  # Extract the first word of "$ac_prog", so it can be a program name with args.
11770set dummy $ac_prog; ac_word=$2
11771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11772$as_echo_n "checking for $ac_word... " >&6; }
11773if ${ac_cv_path_TOUCH+:} false; then :
11774  $as_echo_n "(cached) " >&6
11775else
11776  case $TOUCH in
11777  [\\/]* | ?:[\\/]*)
11778  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11779  ;;
11780  *)
11781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11782for as_dir in $PATH
11783do
11784  IFS=$as_save_IFS
11785  test -z "$as_dir" && as_dir=.
11786    for ac_exec_ext in '' $ac_executable_extensions; do
11787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11788    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11790    break 2
11791  fi
11792done
11793  done
11794IFS=$as_save_IFS
11795
11796  ;;
11797esac
11798fi
11799TOUCH=$ac_cv_path_TOUCH
11800if test -n "$TOUCH"; then
11801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11802$as_echo "$TOUCH" >&6; }
11803else
11804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11805$as_echo "no" >&6; }
11806fi
11807
11808
11809  test -n "$TOUCH" && break
11810done
11811
11812  else
11813    # The variable is set, but is it from the command line or the environment?
11814
11815    # Try to remove the string !TOUCH! from our list.
11816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11818      # If it failed, the variable was not from the command line. Ignore it,
11819      # but warn the user (except for BASH, which is always set by the calling BASH).
11820      if test "xTOUCH" != xBASH; then
11821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11822$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11823      fi
11824      # Try to locate tool using the code snippet
11825      for ac_prog in touch
11826do
11827  # Extract the first word of "$ac_prog", so it can be a program name with args.
11828set dummy $ac_prog; ac_word=$2
11829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11830$as_echo_n "checking for $ac_word... " >&6; }
11831if ${ac_cv_path_TOUCH+:} false; then :
11832  $as_echo_n "(cached) " >&6
11833else
11834  case $TOUCH in
11835  [\\/]* | ?:[\\/]*)
11836  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11837  ;;
11838  *)
11839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11840for as_dir in $PATH
11841do
11842  IFS=$as_save_IFS
11843  test -z "$as_dir" && as_dir=.
11844    for ac_exec_ext in '' $ac_executable_extensions; do
11845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11846    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11848    break 2
11849  fi
11850done
11851  done
11852IFS=$as_save_IFS
11853
11854  ;;
11855esac
11856fi
11857TOUCH=$ac_cv_path_TOUCH
11858if test -n "$TOUCH"; then
11859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11860$as_echo "$TOUCH" >&6; }
11861else
11862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11863$as_echo "no" >&6; }
11864fi
11865
11866
11867  test -n "$TOUCH" && break
11868done
11869
11870    else
11871      # If it succeeded, then it was overridden by the user. We will use it
11872      # for the tool.
11873
11874      # First remove it from the list of overridden variables, so we can test
11875      # for unknown variables in the end.
11876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11877
11878      # Check if we try to supply an empty value
11879      if test "x$TOUCH" = x; then
11880        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11881$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11883$as_echo_n "checking for TOUCH... " >&6; }
11884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11885$as_echo "disabled" >&6; }
11886      else
11887        # Check if the provided tool contains a complete path.
11888        tool_specified="$TOUCH"
11889        tool_basename="${tool_specified##*/}"
11890        if test "x$tool_basename" = "x$tool_specified"; then
11891          # A command without a complete path is provided, search $PATH.
11892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11893$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11894          # Extract the first word of "$tool_basename", so it can be a program name with args.
11895set dummy $tool_basename; ac_word=$2
11896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11897$as_echo_n "checking for $ac_word... " >&6; }
11898if ${ac_cv_path_TOUCH+:} false; then :
11899  $as_echo_n "(cached) " >&6
11900else
11901  case $TOUCH in
11902  [\\/]* | ?:[\\/]*)
11903  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11904  ;;
11905  *)
11906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11907for as_dir in $PATH
11908do
11909  IFS=$as_save_IFS
11910  test -z "$as_dir" && as_dir=.
11911    for ac_exec_ext in '' $ac_executable_extensions; do
11912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11913    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11915    break 2
11916  fi
11917done
11918  done
11919IFS=$as_save_IFS
11920
11921  ;;
11922esac
11923fi
11924TOUCH=$ac_cv_path_TOUCH
11925if test -n "$TOUCH"; then
11926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11927$as_echo "$TOUCH" >&6; }
11928else
11929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11930$as_echo "no" >&6; }
11931fi
11932
11933
11934          if test "x$TOUCH" = x; then
11935            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11936          fi
11937        else
11938          # Otherwise we believe it is a complete path. Use it as it is.
11939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11940$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11941          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11942$as_echo_n "checking for TOUCH... " >&6; }
11943          if test ! -x "$tool_specified"; then
11944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11945$as_echo "not found" >&6; }
11946            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11947          fi
11948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11949$as_echo "$tool_specified" >&6; }
11950        fi
11951      fi
11952    fi
11953
11954  fi
11955
11956
11957
11958  if test "x$TOUCH" = x; then
11959    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11960  fi
11961
11962
11963
11964
11965
11966  # Publish this variable in the help.
11967
11968
11969  if [ -z "${TR+x}" ]; then
11970    # The variable is not set by user, try to locate tool using the code snippet
11971    for ac_prog in tr
11972do
11973  # Extract the first word of "$ac_prog", so it can be a program name with args.
11974set dummy $ac_prog; ac_word=$2
11975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11976$as_echo_n "checking for $ac_word... " >&6; }
11977if ${ac_cv_path_TR+:} false; then :
11978  $as_echo_n "(cached) " >&6
11979else
11980  case $TR in
11981  [\\/]* | ?:[\\/]*)
11982  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11983  ;;
11984  *)
11985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11986for as_dir in $PATH
11987do
11988  IFS=$as_save_IFS
11989  test -z "$as_dir" && as_dir=.
11990    for ac_exec_ext in '' $ac_executable_extensions; do
11991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11992    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11994    break 2
11995  fi
11996done
11997  done
11998IFS=$as_save_IFS
11999
12000  ;;
12001esac
12002fi
12003TR=$ac_cv_path_TR
12004if test -n "$TR"; then
12005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12006$as_echo "$TR" >&6; }
12007else
12008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12009$as_echo "no" >&6; }
12010fi
12011
12012
12013  test -n "$TR" && break
12014done
12015
12016  else
12017    # The variable is set, but is it from the command line or the environment?
12018
12019    # Try to remove the string !TR! from our list.
12020    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12021    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12022      # If it failed, the variable was not from the command line. Ignore it,
12023      # but warn the user (except for BASH, which is always set by the calling BASH).
12024      if test "xTR" != xBASH; then
12025        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12026$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12027      fi
12028      # Try to locate tool using the code snippet
12029      for ac_prog in tr
12030do
12031  # Extract the first word of "$ac_prog", so it can be a program name with args.
12032set dummy $ac_prog; ac_word=$2
12033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12034$as_echo_n "checking for $ac_word... " >&6; }
12035if ${ac_cv_path_TR+:} false; then :
12036  $as_echo_n "(cached) " >&6
12037else
12038  case $TR in
12039  [\\/]* | ?:[\\/]*)
12040  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12041  ;;
12042  *)
12043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12044for as_dir in $PATH
12045do
12046  IFS=$as_save_IFS
12047  test -z "$as_dir" && as_dir=.
12048    for ac_exec_ext in '' $ac_executable_extensions; do
12049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12050    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12052    break 2
12053  fi
12054done
12055  done
12056IFS=$as_save_IFS
12057
12058  ;;
12059esac
12060fi
12061TR=$ac_cv_path_TR
12062if test -n "$TR"; then
12063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12064$as_echo "$TR" >&6; }
12065else
12066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12067$as_echo "no" >&6; }
12068fi
12069
12070
12071  test -n "$TR" && break
12072done
12073
12074    else
12075      # If it succeeded, then it was overridden by the user. We will use it
12076      # for the tool.
12077
12078      # First remove it from the list of overridden variables, so we can test
12079      # for unknown variables in the end.
12080      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12081
12082      # Check if we try to supply an empty value
12083      if test "x$TR" = x; then
12084        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12085$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12086        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12087$as_echo_n "checking for TR... " >&6; }
12088        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12089$as_echo "disabled" >&6; }
12090      else
12091        # Check if the provided tool contains a complete path.
12092        tool_specified="$TR"
12093        tool_basename="${tool_specified##*/}"
12094        if test "x$tool_basename" = "x$tool_specified"; then
12095          # A command without a complete path is provided, search $PATH.
12096          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12097$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12098          # Extract the first word of "$tool_basename", so it can be a program name with args.
12099set dummy $tool_basename; ac_word=$2
12100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12101$as_echo_n "checking for $ac_word... " >&6; }
12102if ${ac_cv_path_TR+:} false; then :
12103  $as_echo_n "(cached) " >&6
12104else
12105  case $TR in
12106  [\\/]* | ?:[\\/]*)
12107  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12108  ;;
12109  *)
12110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12111for as_dir in $PATH
12112do
12113  IFS=$as_save_IFS
12114  test -z "$as_dir" && as_dir=.
12115    for ac_exec_ext in '' $ac_executable_extensions; do
12116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12117    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12119    break 2
12120  fi
12121done
12122  done
12123IFS=$as_save_IFS
12124
12125  ;;
12126esac
12127fi
12128TR=$ac_cv_path_TR
12129if test -n "$TR"; then
12130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12131$as_echo "$TR" >&6; }
12132else
12133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12134$as_echo "no" >&6; }
12135fi
12136
12137
12138          if test "x$TR" = x; then
12139            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12140          fi
12141        else
12142          # Otherwise we believe it is a complete path. Use it as it is.
12143          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12144$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12145          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12146$as_echo_n "checking for TR... " >&6; }
12147          if test ! -x "$tool_specified"; then
12148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12149$as_echo "not found" >&6; }
12150            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12151          fi
12152          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12153$as_echo "$tool_specified" >&6; }
12154        fi
12155      fi
12156    fi
12157
12158  fi
12159
12160
12161
12162  if test "x$TR" = x; then
12163    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12164  fi
12165
12166
12167
12168
12169
12170  # Publish this variable in the help.
12171
12172
12173  if [ -z "${UNAME+x}" ]; then
12174    # The variable is not set by user, try to locate tool using the code snippet
12175    for ac_prog in uname
12176do
12177  # Extract the first word of "$ac_prog", so it can be a program name with args.
12178set dummy $ac_prog; ac_word=$2
12179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12180$as_echo_n "checking for $ac_word... " >&6; }
12181if ${ac_cv_path_UNAME+:} false; then :
12182  $as_echo_n "(cached) " >&6
12183else
12184  case $UNAME in
12185  [\\/]* | ?:[\\/]*)
12186  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12187  ;;
12188  *)
12189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12190for as_dir in $PATH
12191do
12192  IFS=$as_save_IFS
12193  test -z "$as_dir" && as_dir=.
12194    for ac_exec_ext in '' $ac_executable_extensions; do
12195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12196    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12198    break 2
12199  fi
12200done
12201  done
12202IFS=$as_save_IFS
12203
12204  ;;
12205esac
12206fi
12207UNAME=$ac_cv_path_UNAME
12208if test -n "$UNAME"; then
12209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12210$as_echo "$UNAME" >&6; }
12211else
12212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12213$as_echo "no" >&6; }
12214fi
12215
12216
12217  test -n "$UNAME" && break
12218done
12219
12220  else
12221    # The variable is set, but is it from the command line or the environment?
12222
12223    # Try to remove the string !UNAME! from our list.
12224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12226      # If it failed, the variable was not from the command line. Ignore it,
12227      # but warn the user (except for BASH, which is always set by the calling BASH).
12228      if test "xUNAME" != xBASH; then
12229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12230$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12231      fi
12232      # Try to locate tool using the code snippet
12233      for ac_prog in uname
12234do
12235  # Extract the first word of "$ac_prog", so it can be a program name with args.
12236set dummy $ac_prog; ac_word=$2
12237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12238$as_echo_n "checking for $ac_word... " >&6; }
12239if ${ac_cv_path_UNAME+:} false; then :
12240  $as_echo_n "(cached) " >&6
12241else
12242  case $UNAME in
12243  [\\/]* | ?:[\\/]*)
12244  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12245  ;;
12246  *)
12247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12248for as_dir in $PATH
12249do
12250  IFS=$as_save_IFS
12251  test -z "$as_dir" && as_dir=.
12252    for ac_exec_ext in '' $ac_executable_extensions; do
12253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12254    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12256    break 2
12257  fi
12258done
12259  done
12260IFS=$as_save_IFS
12261
12262  ;;
12263esac
12264fi
12265UNAME=$ac_cv_path_UNAME
12266if test -n "$UNAME"; then
12267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12268$as_echo "$UNAME" >&6; }
12269else
12270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12271$as_echo "no" >&6; }
12272fi
12273
12274
12275  test -n "$UNAME" && break
12276done
12277
12278    else
12279      # If it succeeded, then it was overridden by the user. We will use it
12280      # for the tool.
12281
12282      # First remove it from the list of overridden variables, so we can test
12283      # for unknown variables in the end.
12284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12285
12286      # Check if we try to supply an empty value
12287      if test "x$UNAME" = x; then
12288        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12289$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12291$as_echo_n "checking for UNAME... " >&6; }
12292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12293$as_echo "disabled" >&6; }
12294      else
12295        # Check if the provided tool contains a complete path.
12296        tool_specified="$UNAME"
12297        tool_basename="${tool_specified##*/}"
12298        if test "x$tool_basename" = "x$tool_specified"; then
12299          # A command without a complete path is provided, search $PATH.
12300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12301$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12302          # Extract the first word of "$tool_basename", so it can be a program name with args.
12303set dummy $tool_basename; ac_word=$2
12304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12305$as_echo_n "checking for $ac_word... " >&6; }
12306if ${ac_cv_path_UNAME+:} false; then :
12307  $as_echo_n "(cached) " >&6
12308else
12309  case $UNAME in
12310  [\\/]* | ?:[\\/]*)
12311  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12312  ;;
12313  *)
12314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12315for as_dir in $PATH
12316do
12317  IFS=$as_save_IFS
12318  test -z "$as_dir" && as_dir=.
12319    for ac_exec_ext in '' $ac_executable_extensions; do
12320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12321    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12323    break 2
12324  fi
12325done
12326  done
12327IFS=$as_save_IFS
12328
12329  ;;
12330esac
12331fi
12332UNAME=$ac_cv_path_UNAME
12333if test -n "$UNAME"; then
12334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12335$as_echo "$UNAME" >&6; }
12336else
12337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12338$as_echo "no" >&6; }
12339fi
12340
12341
12342          if test "x$UNAME" = x; then
12343            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12344          fi
12345        else
12346          # Otherwise we believe it is a complete path. Use it as it is.
12347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12348$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12349          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12350$as_echo_n "checking for UNAME... " >&6; }
12351          if test ! -x "$tool_specified"; then
12352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12353$as_echo "not found" >&6; }
12354            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12355          fi
12356          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12357$as_echo "$tool_specified" >&6; }
12358        fi
12359      fi
12360    fi
12361
12362  fi
12363
12364
12365
12366  if test "x$UNAME" = x; then
12367    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12368  fi
12369
12370
12371
12372
12373
12374  # Publish this variable in the help.
12375
12376
12377  if [ -z "${UNIQ+x}" ]; then
12378    # The variable is not set by user, try to locate tool using the code snippet
12379    for ac_prog in uniq
12380do
12381  # Extract the first word of "$ac_prog", so it can be a program name with args.
12382set dummy $ac_prog; ac_word=$2
12383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12384$as_echo_n "checking for $ac_word... " >&6; }
12385if ${ac_cv_path_UNIQ+:} false; then :
12386  $as_echo_n "(cached) " >&6
12387else
12388  case $UNIQ in
12389  [\\/]* | ?:[\\/]*)
12390  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12391  ;;
12392  *)
12393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12394for as_dir in $PATH
12395do
12396  IFS=$as_save_IFS
12397  test -z "$as_dir" && as_dir=.
12398    for ac_exec_ext in '' $ac_executable_extensions; do
12399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12400    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12402    break 2
12403  fi
12404done
12405  done
12406IFS=$as_save_IFS
12407
12408  ;;
12409esac
12410fi
12411UNIQ=$ac_cv_path_UNIQ
12412if test -n "$UNIQ"; then
12413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12414$as_echo "$UNIQ" >&6; }
12415else
12416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12417$as_echo "no" >&6; }
12418fi
12419
12420
12421  test -n "$UNIQ" && break
12422done
12423
12424  else
12425    # The variable is set, but is it from the command line or the environment?
12426
12427    # Try to remove the string !UNIQ! from our list.
12428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12430      # If it failed, the variable was not from the command line. Ignore it,
12431      # but warn the user (except for BASH, which is always set by the calling BASH).
12432      if test "xUNIQ" != xBASH; then
12433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12434$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12435      fi
12436      # Try to locate tool using the code snippet
12437      for ac_prog in uniq
12438do
12439  # Extract the first word of "$ac_prog", so it can be a program name with args.
12440set dummy $ac_prog; ac_word=$2
12441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12442$as_echo_n "checking for $ac_word... " >&6; }
12443if ${ac_cv_path_UNIQ+:} false; then :
12444  $as_echo_n "(cached) " >&6
12445else
12446  case $UNIQ in
12447  [\\/]* | ?:[\\/]*)
12448  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12449  ;;
12450  *)
12451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12452for as_dir in $PATH
12453do
12454  IFS=$as_save_IFS
12455  test -z "$as_dir" && as_dir=.
12456    for ac_exec_ext in '' $ac_executable_extensions; do
12457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12458    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12460    break 2
12461  fi
12462done
12463  done
12464IFS=$as_save_IFS
12465
12466  ;;
12467esac
12468fi
12469UNIQ=$ac_cv_path_UNIQ
12470if test -n "$UNIQ"; then
12471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12472$as_echo "$UNIQ" >&6; }
12473else
12474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12475$as_echo "no" >&6; }
12476fi
12477
12478
12479  test -n "$UNIQ" && break
12480done
12481
12482    else
12483      # If it succeeded, then it was overridden by the user. We will use it
12484      # for the tool.
12485
12486      # First remove it from the list of overridden variables, so we can test
12487      # for unknown variables in the end.
12488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12489
12490      # Check if we try to supply an empty value
12491      if test "x$UNIQ" = x; then
12492        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12493$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12495$as_echo_n "checking for UNIQ... " >&6; }
12496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12497$as_echo "disabled" >&6; }
12498      else
12499        # Check if the provided tool contains a complete path.
12500        tool_specified="$UNIQ"
12501        tool_basename="${tool_specified##*/}"
12502        if test "x$tool_basename" = "x$tool_specified"; then
12503          # A command without a complete path is provided, search $PATH.
12504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12505$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12506          # Extract the first word of "$tool_basename", so it can be a program name with args.
12507set dummy $tool_basename; ac_word=$2
12508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12509$as_echo_n "checking for $ac_word... " >&6; }
12510if ${ac_cv_path_UNIQ+:} false; then :
12511  $as_echo_n "(cached) " >&6
12512else
12513  case $UNIQ in
12514  [\\/]* | ?:[\\/]*)
12515  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12516  ;;
12517  *)
12518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12519for as_dir in $PATH
12520do
12521  IFS=$as_save_IFS
12522  test -z "$as_dir" && as_dir=.
12523    for ac_exec_ext in '' $ac_executable_extensions; do
12524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12525    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12527    break 2
12528  fi
12529done
12530  done
12531IFS=$as_save_IFS
12532
12533  ;;
12534esac
12535fi
12536UNIQ=$ac_cv_path_UNIQ
12537if test -n "$UNIQ"; then
12538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12539$as_echo "$UNIQ" >&6; }
12540else
12541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12542$as_echo "no" >&6; }
12543fi
12544
12545
12546          if test "x$UNIQ" = x; then
12547            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12548          fi
12549        else
12550          # Otherwise we believe it is a complete path. Use it as it is.
12551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12552$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12553          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12554$as_echo_n "checking for UNIQ... " >&6; }
12555          if test ! -x "$tool_specified"; then
12556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12557$as_echo "not found" >&6; }
12558            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12559          fi
12560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12561$as_echo "$tool_specified" >&6; }
12562        fi
12563      fi
12564    fi
12565
12566  fi
12567
12568
12569
12570  if test "x$UNIQ" = x; then
12571    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12572  fi
12573
12574
12575
12576
12577
12578  # Publish this variable in the help.
12579
12580
12581  if [ -z "${WC+x}" ]; then
12582    # The variable is not set by user, try to locate tool using the code snippet
12583    for ac_prog in wc
12584do
12585  # Extract the first word of "$ac_prog", so it can be a program name with args.
12586set dummy $ac_prog; ac_word=$2
12587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12588$as_echo_n "checking for $ac_word... " >&6; }
12589if ${ac_cv_path_WC+:} false; then :
12590  $as_echo_n "(cached) " >&6
12591else
12592  case $WC in
12593  [\\/]* | ?:[\\/]*)
12594  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12595  ;;
12596  *)
12597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12598for as_dir in $PATH
12599do
12600  IFS=$as_save_IFS
12601  test -z "$as_dir" && as_dir=.
12602    for ac_exec_ext in '' $ac_executable_extensions; do
12603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12604    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12606    break 2
12607  fi
12608done
12609  done
12610IFS=$as_save_IFS
12611
12612  ;;
12613esac
12614fi
12615WC=$ac_cv_path_WC
12616if test -n "$WC"; then
12617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12618$as_echo "$WC" >&6; }
12619else
12620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12621$as_echo "no" >&6; }
12622fi
12623
12624
12625  test -n "$WC" && break
12626done
12627
12628  else
12629    # The variable is set, but is it from the command line or the environment?
12630
12631    # Try to remove the string !WC! from our list.
12632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12634      # If it failed, the variable was not from the command line. Ignore it,
12635      # but warn the user (except for BASH, which is always set by the calling BASH).
12636      if test "xWC" != xBASH; then
12637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12638$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12639      fi
12640      # Try to locate tool using the code snippet
12641      for ac_prog in wc
12642do
12643  # Extract the first word of "$ac_prog", so it can be a program name with args.
12644set dummy $ac_prog; ac_word=$2
12645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12646$as_echo_n "checking for $ac_word... " >&6; }
12647if ${ac_cv_path_WC+:} false; then :
12648  $as_echo_n "(cached) " >&6
12649else
12650  case $WC in
12651  [\\/]* | ?:[\\/]*)
12652  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12653  ;;
12654  *)
12655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12656for as_dir in $PATH
12657do
12658  IFS=$as_save_IFS
12659  test -z "$as_dir" && as_dir=.
12660    for ac_exec_ext in '' $ac_executable_extensions; do
12661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12662    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12664    break 2
12665  fi
12666done
12667  done
12668IFS=$as_save_IFS
12669
12670  ;;
12671esac
12672fi
12673WC=$ac_cv_path_WC
12674if test -n "$WC"; then
12675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12676$as_echo "$WC" >&6; }
12677else
12678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12679$as_echo "no" >&6; }
12680fi
12681
12682
12683  test -n "$WC" && break
12684done
12685
12686    else
12687      # If it succeeded, then it was overridden by the user. We will use it
12688      # for the tool.
12689
12690      # First remove it from the list of overridden variables, so we can test
12691      # for unknown variables in the end.
12692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12693
12694      # Check if we try to supply an empty value
12695      if test "x$WC" = x; then
12696        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12697$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12699$as_echo_n "checking for WC... " >&6; }
12700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12701$as_echo "disabled" >&6; }
12702      else
12703        # Check if the provided tool contains a complete path.
12704        tool_specified="$WC"
12705        tool_basename="${tool_specified##*/}"
12706        if test "x$tool_basename" = "x$tool_specified"; then
12707          # A command without a complete path is provided, search $PATH.
12708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12709$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12710          # Extract the first word of "$tool_basename", so it can be a program name with args.
12711set dummy $tool_basename; ac_word=$2
12712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12713$as_echo_n "checking for $ac_word... " >&6; }
12714if ${ac_cv_path_WC+:} false; then :
12715  $as_echo_n "(cached) " >&6
12716else
12717  case $WC in
12718  [\\/]* | ?:[\\/]*)
12719  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12720  ;;
12721  *)
12722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12723for as_dir in $PATH
12724do
12725  IFS=$as_save_IFS
12726  test -z "$as_dir" && as_dir=.
12727    for ac_exec_ext in '' $ac_executable_extensions; do
12728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12729    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12731    break 2
12732  fi
12733done
12734  done
12735IFS=$as_save_IFS
12736
12737  ;;
12738esac
12739fi
12740WC=$ac_cv_path_WC
12741if test -n "$WC"; then
12742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12743$as_echo "$WC" >&6; }
12744else
12745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12746$as_echo "no" >&6; }
12747fi
12748
12749
12750          if test "x$WC" = x; then
12751            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12752          fi
12753        else
12754          # Otherwise we believe it is a complete path. Use it as it is.
12755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12756$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12757          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12758$as_echo_n "checking for WC... " >&6; }
12759          if test ! -x "$tool_specified"; then
12760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12761$as_echo "not found" >&6; }
12762            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12763          fi
12764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12765$as_echo "$tool_specified" >&6; }
12766        fi
12767      fi
12768    fi
12769
12770  fi
12771
12772
12773
12774  if test "x$WC" = x; then
12775    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12776  fi
12777
12778
12779
12780
12781
12782  # Publish this variable in the help.
12783
12784
12785  if [ -z "${WHICH+x}" ]; then
12786    # The variable is not set by user, try to locate tool using the code snippet
12787    for ac_prog in which
12788do
12789  # Extract the first word of "$ac_prog", so it can be a program name with args.
12790set dummy $ac_prog; ac_word=$2
12791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12792$as_echo_n "checking for $ac_word... " >&6; }
12793if ${ac_cv_path_WHICH+:} false; then :
12794  $as_echo_n "(cached) " >&6
12795else
12796  case $WHICH in
12797  [\\/]* | ?:[\\/]*)
12798  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12799  ;;
12800  *)
12801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12802for as_dir in $PATH
12803do
12804  IFS=$as_save_IFS
12805  test -z "$as_dir" && as_dir=.
12806    for ac_exec_ext in '' $ac_executable_extensions; do
12807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12808    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12810    break 2
12811  fi
12812done
12813  done
12814IFS=$as_save_IFS
12815
12816  ;;
12817esac
12818fi
12819WHICH=$ac_cv_path_WHICH
12820if test -n "$WHICH"; then
12821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12822$as_echo "$WHICH" >&6; }
12823else
12824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12825$as_echo "no" >&6; }
12826fi
12827
12828
12829  test -n "$WHICH" && break
12830done
12831
12832  else
12833    # The variable is set, but is it from the command line or the environment?
12834
12835    # Try to remove the string !WHICH! from our list.
12836    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12837    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12838      # If it failed, the variable was not from the command line. Ignore it,
12839      # but warn the user (except for BASH, which is always set by the calling BASH).
12840      if test "xWHICH" != xBASH; then
12841        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12842$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12843      fi
12844      # Try to locate tool using the code snippet
12845      for ac_prog in which
12846do
12847  # Extract the first word of "$ac_prog", so it can be a program name with args.
12848set dummy $ac_prog; ac_word=$2
12849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12850$as_echo_n "checking for $ac_word... " >&6; }
12851if ${ac_cv_path_WHICH+:} false; then :
12852  $as_echo_n "(cached) " >&6
12853else
12854  case $WHICH in
12855  [\\/]* | ?:[\\/]*)
12856  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12857  ;;
12858  *)
12859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12860for as_dir in $PATH
12861do
12862  IFS=$as_save_IFS
12863  test -z "$as_dir" && as_dir=.
12864    for ac_exec_ext in '' $ac_executable_extensions; do
12865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12866    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12868    break 2
12869  fi
12870done
12871  done
12872IFS=$as_save_IFS
12873
12874  ;;
12875esac
12876fi
12877WHICH=$ac_cv_path_WHICH
12878if test -n "$WHICH"; then
12879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12880$as_echo "$WHICH" >&6; }
12881else
12882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12883$as_echo "no" >&6; }
12884fi
12885
12886
12887  test -n "$WHICH" && break
12888done
12889
12890    else
12891      # If it succeeded, then it was overridden by the user. We will use it
12892      # for the tool.
12893
12894      # First remove it from the list of overridden variables, so we can test
12895      # for unknown variables in the end.
12896      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12897
12898      # Check if we try to supply an empty value
12899      if test "x$WHICH" = x; then
12900        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12901$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12902        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12903$as_echo_n "checking for WHICH... " >&6; }
12904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12905$as_echo "disabled" >&6; }
12906      else
12907        # Check if the provided tool contains a complete path.
12908        tool_specified="$WHICH"
12909        tool_basename="${tool_specified##*/}"
12910        if test "x$tool_basename" = "x$tool_specified"; then
12911          # A command without a complete path is provided, search $PATH.
12912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12913$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12914          # Extract the first word of "$tool_basename", so it can be a program name with args.
12915set dummy $tool_basename; ac_word=$2
12916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12917$as_echo_n "checking for $ac_word... " >&6; }
12918if ${ac_cv_path_WHICH+:} false; then :
12919  $as_echo_n "(cached) " >&6
12920else
12921  case $WHICH in
12922  [\\/]* | ?:[\\/]*)
12923  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12924  ;;
12925  *)
12926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12927for as_dir in $PATH
12928do
12929  IFS=$as_save_IFS
12930  test -z "$as_dir" && as_dir=.
12931    for ac_exec_ext in '' $ac_executable_extensions; do
12932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12933    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12935    break 2
12936  fi
12937done
12938  done
12939IFS=$as_save_IFS
12940
12941  ;;
12942esac
12943fi
12944WHICH=$ac_cv_path_WHICH
12945if test -n "$WHICH"; then
12946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12947$as_echo "$WHICH" >&6; }
12948else
12949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12950$as_echo "no" >&6; }
12951fi
12952
12953
12954          if test "x$WHICH" = x; then
12955            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12956          fi
12957        else
12958          # Otherwise we believe it is a complete path. Use it as it is.
12959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12960$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12961          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12962$as_echo_n "checking for WHICH... " >&6; }
12963          if test ! -x "$tool_specified"; then
12964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12965$as_echo "not found" >&6; }
12966            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12967          fi
12968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12969$as_echo "$tool_specified" >&6; }
12970        fi
12971      fi
12972    fi
12973
12974  fi
12975
12976
12977
12978  if test "x$WHICH" = x; then
12979    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12980  fi
12981
12982
12983
12984
12985
12986  # Publish this variable in the help.
12987
12988
12989  if [ -z "${XARGS+x}" ]; then
12990    # The variable is not set by user, try to locate tool using the code snippet
12991    for ac_prog in xargs
12992do
12993  # Extract the first word of "$ac_prog", so it can be a program name with args.
12994set dummy $ac_prog; ac_word=$2
12995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12996$as_echo_n "checking for $ac_word... " >&6; }
12997if ${ac_cv_path_XARGS+:} false; then :
12998  $as_echo_n "(cached) " >&6
12999else
13000  case $XARGS in
13001  [\\/]* | ?:[\\/]*)
13002  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13003  ;;
13004  *)
13005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13006for as_dir in $PATH
13007do
13008  IFS=$as_save_IFS
13009  test -z "$as_dir" && as_dir=.
13010    for ac_exec_ext in '' $ac_executable_extensions; do
13011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13012    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13014    break 2
13015  fi
13016done
13017  done
13018IFS=$as_save_IFS
13019
13020  ;;
13021esac
13022fi
13023XARGS=$ac_cv_path_XARGS
13024if test -n "$XARGS"; then
13025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13026$as_echo "$XARGS" >&6; }
13027else
13028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13029$as_echo "no" >&6; }
13030fi
13031
13032
13033  test -n "$XARGS" && break
13034done
13035
13036  else
13037    # The variable is set, but is it from the command line or the environment?
13038
13039    # Try to remove the string !XARGS! from our list.
13040    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13041    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13042      # If it failed, the variable was not from the command line. Ignore it,
13043      # but warn the user (except for BASH, which is always set by the calling BASH).
13044      if test "xXARGS" != xBASH; then
13045        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13046$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13047      fi
13048      # Try to locate tool using the code snippet
13049      for ac_prog in xargs
13050do
13051  # Extract the first word of "$ac_prog", so it can be a program name with args.
13052set dummy $ac_prog; ac_word=$2
13053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13054$as_echo_n "checking for $ac_word... " >&6; }
13055if ${ac_cv_path_XARGS+:} false; then :
13056  $as_echo_n "(cached) " >&6
13057else
13058  case $XARGS in
13059  [\\/]* | ?:[\\/]*)
13060  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13061  ;;
13062  *)
13063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13064for as_dir in $PATH
13065do
13066  IFS=$as_save_IFS
13067  test -z "$as_dir" && as_dir=.
13068    for ac_exec_ext in '' $ac_executable_extensions; do
13069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13070    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13072    break 2
13073  fi
13074done
13075  done
13076IFS=$as_save_IFS
13077
13078  ;;
13079esac
13080fi
13081XARGS=$ac_cv_path_XARGS
13082if test -n "$XARGS"; then
13083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13084$as_echo "$XARGS" >&6; }
13085else
13086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13087$as_echo "no" >&6; }
13088fi
13089
13090
13091  test -n "$XARGS" && break
13092done
13093
13094    else
13095      # If it succeeded, then it was overridden by the user. We will use it
13096      # for the tool.
13097
13098      # First remove it from the list of overridden variables, so we can test
13099      # for unknown variables in the end.
13100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13101
13102      # Check if we try to supply an empty value
13103      if test "x$XARGS" = x; then
13104        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13105$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13107$as_echo_n "checking for XARGS... " >&6; }
13108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13109$as_echo "disabled" >&6; }
13110      else
13111        # Check if the provided tool contains a complete path.
13112        tool_specified="$XARGS"
13113        tool_basename="${tool_specified##*/}"
13114        if test "x$tool_basename" = "x$tool_specified"; then
13115          # A command without a complete path is provided, search $PATH.
13116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13117$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13118          # Extract the first word of "$tool_basename", so it can be a program name with args.
13119set dummy $tool_basename; ac_word=$2
13120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13121$as_echo_n "checking for $ac_word... " >&6; }
13122if ${ac_cv_path_XARGS+:} false; then :
13123  $as_echo_n "(cached) " >&6
13124else
13125  case $XARGS in
13126  [\\/]* | ?:[\\/]*)
13127  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13128  ;;
13129  *)
13130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13131for as_dir in $PATH
13132do
13133  IFS=$as_save_IFS
13134  test -z "$as_dir" && as_dir=.
13135    for ac_exec_ext in '' $ac_executable_extensions; do
13136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13137    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13139    break 2
13140  fi
13141done
13142  done
13143IFS=$as_save_IFS
13144
13145  ;;
13146esac
13147fi
13148XARGS=$ac_cv_path_XARGS
13149if test -n "$XARGS"; then
13150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13151$as_echo "$XARGS" >&6; }
13152else
13153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13154$as_echo "no" >&6; }
13155fi
13156
13157
13158          if test "x$XARGS" = x; then
13159            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13160          fi
13161        else
13162          # Otherwise we believe it is a complete path. Use it as it is.
13163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13164$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13165          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13166$as_echo_n "checking for XARGS... " >&6; }
13167          if test ! -x "$tool_specified"; then
13168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13169$as_echo "not found" >&6; }
13170            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13171          fi
13172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13173$as_echo "$tool_specified" >&6; }
13174        fi
13175      fi
13176    fi
13177
13178  fi
13179
13180
13181
13182  if test "x$XARGS" = x; then
13183    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13184  fi
13185
13186
13187
13188  # Then required tools that require some special treatment.
13189
13190
13191  # Publish this variable in the help.
13192
13193
13194  if [ -z "${AWK+x}" ]; then
13195    # The variable is not set by user, try to locate tool using the code snippet
13196    for ac_prog in gawk mawk nawk awk
13197do
13198  # Extract the first word of "$ac_prog", so it can be a program name with args.
13199set dummy $ac_prog; ac_word=$2
13200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13201$as_echo_n "checking for $ac_word... " >&6; }
13202if ${ac_cv_prog_AWK+:} false; then :
13203  $as_echo_n "(cached) " >&6
13204else
13205  if test -n "$AWK"; then
13206  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13207else
13208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13209for as_dir in $PATH
13210do
13211  IFS=$as_save_IFS
13212  test -z "$as_dir" && as_dir=.
13213    for ac_exec_ext in '' $ac_executable_extensions; do
13214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13215    ac_cv_prog_AWK="$ac_prog"
13216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13217    break 2
13218  fi
13219done
13220  done
13221IFS=$as_save_IFS
13222
13223fi
13224fi
13225AWK=$ac_cv_prog_AWK
13226if test -n "$AWK"; then
13227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13228$as_echo "$AWK" >&6; }
13229else
13230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13231$as_echo "no" >&6; }
13232fi
13233
13234
13235  test -n "$AWK" && break
13236done
13237
13238  else
13239    # The variable is set, but is it from the command line or the environment?
13240
13241    # Try to remove the string !AWK! from our list.
13242    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13243    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13244      # If it failed, the variable was not from the command line. Ignore it,
13245      # but warn the user (except for BASH, which is always set by the calling BASH).
13246      if test "xAWK" != xBASH; then
13247        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13248$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13249      fi
13250      # Try to locate tool using the code snippet
13251      for ac_prog in gawk mawk nawk awk
13252do
13253  # Extract the first word of "$ac_prog", so it can be a program name with args.
13254set dummy $ac_prog; ac_word=$2
13255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13256$as_echo_n "checking for $ac_word... " >&6; }
13257if ${ac_cv_prog_AWK+:} false; then :
13258  $as_echo_n "(cached) " >&6
13259else
13260  if test -n "$AWK"; then
13261  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13262else
13263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13264for as_dir in $PATH
13265do
13266  IFS=$as_save_IFS
13267  test -z "$as_dir" && as_dir=.
13268    for ac_exec_ext in '' $ac_executable_extensions; do
13269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13270    ac_cv_prog_AWK="$ac_prog"
13271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13272    break 2
13273  fi
13274done
13275  done
13276IFS=$as_save_IFS
13277
13278fi
13279fi
13280AWK=$ac_cv_prog_AWK
13281if test -n "$AWK"; then
13282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13283$as_echo "$AWK" >&6; }
13284else
13285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13286$as_echo "no" >&6; }
13287fi
13288
13289
13290  test -n "$AWK" && break
13291done
13292
13293    else
13294      # If it succeeded, then it was overridden by the user. We will use it
13295      # for the tool.
13296
13297      # First remove it from the list of overridden variables, so we can test
13298      # for unknown variables in the end.
13299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13300
13301      # Check if we try to supply an empty value
13302      if test "x$AWK" = x; then
13303        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13304$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13306$as_echo_n "checking for AWK... " >&6; }
13307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13308$as_echo "disabled" >&6; }
13309      else
13310        # Check if the provided tool contains a complete path.
13311        tool_specified="$AWK"
13312        tool_basename="${tool_specified##*/}"
13313        if test "x$tool_basename" = "x$tool_specified"; then
13314          # A command without a complete path is provided, search $PATH.
13315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13316$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13317          # Extract the first word of "$tool_basename", so it can be a program name with args.
13318set dummy $tool_basename; ac_word=$2
13319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13320$as_echo_n "checking for $ac_word... " >&6; }
13321if ${ac_cv_path_AWK+:} false; then :
13322  $as_echo_n "(cached) " >&6
13323else
13324  case $AWK in
13325  [\\/]* | ?:[\\/]*)
13326  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13327  ;;
13328  *)
13329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13330for as_dir in $PATH
13331do
13332  IFS=$as_save_IFS
13333  test -z "$as_dir" && as_dir=.
13334    for ac_exec_ext in '' $ac_executable_extensions; do
13335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13336    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13338    break 2
13339  fi
13340done
13341  done
13342IFS=$as_save_IFS
13343
13344  ;;
13345esac
13346fi
13347AWK=$ac_cv_path_AWK
13348if test -n "$AWK"; then
13349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13350$as_echo "$AWK" >&6; }
13351else
13352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13353$as_echo "no" >&6; }
13354fi
13355
13356
13357          if test "x$AWK" = x; then
13358            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13359          fi
13360        else
13361          # Otherwise we believe it is a complete path. Use it as it is.
13362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13363$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13364          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13365$as_echo_n "checking for AWK... " >&6; }
13366          if test ! -x "$tool_specified"; then
13367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13368$as_echo "not found" >&6; }
13369            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13370          fi
13371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13372$as_echo "$tool_specified" >&6; }
13373        fi
13374      fi
13375    fi
13376
13377  fi
13378
13379
13380  if test "x$AWK" = x; then
13381    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13382  fi
13383
13384
13385
13386
13387  # Publish this variable in the help.
13388
13389
13390  if [ -z "${GREP+x}" ]; then
13391    # The variable is not set by user, try to locate tool using the code snippet
13392    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13393$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13394if ${ac_cv_path_GREP+:} false; then :
13395  $as_echo_n "(cached) " >&6
13396else
13397  if test -z "$GREP"; then
13398  ac_path_GREP_found=false
13399  # Loop through the user's path and test for each of PROGNAME-LIST
13400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13401for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13402do
13403  IFS=$as_save_IFS
13404  test -z "$as_dir" && as_dir=.
13405    for ac_prog in grep ggrep; do
13406    for ac_exec_ext in '' $ac_executable_extensions; do
13407      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13408      as_fn_executable_p "$ac_path_GREP" || continue
13409# Check for GNU ac_path_GREP and select it if it is found.
13410  # Check for GNU $ac_path_GREP
13411case `"$ac_path_GREP" --version 2>&1` in
13412*GNU*)
13413  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13414*)
13415  ac_count=0
13416  $as_echo_n 0123456789 >"conftest.in"
13417  while :
13418  do
13419    cat "conftest.in" "conftest.in" >"conftest.tmp"
13420    mv "conftest.tmp" "conftest.in"
13421    cp "conftest.in" "conftest.nl"
13422    $as_echo 'GREP' >> "conftest.nl"
13423    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13424    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13425    as_fn_arith $ac_count + 1 && ac_count=$as_val
13426    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13427      # Best one so far, save it but keep looking for a better one
13428      ac_cv_path_GREP="$ac_path_GREP"
13429      ac_path_GREP_max=$ac_count
13430    fi
13431    # 10*(2^10) chars as input seems more than enough
13432    test $ac_count -gt 10 && break
13433  done
13434  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13435esac
13436
13437      $ac_path_GREP_found && break 3
13438    done
13439  done
13440  done
13441IFS=$as_save_IFS
13442  if test -z "$ac_cv_path_GREP"; then
13443    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13444  fi
13445else
13446  ac_cv_path_GREP=$GREP
13447fi
13448
13449fi
13450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13451$as_echo "$ac_cv_path_GREP" >&6; }
13452 GREP="$ac_cv_path_GREP"
13453
13454
13455  else
13456    # The variable is set, but is it from the command line or the environment?
13457
13458    # Try to remove the string !GREP! from our list.
13459    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13460    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13461      # If it failed, the variable was not from the command line. Ignore it,
13462      # but warn the user (except for BASH, which is always set by the calling BASH).
13463      if test "xGREP" != xBASH; then
13464        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13465$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13466      fi
13467      # Try to locate tool using the code snippet
13468      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13469$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13470if ${ac_cv_path_GREP+:} false; then :
13471  $as_echo_n "(cached) " >&6
13472else
13473  if test -z "$GREP"; then
13474  ac_path_GREP_found=false
13475  # Loop through the user's path and test for each of PROGNAME-LIST
13476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13477for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13478do
13479  IFS=$as_save_IFS
13480  test -z "$as_dir" && as_dir=.
13481    for ac_prog in grep ggrep; do
13482    for ac_exec_ext in '' $ac_executable_extensions; do
13483      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13484      as_fn_executable_p "$ac_path_GREP" || continue
13485# Check for GNU ac_path_GREP and select it if it is found.
13486  # Check for GNU $ac_path_GREP
13487case `"$ac_path_GREP" --version 2>&1` in
13488*GNU*)
13489  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13490*)
13491  ac_count=0
13492  $as_echo_n 0123456789 >"conftest.in"
13493  while :
13494  do
13495    cat "conftest.in" "conftest.in" >"conftest.tmp"
13496    mv "conftest.tmp" "conftest.in"
13497    cp "conftest.in" "conftest.nl"
13498    $as_echo 'GREP' >> "conftest.nl"
13499    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13500    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13501    as_fn_arith $ac_count + 1 && ac_count=$as_val
13502    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13503      # Best one so far, save it but keep looking for a better one
13504      ac_cv_path_GREP="$ac_path_GREP"
13505      ac_path_GREP_max=$ac_count
13506    fi
13507    # 10*(2^10) chars as input seems more than enough
13508    test $ac_count -gt 10 && break
13509  done
13510  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13511esac
13512
13513      $ac_path_GREP_found && break 3
13514    done
13515  done
13516  done
13517IFS=$as_save_IFS
13518  if test -z "$ac_cv_path_GREP"; then
13519    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13520  fi
13521else
13522  ac_cv_path_GREP=$GREP
13523fi
13524
13525fi
13526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13527$as_echo "$ac_cv_path_GREP" >&6; }
13528 GREP="$ac_cv_path_GREP"
13529
13530
13531    else
13532      # If it succeeded, then it was overridden by the user. We will use it
13533      # for the tool.
13534
13535      # First remove it from the list of overridden variables, so we can test
13536      # for unknown variables in the end.
13537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13538
13539      # Check if we try to supply an empty value
13540      if test "x$GREP" = x; then
13541        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13542$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13544$as_echo_n "checking for GREP... " >&6; }
13545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13546$as_echo "disabled" >&6; }
13547      else
13548        # Check if the provided tool contains a complete path.
13549        tool_specified="$GREP"
13550        tool_basename="${tool_specified##*/}"
13551        if test "x$tool_basename" = "x$tool_specified"; then
13552          # A command without a complete path is provided, search $PATH.
13553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13554$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13555          # Extract the first word of "$tool_basename", so it can be a program name with args.
13556set dummy $tool_basename; ac_word=$2
13557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13558$as_echo_n "checking for $ac_word... " >&6; }
13559if ${ac_cv_path_GREP+:} false; then :
13560  $as_echo_n "(cached) " >&6
13561else
13562  case $GREP in
13563  [\\/]* | ?:[\\/]*)
13564  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13565  ;;
13566  *)
13567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13568for as_dir in $PATH
13569do
13570  IFS=$as_save_IFS
13571  test -z "$as_dir" && as_dir=.
13572    for ac_exec_ext in '' $ac_executable_extensions; do
13573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13574    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13576    break 2
13577  fi
13578done
13579  done
13580IFS=$as_save_IFS
13581
13582  ;;
13583esac
13584fi
13585GREP=$ac_cv_path_GREP
13586if test -n "$GREP"; then
13587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13588$as_echo "$GREP" >&6; }
13589else
13590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13591$as_echo "no" >&6; }
13592fi
13593
13594
13595          if test "x$GREP" = x; then
13596            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13597          fi
13598        else
13599          # Otherwise we believe it is a complete path. Use it as it is.
13600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13601$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13602          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13603$as_echo_n "checking for GREP... " >&6; }
13604          if test ! -x "$tool_specified"; then
13605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13606$as_echo "not found" >&6; }
13607            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13608          fi
13609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13610$as_echo "$tool_specified" >&6; }
13611        fi
13612      fi
13613    fi
13614
13615  fi
13616
13617
13618  if test "x$GREP" = x; then
13619    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13620  fi
13621
13622
13623
13624
13625  # Publish this variable in the help.
13626
13627
13628  if [ -z "${EGREP+x}" ]; then
13629    # The variable is not set by user, try to locate tool using the code snippet
13630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13631$as_echo_n "checking for egrep... " >&6; }
13632if ${ac_cv_path_EGREP+:} false; then :
13633  $as_echo_n "(cached) " >&6
13634else
13635  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13636   then ac_cv_path_EGREP="$GREP -E"
13637   else
13638     if test -z "$EGREP"; then
13639  ac_path_EGREP_found=false
13640  # Loop through the user's path and test for each of PROGNAME-LIST
13641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13642for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13643do
13644  IFS=$as_save_IFS
13645  test -z "$as_dir" && as_dir=.
13646    for ac_prog in egrep; do
13647    for ac_exec_ext in '' $ac_executable_extensions; do
13648      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13649      as_fn_executable_p "$ac_path_EGREP" || continue
13650# Check for GNU ac_path_EGREP and select it if it is found.
13651  # Check for GNU $ac_path_EGREP
13652case `"$ac_path_EGREP" --version 2>&1` in
13653*GNU*)
13654  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13655*)
13656  ac_count=0
13657  $as_echo_n 0123456789 >"conftest.in"
13658  while :
13659  do
13660    cat "conftest.in" "conftest.in" >"conftest.tmp"
13661    mv "conftest.tmp" "conftest.in"
13662    cp "conftest.in" "conftest.nl"
13663    $as_echo 'EGREP' >> "conftest.nl"
13664    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13665    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13666    as_fn_arith $ac_count + 1 && ac_count=$as_val
13667    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13668      # Best one so far, save it but keep looking for a better one
13669      ac_cv_path_EGREP="$ac_path_EGREP"
13670      ac_path_EGREP_max=$ac_count
13671    fi
13672    # 10*(2^10) chars as input seems more than enough
13673    test $ac_count -gt 10 && break
13674  done
13675  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13676esac
13677
13678      $ac_path_EGREP_found && break 3
13679    done
13680  done
13681  done
13682IFS=$as_save_IFS
13683  if test -z "$ac_cv_path_EGREP"; then
13684    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13685  fi
13686else
13687  ac_cv_path_EGREP=$EGREP
13688fi
13689
13690   fi
13691fi
13692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13693$as_echo "$ac_cv_path_EGREP" >&6; }
13694 EGREP="$ac_cv_path_EGREP"
13695
13696
13697  else
13698    # The variable is set, but is it from the command line or the environment?
13699
13700    # Try to remove the string !EGREP! from our list.
13701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13703      # If it failed, the variable was not from the command line. Ignore it,
13704      # but warn the user (except for BASH, which is always set by the calling BASH).
13705      if test "xEGREP" != xBASH; then
13706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13707$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13708      fi
13709      # Try to locate tool using the code snippet
13710      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13711$as_echo_n "checking for egrep... " >&6; }
13712if ${ac_cv_path_EGREP+:} false; then :
13713  $as_echo_n "(cached) " >&6
13714else
13715  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13716   then ac_cv_path_EGREP="$GREP -E"
13717   else
13718     if test -z "$EGREP"; then
13719  ac_path_EGREP_found=false
13720  # Loop through the user's path and test for each of PROGNAME-LIST
13721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13722for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13723do
13724  IFS=$as_save_IFS
13725  test -z "$as_dir" && as_dir=.
13726    for ac_prog in egrep; do
13727    for ac_exec_ext in '' $ac_executable_extensions; do
13728      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13729      as_fn_executable_p "$ac_path_EGREP" || continue
13730# Check for GNU ac_path_EGREP and select it if it is found.
13731  # Check for GNU $ac_path_EGREP
13732case `"$ac_path_EGREP" --version 2>&1` in
13733*GNU*)
13734  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13735*)
13736  ac_count=0
13737  $as_echo_n 0123456789 >"conftest.in"
13738  while :
13739  do
13740    cat "conftest.in" "conftest.in" >"conftest.tmp"
13741    mv "conftest.tmp" "conftest.in"
13742    cp "conftest.in" "conftest.nl"
13743    $as_echo 'EGREP' >> "conftest.nl"
13744    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13745    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13746    as_fn_arith $ac_count + 1 && ac_count=$as_val
13747    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13748      # Best one so far, save it but keep looking for a better one
13749      ac_cv_path_EGREP="$ac_path_EGREP"
13750      ac_path_EGREP_max=$ac_count
13751    fi
13752    # 10*(2^10) chars as input seems more than enough
13753    test $ac_count -gt 10 && break
13754  done
13755  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13756esac
13757
13758      $ac_path_EGREP_found && break 3
13759    done
13760  done
13761  done
13762IFS=$as_save_IFS
13763  if test -z "$ac_cv_path_EGREP"; then
13764    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13765  fi
13766else
13767  ac_cv_path_EGREP=$EGREP
13768fi
13769
13770   fi
13771fi
13772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13773$as_echo "$ac_cv_path_EGREP" >&6; }
13774 EGREP="$ac_cv_path_EGREP"
13775
13776
13777    else
13778      # If it succeeded, then it was overridden by the user. We will use it
13779      # for the tool.
13780
13781      # First remove it from the list of overridden variables, so we can test
13782      # for unknown variables in the end.
13783      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13784
13785      # Check if we try to supply an empty value
13786      if test "x$EGREP" = x; then
13787        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13788$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13789        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13790$as_echo_n "checking for EGREP... " >&6; }
13791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13792$as_echo "disabled" >&6; }
13793      else
13794        # Check if the provided tool contains a complete path.
13795        tool_specified="$EGREP"
13796        tool_basename="${tool_specified##*/}"
13797        if test "x$tool_basename" = "x$tool_specified"; then
13798          # A command without a complete path is provided, search $PATH.
13799          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13800$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13801          # Extract the first word of "$tool_basename", so it can be a program name with args.
13802set dummy $tool_basename; ac_word=$2
13803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13804$as_echo_n "checking for $ac_word... " >&6; }
13805if ${ac_cv_path_EGREP+:} false; then :
13806  $as_echo_n "(cached) " >&6
13807else
13808  case $EGREP in
13809  [\\/]* | ?:[\\/]*)
13810  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13811  ;;
13812  *)
13813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13814for as_dir in $PATH
13815do
13816  IFS=$as_save_IFS
13817  test -z "$as_dir" && as_dir=.
13818    for ac_exec_ext in '' $ac_executable_extensions; do
13819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13820    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13822    break 2
13823  fi
13824done
13825  done
13826IFS=$as_save_IFS
13827
13828  ;;
13829esac
13830fi
13831EGREP=$ac_cv_path_EGREP
13832if test -n "$EGREP"; then
13833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13834$as_echo "$EGREP" >&6; }
13835else
13836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13837$as_echo "no" >&6; }
13838fi
13839
13840
13841          if test "x$EGREP" = x; then
13842            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13843          fi
13844        else
13845          # Otherwise we believe it is a complete path. Use it as it is.
13846          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13847$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13848          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13849$as_echo_n "checking for EGREP... " >&6; }
13850          if test ! -x "$tool_specified"; then
13851            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13852$as_echo "not found" >&6; }
13853            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13854          fi
13855          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13856$as_echo "$tool_specified" >&6; }
13857        fi
13858      fi
13859    fi
13860
13861  fi
13862
13863
13864  if test "x$EGREP" = x; then
13865    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13866  fi
13867
13868
13869
13870
13871  # Publish this variable in the help.
13872
13873
13874  if [ -z "${FGREP+x}" ]; then
13875    # The variable is not set by user, try to locate tool using the code snippet
13876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13877$as_echo_n "checking for fgrep... " >&6; }
13878if ${ac_cv_path_FGREP+:} false; then :
13879  $as_echo_n "(cached) " >&6
13880else
13881  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13882   then ac_cv_path_FGREP="$GREP -F"
13883   else
13884     if test -z "$FGREP"; then
13885  ac_path_FGREP_found=false
13886  # Loop through the user's path and test for each of PROGNAME-LIST
13887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13888for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13889do
13890  IFS=$as_save_IFS
13891  test -z "$as_dir" && as_dir=.
13892    for ac_prog in fgrep; do
13893    for ac_exec_ext in '' $ac_executable_extensions; do
13894      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13895      as_fn_executable_p "$ac_path_FGREP" || continue
13896# Check for GNU ac_path_FGREP and select it if it is found.
13897  # Check for GNU $ac_path_FGREP
13898case `"$ac_path_FGREP" --version 2>&1` in
13899*GNU*)
13900  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13901*)
13902  ac_count=0
13903  $as_echo_n 0123456789 >"conftest.in"
13904  while :
13905  do
13906    cat "conftest.in" "conftest.in" >"conftest.tmp"
13907    mv "conftest.tmp" "conftest.in"
13908    cp "conftest.in" "conftest.nl"
13909    $as_echo 'FGREP' >> "conftest.nl"
13910    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13911    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13912    as_fn_arith $ac_count + 1 && ac_count=$as_val
13913    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13914      # Best one so far, save it but keep looking for a better one
13915      ac_cv_path_FGREP="$ac_path_FGREP"
13916      ac_path_FGREP_max=$ac_count
13917    fi
13918    # 10*(2^10) chars as input seems more than enough
13919    test $ac_count -gt 10 && break
13920  done
13921  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13922esac
13923
13924      $ac_path_FGREP_found && break 3
13925    done
13926  done
13927  done
13928IFS=$as_save_IFS
13929  if test -z "$ac_cv_path_FGREP"; then
13930    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13931  fi
13932else
13933  ac_cv_path_FGREP=$FGREP
13934fi
13935
13936   fi
13937fi
13938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13939$as_echo "$ac_cv_path_FGREP" >&6; }
13940 FGREP="$ac_cv_path_FGREP"
13941
13942
13943  else
13944    # The variable is set, but is it from the command line or the environment?
13945
13946    # Try to remove the string !FGREP! from our list.
13947    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13948    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13949      # If it failed, the variable was not from the command line. Ignore it,
13950      # but warn the user (except for BASH, which is always set by the calling BASH).
13951      if test "xFGREP" != xBASH; then
13952        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13953$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13954      fi
13955      # Try to locate tool using the code snippet
13956      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13957$as_echo_n "checking for fgrep... " >&6; }
13958if ${ac_cv_path_FGREP+:} false; then :
13959  $as_echo_n "(cached) " >&6
13960else
13961  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13962   then ac_cv_path_FGREP="$GREP -F"
13963   else
13964     if test -z "$FGREP"; then
13965  ac_path_FGREP_found=false
13966  # Loop through the user's path and test for each of PROGNAME-LIST
13967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13968for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13969do
13970  IFS=$as_save_IFS
13971  test -z "$as_dir" && as_dir=.
13972    for ac_prog in fgrep; do
13973    for ac_exec_ext in '' $ac_executable_extensions; do
13974      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13975      as_fn_executable_p "$ac_path_FGREP" || continue
13976# Check for GNU ac_path_FGREP and select it if it is found.
13977  # Check for GNU $ac_path_FGREP
13978case `"$ac_path_FGREP" --version 2>&1` in
13979*GNU*)
13980  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13981*)
13982  ac_count=0
13983  $as_echo_n 0123456789 >"conftest.in"
13984  while :
13985  do
13986    cat "conftest.in" "conftest.in" >"conftest.tmp"
13987    mv "conftest.tmp" "conftest.in"
13988    cp "conftest.in" "conftest.nl"
13989    $as_echo 'FGREP' >> "conftest.nl"
13990    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13991    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13992    as_fn_arith $ac_count + 1 && ac_count=$as_val
13993    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13994      # Best one so far, save it but keep looking for a better one
13995      ac_cv_path_FGREP="$ac_path_FGREP"
13996      ac_path_FGREP_max=$ac_count
13997    fi
13998    # 10*(2^10) chars as input seems more than enough
13999    test $ac_count -gt 10 && break
14000  done
14001  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14002esac
14003
14004      $ac_path_FGREP_found && break 3
14005    done
14006  done
14007  done
14008IFS=$as_save_IFS
14009  if test -z "$ac_cv_path_FGREP"; then
14010    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14011  fi
14012else
14013  ac_cv_path_FGREP=$FGREP
14014fi
14015
14016   fi
14017fi
14018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14019$as_echo "$ac_cv_path_FGREP" >&6; }
14020 FGREP="$ac_cv_path_FGREP"
14021
14022
14023    else
14024      # If it succeeded, then it was overridden by the user. We will use it
14025      # for the tool.
14026
14027      # First remove it from the list of overridden variables, so we can test
14028      # for unknown variables in the end.
14029      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14030
14031      # Check if we try to supply an empty value
14032      if test "x$FGREP" = x; then
14033        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14034$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14035        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14036$as_echo_n "checking for FGREP... " >&6; }
14037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14038$as_echo "disabled" >&6; }
14039      else
14040        # Check if the provided tool contains a complete path.
14041        tool_specified="$FGREP"
14042        tool_basename="${tool_specified##*/}"
14043        if test "x$tool_basename" = "x$tool_specified"; then
14044          # A command without a complete path is provided, search $PATH.
14045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14046$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14047          # Extract the first word of "$tool_basename", so it can be a program name with args.
14048set dummy $tool_basename; ac_word=$2
14049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14050$as_echo_n "checking for $ac_word... " >&6; }
14051if ${ac_cv_path_FGREP+:} false; then :
14052  $as_echo_n "(cached) " >&6
14053else
14054  case $FGREP in
14055  [\\/]* | ?:[\\/]*)
14056  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14057  ;;
14058  *)
14059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14060for as_dir in $PATH
14061do
14062  IFS=$as_save_IFS
14063  test -z "$as_dir" && as_dir=.
14064    for ac_exec_ext in '' $ac_executable_extensions; do
14065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14066    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14068    break 2
14069  fi
14070done
14071  done
14072IFS=$as_save_IFS
14073
14074  ;;
14075esac
14076fi
14077FGREP=$ac_cv_path_FGREP
14078if test -n "$FGREP"; then
14079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14080$as_echo "$FGREP" >&6; }
14081else
14082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14083$as_echo "no" >&6; }
14084fi
14085
14086
14087          if test "x$FGREP" = x; then
14088            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14089          fi
14090        else
14091          # Otherwise we believe it is a complete path. Use it as it is.
14092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14093$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14094          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14095$as_echo_n "checking for FGREP... " >&6; }
14096          if test ! -x "$tool_specified"; then
14097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14098$as_echo "not found" >&6; }
14099            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14100          fi
14101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14102$as_echo "$tool_specified" >&6; }
14103        fi
14104      fi
14105    fi
14106
14107  fi
14108
14109
14110  if test "x$FGREP" = x; then
14111    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14112  fi
14113
14114
14115
14116
14117  # Publish this variable in the help.
14118
14119
14120  if [ -z "${SED+x}" ]; then
14121    # The variable is not set by user, try to locate tool using the code snippet
14122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14123$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14124if ${ac_cv_path_SED+:} false; then :
14125  $as_echo_n "(cached) " >&6
14126else
14127            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14128     for ac_i in 1 2 3 4 5 6 7; do
14129       ac_script="$ac_script$as_nl$ac_script"
14130     done
14131     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14132     { ac_script=; unset ac_script;}
14133     if test -z "$SED"; then
14134  ac_path_SED_found=false
14135  # Loop through the user's path and test for each of PROGNAME-LIST
14136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14137for as_dir in $PATH
14138do
14139  IFS=$as_save_IFS
14140  test -z "$as_dir" && as_dir=.
14141    for ac_prog in sed gsed; do
14142    for ac_exec_ext in '' $ac_executable_extensions; do
14143      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14144      as_fn_executable_p "$ac_path_SED" || continue
14145# Check for GNU ac_path_SED and select it if it is found.
14146  # Check for GNU $ac_path_SED
14147case `"$ac_path_SED" --version 2>&1` in
14148*GNU*)
14149  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14150*)
14151  ac_count=0
14152  $as_echo_n 0123456789 >"conftest.in"
14153  while :
14154  do
14155    cat "conftest.in" "conftest.in" >"conftest.tmp"
14156    mv "conftest.tmp" "conftest.in"
14157    cp "conftest.in" "conftest.nl"
14158    $as_echo '' >> "conftest.nl"
14159    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14160    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14161    as_fn_arith $ac_count + 1 && ac_count=$as_val
14162    if test $ac_count -gt ${ac_path_SED_max-0}; then
14163      # Best one so far, save it but keep looking for a better one
14164      ac_cv_path_SED="$ac_path_SED"
14165      ac_path_SED_max=$ac_count
14166    fi
14167    # 10*(2^10) chars as input seems more than enough
14168    test $ac_count -gt 10 && break
14169  done
14170  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14171esac
14172
14173      $ac_path_SED_found && break 3
14174    done
14175  done
14176  done
14177IFS=$as_save_IFS
14178  if test -z "$ac_cv_path_SED"; then
14179    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14180  fi
14181else
14182  ac_cv_path_SED=$SED
14183fi
14184
14185fi
14186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14187$as_echo "$ac_cv_path_SED" >&6; }
14188 SED="$ac_cv_path_SED"
14189  rm -f conftest.sed
14190
14191  else
14192    # The variable is set, but is it from the command line or the environment?
14193
14194    # Try to remove the string !SED! from our list.
14195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14197      # If it failed, the variable was not from the command line. Ignore it,
14198      # but warn the user (except for BASH, which is always set by the calling BASH).
14199      if test "xSED" != xBASH; then
14200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14201$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14202      fi
14203      # Try to locate tool using the code snippet
14204      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14205$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14206if ${ac_cv_path_SED+:} false; then :
14207  $as_echo_n "(cached) " >&6
14208else
14209            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14210     for ac_i in 1 2 3 4 5 6 7; do
14211       ac_script="$ac_script$as_nl$ac_script"
14212     done
14213     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14214     { ac_script=; unset ac_script;}
14215     if test -z "$SED"; then
14216  ac_path_SED_found=false
14217  # Loop through the user's path and test for each of PROGNAME-LIST
14218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14219for as_dir in $PATH
14220do
14221  IFS=$as_save_IFS
14222  test -z "$as_dir" && as_dir=.
14223    for ac_prog in sed gsed; do
14224    for ac_exec_ext in '' $ac_executable_extensions; do
14225      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14226      as_fn_executable_p "$ac_path_SED" || continue
14227# Check for GNU ac_path_SED and select it if it is found.
14228  # Check for GNU $ac_path_SED
14229case `"$ac_path_SED" --version 2>&1` in
14230*GNU*)
14231  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14232*)
14233  ac_count=0
14234  $as_echo_n 0123456789 >"conftest.in"
14235  while :
14236  do
14237    cat "conftest.in" "conftest.in" >"conftest.tmp"
14238    mv "conftest.tmp" "conftest.in"
14239    cp "conftest.in" "conftest.nl"
14240    $as_echo '' >> "conftest.nl"
14241    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14242    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14243    as_fn_arith $ac_count + 1 && ac_count=$as_val
14244    if test $ac_count -gt ${ac_path_SED_max-0}; then
14245      # Best one so far, save it but keep looking for a better one
14246      ac_cv_path_SED="$ac_path_SED"
14247      ac_path_SED_max=$ac_count
14248    fi
14249    # 10*(2^10) chars as input seems more than enough
14250    test $ac_count -gt 10 && break
14251  done
14252  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14253esac
14254
14255      $ac_path_SED_found && break 3
14256    done
14257  done
14258  done
14259IFS=$as_save_IFS
14260  if test -z "$ac_cv_path_SED"; then
14261    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14262  fi
14263else
14264  ac_cv_path_SED=$SED
14265fi
14266
14267fi
14268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14269$as_echo "$ac_cv_path_SED" >&6; }
14270 SED="$ac_cv_path_SED"
14271  rm -f conftest.sed
14272
14273    else
14274      # If it succeeded, then it was overridden by the user. We will use it
14275      # for the tool.
14276
14277      # First remove it from the list of overridden variables, so we can test
14278      # for unknown variables in the end.
14279      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14280
14281      # Check if we try to supply an empty value
14282      if test "x$SED" = x; then
14283        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14284$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14285        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14286$as_echo_n "checking for SED... " >&6; }
14287        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14288$as_echo "disabled" >&6; }
14289      else
14290        # Check if the provided tool contains a complete path.
14291        tool_specified="$SED"
14292        tool_basename="${tool_specified##*/}"
14293        if test "x$tool_basename" = "x$tool_specified"; then
14294          # A command without a complete path is provided, search $PATH.
14295          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14296$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14297          # Extract the first word of "$tool_basename", so it can be a program name with args.
14298set dummy $tool_basename; ac_word=$2
14299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14300$as_echo_n "checking for $ac_word... " >&6; }
14301if ${ac_cv_path_SED+:} false; then :
14302  $as_echo_n "(cached) " >&6
14303else
14304  case $SED in
14305  [\\/]* | ?:[\\/]*)
14306  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14307  ;;
14308  *)
14309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14310for as_dir in $PATH
14311do
14312  IFS=$as_save_IFS
14313  test -z "$as_dir" && as_dir=.
14314    for ac_exec_ext in '' $ac_executable_extensions; do
14315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14316    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14318    break 2
14319  fi
14320done
14321  done
14322IFS=$as_save_IFS
14323
14324  ;;
14325esac
14326fi
14327SED=$ac_cv_path_SED
14328if test -n "$SED"; then
14329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14330$as_echo "$SED" >&6; }
14331else
14332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14333$as_echo "no" >&6; }
14334fi
14335
14336
14337          if test "x$SED" = x; then
14338            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14339          fi
14340        else
14341          # Otherwise we believe it is a complete path. Use it as it is.
14342          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14343$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14344          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14345$as_echo_n "checking for SED... " >&6; }
14346          if test ! -x "$tool_specified"; then
14347            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14348$as_echo "not found" >&6; }
14349            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14350          fi
14351          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14352$as_echo "$tool_specified" >&6; }
14353        fi
14354      fi
14355    fi
14356
14357  fi
14358
14359
14360  if test "x$SED" = x; then
14361    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14362  fi
14363
14364
14365
14366  # Always force rm.
14367  RM="$RM -f"
14368
14369  # pwd behaves differently on various platforms and some don't support the -L flag.
14370  # Always use the bash builtin pwd to get uniform behavior.
14371  THEPWDCMD=pwd
14372
14373  # These are not required on all platforms
14374
14375
14376  # Publish this variable in the help.
14377
14378
14379  if [ -z "${CYGPATH+x}" ]; then
14380    # The variable is not set by user, try to locate tool using the code snippet
14381    for ac_prog in cygpath
14382do
14383  # Extract the first word of "$ac_prog", so it can be a program name with args.
14384set dummy $ac_prog; ac_word=$2
14385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14386$as_echo_n "checking for $ac_word... " >&6; }
14387if ${ac_cv_path_CYGPATH+:} false; then :
14388  $as_echo_n "(cached) " >&6
14389else
14390  case $CYGPATH in
14391  [\\/]* | ?:[\\/]*)
14392  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14393  ;;
14394  *)
14395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14396for as_dir in $PATH
14397do
14398  IFS=$as_save_IFS
14399  test -z "$as_dir" && as_dir=.
14400    for ac_exec_ext in '' $ac_executable_extensions; do
14401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14402    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14404    break 2
14405  fi
14406done
14407  done
14408IFS=$as_save_IFS
14409
14410  ;;
14411esac
14412fi
14413CYGPATH=$ac_cv_path_CYGPATH
14414if test -n "$CYGPATH"; then
14415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14416$as_echo "$CYGPATH" >&6; }
14417else
14418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14419$as_echo "no" >&6; }
14420fi
14421
14422
14423  test -n "$CYGPATH" && break
14424done
14425
14426  else
14427    # The variable is set, but is it from the command line or the environment?
14428
14429    # Try to remove the string !CYGPATH! from our list.
14430    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14431    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14432      # If it failed, the variable was not from the command line. Ignore it,
14433      # but warn the user (except for BASH, which is always set by the calling BASH).
14434      if test "xCYGPATH" != xBASH; then
14435        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14436$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14437      fi
14438      # Try to locate tool using the code snippet
14439      for ac_prog in cygpath
14440do
14441  # Extract the first word of "$ac_prog", so it can be a program name with args.
14442set dummy $ac_prog; ac_word=$2
14443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14444$as_echo_n "checking for $ac_word... " >&6; }
14445if ${ac_cv_path_CYGPATH+:} false; then :
14446  $as_echo_n "(cached) " >&6
14447else
14448  case $CYGPATH in
14449  [\\/]* | ?:[\\/]*)
14450  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14451  ;;
14452  *)
14453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14454for as_dir in $PATH
14455do
14456  IFS=$as_save_IFS
14457  test -z "$as_dir" && as_dir=.
14458    for ac_exec_ext in '' $ac_executable_extensions; do
14459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14460    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14462    break 2
14463  fi
14464done
14465  done
14466IFS=$as_save_IFS
14467
14468  ;;
14469esac
14470fi
14471CYGPATH=$ac_cv_path_CYGPATH
14472if test -n "$CYGPATH"; then
14473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14474$as_echo "$CYGPATH" >&6; }
14475else
14476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14477$as_echo "no" >&6; }
14478fi
14479
14480
14481  test -n "$CYGPATH" && break
14482done
14483
14484    else
14485      # If it succeeded, then it was overridden by the user. We will use it
14486      # for the tool.
14487
14488      # First remove it from the list of overridden variables, so we can test
14489      # for unknown variables in the end.
14490      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14491
14492      # Check if we try to supply an empty value
14493      if test "x$CYGPATH" = x; then
14494        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14495$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14497$as_echo_n "checking for CYGPATH... " >&6; }
14498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14499$as_echo "disabled" >&6; }
14500      else
14501        # Check if the provided tool contains a complete path.
14502        tool_specified="$CYGPATH"
14503        tool_basename="${tool_specified##*/}"
14504        if test "x$tool_basename" = "x$tool_specified"; then
14505          # A command without a complete path is provided, search $PATH.
14506          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14507$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14508          # Extract the first word of "$tool_basename", so it can be a program name with args.
14509set dummy $tool_basename; ac_word=$2
14510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14511$as_echo_n "checking for $ac_word... " >&6; }
14512if ${ac_cv_path_CYGPATH+:} false; then :
14513  $as_echo_n "(cached) " >&6
14514else
14515  case $CYGPATH in
14516  [\\/]* | ?:[\\/]*)
14517  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14518  ;;
14519  *)
14520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14521for as_dir in $PATH
14522do
14523  IFS=$as_save_IFS
14524  test -z "$as_dir" && as_dir=.
14525    for ac_exec_ext in '' $ac_executable_extensions; do
14526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14527    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14529    break 2
14530  fi
14531done
14532  done
14533IFS=$as_save_IFS
14534
14535  ;;
14536esac
14537fi
14538CYGPATH=$ac_cv_path_CYGPATH
14539if test -n "$CYGPATH"; then
14540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14541$as_echo "$CYGPATH" >&6; }
14542else
14543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14544$as_echo "no" >&6; }
14545fi
14546
14547
14548          if test "x$CYGPATH" = x; then
14549            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14550          fi
14551        else
14552          # Otherwise we believe it is a complete path. Use it as it is.
14553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14554$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14555          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14556$as_echo_n "checking for CYGPATH... " >&6; }
14557          if test ! -x "$tool_specified"; then
14558            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14559$as_echo "not found" >&6; }
14560            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14561          fi
14562          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14563$as_echo "$tool_specified" >&6; }
14564        fi
14565      fi
14566    fi
14567
14568  fi
14569
14570
14571
14572
14573  # Publish this variable in the help.
14574
14575
14576  if [ -z "${READLINK+x}" ]; then
14577    # The variable is not set by user, try to locate tool using the code snippet
14578    for ac_prog in greadlink readlink
14579do
14580  # Extract the first word of "$ac_prog", so it can be a program name with args.
14581set dummy $ac_prog; ac_word=$2
14582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14583$as_echo_n "checking for $ac_word... " >&6; }
14584if ${ac_cv_path_READLINK+:} false; then :
14585  $as_echo_n "(cached) " >&6
14586else
14587  case $READLINK in
14588  [\\/]* | ?:[\\/]*)
14589  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14590  ;;
14591  *)
14592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14593for as_dir in $PATH
14594do
14595  IFS=$as_save_IFS
14596  test -z "$as_dir" && as_dir=.
14597    for ac_exec_ext in '' $ac_executable_extensions; do
14598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14599    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14601    break 2
14602  fi
14603done
14604  done
14605IFS=$as_save_IFS
14606
14607  ;;
14608esac
14609fi
14610READLINK=$ac_cv_path_READLINK
14611if test -n "$READLINK"; then
14612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14613$as_echo "$READLINK" >&6; }
14614else
14615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14616$as_echo "no" >&6; }
14617fi
14618
14619
14620  test -n "$READLINK" && break
14621done
14622
14623  else
14624    # The variable is set, but is it from the command line or the environment?
14625
14626    # Try to remove the string !READLINK! from our list.
14627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14629      # If it failed, the variable was not from the command line. Ignore it,
14630      # but warn the user (except for BASH, which is always set by the calling BASH).
14631      if test "xREADLINK" != xBASH; then
14632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14633$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14634      fi
14635      # Try to locate tool using the code snippet
14636      for ac_prog in greadlink readlink
14637do
14638  # Extract the first word of "$ac_prog", so it can be a program name with args.
14639set dummy $ac_prog; ac_word=$2
14640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14641$as_echo_n "checking for $ac_word... " >&6; }
14642if ${ac_cv_path_READLINK+:} false; then :
14643  $as_echo_n "(cached) " >&6
14644else
14645  case $READLINK in
14646  [\\/]* | ?:[\\/]*)
14647  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14648  ;;
14649  *)
14650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14651for as_dir in $PATH
14652do
14653  IFS=$as_save_IFS
14654  test -z "$as_dir" && as_dir=.
14655    for ac_exec_ext in '' $ac_executable_extensions; do
14656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14657    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14659    break 2
14660  fi
14661done
14662  done
14663IFS=$as_save_IFS
14664
14665  ;;
14666esac
14667fi
14668READLINK=$ac_cv_path_READLINK
14669if test -n "$READLINK"; then
14670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14671$as_echo "$READLINK" >&6; }
14672else
14673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14674$as_echo "no" >&6; }
14675fi
14676
14677
14678  test -n "$READLINK" && break
14679done
14680
14681    else
14682      # If it succeeded, then it was overridden by the user. We will use it
14683      # for the tool.
14684
14685      # First remove it from the list of overridden variables, so we can test
14686      # for unknown variables in the end.
14687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14688
14689      # Check if we try to supply an empty value
14690      if test "x$READLINK" = x; then
14691        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14692$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14694$as_echo_n "checking for READLINK... " >&6; }
14695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14696$as_echo "disabled" >&6; }
14697      else
14698        # Check if the provided tool contains a complete path.
14699        tool_specified="$READLINK"
14700        tool_basename="${tool_specified##*/}"
14701        if test "x$tool_basename" = "x$tool_specified"; then
14702          # A command without a complete path is provided, search $PATH.
14703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14704$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14705          # Extract the first word of "$tool_basename", so it can be a program name with args.
14706set dummy $tool_basename; ac_word=$2
14707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14708$as_echo_n "checking for $ac_word... " >&6; }
14709if ${ac_cv_path_READLINK+:} false; then :
14710  $as_echo_n "(cached) " >&6
14711else
14712  case $READLINK in
14713  [\\/]* | ?:[\\/]*)
14714  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14715  ;;
14716  *)
14717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14718for as_dir in $PATH
14719do
14720  IFS=$as_save_IFS
14721  test -z "$as_dir" && as_dir=.
14722    for ac_exec_ext in '' $ac_executable_extensions; do
14723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14724    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14726    break 2
14727  fi
14728done
14729  done
14730IFS=$as_save_IFS
14731
14732  ;;
14733esac
14734fi
14735READLINK=$ac_cv_path_READLINK
14736if test -n "$READLINK"; then
14737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14738$as_echo "$READLINK" >&6; }
14739else
14740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14741$as_echo "no" >&6; }
14742fi
14743
14744
14745          if test "x$READLINK" = x; then
14746            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14747          fi
14748        else
14749          # Otherwise we believe it is a complete path. Use it as it is.
14750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14751$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14752          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14753$as_echo_n "checking for READLINK... " >&6; }
14754          if test ! -x "$tool_specified"; then
14755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14756$as_echo "not found" >&6; }
14757            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14758          fi
14759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14760$as_echo "$tool_specified" >&6; }
14761        fi
14762      fi
14763    fi
14764
14765  fi
14766
14767
14768
14769
14770  # Publish this variable in the help.
14771
14772
14773  if [ -z "${DF+x}" ]; then
14774    # The variable is not set by user, try to locate tool using the code snippet
14775    for ac_prog in df
14776do
14777  # Extract the first word of "$ac_prog", so it can be a program name with args.
14778set dummy $ac_prog; ac_word=$2
14779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14780$as_echo_n "checking for $ac_word... " >&6; }
14781if ${ac_cv_path_DF+:} false; then :
14782  $as_echo_n "(cached) " >&6
14783else
14784  case $DF in
14785  [\\/]* | ?:[\\/]*)
14786  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14787  ;;
14788  *)
14789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14790for as_dir in $PATH
14791do
14792  IFS=$as_save_IFS
14793  test -z "$as_dir" && as_dir=.
14794    for ac_exec_ext in '' $ac_executable_extensions; do
14795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14796    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14798    break 2
14799  fi
14800done
14801  done
14802IFS=$as_save_IFS
14803
14804  ;;
14805esac
14806fi
14807DF=$ac_cv_path_DF
14808if test -n "$DF"; then
14809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14810$as_echo "$DF" >&6; }
14811else
14812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14813$as_echo "no" >&6; }
14814fi
14815
14816
14817  test -n "$DF" && break
14818done
14819
14820  else
14821    # The variable is set, but is it from the command line or the environment?
14822
14823    # Try to remove the string !DF! from our list.
14824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14826      # If it failed, the variable was not from the command line. Ignore it,
14827      # but warn the user (except for BASH, which is always set by the calling BASH).
14828      if test "xDF" != xBASH; then
14829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14830$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14831      fi
14832      # Try to locate tool using the code snippet
14833      for ac_prog in df
14834do
14835  # Extract the first word of "$ac_prog", so it can be a program name with args.
14836set dummy $ac_prog; ac_word=$2
14837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14838$as_echo_n "checking for $ac_word... " >&6; }
14839if ${ac_cv_path_DF+:} false; then :
14840  $as_echo_n "(cached) " >&6
14841else
14842  case $DF in
14843  [\\/]* | ?:[\\/]*)
14844  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14845  ;;
14846  *)
14847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14848for as_dir in $PATH
14849do
14850  IFS=$as_save_IFS
14851  test -z "$as_dir" && as_dir=.
14852    for ac_exec_ext in '' $ac_executable_extensions; do
14853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14854    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14856    break 2
14857  fi
14858done
14859  done
14860IFS=$as_save_IFS
14861
14862  ;;
14863esac
14864fi
14865DF=$ac_cv_path_DF
14866if test -n "$DF"; then
14867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14868$as_echo "$DF" >&6; }
14869else
14870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14871$as_echo "no" >&6; }
14872fi
14873
14874
14875  test -n "$DF" && break
14876done
14877
14878    else
14879      # If it succeeded, then it was overridden by the user. We will use it
14880      # for the tool.
14881
14882      # First remove it from the list of overridden variables, so we can test
14883      # for unknown variables in the end.
14884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14885
14886      # Check if we try to supply an empty value
14887      if test "x$DF" = x; then
14888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14889$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14891$as_echo_n "checking for DF... " >&6; }
14892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14893$as_echo "disabled" >&6; }
14894      else
14895        # Check if the provided tool contains a complete path.
14896        tool_specified="$DF"
14897        tool_basename="${tool_specified##*/}"
14898        if test "x$tool_basename" = "x$tool_specified"; then
14899          # A command without a complete path is provided, search $PATH.
14900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14901$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14902          # Extract the first word of "$tool_basename", so it can be a program name with args.
14903set dummy $tool_basename; ac_word=$2
14904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14905$as_echo_n "checking for $ac_word... " >&6; }
14906if ${ac_cv_path_DF+:} false; then :
14907  $as_echo_n "(cached) " >&6
14908else
14909  case $DF in
14910  [\\/]* | ?:[\\/]*)
14911  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14912  ;;
14913  *)
14914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14915for as_dir in $PATH
14916do
14917  IFS=$as_save_IFS
14918  test -z "$as_dir" && as_dir=.
14919    for ac_exec_ext in '' $ac_executable_extensions; do
14920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14921    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14923    break 2
14924  fi
14925done
14926  done
14927IFS=$as_save_IFS
14928
14929  ;;
14930esac
14931fi
14932DF=$ac_cv_path_DF
14933if test -n "$DF"; then
14934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14935$as_echo "$DF" >&6; }
14936else
14937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14938$as_echo "no" >&6; }
14939fi
14940
14941
14942          if test "x$DF" = x; then
14943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14944          fi
14945        else
14946          # Otherwise we believe it is a complete path. Use it as it is.
14947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14948$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14950$as_echo_n "checking for DF... " >&6; }
14951          if test ! -x "$tool_specified"; then
14952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14953$as_echo "not found" >&6; }
14954            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14955          fi
14956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14957$as_echo "$tool_specified" >&6; }
14958        fi
14959      fi
14960    fi
14961
14962  fi
14963
14964
14965
14966
14967  # Publish this variable in the help.
14968
14969
14970  if [ -z "${CPIO+x}" ]; then
14971    # The variable is not set by user, try to locate tool using the code snippet
14972    for ac_prog in cpio bsdcpio
14973do
14974  # Extract the first word of "$ac_prog", so it can be a program name with args.
14975set dummy $ac_prog; ac_word=$2
14976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14977$as_echo_n "checking for $ac_word... " >&6; }
14978if ${ac_cv_path_CPIO+:} false; then :
14979  $as_echo_n "(cached) " >&6
14980else
14981  case $CPIO in
14982  [\\/]* | ?:[\\/]*)
14983  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14984  ;;
14985  *)
14986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14987for as_dir in $PATH
14988do
14989  IFS=$as_save_IFS
14990  test -z "$as_dir" && as_dir=.
14991    for ac_exec_ext in '' $ac_executable_extensions; do
14992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14993    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14995    break 2
14996  fi
14997done
14998  done
14999IFS=$as_save_IFS
15000
15001  ;;
15002esac
15003fi
15004CPIO=$ac_cv_path_CPIO
15005if test -n "$CPIO"; then
15006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15007$as_echo "$CPIO" >&6; }
15008else
15009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15010$as_echo "no" >&6; }
15011fi
15012
15013
15014  test -n "$CPIO" && break
15015done
15016
15017  else
15018    # The variable is set, but is it from the command line or the environment?
15019
15020    # Try to remove the string !CPIO! from our list.
15021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15023      # If it failed, the variable was not from the command line. Ignore it,
15024      # but warn the user (except for BASH, which is always set by the calling BASH).
15025      if test "xCPIO" != xBASH; then
15026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15027$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15028      fi
15029      # Try to locate tool using the code snippet
15030      for ac_prog in cpio bsdcpio
15031do
15032  # Extract the first word of "$ac_prog", so it can be a program name with args.
15033set dummy $ac_prog; ac_word=$2
15034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15035$as_echo_n "checking for $ac_word... " >&6; }
15036if ${ac_cv_path_CPIO+:} false; then :
15037  $as_echo_n "(cached) " >&6
15038else
15039  case $CPIO in
15040  [\\/]* | ?:[\\/]*)
15041  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15042  ;;
15043  *)
15044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15045for as_dir in $PATH
15046do
15047  IFS=$as_save_IFS
15048  test -z "$as_dir" && as_dir=.
15049    for ac_exec_ext in '' $ac_executable_extensions; do
15050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15051    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15053    break 2
15054  fi
15055done
15056  done
15057IFS=$as_save_IFS
15058
15059  ;;
15060esac
15061fi
15062CPIO=$ac_cv_path_CPIO
15063if test -n "$CPIO"; then
15064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15065$as_echo "$CPIO" >&6; }
15066else
15067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15068$as_echo "no" >&6; }
15069fi
15070
15071
15072  test -n "$CPIO" && break
15073done
15074
15075    else
15076      # If it succeeded, then it was overridden by the user. We will use it
15077      # for the tool.
15078
15079      # First remove it from the list of overridden variables, so we can test
15080      # for unknown variables in the end.
15081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15082
15083      # Check if we try to supply an empty value
15084      if test "x$CPIO" = x; then
15085        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15086$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15088$as_echo_n "checking for CPIO... " >&6; }
15089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15090$as_echo "disabled" >&6; }
15091      else
15092        # Check if the provided tool contains a complete path.
15093        tool_specified="$CPIO"
15094        tool_basename="${tool_specified##*/}"
15095        if test "x$tool_basename" = "x$tool_specified"; then
15096          # A command without a complete path is provided, search $PATH.
15097          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15098$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15099          # Extract the first word of "$tool_basename", so it can be a program name with args.
15100set dummy $tool_basename; ac_word=$2
15101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15102$as_echo_n "checking for $ac_word... " >&6; }
15103if ${ac_cv_path_CPIO+:} false; then :
15104  $as_echo_n "(cached) " >&6
15105else
15106  case $CPIO in
15107  [\\/]* | ?:[\\/]*)
15108  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15109  ;;
15110  *)
15111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15112for as_dir in $PATH
15113do
15114  IFS=$as_save_IFS
15115  test -z "$as_dir" && as_dir=.
15116    for ac_exec_ext in '' $ac_executable_extensions; do
15117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15118    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15120    break 2
15121  fi
15122done
15123  done
15124IFS=$as_save_IFS
15125
15126  ;;
15127esac
15128fi
15129CPIO=$ac_cv_path_CPIO
15130if test -n "$CPIO"; then
15131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15132$as_echo "$CPIO" >&6; }
15133else
15134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15135$as_echo "no" >&6; }
15136fi
15137
15138
15139          if test "x$CPIO" = x; then
15140            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15141          fi
15142        else
15143          # Otherwise we believe it is a complete path. Use it as it is.
15144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15145$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15146          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15147$as_echo_n "checking for CPIO... " >&6; }
15148          if test ! -x "$tool_specified"; then
15149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15150$as_echo "not found" >&6; }
15151            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15152          fi
15153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15154$as_echo "$tool_specified" >&6; }
15155        fi
15156      fi
15157    fi
15158
15159  fi
15160
15161
15162
15163
15164  # Publish this variable in the help.
15165
15166
15167  if [ -z "${NICE+x}" ]; then
15168    # The variable is not set by user, try to locate tool using the code snippet
15169    for ac_prog in nice
15170do
15171  # Extract the first word of "$ac_prog", so it can be a program name with args.
15172set dummy $ac_prog; ac_word=$2
15173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15174$as_echo_n "checking for $ac_word... " >&6; }
15175if ${ac_cv_path_NICE+:} false; then :
15176  $as_echo_n "(cached) " >&6
15177else
15178  case $NICE in
15179  [\\/]* | ?:[\\/]*)
15180  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15181  ;;
15182  *)
15183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15184for as_dir in $PATH
15185do
15186  IFS=$as_save_IFS
15187  test -z "$as_dir" && as_dir=.
15188    for ac_exec_ext in '' $ac_executable_extensions; do
15189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15190    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15192    break 2
15193  fi
15194done
15195  done
15196IFS=$as_save_IFS
15197
15198  ;;
15199esac
15200fi
15201NICE=$ac_cv_path_NICE
15202if test -n "$NICE"; then
15203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15204$as_echo "$NICE" >&6; }
15205else
15206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15207$as_echo "no" >&6; }
15208fi
15209
15210
15211  test -n "$NICE" && break
15212done
15213
15214  else
15215    # The variable is set, but is it from the command line or the environment?
15216
15217    # Try to remove the string !NICE! from our list.
15218    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15219    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15220      # If it failed, the variable was not from the command line. Ignore it,
15221      # but warn the user (except for BASH, which is always set by the calling BASH).
15222      if test "xNICE" != xBASH; then
15223        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15224$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15225      fi
15226      # Try to locate tool using the code snippet
15227      for ac_prog in nice
15228do
15229  # Extract the first word of "$ac_prog", so it can be a program name with args.
15230set dummy $ac_prog; ac_word=$2
15231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15232$as_echo_n "checking for $ac_word... " >&6; }
15233if ${ac_cv_path_NICE+:} false; then :
15234  $as_echo_n "(cached) " >&6
15235else
15236  case $NICE in
15237  [\\/]* | ?:[\\/]*)
15238  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15239  ;;
15240  *)
15241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15242for as_dir in $PATH
15243do
15244  IFS=$as_save_IFS
15245  test -z "$as_dir" && as_dir=.
15246    for ac_exec_ext in '' $ac_executable_extensions; do
15247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15248    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15250    break 2
15251  fi
15252done
15253  done
15254IFS=$as_save_IFS
15255
15256  ;;
15257esac
15258fi
15259NICE=$ac_cv_path_NICE
15260if test -n "$NICE"; then
15261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15262$as_echo "$NICE" >&6; }
15263else
15264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15265$as_echo "no" >&6; }
15266fi
15267
15268
15269  test -n "$NICE" && break
15270done
15271
15272    else
15273      # If it succeeded, then it was overridden by the user. We will use it
15274      # for the tool.
15275
15276      # First remove it from the list of overridden variables, so we can test
15277      # for unknown variables in the end.
15278      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15279
15280      # Check if we try to supply an empty value
15281      if test "x$NICE" = x; then
15282        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15283$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15285$as_echo_n "checking for NICE... " >&6; }
15286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15287$as_echo "disabled" >&6; }
15288      else
15289        # Check if the provided tool contains a complete path.
15290        tool_specified="$NICE"
15291        tool_basename="${tool_specified##*/}"
15292        if test "x$tool_basename" = "x$tool_specified"; then
15293          # A command without a complete path is provided, search $PATH.
15294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15295$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15296          # Extract the first word of "$tool_basename", so it can be a program name with args.
15297set dummy $tool_basename; ac_word=$2
15298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15299$as_echo_n "checking for $ac_word... " >&6; }
15300if ${ac_cv_path_NICE+:} false; then :
15301  $as_echo_n "(cached) " >&6
15302else
15303  case $NICE in
15304  [\\/]* | ?:[\\/]*)
15305  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15306  ;;
15307  *)
15308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15309for as_dir in $PATH
15310do
15311  IFS=$as_save_IFS
15312  test -z "$as_dir" && as_dir=.
15313    for ac_exec_ext in '' $ac_executable_extensions; do
15314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15315    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15317    break 2
15318  fi
15319done
15320  done
15321IFS=$as_save_IFS
15322
15323  ;;
15324esac
15325fi
15326NICE=$ac_cv_path_NICE
15327if test -n "$NICE"; then
15328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15329$as_echo "$NICE" >&6; }
15330else
15331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15332$as_echo "no" >&6; }
15333fi
15334
15335
15336          if test "x$NICE" = x; then
15337            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15338          fi
15339        else
15340          # Otherwise we believe it is a complete path. Use it as it is.
15341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15342$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15343          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15344$as_echo_n "checking for NICE... " >&6; }
15345          if test ! -x "$tool_specified"; then
15346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15347$as_echo "not found" >&6; }
15348            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15349          fi
15350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15351$as_echo "$tool_specified" >&6; }
15352        fi
15353      fi
15354    fi
15355
15356  fi
15357
15358
15359
15360
15361# Now we can determine OpenJDK build and target platforms. This is required to
15362# have early on.
15363# Make sure we can run config.sub.
15364$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15365  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15366
15367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15368$as_echo_n "checking build system type... " >&6; }
15369if ${ac_cv_build+:} false; then :
15370  $as_echo_n "(cached) " >&6
15371else
15372  ac_build_alias=$build_alias
15373test "x$ac_build_alias" = x &&
15374  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15375test "x$ac_build_alias" = x &&
15376  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15377ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15378  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15379
15380fi
15381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15382$as_echo "$ac_cv_build" >&6; }
15383case $ac_cv_build in
15384*-*-*) ;;
15385*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15386esac
15387build=$ac_cv_build
15388ac_save_IFS=$IFS; IFS='-'
15389set x $ac_cv_build
15390shift
15391build_cpu=$1
15392build_vendor=$2
15393shift; shift
15394# Remember, the first character of IFS is used to create $*,
15395# except with old shells:
15396build_os=$*
15397IFS=$ac_save_IFS
15398case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15399
15400
15401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15402$as_echo_n "checking host system type... " >&6; }
15403if ${ac_cv_host+:} false; then :
15404  $as_echo_n "(cached) " >&6
15405else
15406  if test "x$host_alias" = x; then
15407  ac_cv_host=$ac_cv_build
15408else
15409  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15410    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15411fi
15412
15413fi
15414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15415$as_echo "$ac_cv_host" >&6; }
15416case $ac_cv_host in
15417*-*-*) ;;
15418*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15419esac
15420host=$ac_cv_host
15421ac_save_IFS=$IFS; IFS='-'
15422set x $ac_cv_host
15423shift
15424host_cpu=$1
15425host_vendor=$2
15426shift; shift
15427# Remember, the first character of IFS is used to create $*,
15428# except with old shells:
15429host_os=$*
15430IFS=$ac_save_IFS
15431case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15432
15433
15434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15435$as_echo_n "checking target system type... " >&6; }
15436if ${ac_cv_target+:} false; then :
15437  $as_echo_n "(cached) " >&6
15438else
15439  if test "x$target_alias" = x; then
15440  ac_cv_target=$ac_cv_host
15441else
15442  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15443    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15444fi
15445
15446fi
15447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15448$as_echo "$ac_cv_target" >&6; }
15449case $ac_cv_target in
15450*-*-*) ;;
15451*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15452esac
15453target=$ac_cv_target
15454ac_save_IFS=$IFS; IFS='-'
15455set x $ac_cv_target
15456shift
15457target_cpu=$1
15458target_vendor=$2
15459shift; shift
15460# Remember, the first character of IFS is used to create $*,
15461# except with old shells:
15462target_os=$*
15463IFS=$ac_save_IFS
15464case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15465
15466
15467# The aliases save the names the user supplied, while $host etc.
15468# will get canonicalized.
15469test -n "$target_alias" &&
15470  test "$program_prefix$program_suffix$program_transform_name" = \
15471    NONENONEs,x,x, &&
15472  program_prefix=${target_alias}-
15473
15474  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15475  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15476  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15477  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15478  # to use the configure naming style.
15479
15480
15481
15482
15483
15484  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15485  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15486  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15487  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15488  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15489  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15490
15491
15492
15493  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15494
15495  case "$build_os" in
15496    *linux*)
15497      VAR_OS=linux
15498      VAR_OS_TYPE=unix
15499      ;;
15500    *solaris*)
15501      VAR_OS=solaris
15502      VAR_OS_TYPE=unix
15503      ;;
15504    *darwin*)
15505      VAR_OS=macosx
15506      VAR_OS_TYPE=unix
15507      ;;
15508    *bsd*)
15509      VAR_OS=bsd
15510      VAR_OS_TYPE=unix
15511      ;;
15512    *cygwin*)
15513      VAR_OS=windows
15514      VAR_OS_ENV=windows.cygwin
15515      ;;
15516    *mingw*)
15517      VAR_OS=windows
15518      VAR_OS_ENV=windows.msys
15519      ;;
15520    *aix*)
15521      VAR_OS=aix
15522      VAR_OS_TYPE=unix
15523      ;;
15524    *)
15525      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15526      ;;
15527  esac
15528
15529
15530  # First argument is the cpu name from the trip/quad
15531  case "$build_cpu" in
15532    x86_64)
15533      VAR_CPU=x86_64
15534      VAR_CPU_ARCH=x86
15535      VAR_CPU_BITS=64
15536      VAR_CPU_ENDIAN=little
15537      ;;
15538    i?86)
15539      VAR_CPU=x86
15540      VAR_CPU_ARCH=x86
15541      VAR_CPU_BITS=32
15542      VAR_CPU_ENDIAN=little
15543      ;;
15544    arm*)
15545      VAR_CPU=arm
15546      VAR_CPU_ARCH=arm
15547      VAR_CPU_BITS=32
15548      VAR_CPU_ENDIAN=little
15549      ;;
15550    aarch64)
15551      VAR_CPU=aarch64
15552      VAR_CPU_ARCH=aarch64
15553      VAR_CPU_BITS=64
15554      VAR_CPU_ENDIAN=little
15555      ;;
15556    powerpc)
15557      VAR_CPU=ppc
15558      VAR_CPU_ARCH=ppc
15559      VAR_CPU_BITS=32
15560      VAR_CPU_ENDIAN=big
15561      ;;
15562    powerpc64)
15563      VAR_CPU=ppc64
15564      VAR_CPU_ARCH=ppc
15565      VAR_CPU_BITS=64
15566      VAR_CPU_ENDIAN=big
15567      ;;
15568    powerpc64le)
15569      VAR_CPU=ppc64le
15570      VAR_CPU_ARCH=ppc
15571      VAR_CPU_BITS=64
15572      VAR_CPU_ENDIAN=little
15573      ;;
15574    s390)
15575      VAR_CPU=s390
15576      VAR_CPU_ARCH=s390
15577      VAR_CPU_BITS=32
15578      VAR_CPU_ENDIAN=big
15579      ;;
15580    s390x)
15581      VAR_CPU=s390x
15582      VAR_CPU_ARCH=s390
15583      VAR_CPU_BITS=64
15584      VAR_CPU_ENDIAN=big
15585      ;;
15586    sparc)
15587      VAR_CPU=sparc
15588      VAR_CPU_ARCH=sparc
15589      VAR_CPU_BITS=32
15590      VAR_CPU_ENDIAN=big
15591      ;;
15592    sparcv9|sparc64)
15593      VAR_CPU=sparcv9
15594      VAR_CPU_ARCH=sparc
15595      VAR_CPU_BITS=64
15596      VAR_CPU_ENDIAN=big
15597      ;;
15598    *)
15599      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15600      ;;
15601  esac
15602
15603  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15604  OPENJDK_BUILD_OS="$VAR_OS"
15605  if test "x$VAR_OS_TYPE" != x; then
15606    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15607  else
15608    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15609  fi
15610  if test "x$VAR_OS_ENV" != x; then
15611    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15612  else
15613    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15614  fi
15615  OPENJDK_BUILD_CPU="$VAR_CPU"
15616  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15617  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15618  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15619
15620
15621
15622
15623
15624
15625
15626
15627  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15628$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15630$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15631
15632  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15633
15634  case "$host_os" in
15635    *linux*)
15636      VAR_OS=linux
15637      VAR_OS_TYPE=unix
15638      ;;
15639    *solaris*)
15640      VAR_OS=solaris
15641      VAR_OS_TYPE=unix
15642      ;;
15643    *darwin*)
15644      VAR_OS=macosx
15645      VAR_OS_TYPE=unix
15646      ;;
15647    *bsd*)
15648      VAR_OS=bsd
15649      VAR_OS_TYPE=unix
15650      ;;
15651    *cygwin*)
15652      VAR_OS=windows
15653      VAR_OS_ENV=windows.cygwin
15654      ;;
15655    *mingw*)
15656      VAR_OS=windows
15657      VAR_OS_ENV=windows.msys
15658      ;;
15659    *aix*)
15660      VAR_OS=aix
15661      VAR_OS_TYPE=unix
15662      ;;
15663    *)
15664      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15665      ;;
15666  esac
15667
15668
15669  # First argument is the cpu name from the trip/quad
15670  case "$host_cpu" in
15671    x86_64)
15672      VAR_CPU=x86_64
15673      VAR_CPU_ARCH=x86
15674      VAR_CPU_BITS=64
15675      VAR_CPU_ENDIAN=little
15676      ;;
15677    i?86)
15678      VAR_CPU=x86
15679      VAR_CPU_ARCH=x86
15680      VAR_CPU_BITS=32
15681      VAR_CPU_ENDIAN=little
15682      ;;
15683    arm*)
15684      VAR_CPU=arm
15685      VAR_CPU_ARCH=arm
15686      VAR_CPU_BITS=32
15687      VAR_CPU_ENDIAN=little
15688      ;;
15689    aarch64)
15690      VAR_CPU=aarch64
15691      VAR_CPU_ARCH=aarch64
15692      VAR_CPU_BITS=64
15693      VAR_CPU_ENDIAN=little
15694      ;;
15695    powerpc)
15696      VAR_CPU=ppc
15697      VAR_CPU_ARCH=ppc
15698      VAR_CPU_BITS=32
15699      VAR_CPU_ENDIAN=big
15700      ;;
15701    powerpc64)
15702      VAR_CPU=ppc64
15703      VAR_CPU_ARCH=ppc
15704      VAR_CPU_BITS=64
15705      VAR_CPU_ENDIAN=big
15706      ;;
15707    powerpc64le)
15708      VAR_CPU=ppc64le
15709      VAR_CPU_ARCH=ppc
15710      VAR_CPU_BITS=64
15711      VAR_CPU_ENDIAN=little
15712      ;;
15713    s390)
15714      VAR_CPU=s390
15715      VAR_CPU_ARCH=s390
15716      VAR_CPU_BITS=32
15717      VAR_CPU_ENDIAN=big
15718      ;;
15719    s390x)
15720      VAR_CPU=s390x
15721      VAR_CPU_ARCH=s390
15722      VAR_CPU_BITS=64
15723      VAR_CPU_ENDIAN=big
15724      ;;
15725    sparc)
15726      VAR_CPU=sparc
15727      VAR_CPU_ARCH=sparc
15728      VAR_CPU_BITS=32
15729      VAR_CPU_ENDIAN=big
15730      ;;
15731    sparcv9|sparc64)
15732      VAR_CPU=sparcv9
15733      VAR_CPU_ARCH=sparc
15734      VAR_CPU_BITS=64
15735      VAR_CPU_ENDIAN=big
15736      ;;
15737    *)
15738      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15739      ;;
15740  esac
15741
15742  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15743  OPENJDK_TARGET_OS="$VAR_OS"
15744  if test "x$VAR_OS_TYPE" != x; then
15745    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15746  else
15747    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15748  fi
15749  if test "x$VAR_OS_ENV" != x; then
15750    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15751  else
15752    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15753  fi
15754  OPENJDK_TARGET_CPU="$VAR_CPU"
15755  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15756  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15757  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15758
15759
15760
15761
15762
15763
15764
15765
15766  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15767$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15769$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15770
15771
15772
15773# Check whether --with-target-bits was given.
15774if test "${with_target_bits+set}" = set; then :
15775  withval=$with_target_bits;
15776fi
15777
15778
15779  # We have three types of compiles:
15780  # native  == normal compilation, target system == build system
15781  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15782  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15783  #
15784  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15785    # We're doing a proper cross-compilation
15786    COMPILE_TYPE="cross"
15787  else
15788    COMPILE_TYPE="native"
15789  fi
15790
15791  if test "x$with_target_bits" != x; then
15792    if test "x$COMPILE_TYPE" = "xcross"; then
15793      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15794    fi
15795
15796    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15797      # A reduced build is requested
15798      COMPILE_TYPE="reduced"
15799      OPENJDK_TARGET_CPU_BITS=32
15800      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15801        OPENJDK_TARGET_CPU=x86
15802      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15803        OPENJDK_TARGET_CPU=sparc
15804      else
15805        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15806      fi
15807    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15808      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
15809    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15810      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15811$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15812    else
15813      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15814    fi
15815  fi
15816
15817
15818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15819$as_echo_n "checking compilation type... " >&6; }
15820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15821$as_echo "$COMPILE_TYPE" >&6; }
15822
15823
15824  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15825    REQUIRED_OS_NAME=SunOS
15826    REQUIRED_OS_VERSION=5.10
15827  fi
15828  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15829    REQUIRED_OS_NAME=Linux
15830    REQUIRED_OS_VERSION=2.6
15831  fi
15832  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15833    REQUIRED_OS_NAME=Windows
15834    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15835      REQUIRED_OS_VERSION=5.2
15836    else
15837      REQUIRED_OS_VERSION=5.1
15838    fi
15839  fi
15840  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15841    REQUIRED_OS_NAME=Darwin
15842    REQUIRED_OS_VERSION=11.2
15843  fi
15844  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15845    REQUIRED_OS_NAME=AIX
15846    REQUIRED_OS_VERSION=7.1
15847  fi
15848
15849
15850
15851
15852
15853
15854  # Also store the legacy naming of the cpu.
15855  # Ie i586 and amd64 instead of x86 and x86_64
15856  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15857  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15858    OPENJDK_TARGET_CPU_LEGACY="i586"
15859  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15860    # On all platforms except MacOSX replace x86_64 with amd64.
15861    OPENJDK_TARGET_CPU_LEGACY="amd64"
15862  fi
15863
15864
15865  # And the second legacy naming of the cpu.
15866  # Ie i386 and amd64 instead of x86 and x86_64.
15867  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15868  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15869    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15870  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15871    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15872  fi
15873
15874
15875  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15876  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15877  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15878  OPENJDK_TARGET_CPU_ISADIR=""
15879  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15880    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15881      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15882    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15883      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15884    fi
15885  fi
15886
15887
15888  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15889  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15890  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15891    # On linux only, we replace x86 with i386.
15892    OPENJDK_TARGET_CPU_OSARCH="i386"
15893  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15894    # On all platforms except macosx, we replace x86_64 with amd64.
15895    OPENJDK_TARGET_CPU_OSARCH="amd64"
15896  fi
15897
15898
15899  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15900  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15901    OPENJDK_TARGET_CPU_JLI="i386"
15902  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15903    # On all platforms except macosx, we replace x86_64 with amd64.
15904    OPENJDK_TARGET_CPU_JLI="amd64"
15905  fi
15906
15907  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15908      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15909  else
15910      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15911  fi
15912
15913
15914  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15915  # Macosx is osx and x86_64 is x64
15916  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15917    OPENJDK_TARGET_OS_BUNDLE="osx"
15918  else
15919    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15920  fi
15921  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15922    OPENJDK_TARGET_CPU_BUNDLE="x64"
15923  else
15924    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15925  fi
15926  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15927
15928
15929  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15930    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15931    # unpack200.exe. This variable is used in
15932    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
15933    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15934      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15935    fi
15936  fi
15937
15938  if test "x$COMPILE_TYPE" = "xcross"; then
15939    # FIXME: ... or should this include reduced builds..?
15940    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15941  else
15942    DEFINE_CROSS_COMPILE_ARCH=""
15943  fi
15944
15945
15946  # Convert openjdk platform names to hotspot names
15947
15948  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15949  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15950    HOTSPOT_TARGET_OS=bsd
15951  fi
15952
15953
15954  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15955  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15956    HOTSPOT_TARGET_OS_TYPE=posix
15957  fi
15958
15959
15960  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15961  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15962    HOTSPOT_TARGET_CPU=x86_32
15963  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15964    HOTSPOT_TARGET_CPU=sparc
15965  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15966    HOTSPOT_TARGET_CPU=ppc_64
15967  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15968    HOTSPOT_TARGET_CPU=ppc_64
15969  fi
15970
15971
15972  # This is identical with OPENJDK_*, but define anyway for consistency.
15973  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15974
15975
15976  # Setup HOTSPOT_TARGET_CPU_DEFINE
15977  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15978    HOTSPOT_TARGET_CPU_DEFINE=IA32
15979  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15980    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15981  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15982    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15983  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15984    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15985  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15986    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15987  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15988    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15989
15990  # The cpu defines below are for zero, we don't support them directly.
15991  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15992    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15993  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15994    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15995  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15996    HOTSPOT_TARGET_CPU_DEFINE=S390
15997  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15998    HOTSPOT_TARGET_CPU_DEFINE=S390
15999  elif test "x$OPENJDK_TARGET_CPU" != x; then
16000    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16001  fi
16002
16003
16004
16005
16006  # Also store the legacy naming of the cpu.
16007  # Ie i586 and amd64 instead of x86 and x86_64
16008  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16009  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16010    OPENJDK_BUILD_CPU_LEGACY="i586"
16011  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16012    # On all platforms except MacOSX replace x86_64 with amd64.
16013    OPENJDK_BUILD_CPU_LEGACY="amd64"
16014  fi
16015
16016
16017  # And the second legacy naming of the cpu.
16018  # Ie i386 and amd64 instead of x86 and x86_64.
16019  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16020  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16021    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16022  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16023    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16024  fi
16025
16026
16027  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16028  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16029  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16030  OPENJDK_BUILD_CPU_ISADIR=""
16031  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16032    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16033      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16034    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16035      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16036    fi
16037  fi
16038
16039
16040  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16041  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16042  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16043    # On linux only, we replace x86 with i386.
16044    OPENJDK_BUILD_CPU_OSARCH="i386"
16045  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16046    # On all platforms except macosx, we replace x86_64 with amd64.
16047    OPENJDK_BUILD_CPU_OSARCH="amd64"
16048  fi
16049
16050
16051  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16052  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16053    OPENJDK_BUILD_CPU_JLI="i386"
16054  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16055    # On all platforms except macosx, we replace x86_64 with amd64.
16056    OPENJDK_BUILD_CPU_JLI="amd64"
16057  fi
16058
16059  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16060      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16061  else
16062      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16063  fi
16064
16065
16066  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16067  # Macosx is osx and x86_64 is x64
16068  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16069    OPENJDK_BUILD_OS_BUNDLE="osx"
16070  else
16071    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16072  fi
16073  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16074    OPENJDK_BUILD_CPU_BUNDLE="x64"
16075  else
16076    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16077  fi
16078  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16079
16080
16081  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16082    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16083    # unpack200.exe. This variable is used in
16084    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16085    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16086      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16087    fi
16088  fi
16089
16090  if test "x$COMPILE_TYPE" = "xcross"; then
16091    # FIXME: ... or should this include reduced builds..?
16092    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16093  else
16094    DEFINE_CROSS_COMPILE_ARCH=""
16095  fi
16096
16097
16098  # Convert openjdk platform names to hotspot names
16099
16100  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16101  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16102    HOTSPOT_BUILD_OS=bsd
16103  fi
16104
16105
16106  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16107  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16108    HOTSPOT_BUILD_OS_TYPE=posix
16109  fi
16110
16111
16112  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16113  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16114    HOTSPOT_BUILD_CPU=x86_32
16115  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16116    HOTSPOT_BUILD_CPU=sparc
16117  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16118    HOTSPOT_BUILD_CPU=ppc_64
16119  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16120    HOTSPOT_BUILD_CPU=ppc_64
16121  fi
16122
16123
16124  # This is identical with OPENJDK_*, but define anyway for consistency.
16125  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16126
16127
16128  # Setup HOTSPOT_BUILD_CPU_DEFINE
16129  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16130    HOTSPOT_BUILD_CPU_DEFINE=IA32
16131  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16132    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16133  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16134    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16135  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16136    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16137  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16138    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16139  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16140    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16141
16142  # The cpu defines below are for zero, we don't support them directly.
16143  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16144    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16145  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16146    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16147  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16148    HOTSPOT_BUILD_CPU_DEFINE=S390
16149  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16150    HOTSPOT_BUILD_CPU_DEFINE=S390
16151  elif test "x$OPENJDK_BUILD_CPU" != x; then
16152    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16153  fi
16154
16155
16156
16157
16158
16159
16160# Continue setting up basic stuff. Most remaining code require fundamental tools.
16161
16162  # Save the current directory this script was started from
16163  CURDIR="$PWD"
16164
16165  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16166  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16167  # was not available at that time.
16168  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16169  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16170    ORIGINAL_PATH="$REWRITTEN_PATH"
16171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16172$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16173  fi
16174
16175  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16176    PATH_SEP=";"
16177
16178  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16179  if test $SRC_ROOT_LENGTH -gt 100; then
16180    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16181  fi
16182
16183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16185$as_echo_n "checking cygwin release... " >&6; }
16186    CYGWIN_VERSION=`$UNAME -r`
16187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16188$as_echo "$CYGWIN_VERSION" >&6; }
16189    WINDOWS_ENV_VENDOR='cygwin'
16190    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16191
16192    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16193    if test "x$CYGWIN_VERSION_OLD" != x; then
16194      { $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
16195$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;}
16196      as_fn_error $? "Cannot continue" "$LINENO" 5
16197    fi
16198    if test "x$CYGPATH" = x; then
16199      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16200    fi
16201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16202$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16203    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16204    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16205    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16206    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16208$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16209    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16210    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16211    if test "x$test_cygdrive_prefix" = x; then
16212      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16213    fi
16214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16215    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16216$as_echo_n "checking msys release... " >&6; }
16217    MSYS_VERSION=`$UNAME -r`
16218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16219$as_echo "$MSYS_VERSION" >&6; }
16220
16221    WINDOWS_ENV_VENDOR='msys'
16222    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16223
16224    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16225$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16226    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16227    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16228
16229  windows_path="$MSYS_ROOT_PATH"
16230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16231    unix_path=`$CYGPATH -u "$windows_path"`
16232    MSYS_ROOT_PATH="$unix_path"
16233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16235    MSYS_ROOT_PATH="$unix_path"
16236  fi
16237
16238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16239$as_echo "$MSYS_ROOT_PATH" >&6; }
16240    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16241  else
16242    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16243  fi
16244
16245  # Test if windows or unix (cygwin/msys) find is first in path.
16246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16247$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16248  FIND_BINARY_OUTPUT=`find --version 2>&1`
16249  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16250    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16251$as_echo "unix style" >&6; }
16252  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16253    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16254$as_echo "Windows" >&6; }
16255    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16256$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16257    { $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
16258$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16259    as_fn_error $? "Cannot continue" "$LINENO" 5
16260  else
16261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16262$as_echo "unknown" >&6; }
16263    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16264$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16265  fi
16266
16267  else
16268    PATH_SEP=":"
16269  fi
16270
16271
16272  # We get the top-level directory from the supporting wrappers.
16273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16274$as_echo_n "checking for top-level directory... " >&6; }
16275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16276$as_echo "$TOPDIR" >&6; }
16277
16278
16279  # Save the original version of TOPDIR for string comparisons
16280  ORIGINAL_TOPDIR="$TOPDIR"
16281
16282
16283  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16284
16285  # Only process if variable expands to non-empty
16286
16287  if test "x$CURDIR" != x; then
16288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16289
16290  # Input might be given as Windows format, start by converting to
16291  # unix format.
16292  path="$CURDIR"
16293  new_path=`$CYGPATH -u "$path"`
16294
16295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16298  # "foo.exe" is OK but "foo" is an error.
16299  #
16300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16301  # It is also a way to make sure we got the proper file name for the real test later on.
16302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16303  if test "x$test_shortpath" = x; then
16304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16305$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16306    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16307  fi
16308
16309  # Call helper function which possibly converts this using DOS-style short mode.
16310  # If so, the updated path is stored in $new_path.
16311
16312  input_path="$new_path"
16313  # Check if we need to convert this using DOS-style short mode. If the path
16314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16315  # take no chances and rewrite it.
16316  # Note: m4 eats our [], so we need to use [ and ] instead.
16317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16318  if test "x$has_forbidden_chars" != x; then
16319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16323      # Going to short mode and back again did indeed matter. Since short mode is
16324      # case insensitive, let's make it lowercase to improve readability.
16325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16326      # Now convert it back to Unix-style (cygpath)
16327      input_path=`$CYGPATH -u "$shortmode_path"`
16328      new_path="$input_path"
16329    fi
16330  fi
16331
16332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16333  if test "x$test_cygdrive_prefix" = x; then
16334    # As a simple fix, exclude /usr/bin since it's not a real path.
16335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16337      # a path prefixed by /cygdrive for fixpath to work.
16338      new_path="$CYGWIN_ROOT_PATH$input_path"
16339    fi
16340  fi
16341
16342
16343  if test "x$path" != "x$new_path"; then
16344    CURDIR="$new_path"
16345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16346$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16347  fi
16348
16349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16350
16351  path="$CURDIR"
16352  has_colon=`$ECHO $path | $GREP ^.:`
16353  new_path="$path"
16354  if test "x$has_colon" = x; then
16355    # Not in mixed or Windows style, start by that.
16356    new_path=`cmd //c echo $path`
16357  fi
16358
16359
16360  input_path="$new_path"
16361  # Check if we need to convert this using DOS-style short mode. If the path
16362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16363  # take no chances and rewrite it.
16364  # Note: m4 eats our [], so we need to use [ and ] instead.
16365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16366  if test "x$has_forbidden_chars" != x; then
16367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16369  fi
16370
16371
16372  windows_path="$new_path"
16373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16374    unix_path=`$CYGPATH -u "$windows_path"`
16375    new_path="$unix_path"
16376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16378    new_path="$unix_path"
16379  fi
16380
16381  if test "x$path" != "x$new_path"; then
16382    CURDIR="$new_path"
16383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16384$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16385  fi
16386
16387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16389
16390    else
16391      # We're on a unix platform. Hooray! :)
16392      path="$CURDIR"
16393      has_space=`$ECHO "$path" | $GREP " "`
16394      if test "x$has_space" != x; then
16395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16396$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16397        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16398      fi
16399
16400      # Use eval to expand a potential ~
16401      eval path="$path"
16402      if test ! -f "$path" && test ! -d "$path"; then
16403        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16404      fi
16405
16406      if test -d "$path"; then
16407        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16408      else
16409        dir="`$DIRNAME "$path"`"
16410        base="`$BASENAME "$path"`"
16411        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16412      fi
16413    fi
16414  fi
16415
16416
16417  # Only process if variable expands to non-empty
16418
16419  if test "x$TOPDIR" != x; then
16420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16421
16422  # Input might be given as Windows format, start by converting to
16423  # unix format.
16424  path="$TOPDIR"
16425  new_path=`$CYGPATH -u "$path"`
16426
16427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16430  # "foo.exe" is OK but "foo" is an error.
16431  #
16432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16433  # It is also a way to make sure we got the proper file name for the real test later on.
16434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16435  if test "x$test_shortpath" = x; then
16436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16437$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16438    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16439  fi
16440
16441  # Call helper function which possibly converts this using DOS-style short mode.
16442  # If so, the updated path is stored in $new_path.
16443
16444  input_path="$new_path"
16445  # Check if we need to convert this using DOS-style short mode. If the path
16446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16447  # take no chances and rewrite it.
16448  # Note: m4 eats our [], so we need to use [ and ] instead.
16449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16450  if test "x$has_forbidden_chars" != x; then
16451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16455      # Going to short mode and back again did indeed matter. Since short mode is
16456      # case insensitive, let's make it lowercase to improve readability.
16457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16458      # Now convert it back to Unix-style (cygpath)
16459      input_path=`$CYGPATH -u "$shortmode_path"`
16460      new_path="$input_path"
16461    fi
16462  fi
16463
16464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16465  if test "x$test_cygdrive_prefix" = x; then
16466    # As a simple fix, exclude /usr/bin since it's not a real path.
16467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16469      # a path prefixed by /cygdrive for fixpath to work.
16470      new_path="$CYGWIN_ROOT_PATH$input_path"
16471    fi
16472  fi
16473
16474
16475  if test "x$path" != "x$new_path"; then
16476    TOPDIR="$new_path"
16477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16478$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16479  fi
16480
16481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16482
16483  path="$TOPDIR"
16484  has_colon=`$ECHO $path | $GREP ^.:`
16485  new_path="$path"
16486  if test "x$has_colon" = x; then
16487    # Not in mixed or Windows style, start by that.
16488    new_path=`cmd //c echo $path`
16489  fi
16490
16491
16492  input_path="$new_path"
16493  # Check if we need to convert this using DOS-style short mode. If the path
16494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16495  # take no chances and rewrite it.
16496  # Note: m4 eats our [], so we need to use [ and ] instead.
16497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16498  if test "x$has_forbidden_chars" != x; then
16499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16501  fi
16502
16503
16504  windows_path="$new_path"
16505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16506    unix_path=`$CYGPATH -u "$windows_path"`
16507    new_path="$unix_path"
16508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16510    new_path="$unix_path"
16511  fi
16512
16513  if test "x$path" != "x$new_path"; then
16514    TOPDIR="$new_path"
16515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16516$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16517  fi
16518
16519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16521
16522    else
16523      # We're on a unix platform. Hooray! :)
16524      path="$TOPDIR"
16525      has_space=`$ECHO "$path" | $GREP " "`
16526      if test "x$has_space" != x; then
16527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16528$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16529        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16530      fi
16531
16532      # Use eval to expand a potential ~
16533      eval path="$path"
16534      if test ! -f "$path" && test ! -d "$path"; then
16535        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16536      fi
16537
16538      if test -d "$path"; then
16539        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16540      else
16541        dir="`$DIRNAME "$path"`"
16542        base="`$BASENAME "$path"`"
16543        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16544      fi
16545    fi
16546  fi
16547
16548  # SRC_ROOT is a traditional alias for TOPDIR.
16549  SRC_ROOT=$TOPDIR
16550
16551  # Calculate a canonical version of TOPDIR for string comparisons
16552  CANONICAL_TOPDIR=$TOPDIR
16553
16554  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16555    # Follow a chain of symbolic links. Use readlink
16556    # where it exists, else fall back to horribly
16557    # complicated shell code.
16558    if test "x$READLINK_TESTED" != yes; then
16559      # On MacOSX there is a readlink tool with a different
16560      # purpose than the GNU readlink tool. Check the found readlink.
16561      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16562      if test "x$ISGNU" = x; then
16563        # A readlink that we do not know how to use.
16564        # Are there other non-GNU readlinks out there?
16565        READLINK_TESTED=yes
16566        READLINK=
16567      fi
16568    fi
16569
16570    if test "x$READLINK" != x; then
16571      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16572    else
16573      # Save the current directory for restoring afterwards
16574      STARTDIR=$PWD
16575      COUNTER=0
16576      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16577      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16578      cd $sym_link_dir
16579      # Use -P flag to resolve symlinks in directories.
16580      cd `$THEPWDCMD -P`
16581      sym_link_dir=`$THEPWDCMD -P`
16582      # Resolve file symlinks
16583      while test $COUNTER -lt 20; do
16584        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16585        if test "x$ISLINK" == x; then
16586          # This is not a symbolic link! We are done!
16587          break
16588        fi
16589        # Again resolve directory symlinks since the target of the just found
16590        # link could be in a different directory
16591        cd `$DIRNAME $ISLINK`
16592        sym_link_dir=`$THEPWDCMD -P`
16593        sym_link_file=`$BASENAME $ISLINK`
16594        let COUNTER=COUNTER+1
16595      done
16596      cd $STARTDIR
16597      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16598    fi
16599  fi
16600
16601
16602
16603  # Locate the directory of this script.
16604  AUTOCONF_DIR=$TOPDIR/common/autoconf
16605
16606  # Setup username (for use in adhoc version strings etc)
16607  # Outer [ ] to quote m4.
16608   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16609
16610
16611
16612# Check if it's a pure open build or if custom sources are to be used.
16613
16614  # Check whether --enable-openjdk-only was given.
16615if test "${enable_openjdk_only+set}" = set; then :
16616  enableval=$enable_openjdk_only;
16617else
16618  enable_openjdk_only="no"
16619fi
16620
16621
16622  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16623$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16625$as_echo "$enable_openjdk_only" >&6; }
16626  if test "x$enable_openjdk_only" = "xyes"; then
16627    SUPPRESS_CUSTOM_EXTENSIONS="true"
16628  elif test "x$enable_openjdk_only" = "xno"; then
16629    SUPPRESS_CUSTOM_EXTENSIONS="false"
16630  else
16631    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16632  fi
16633
16634  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16635  # the IncludeCustomExtension macro.
16636
16637
16638# Check whether --with-custom-make-dir was given.
16639if test "${with_custom_make_dir+set}" = set; then :
16640  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
16641$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16642fi
16643
16644
16645
16646
16647# These are needed to be able to create a configuration name (and thus the output directory)
16648
16649  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16650$as_echo_n "checking which variant of the JDK to build... " >&6; }
16651
16652# Check whether --with-jdk-variant was given.
16653if test "${with_jdk_variant+set}" = set; then :
16654  withval=$with_jdk_variant;
16655fi
16656
16657
16658  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16659    JDK_VARIANT="normal"
16660  else
16661    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16662  fi
16663
16664
16665
16666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16667$as_echo "$JDK_VARIANT" >&6; }
16668
16669
16670  DEBUG_LEVEL="release"
16671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16672$as_echo_n "checking which debug level to use... " >&6; }
16673  # Check whether --enable-debug was given.
16674if test "${enable_debug+set}" = set; then :
16675  enableval=$enable_debug;
16676        ENABLE_DEBUG="${enableval}"
16677        DEBUG_LEVEL="fastdebug"
16678
16679else
16680  ENABLE_DEBUG="no"
16681fi
16682
16683
16684
16685# Check whether --with-debug-level was given.
16686if test "${with_debug_level+set}" = set; then :
16687  withval=$with_debug_level;
16688        DEBUG_LEVEL="${withval}"
16689        if test "x$ENABLE_DEBUG" = xyes; then
16690          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16691        fi
16692
16693fi
16694
16695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16696$as_echo "$DEBUG_LEVEL" >&6; }
16697
16698  if test "x$DEBUG_LEVEL" != xrelease && \
16699      test "x$DEBUG_LEVEL" != xoptimized && \
16700      test "x$DEBUG_LEVEL" != xfastdebug && \
16701      test "x$DEBUG_LEVEL" != xslowdebug; then
16702    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16703  fi
16704
16705  # Translate DEBUG_LEVEL to debug level used by Hotspot
16706  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16707  if test "x$DEBUG_LEVEL" = xrelease; then
16708    HOTSPOT_DEBUG_LEVEL="product"
16709  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16710    HOTSPOT_DEBUG_LEVEL="debug"
16711  fi
16712
16713  if test "x$DEBUG_LEVEL" = xoptimized; then
16714    # The debug level 'optimized' is a little special because it is currently only
16715    # applicable to the HotSpot build where it means to build a completely
16716    # optimized version of the VM without any debugging code (like for the
16717    # 'release' debug level which is called 'product' in the HotSpot build) but
16718    # with the exception that it can contain additional code which is otherwise
16719    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16720    # test new and/or experimental features which are not intended for customer
16721    # shipment. Because these new features need to be tested and benchmarked in
16722    # real world scenarios, we want to build the containing JDK at the 'release'
16723    # debug level.
16724    DEBUG_LEVEL="release"
16725  fi
16726
16727
16728
16729
16730
16731
16732# Check whether --with-jvm-variants was given.
16733if test "${with_jvm_variants+set}" = set; then :
16734  withval=$with_jvm_variants;
16735fi
16736
16737
16738
16739
16740# Check whether --with-cpu-port was given.
16741if test "${with_cpu_port+set}" = set; then :
16742  withval=$with_cpu_port;
16743fi
16744
16745
16746  if test "x$with_cpu_port" != x; then
16747    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16748      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16749    fi
16750    if test "x$with_cpu_port" != xarm64 && \
16751        test "x$with_cpu_port" != xaarch64; then
16752      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16753    fi
16754    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16755  fi
16756
16757
16758  if test "x$with_jvm_variants" = x; then
16759    with_jvm_variants="server"
16760  fi
16761  JVM_VARIANTS_OPT="$with_jvm_variants"
16762
16763  # Has the user listed more than one variant?
16764  # Additional [] needed to keep m4 from mangling shell constructs.
16765  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16766    BUILDING_MULTIPLE_JVM_VARIANTS=true
16767  else
16768    BUILDING_MULTIPLE_JVM_VARIANTS=false
16769  fi
16770  # Replace the commas with AND for use in the build directory name.
16771  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16772
16773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16774$as_echo_n "checking which variants of the JVM to build... " >&6; }
16775  # JVM_VARIANTS is a space-separated list.
16776  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16777  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16779$as_echo "$JVM_VARIANTS" >&6; }
16780
16781  # Check that the selected variants are valid
16782
16783  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16784  # Notice that the original variant failes on SLES 10 and 11
16785  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16786  STACK=${JVM_VARIANTS// /$'\n'}
16787  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16788  if test "x$INVALID_VARIANTS" != x; then
16789    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16790$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16791    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16792  fi
16793
16794  # All "special" variants share the same output directory ("server")
16795  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16796  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16797  STACK=${JVM_VARIANTS// /$'\n'}
16798  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16799  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16800    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16801  fi
16802
16803  # The "main" variant is the one used by other libs to link against during the
16804  # build.
16805  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16806    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16807    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16808      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16809        JVM_VARIANT_MAIN="$variant"
16810        break
16811      fi
16812    done
16813  else
16814    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16815  fi
16816
16817
16818
16819
16820
16821  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16822    # zero behaves as a platform and rewrites these values. This is really weird. :(
16823    # We are guaranteed that we do not build any other variants when building zero.
16824    HOTSPOT_TARGET_CPU=zero
16825    HOTSPOT_TARGET_CPU_ARCH=zero
16826  fi
16827
16828
16829# With basic setup done, call the custom early hook.
16830
16831
16832# Check if we have devkits, extra paths or sysroot set.
16833
16834
16835# Check whether --with-devkit was given.
16836if test "${with_devkit+set}" = set; then :
16837  withval=$with_devkit;
16838
16839  # Only process if variable expands to non-empty
16840
16841  if test "x$with_devkit" != x; then
16842    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16843
16844  # Input might be given as Windows format, start by converting to
16845  # unix format.
16846  path="$with_devkit"
16847  new_path=`$CYGPATH -u "$path"`
16848
16849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16852  # "foo.exe" is OK but "foo" is an error.
16853  #
16854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16855  # It is also a way to make sure we got the proper file name for the real test later on.
16856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16857  if test "x$test_shortpath" = x; then
16858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16859$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16860    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16861  fi
16862
16863  # Call helper function which possibly converts this using DOS-style short mode.
16864  # If so, the updated path is stored in $new_path.
16865
16866  input_path="$new_path"
16867  # Check if we need to convert this using DOS-style short mode. If the path
16868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16869  # take no chances and rewrite it.
16870  # Note: m4 eats our [], so we need to use [ and ] instead.
16871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16872  if test "x$has_forbidden_chars" != x; then
16873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16877      # Going to short mode and back again did indeed matter. Since short mode is
16878      # case insensitive, let's make it lowercase to improve readability.
16879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16880      # Now convert it back to Unix-style (cygpath)
16881      input_path=`$CYGPATH -u "$shortmode_path"`
16882      new_path="$input_path"
16883    fi
16884  fi
16885
16886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16887  if test "x$test_cygdrive_prefix" = x; then
16888    # As a simple fix, exclude /usr/bin since it's not a real path.
16889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16891      # a path prefixed by /cygdrive for fixpath to work.
16892      new_path="$CYGWIN_ROOT_PATH$input_path"
16893    fi
16894  fi
16895
16896
16897  if test "x$path" != "x$new_path"; then
16898    with_devkit="$new_path"
16899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16900$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16901  fi
16902
16903    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16904
16905  path="$with_devkit"
16906  has_colon=`$ECHO $path | $GREP ^.:`
16907  new_path="$path"
16908  if test "x$has_colon" = x; then
16909    # Not in mixed or Windows style, start by that.
16910    new_path=`cmd //c echo $path`
16911  fi
16912
16913
16914  input_path="$new_path"
16915  # Check if we need to convert this using DOS-style short mode. If the path
16916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16917  # take no chances and rewrite it.
16918  # Note: m4 eats our [], so we need to use [ and ] instead.
16919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16920  if test "x$has_forbidden_chars" != x; then
16921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16923  fi
16924
16925
16926  windows_path="$new_path"
16927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16928    unix_path=`$CYGPATH -u "$windows_path"`
16929    new_path="$unix_path"
16930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16932    new_path="$unix_path"
16933  fi
16934
16935  if test "x$path" != "x$new_path"; then
16936    with_devkit="$new_path"
16937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16938$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16939  fi
16940
16941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16943
16944    else
16945      # We're on a unix platform. Hooray! :)
16946      path="$with_devkit"
16947      has_space=`$ECHO "$path" | $GREP " "`
16948      if test "x$has_space" != x; then
16949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16950$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16951        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16952      fi
16953
16954      # Use eval to expand a potential ~
16955      eval path="$path"
16956      if test ! -f "$path" && test ! -d "$path"; then
16957        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16958      fi
16959
16960      if test -d "$path"; then
16961        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16962      else
16963        dir="`$DIRNAME "$path"`"
16964        base="`$BASENAME "$path"`"
16965        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16966      fi
16967    fi
16968  fi
16969
16970        DEVKIT_ROOT="$with_devkit"
16971        # Check for a meta data info file in the root of the devkit
16972        if test -f "$DEVKIT_ROOT/devkit.info"; then
16973          . $DEVKIT_ROOT/devkit.info
16974          # This potentially sets the following:
16975          # A descriptive name of the devkit
16976
16977  if test "x$DEVKIT_NAME" = x; then
16978    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16979  fi
16980
16981          # Corresponds to --with-extra-path
16982
16983  if test "x$DEVKIT_EXTRA_PATH" = x; then
16984    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16985  fi
16986
16987          # Corresponds to --with-toolchain-path
16988
16989  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16990    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16991  fi
16992
16993          # Corresponds to --with-sysroot
16994
16995  if test "x$DEVKIT_SYSROOT" = x; then
16996    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16997  fi
16998
16999
17000          # Identifies the Visual Studio version in the devkit
17001
17002  if test "x$DEVKIT_VS_VERSION" = x; then
17003    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17004  fi
17005
17006          # The Visual Studio include environment variable
17007
17008  if test "x$DEVKIT_VS_INCLUDE" = x; then
17009    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17010  fi
17011
17012          # The Visual Studio lib environment variable
17013
17014  if test "x$DEVKIT_VS_LIB" = x; then
17015    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17016  fi
17017
17018          # Corresponds to --with-msvcr-dll
17019
17020  if test "x$DEVKIT_MSVCR_DLL" = x; then
17021    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17022  fi
17023
17024          # Corresponds to --with-msvcp-dll
17025
17026  if test "x$DEVKIT_MSVCP_DLL" = x; then
17027    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17028  fi
17029
17030        fi
17031
17032        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17033$as_echo_n "checking for devkit... " >&6; }
17034        if test "x$DEVKIT_NAME" != x; then
17035          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17036$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17037        else
17038          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17039$as_echo "$DEVKIT_ROOT" >&6; }
17040        fi
17041
17042
17043  if test "x$DEVKIT_EXTRA_PATH" != x; then
17044    if test "x$EXTRA_PATH" = x; then
17045      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17046    else
17047      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17048    fi
17049  fi
17050
17051
17052        # Fallback default of just /bin if DEVKIT_PATH is not defined
17053        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17054          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17055        fi
17056
17057  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17058    if test "x$TOOLCHAIN_PATH" = x; then
17059      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17060    else
17061      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17062    fi
17063  fi
17064
17065
17066        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17067        # places for backwards compatiblity.
17068        if test "x$DEVKIT_SYSROOT" != x; then
17069          SYSROOT="$DEVKIT_SYSROOT"
17070        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17071          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17072        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17073          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17074        fi
17075
17076
17077fi
17078
17079
17080  # You can force the sysroot if the sysroot encoded into the compiler tools
17081  # is not correct.
17082
17083# Check whether --with-sys-root was given.
17084if test "${with_sys_root+set}" = set; then :
17085  withval=$with_sys_root; SYSROOT=$with_sys_root
17086
17087fi
17088
17089
17090
17091# Check whether --with-sysroot was given.
17092if test "${with_sysroot+set}" = set; then :
17093  withval=$with_sysroot; SYSROOT=$with_sysroot
17094
17095fi
17096
17097
17098
17099# Check whether --with-tools-dir was given.
17100if test "${with_tools_dir+set}" = set; then :
17101  withval=$with_tools_dir;
17102  if test "x$with_tools_dir" != x; then
17103    if test "x$TOOLCHAIN_PATH" = x; then
17104      TOOLCHAIN_PATH="$with_tools_dir"
17105    else
17106      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17107    fi
17108  fi
17109
17110
17111fi
17112
17113
17114
17115# Check whether --with-toolchain-path was given.
17116if test "${with_toolchain_path+set}" = set; then :
17117  withval=$with_toolchain_path;
17118  if test "x$with_toolchain_path" != x; then
17119    if test "x$TOOLCHAIN_PATH" = x; then
17120      TOOLCHAIN_PATH="$with_toolchain_path"
17121    else
17122      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17123    fi
17124  fi
17125
17126
17127fi
17128
17129
17130
17131# Check whether --with-extra-path was given.
17132if test "${with_extra_path+set}" = set; then :
17133  withval=$with_extra_path;
17134  if test "x$with_extra_path" != x; then
17135    if test "x$EXTRA_PATH" = x; then
17136      EXTRA_PATH="$with_extra_path"
17137    else
17138      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17139    fi
17140  fi
17141
17142
17143fi
17144
17145
17146  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17147    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17148    # If not, detect if Xcode is installed by running xcodebuild -version
17149    # if no Xcode installed, xcodebuild exits with 1
17150    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17151    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17152      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17153      # fall back on the stub binary in /usr/bin/xcodebuild
17154      # Extract the first word of "xcodebuild", so it can be a program name with args.
17155set dummy xcodebuild; ac_word=$2
17156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17157$as_echo_n "checking for $ac_word... " >&6; }
17158if ${ac_cv_path_XCODEBUILD+:} false; then :
17159  $as_echo_n "(cached) " >&6
17160else
17161  case $XCODEBUILD in
17162  [\\/]* | ?:[\\/]*)
17163  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17164  ;;
17165  *)
17166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17167for as_dir in $TOOLCHAIN_PATH
17168do
17169  IFS=$as_save_IFS
17170  test -z "$as_dir" && as_dir=.
17171    for ac_exec_ext in '' $ac_executable_extensions; do
17172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17173    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17175    break 2
17176  fi
17177done
17178  done
17179IFS=$as_save_IFS
17180
17181  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17182  ;;
17183esac
17184fi
17185XCODEBUILD=$ac_cv_path_XCODEBUILD
17186if test -n "$XCODEBUILD"; then
17187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17188$as_echo "$XCODEBUILD" >&6; }
17189else
17190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17191$as_echo "no" >&6; }
17192fi
17193
17194
17195    else
17196      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17197      # when only the command line tools are installed there are no SDKs, so headers
17198      # are copied into the system frameworks
17199      XCODEBUILD=
17200
17201    fi
17202
17203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17204$as_echo_n "checking for sdk name... " >&6; }
17205
17206# Check whether --with-sdk-name was given.
17207if test "${with_sdk_name+set}" = set; then :
17208  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17209
17210fi
17211
17212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17213$as_echo "$SDKNAME" >&6; }
17214
17215    # if toolchain path is specified then don't rely on system headers, they may not compile
17216    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17217    test -z "$TOOLCHAIN_PATH" && \
17218      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17219
17220    if test -z "$SYSROOT"; then
17221      if test -n "$XCODEBUILD"; then
17222        # if we don't have system headers, use default SDK name (last resort)
17223        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17224          SDKNAME=${SDKNAME:-macosx}
17225        fi
17226
17227        if test -n "$SDKNAME"; then
17228          # Call xcodebuild to determine SYSROOT
17229          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17230        fi
17231      else
17232        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17233          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
17234        fi
17235      fi
17236    else
17237      # warn user if --with-sdk-name was also set
17238      if test -n "$with_sdk_name"; then
17239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17240$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17241      fi
17242    fi
17243
17244    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17245      # If no system framework headers, then SYSROOT must be set, or we won't build
17246      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
17247    fi
17248
17249    # Perform a basic sanity test
17250    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17251      if test -z "$SYSROOT"; then
17252        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
17253      else
17254        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17255      fi
17256    fi
17257
17258    # set SDKROOT too, Xcode tools will pick it up
17259    SDKROOT="$SYSROOT"
17260
17261  fi
17262
17263  # Prepend the extra path to the global path
17264
17265  if test "x$EXTRA_PATH" != x; then
17266    if test "x$PATH" = x; then
17267      PATH="$EXTRA_PATH"
17268    else
17269      PATH="$EXTRA_PATH:$PATH"
17270    fi
17271  fi
17272
17273
17274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17275$as_echo_n "checking for sysroot... " >&6; }
17276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17277$as_echo "$SYSROOT" >&6; }
17278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17279$as_echo_n "checking for toolchain path... " >&6; }
17280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17281$as_echo "$TOOLCHAIN_PATH" >&6; }
17282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17283$as_echo_n "checking for extra path... " >&6; }
17284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17285$as_echo "$EXTRA_PATH" >&6; }
17286
17287
17288# To properly create a configuration name, we need to have the OpenJDK target
17289# and options (variants and debug level) parsed.
17290
17291
17292
17293# Check whether --with-conf-name was given.
17294if test "${with_conf_name+set}" = set; then :
17295  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17296fi
17297
17298
17299  # Test from where we are running configure, in or outside of src root.
17300  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17301$as_echo_n "checking where to store configuration... " >&6; }
17302  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17303      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17304      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17305    # We are running configure from the src root.
17306    # Create a default ./build/target-variant-debuglevel output root.
17307    if test "x${CONF_NAME}" = x; then
17308      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17309$as_echo "in default location" >&6; }
17310      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17311    else
17312      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17313$as_echo "in build directory with custom name" >&6; }
17314    fi
17315    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17316    $MKDIR -p "$OUTPUT_ROOT"
17317    if test ! -d "$OUTPUT_ROOT"; then
17318      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17319    fi
17320  else
17321    # We are running configure from outside of the src dir.
17322    # Then use the current directory as output dir!
17323    # If configuration is situated in normal build directory, just use the build
17324    # directory name as configuration name, otherwise use the complete path.
17325    if test "x${CONF_NAME}" = x; then
17326      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17327    fi
17328    OUTPUT_ROOT="$CURDIR"
17329    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17330$as_echo "in current directory" >&6; }
17331
17332    # WARNING: This might be a bad thing to do. You need to be sure you want to
17333    # have a configuration in this directory. Do some sanity checks!
17334
17335    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17336      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17337      # other files
17338      files_present=`$LS $OUTPUT_ROOT`
17339      # Configure has already touched config.log and confdefs.h in the current dir when this check
17340      # is performed.
17341      filtered_files=`$ECHO "$files_present" \
17342          | $SED -e 's/config.log//g' \
17343              -e 's/configure.log//g' \
17344              -e 's/confdefs.h//g' \
17345              -e 's/ //g' \
17346          | $TR -d '\n'`
17347      if test "x$filtered_files" != x; then
17348        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17349$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17350        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17351$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17352        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17353$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17354        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17355$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17356        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17357$as_echo "$as_me: seriously mess up just about everything." >&6;}
17358        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17359$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17360        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17361$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17362        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17363      fi
17364    fi
17365  fi
17366  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17367$as_echo_n "checking what configuration name to use... " >&6; }
17368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17369$as_echo "$CONF_NAME" >&6; }
17370
17371
17372  # Only process if variable expands to non-empty
17373
17374  if test "x$OUTPUT_ROOT" != x; then
17375    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17376
17377  # Input might be given as Windows format, start by converting to
17378  # unix format.
17379  path="$OUTPUT_ROOT"
17380  new_path=`$CYGPATH -u "$path"`
17381
17382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17385  # "foo.exe" is OK but "foo" is an error.
17386  #
17387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17388  # It is also a way to make sure we got the proper file name for the real test later on.
17389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17390  if test "x$test_shortpath" = x; then
17391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17392$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17393    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17394  fi
17395
17396  # Call helper function which possibly converts this using DOS-style short mode.
17397  # If so, the updated path is stored in $new_path.
17398
17399  input_path="$new_path"
17400  # Check if we need to convert this using DOS-style short mode. If the path
17401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17402  # take no chances and rewrite it.
17403  # Note: m4 eats our [], so we need to use [ and ] instead.
17404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17405  if test "x$has_forbidden_chars" != x; then
17406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17410      # Going to short mode and back again did indeed matter. Since short mode is
17411      # case insensitive, let's make it lowercase to improve readability.
17412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17413      # Now convert it back to Unix-style (cygpath)
17414      input_path=`$CYGPATH -u "$shortmode_path"`
17415      new_path="$input_path"
17416    fi
17417  fi
17418
17419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17420  if test "x$test_cygdrive_prefix" = x; then
17421    # As a simple fix, exclude /usr/bin since it's not a real path.
17422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17424      # a path prefixed by /cygdrive for fixpath to work.
17425      new_path="$CYGWIN_ROOT_PATH$input_path"
17426    fi
17427  fi
17428
17429
17430  if test "x$path" != "x$new_path"; then
17431    OUTPUT_ROOT="$new_path"
17432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17433$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17434  fi
17435
17436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17437
17438  path="$OUTPUT_ROOT"
17439  has_colon=`$ECHO $path | $GREP ^.:`
17440  new_path="$path"
17441  if test "x$has_colon" = x; then
17442    # Not in mixed or Windows style, start by that.
17443    new_path=`cmd //c echo $path`
17444  fi
17445
17446
17447  input_path="$new_path"
17448  # Check if we need to convert this using DOS-style short mode. If the path
17449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17450  # take no chances and rewrite it.
17451  # Note: m4 eats our [], so we need to use [ and ] instead.
17452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17453  if test "x$has_forbidden_chars" != x; then
17454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17456  fi
17457
17458
17459  windows_path="$new_path"
17460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17461    unix_path=`$CYGPATH -u "$windows_path"`
17462    new_path="$unix_path"
17463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17465    new_path="$unix_path"
17466  fi
17467
17468  if test "x$path" != "x$new_path"; then
17469    OUTPUT_ROOT="$new_path"
17470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17471$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17472  fi
17473
17474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17476
17477    else
17478      # We're on a unix platform. Hooray! :)
17479      path="$OUTPUT_ROOT"
17480      has_space=`$ECHO "$path" | $GREP " "`
17481      if test "x$has_space" != x; then
17482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17483$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17484        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17485      fi
17486
17487      # Use eval to expand a potential ~
17488      eval path="$path"
17489      if test ! -f "$path" && test ! -d "$path"; then
17490        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17491      fi
17492
17493      if test -d "$path"; then
17494        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17495      else
17496        dir="`$DIRNAME "$path"`"
17497        base="`$BASENAME "$path"`"
17498        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17499      fi
17500    fi
17501  fi
17502
17503
17504  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17505  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17506
17507  SPEC="$OUTPUT_ROOT/spec.gmk"
17508
17509
17510
17511
17512
17513  # The spec.gmk file contains all variables for the make system.
17514  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17515
17516  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17517  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17518
17519  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17520  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17521
17522  # The compare.sh is used to compare the build output to other builds.
17523  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17524
17525  # The generated Makefile knows where the spec.gmk is and where the source is.
17526  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17527  # which will look for generated configurations
17528  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17529
17530
17531
17532# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17533
17534  for ac_prog in apt-get yum brew port pkgutil pkgadd
17535do
17536  # Extract the first word of "$ac_prog", so it can be a program name with args.
17537set dummy $ac_prog; ac_word=$2
17538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17539$as_echo_n "checking for $ac_word... " >&6; }
17540if ${ac_cv_prog_PKGHANDLER+:} false; then :
17541  $as_echo_n "(cached) " >&6
17542else
17543  if test -n "$PKGHANDLER"; then
17544  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17545else
17546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17547for as_dir in $PATH
17548do
17549  IFS=$as_save_IFS
17550  test -z "$as_dir" && as_dir=.
17551    for ac_exec_ext in '' $ac_executable_extensions; do
17552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17553    ac_cv_prog_PKGHANDLER="$ac_prog"
17554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17555    break 2
17556  fi
17557done
17558  done
17559IFS=$as_save_IFS
17560
17561fi
17562fi
17563PKGHANDLER=$ac_cv_prog_PKGHANDLER
17564if test -n "$PKGHANDLER"; then
17565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17566$as_echo "$PKGHANDLER" >&6; }
17567else
17568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17569$as_echo "no" >&6; }
17570fi
17571
17572
17573  test -n "$PKGHANDLER" && break
17574done
17575
17576
17577
17578# Setup tools that requires more complex handling, or that is not needed by the configure script.
17579
17580
17581
17582  # Publish this variable in the help.
17583
17584
17585  if [ -z "${MAKE+x}" ]; then
17586    # The variable is not set by user, try to locate tool using the code snippet
17587
17588    # Try our hardest to locate a correct version of GNU make
17589    for ac_prog in gmake
17590do
17591  # Extract the first word of "$ac_prog", so it can be a program name with args.
17592set dummy $ac_prog; ac_word=$2
17593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17594$as_echo_n "checking for $ac_word... " >&6; }
17595if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17596  $as_echo_n "(cached) " >&6
17597else
17598  case $CHECK_GMAKE in
17599  [\\/]* | ?:[\\/]*)
17600  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17601  ;;
17602  *)
17603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17604for as_dir in $PATH
17605do
17606  IFS=$as_save_IFS
17607  test -z "$as_dir" && as_dir=.
17608    for ac_exec_ext in '' $ac_executable_extensions; do
17609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17610    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17612    break 2
17613  fi
17614done
17615  done
17616IFS=$as_save_IFS
17617
17618  ;;
17619esac
17620fi
17621CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17622if test -n "$CHECK_GMAKE"; then
17623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17624$as_echo "$CHECK_GMAKE" >&6; }
17625else
17626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17627$as_echo "no" >&6; }
17628fi
17629
17630
17631  test -n "$CHECK_GMAKE" && break
17632done
17633
17634
17635  MAKE_CANDIDATE=""$CHECK_GMAKE""
17636  DESCRIPTION="gmake in PATH"
17637
17638  # On Cygwin, we require a newer version of make than on other platforms
17639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17640    MAKE_VERSION_EXPR="-e 4\."
17641    MAKE_REQUIRED_VERSION="4.0"
17642   else
17643    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17644    MAKE_REQUIRED_VERSION="3.81"
17645  fi
17646
17647  if test "x$MAKE_CANDIDATE" != x; then
17648    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17649$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17650    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17651    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17652    if test "x$IS_GNU_MAKE" = x; then
17653      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17654$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17655    else
17656      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17657      if test "x$IS_MODERN_MAKE" = x; then
17658        { $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
17659$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;}
17660      else
17661        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17662          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17663            MAKE_EXPECTED_ENV='cygwin'
17664          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17665            MAKE_EXPECTED_ENV='msys'
17666          else
17667            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17668          fi
17669          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17670          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17671        else
17672          # Not relevant for non-Windows
17673          IS_MAKE_CORRECT_ENV=true
17674        fi
17675        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17676          { $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
17677$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;}
17678        else
17679          FOUND_MAKE=$MAKE_CANDIDATE
17680
17681  # Only process if variable expands to non-empty
17682
17683  if test "x$FOUND_MAKE" != x; then
17684    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17685
17686  # First separate the path from the arguments. This will split at the first
17687  # space.
17688  complete="$FOUND_MAKE"
17689  path="${complete%% *}"
17690  tmp="$complete EOL"
17691  arguments="${tmp#* }"
17692
17693  # Input might be given as Windows format, start by converting to
17694  # unix format.
17695  new_path=`$CYGPATH -u "$path"`
17696
17697  # Now try to locate executable using which
17698  new_path=`$WHICH "$new_path" 2> /dev/null`
17699  # bat and cmd files are not always considered executable in cygwin causing which
17700  # to not find them
17701  if test "x$new_path" = x \
17702      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17703      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17704    new_path=`$CYGPATH -u "$path"`
17705  fi
17706  if test "x$new_path" = x; then
17707    # Oops. Which didn't find the executable.
17708    # The splitting of arguments from the executable at a space might have been incorrect,
17709    # since paths with space are more likely in Windows. Give it another try with the whole
17710    # argument.
17711    path="$complete"
17712    arguments="EOL"
17713    new_path=`$CYGPATH -u "$path"`
17714    new_path=`$WHICH "$new_path" 2> /dev/null`
17715    # bat and cmd files are not always considered executable in cygwin causing which
17716    # to not find them
17717    if test "x$new_path" = x \
17718        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17719        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17720      new_path=`$CYGPATH -u "$path"`
17721    fi
17722    if test "x$new_path" = x; then
17723      # It's still not found. Now this is an unrecoverable error.
17724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17725$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17726      has_space=`$ECHO "$complete" | $GREP " "`
17727      if test "x$has_space" != x; then
17728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17730      fi
17731      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17732    fi
17733  fi
17734
17735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17738  # "foo.exe" is OK but "foo" is an error.
17739  #
17740  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17741  # It is also a way to make sure we got the proper file name for the real test later on.
17742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17743  if test "x$test_shortpath" = x; then
17744    # Short path failed, file does not exist as specified.
17745    # Try adding .exe or .cmd
17746    if test -f "${new_path}.exe"; then
17747      input_to_shortpath="${new_path}.exe"
17748    elif test -f "${new_path}.cmd"; then
17749      input_to_shortpath="${new_path}.cmd"
17750    else
17751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17752$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17753      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17754$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17755      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17756    fi
17757  else
17758    input_to_shortpath="$new_path"
17759  fi
17760
17761  # Call helper function which possibly converts this using DOS-style short mode.
17762  # If so, the updated path is stored in $new_path.
17763  new_path="$input_to_shortpath"
17764
17765  input_path="$input_to_shortpath"
17766  # Check if we need to convert this using DOS-style short mode. If the path
17767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17768  # take no chances and rewrite it.
17769  # Note: m4 eats our [], so we need to use [ and ] instead.
17770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17771  if test "x$has_forbidden_chars" != x; then
17772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17776      # Going to short mode and back again did indeed matter. Since short mode is
17777      # case insensitive, let's make it lowercase to improve readability.
17778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17779      # Now convert it back to Unix-style (cygpath)
17780      input_path=`$CYGPATH -u "$shortmode_path"`
17781      new_path="$input_path"
17782    fi
17783  fi
17784
17785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17786  if test "x$test_cygdrive_prefix" = x; then
17787    # As a simple fix, exclude /usr/bin since it's not a real path.
17788    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17790      # a path prefixed by /cygdrive for fixpath to work.
17791      new_path="$CYGWIN_ROOT_PATH$input_path"
17792    fi
17793  fi
17794
17795  # remove trailing .exe if any
17796  new_path="${new_path/%.exe/}"
17797
17798    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17799
17800  # First separate the path from the arguments. This will split at the first
17801  # space.
17802  complete="$FOUND_MAKE"
17803  path="${complete%% *}"
17804  tmp="$complete EOL"
17805  arguments="${tmp#* }"
17806
17807  # Input might be given as Windows format, start by converting to
17808  # unix format.
17809  new_path="$path"
17810
17811  windows_path="$new_path"
17812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17813    unix_path=`$CYGPATH -u "$windows_path"`
17814    new_path="$unix_path"
17815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17817    new_path="$unix_path"
17818  fi
17819
17820
17821  # Now try to locate executable using which
17822  new_path=`$WHICH "$new_path" 2> /dev/null`
17823
17824  if test "x$new_path" = x; then
17825    # Oops. Which didn't find the executable.
17826    # The splitting of arguments from the executable at a space might have been incorrect,
17827    # since paths with space are more likely in Windows. Give it another try with the whole
17828    # argument.
17829    path="$complete"
17830    arguments="EOL"
17831    new_path="$path"
17832
17833  windows_path="$new_path"
17834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17835    unix_path=`$CYGPATH -u "$windows_path"`
17836    new_path="$unix_path"
17837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17839    new_path="$unix_path"
17840  fi
17841
17842
17843    new_path=`$WHICH "$new_path" 2> /dev/null`
17844    # bat and cmd files are not always considered executable in MSYS causing which
17845    # to not find them
17846    if test "x$new_path" = x \
17847        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17848        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17849      new_path="$path"
17850
17851  windows_path="$new_path"
17852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17853    unix_path=`$CYGPATH -u "$windows_path"`
17854    new_path="$unix_path"
17855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17857    new_path="$unix_path"
17858  fi
17859
17860    fi
17861
17862    if test "x$new_path" = x; then
17863      # It's still not found. Now this is an unrecoverable error.
17864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17865$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17866      has_space=`$ECHO "$complete" | $GREP " "`
17867      if test "x$has_space" != x; then
17868        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17869$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17870      fi
17871      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17872    fi
17873  fi
17874
17875  # Now new_path has a complete unix path to the binary
17876  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17877    # Keep paths in /bin as-is, but remove trailing .exe if any
17878    new_path="${new_path/%.exe/}"
17879    # Do not save /bin paths to all_fixpath_prefixes!
17880  else
17881    # Not in mixed or Windows style, start by that.
17882    new_path=`cmd //c echo $new_path`
17883
17884  input_path="$new_path"
17885  # Check if we need to convert this using DOS-style short mode. If the path
17886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17887  # take no chances and rewrite it.
17888  # Note: m4 eats our [], so we need to use [ and ] instead.
17889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17890  if test "x$has_forbidden_chars" != x; then
17891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17893  fi
17894
17895    # Output is in $new_path
17896
17897  windows_path="$new_path"
17898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17899    unix_path=`$CYGPATH -u "$windows_path"`
17900    new_path="$unix_path"
17901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17903    new_path="$unix_path"
17904  fi
17905
17906    # remove trailing .exe if any
17907    new_path="${new_path/%.exe/}"
17908
17909    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17910    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17911  fi
17912
17913    else
17914      # We're on a unix platform. Hooray! :)
17915      # First separate the path from the arguments. This will split at the first
17916      # space.
17917      complete="$FOUND_MAKE"
17918      path="${complete%% *}"
17919      tmp="$complete EOL"
17920      arguments="${tmp#* }"
17921
17922      # Cannot rely on the command "which" here since it doesn't always work.
17923      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17924      if test -z "$is_absolute_path"; then
17925        # Path to executable is not absolute. Find it.
17926        IFS_save="$IFS"
17927        IFS=:
17928        for p in $PATH; do
17929          if test -f "$p/$path" && test -x "$p/$path"; then
17930            new_path="$p/$path"
17931            break
17932          fi
17933        done
17934        IFS="$IFS_save"
17935      else
17936        # This is an absolute path, we can use it without further modifications.
17937        new_path="$path"
17938      fi
17939
17940      if test "x$new_path" = x; then
17941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17942$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17943        has_space=`$ECHO "$complete" | $GREP " "`
17944        if test "x$has_space" != x; then
17945          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17946$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17947        fi
17948        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17949      fi
17950    fi
17951
17952    # Now join together the path and the arguments once again
17953    if test "x$arguments" != xEOL; then
17954      new_complete="$new_path ${arguments% *}"
17955    else
17956      new_complete="$new_path"
17957    fi
17958
17959    if test "x$complete" != "x$new_complete"; then
17960      FOUND_MAKE="$new_complete"
17961      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17962$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17963    fi
17964  fi
17965
17966        fi
17967      fi
17968    fi
17969  fi
17970
17971
17972    if test "x$FOUND_MAKE" = x; then
17973      for ac_prog in make
17974do
17975  # Extract the first word of "$ac_prog", so it can be a program name with args.
17976set dummy $ac_prog; ac_word=$2
17977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17978$as_echo_n "checking for $ac_word... " >&6; }
17979if ${ac_cv_path_CHECK_MAKE+:} false; then :
17980  $as_echo_n "(cached) " >&6
17981else
17982  case $CHECK_MAKE in
17983  [\\/]* | ?:[\\/]*)
17984  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17985  ;;
17986  *)
17987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17988for as_dir in $PATH
17989do
17990  IFS=$as_save_IFS
17991  test -z "$as_dir" && as_dir=.
17992    for ac_exec_ext in '' $ac_executable_extensions; do
17993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17994    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17996    break 2
17997  fi
17998done
17999  done
18000IFS=$as_save_IFS
18001
18002  ;;
18003esac
18004fi
18005CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18006if test -n "$CHECK_MAKE"; then
18007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18008$as_echo "$CHECK_MAKE" >&6; }
18009else
18010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18011$as_echo "no" >&6; }
18012fi
18013
18014
18015  test -n "$CHECK_MAKE" && break
18016done
18017
18018
18019  MAKE_CANDIDATE=""$CHECK_MAKE""
18020  DESCRIPTION="make in PATH"
18021
18022  # On Cygwin, we require a newer version of make than on other platforms
18023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18024    MAKE_VERSION_EXPR="-e 4\."
18025    MAKE_REQUIRED_VERSION="4.0"
18026   else
18027    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18028    MAKE_REQUIRED_VERSION="3.81"
18029  fi
18030
18031  if test "x$MAKE_CANDIDATE" != x; then
18032    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18033$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18034    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18035    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18036    if test "x$IS_GNU_MAKE" = x; then
18037      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18038$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18039    else
18040      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18041      if test "x$IS_MODERN_MAKE" = x; then
18042        { $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
18043$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;}
18044      else
18045        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18046          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18047            MAKE_EXPECTED_ENV='cygwin'
18048          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18049            MAKE_EXPECTED_ENV='msys'
18050          else
18051            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18052          fi
18053          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18054          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18055        else
18056          # Not relevant for non-Windows
18057          IS_MAKE_CORRECT_ENV=true
18058        fi
18059        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18060          { $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
18061$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;}
18062        else
18063          FOUND_MAKE=$MAKE_CANDIDATE
18064
18065  # Only process if variable expands to non-empty
18066
18067  if test "x$FOUND_MAKE" != x; then
18068    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18069
18070  # First separate the path from the arguments. This will split at the first
18071  # space.
18072  complete="$FOUND_MAKE"
18073  path="${complete%% *}"
18074  tmp="$complete EOL"
18075  arguments="${tmp#* }"
18076
18077  # Input might be given as Windows format, start by converting to
18078  # unix format.
18079  new_path=`$CYGPATH -u "$path"`
18080
18081  # Now try to locate executable using which
18082  new_path=`$WHICH "$new_path" 2> /dev/null`
18083  # bat and cmd files are not always considered executable in cygwin causing which
18084  # to not find them
18085  if test "x$new_path" = x \
18086      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18087      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18088    new_path=`$CYGPATH -u "$path"`
18089  fi
18090  if test "x$new_path" = x; then
18091    # Oops. Which didn't find the executable.
18092    # The splitting of arguments from the executable at a space might have been incorrect,
18093    # since paths with space are more likely in Windows. Give it another try with the whole
18094    # argument.
18095    path="$complete"
18096    arguments="EOL"
18097    new_path=`$CYGPATH -u "$path"`
18098    new_path=`$WHICH "$new_path" 2> /dev/null`
18099    # bat and cmd files are not always considered executable in cygwin causing which
18100    # to not find them
18101    if test "x$new_path" = x \
18102        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18103        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18104      new_path=`$CYGPATH -u "$path"`
18105    fi
18106    if test "x$new_path" = x; then
18107      # It's still not found. Now this is an unrecoverable error.
18108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18109$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18110      has_space=`$ECHO "$complete" | $GREP " "`
18111      if test "x$has_space" != x; then
18112        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18113$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18114      fi
18115      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18116    fi
18117  fi
18118
18119  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18120  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18121  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18122  # "foo.exe" is OK but "foo" is an error.
18123  #
18124  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18125  # It is also a way to make sure we got the proper file name for the real test later on.
18126  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18127  if test "x$test_shortpath" = x; then
18128    # Short path failed, file does not exist as specified.
18129    # Try adding .exe or .cmd
18130    if test -f "${new_path}.exe"; then
18131      input_to_shortpath="${new_path}.exe"
18132    elif test -f "${new_path}.cmd"; then
18133      input_to_shortpath="${new_path}.cmd"
18134    else
18135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18136$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18137      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18138$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18139      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18140    fi
18141  else
18142    input_to_shortpath="$new_path"
18143  fi
18144
18145  # Call helper function which possibly converts this using DOS-style short mode.
18146  # If so, the updated path is stored in $new_path.
18147  new_path="$input_to_shortpath"
18148
18149  input_path="$input_to_shortpath"
18150  # Check if we need to convert this using DOS-style short mode. If the path
18151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18152  # take no chances and rewrite it.
18153  # Note: m4 eats our [], so we need to use [ and ] instead.
18154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18155  if test "x$has_forbidden_chars" != x; then
18156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18160      # Going to short mode and back again did indeed matter. Since short mode is
18161      # case insensitive, let's make it lowercase to improve readability.
18162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18163      # Now convert it back to Unix-style (cygpath)
18164      input_path=`$CYGPATH -u "$shortmode_path"`
18165      new_path="$input_path"
18166    fi
18167  fi
18168
18169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18170  if test "x$test_cygdrive_prefix" = x; then
18171    # As a simple fix, exclude /usr/bin since it's not a real path.
18172    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18174      # a path prefixed by /cygdrive for fixpath to work.
18175      new_path="$CYGWIN_ROOT_PATH$input_path"
18176    fi
18177  fi
18178
18179  # remove trailing .exe if any
18180  new_path="${new_path/%.exe/}"
18181
18182    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18183
18184  # First separate the path from the arguments. This will split at the first
18185  # space.
18186  complete="$FOUND_MAKE"
18187  path="${complete%% *}"
18188  tmp="$complete EOL"
18189  arguments="${tmp#* }"
18190
18191  # Input might be given as Windows format, start by converting to
18192  # unix format.
18193  new_path="$path"
18194
18195  windows_path="$new_path"
18196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18197    unix_path=`$CYGPATH -u "$windows_path"`
18198    new_path="$unix_path"
18199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18201    new_path="$unix_path"
18202  fi
18203
18204
18205  # Now try to locate executable using which
18206  new_path=`$WHICH "$new_path" 2> /dev/null`
18207
18208  if test "x$new_path" = x; then
18209    # Oops. Which didn't find the executable.
18210    # The splitting of arguments from the executable at a space might have been incorrect,
18211    # since paths with space are more likely in Windows. Give it another try with the whole
18212    # argument.
18213    path="$complete"
18214    arguments="EOL"
18215    new_path="$path"
18216
18217  windows_path="$new_path"
18218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18219    unix_path=`$CYGPATH -u "$windows_path"`
18220    new_path="$unix_path"
18221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18223    new_path="$unix_path"
18224  fi
18225
18226
18227    new_path=`$WHICH "$new_path" 2> /dev/null`
18228    # bat and cmd files are not always considered executable in MSYS causing which
18229    # to not find them
18230    if test "x$new_path" = x \
18231        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18232        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18233      new_path="$path"
18234
18235  windows_path="$new_path"
18236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18237    unix_path=`$CYGPATH -u "$windows_path"`
18238    new_path="$unix_path"
18239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18241    new_path="$unix_path"
18242  fi
18243
18244    fi
18245
18246    if test "x$new_path" = x; then
18247      # It's still not found. Now this is an unrecoverable error.
18248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18249$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18250      has_space=`$ECHO "$complete" | $GREP " "`
18251      if test "x$has_space" != x; then
18252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18254      fi
18255      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18256    fi
18257  fi
18258
18259  # Now new_path has a complete unix path to the binary
18260  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18261    # Keep paths in /bin as-is, but remove trailing .exe if any
18262    new_path="${new_path/%.exe/}"
18263    # Do not save /bin paths to all_fixpath_prefixes!
18264  else
18265    # Not in mixed or Windows style, start by that.
18266    new_path=`cmd //c echo $new_path`
18267
18268  input_path="$new_path"
18269  # Check if we need to convert this using DOS-style short mode. If the path
18270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18271  # take no chances and rewrite it.
18272  # Note: m4 eats our [], so we need to use [ and ] instead.
18273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18274  if test "x$has_forbidden_chars" != x; then
18275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18277  fi
18278
18279    # Output is in $new_path
18280
18281  windows_path="$new_path"
18282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18283    unix_path=`$CYGPATH -u "$windows_path"`
18284    new_path="$unix_path"
18285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18287    new_path="$unix_path"
18288  fi
18289
18290    # remove trailing .exe if any
18291    new_path="${new_path/%.exe/}"
18292
18293    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18294    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18295  fi
18296
18297    else
18298      # We're on a unix platform. Hooray! :)
18299      # First separate the path from the arguments. This will split at the first
18300      # space.
18301      complete="$FOUND_MAKE"
18302      path="${complete%% *}"
18303      tmp="$complete EOL"
18304      arguments="${tmp#* }"
18305
18306      # Cannot rely on the command "which" here since it doesn't always work.
18307      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18308      if test -z "$is_absolute_path"; then
18309        # Path to executable is not absolute. Find it.
18310        IFS_save="$IFS"
18311        IFS=:
18312        for p in $PATH; do
18313          if test -f "$p/$path" && test -x "$p/$path"; then
18314            new_path="$p/$path"
18315            break
18316          fi
18317        done
18318        IFS="$IFS_save"
18319      else
18320        # This is an absolute path, we can use it without further modifications.
18321        new_path="$path"
18322      fi
18323
18324      if test "x$new_path" = x; then
18325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18326$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18327        has_space=`$ECHO "$complete" | $GREP " "`
18328        if test "x$has_space" != x; then
18329          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18330$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18331        fi
18332        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18333      fi
18334    fi
18335
18336    # Now join together the path and the arguments once again
18337    if test "x$arguments" != xEOL; then
18338      new_complete="$new_path ${arguments% *}"
18339    else
18340      new_complete="$new_path"
18341    fi
18342
18343    if test "x$complete" != "x$new_complete"; then
18344      FOUND_MAKE="$new_complete"
18345      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18346$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18347    fi
18348  fi
18349
18350        fi
18351      fi
18352    fi
18353  fi
18354
18355    fi
18356
18357    if test "x$FOUND_MAKE" = x; then
18358      if test "x$TOOLCHAIN_PATH" != x; then
18359        # We have a toolchain path, check that as well before giving up.
18360        OLD_PATH=$PATH
18361        PATH=$TOOLCHAIN_PATH:$PATH
18362        for ac_prog in gmake
18363do
18364  # Extract the first word of "$ac_prog", so it can be a program name with args.
18365set dummy $ac_prog; ac_word=$2
18366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18367$as_echo_n "checking for $ac_word... " >&6; }
18368if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18369  $as_echo_n "(cached) " >&6
18370else
18371  case $CHECK_TOOLSDIR_GMAKE in
18372  [\\/]* | ?:[\\/]*)
18373  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18374  ;;
18375  *)
18376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18377for as_dir in $PATH
18378do
18379  IFS=$as_save_IFS
18380  test -z "$as_dir" && as_dir=.
18381    for ac_exec_ext in '' $ac_executable_extensions; do
18382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18383    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18385    break 2
18386  fi
18387done
18388  done
18389IFS=$as_save_IFS
18390
18391  ;;
18392esac
18393fi
18394CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18395if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18397$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18398else
18399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18400$as_echo "no" >&6; }
18401fi
18402
18403
18404  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18405done
18406
18407
18408  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18409  DESCRIPTION="gmake in tools-dir"
18410
18411  # On Cygwin, we require a newer version of make than on other platforms
18412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18413    MAKE_VERSION_EXPR="-e 4\."
18414    MAKE_REQUIRED_VERSION="4.0"
18415   else
18416    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18417    MAKE_REQUIRED_VERSION="3.81"
18418  fi
18419
18420  if test "x$MAKE_CANDIDATE" != x; then
18421    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18422$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18423    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18424    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18425    if test "x$IS_GNU_MAKE" = x; then
18426      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18427$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18428    else
18429      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18430      if test "x$IS_MODERN_MAKE" = x; then
18431        { $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
18432$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;}
18433      else
18434        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18435          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18436            MAKE_EXPECTED_ENV='cygwin'
18437          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18438            MAKE_EXPECTED_ENV='msys'
18439          else
18440            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18441          fi
18442          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18443          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18444        else
18445          # Not relevant for non-Windows
18446          IS_MAKE_CORRECT_ENV=true
18447        fi
18448        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18449          { $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
18450$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;}
18451        else
18452          FOUND_MAKE=$MAKE_CANDIDATE
18453
18454  # Only process if variable expands to non-empty
18455
18456  if test "x$FOUND_MAKE" != x; then
18457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18458
18459  # First separate the path from the arguments. This will split at the first
18460  # space.
18461  complete="$FOUND_MAKE"
18462  path="${complete%% *}"
18463  tmp="$complete EOL"
18464  arguments="${tmp#* }"
18465
18466  # Input might be given as Windows format, start by converting to
18467  # unix format.
18468  new_path=`$CYGPATH -u "$path"`
18469
18470  # Now try to locate executable using which
18471  new_path=`$WHICH "$new_path" 2> /dev/null`
18472  # bat and cmd files are not always considered executable in cygwin causing which
18473  # to not find them
18474  if test "x$new_path" = x \
18475      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18476      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18477    new_path=`$CYGPATH -u "$path"`
18478  fi
18479  if test "x$new_path" = x; then
18480    # Oops. Which didn't find the executable.
18481    # The splitting of arguments from the executable at a space might have been incorrect,
18482    # since paths with space are more likely in Windows. Give it another try with the whole
18483    # argument.
18484    path="$complete"
18485    arguments="EOL"
18486    new_path=`$CYGPATH -u "$path"`
18487    new_path=`$WHICH "$new_path" 2> /dev/null`
18488    # bat and cmd files are not always considered executable in cygwin causing which
18489    # to not find them
18490    if test "x$new_path" = x \
18491        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18492        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18493      new_path=`$CYGPATH -u "$path"`
18494    fi
18495    if test "x$new_path" = x; then
18496      # It's still not found. Now this is an unrecoverable error.
18497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18498$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18499      has_space=`$ECHO "$complete" | $GREP " "`
18500      if test "x$has_space" != x; then
18501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18503      fi
18504      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18505    fi
18506  fi
18507
18508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18511  # "foo.exe" is OK but "foo" is an error.
18512  #
18513  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18514  # It is also a way to make sure we got the proper file name for the real test later on.
18515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18516  if test "x$test_shortpath" = x; then
18517    # Short path failed, file does not exist as specified.
18518    # Try adding .exe or .cmd
18519    if test -f "${new_path}.exe"; then
18520      input_to_shortpath="${new_path}.exe"
18521    elif test -f "${new_path}.cmd"; then
18522      input_to_shortpath="${new_path}.cmd"
18523    else
18524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18525$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18526      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18527$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18528      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18529    fi
18530  else
18531    input_to_shortpath="$new_path"
18532  fi
18533
18534  # Call helper function which possibly converts this using DOS-style short mode.
18535  # If so, the updated path is stored in $new_path.
18536  new_path="$input_to_shortpath"
18537
18538  input_path="$input_to_shortpath"
18539  # Check if we need to convert this using DOS-style short mode. If the path
18540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18541  # take no chances and rewrite it.
18542  # Note: m4 eats our [], so we need to use [ and ] instead.
18543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18544  if test "x$has_forbidden_chars" != x; then
18545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18549      # Going to short mode and back again did indeed matter. Since short mode is
18550      # case insensitive, let's make it lowercase to improve readability.
18551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18552      # Now convert it back to Unix-style (cygpath)
18553      input_path=`$CYGPATH -u "$shortmode_path"`
18554      new_path="$input_path"
18555    fi
18556  fi
18557
18558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18559  if test "x$test_cygdrive_prefix" = x; then
18560    # As a simple fix, exclude /usr/bin since it's not a real path.
18561    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18563      # a path prefixed by /cygdrive for fixpath to work.
18564      new_path="$CYGWIN_ROOT_PATH$input_path"
18565    fi
18566  fi
18567
18568  # remove trailing .exe if any
18569  new_path="${new_path/%.exe/}"
18570
18571    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18572
18573  # First separate the path from the arguments. This will split at the first
18574  # space.
18575  complete="$FOUND_MAKE"
18576  path="${complete%% *}"
18577  tmp="$complete EOL"
18578  arguments="${tmp#* }"
18579
18580  # Input might be given as Windows format, start by converting to
18581  # unix format.
18582  new_path="$path"
18583
18584  windows_path="$new_path"
18585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18586    unix_path=`$CYGPATH -u "$windows_path"`
18587    new_path="$unix_path"
18588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18590    new_path="$unix_path"
18591  fi
18592
18593
18594  # Now try to locate executable using which
18595  new_path=`$WHICH "$new_path" 2> /dev/null`
18596
18597  if test "x$new_path" = x; then
18598    # Oops. Which didn't find the executable.
18599    # The splitting of arguments from the executable at a space might have been incorrect,
18600    # since paths with space are more likely in Windows. Give it another try with the whole
18601    # argument.
18602    path="$complete"
18603    arguments="EOL"
18604    new_path="$path"
18605
18606  windows_path="$new_path"
18607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18608    unix_path=`$CYGPATH -u "$windows_path"`
18609    new_path="$unix_path"
18610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18612    new_path="$unix_path"
18613  fi
18614
18615
18616    new_path=`$WHICH "$new_path" 2> /dev/null`
18617    # bat and cmd files are not always considered executable in MSYS causing which
18618    # to not find them
18619    if test "x$new_path" = x \
18620        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18621        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18622      new_path="$path"
18623
18624  windows_path="$new_path"
18625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18626    unix_path=`$CYGPATH -u "$windows_path"`
18627    new_path="$unix_path"
18628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18630    new_path="$unix_path"
18631  fi
18632
18633    fi
18634
18635    if test "x$new_path" = x; then
18636      # It's still not found. Now this is an unrecoverable error.
18637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18638$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18639      has_space=`$ECHO "$complete" | $GREP " "`
18640      if test "x$has_space" != x; then
18641        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18642$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18643      fi
18644      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18645    fi
18646  fi
18647
18648  # Now new_path has a complete unix path to the binary
18649  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18650    # Keep paths in /bin as-is, but remove trailing .exe if any
18651    new_path="${new_path/%.exe/}"
18652    # Do not save /bin paths to all_fixpath_prefixes!
18653  else
18654    # Not in mixed or Windows style, start by that.
18655    new_path=`cmd //c echo $new_path`
18656
18657  input_path="$new_path"
18658  # Check if we need to convert this using DOS-style short mode. If the path
18659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18660  # take no chances and rewrite it.
18661  # Note: m4 eats our [], so we need to use [ and ] instead.
18662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18663  if test "x$has_forbidden_chars" != x; then
18664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18666  fi
18667
18668    # Output is in $new_path
18669
18670  windows_path="$new_path"
18671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18672    unix_path=`$CYGPATH -u "$windows_path"`
18673    new_path="$unix_path"
18674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18676    new_path="$unix_path"
18677  fi
18678
18679    # remove trailing .exe if any
18680    new_path="${new_path/%.exe/}"
18681
18682    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18683    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18684  fi
18685
18686    else
18687      # We're on a unix platform. Hooray! :)
18688      # First separate the path from the arguments. This will split at the first
18689      # space.
18690      complete="$FOUND_MAKE"
18691      path="${complete%% *}"
18692      tmp="$complete EOL"
18693      arguments="${tmp#* }"
18694
18695      # Cannot rely on the command "which" here since it doesn't always work.
18696      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18697      if test -z "$is_absolute_path"; then
18698        # Path to executable is not absolute. Find it.
18699        IFS_save="$IFS"
18700        IFS=:
18701        for p in $PATH; do
18702          if test -f "$p/$path" && test -x "$p/$path"; then
18703            new_path="$p/$path"
18704            break
18705          fi
18706        done
18707        IFS="$IFS_save"
18708      else
18709        # This is an absolute path, we can use it without further modifications.
18710        new_path="$path"
18711      fi
18712
18713      if test "x$new_path" = x; then
18714        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18715$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18716        has_space=`$ECHO "$complete" | $GREP " "`
18717        if test "x$has_space" != x; then
18718          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18719$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18720        fi
18721        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18722      fi
18723    fi
18724
18725    # Now join together the path and the arguments once again
18726    if test "x$arguments" != xEOL; then
18727      new_complete="$new_path ${arguments% *}"
18728    else
18729      new_complete="$new_path"
18730    fi
18731
18732    if test "x$complete" != "x$new_complete"; then
18733      FOUND_MAKE="$new_complete"
18734      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18735$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18736    fi
18737  fi
18738
18739        fi
18740      fi
18741    fi
18742  fi
18743
18744        if test "x$FOUND_MAKE" = x; then
18745          for ac_prog in make
18746do
18747  # Extract the first word of "$ac_prog", so it can be a program name with args.
18748set dummy $ac_prog; ac_word=$2
18749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18750$as_echo_n "checking for $ac_word... " >&6; }
18751if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18752  $as_echo_n "(cached) " >&6
18753else
18754  case $CHECK_TOOLSDIR_MAKE in
18755  [\\/]* | ?:[\\/]*)
18756  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18757  ;;
18758  *)
18759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18760for as_dir in $PATH
18761do
18762  IFS=$as_save_IFS
18763  test -z "$as_dir" && as_dir=.
18764    for ac_exec_ext in '' $ac_executable_extensions; do
18765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18766    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18768    break 2
18769  fi
18770done
18771  done
18772IFS=$as_save_IFS
18773
18774  ;;
18775esac
18776fi
18777CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18778if test -n "$CHECK_TOOLSDIR_MAKE"; then
18779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18780$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18781else
18782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18783$as_echo "no" >&6; }
18784fi
18785
18786
18787  test -n "$CHECK_TOOLSDIR_MAKE" && break
18788done
18789
18790
18791  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18792  DESCRIPTION="make in tools-dir"
18793
18794  # On Cygwin, we require a newer version of make than on other platforms
18795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18796    MAKE_VERSION_EXPR="-e 4\."
18797    MAKE_REQUIRED_VERSION="4.0"
18798   else
18799    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18800    MAKE_REQUIRED_VERSION="3.81"
18801  fi
18802
18803  if test "x$MAKE_CANDIDATE" != x; then
18804    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18805$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18806    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18807    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18808    if test "x$IS_GNU_MAKE" = x; then
18809      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18810$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18811    else
18812      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18813      if test "x$IS_MODERN_MAKE" = x; then
18814        { $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
18815$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;}
18816      else
18817        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18818          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18819            MAKE_EXPECTED_ENV='cygwin'
18820          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18821            MAKE_EXPECTED_ENV='msys'
18822          else
18823            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18824          fi
18825          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18826          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18827        else
18828          # Not relevant for non-Windows
18829          IS_MAKE_CORRECT_ENV=true
18830        fi
18831        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18832          { $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
18833$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;}
18834        else
18835          FOUND_MAKE=$MAKE_CANDIDATE
18836
18837  # Only process if variable expands to non-empty
18838
18839  if test "x$FOUND_MAKE" != x; then
18840    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18841
18842  # First separate the path from the arguments. This will split at the first
18843  # space.
18844  complete="$FOUND_MAKE"
18845  path="${complete%% *}"
18846  tmp="$complete EOL"
18847  arguments="${tmp#* }"
18848
18849  # Input might be given as Windows format, start by converting to
18850  # unix format.
18851  new_path=`$CYGPATH -u "$path"`
18852
18853  # Now try to locate executable using which
18854  new_path=`$WHICH "$new_path" 2> /dev/null`
18855  # bat and cmd files are not always considered executable in cygwin causing which
18856  # to not find them
18857  if test "x$new_path" = x \
18858      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18859      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18860    new_path=`$CYGPATH -u "$path"`
18861  fi
18862  if test "x$new_path" = x; then
18863    # Oops. Which didn't find the executable.
18864    # The splitting of arguments from the executable at a space might have been incorrect,
18865    # since paths with space are more likely in Windows. Give it another try with the whole
18866    # argument.
18867    path="$complete"
18868    arguments="EOL"
18869    new_path=`$CYGPATH -u "$path"`
18870    new_path=`$WHICH "$new_path" 2> /dev/null`
18871    # bat and cmd files are not always considered executable in cygwin causing which
18872    # to not find them
18873    if test "x$new_path" = x \
18874        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18875        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18876      new_path=`$CYGPATH -u "$path"`
18877    fi
18878    if test "x$new_path" = x; then
18879      # It's still not found. Now this is an unrecoverable error.
18880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18881$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18882      has_space=`$ECHO "$complete" | $GREP " "`
18883      if test "x$has_space" != x; then
18884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18886      fi
18887      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18888    fi
18889  fi
18890
18891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18894  # "foo.exe" is OK but "foo" is an error.
18895  #
18896  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18897  # It is also a way to make sure we got the proper file name for the real test later on.
18898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18899  if test "x$test_shortpath" = x; then
18900    # Short path failed, file does not exist as specified.
18901    # Try adding .exe or .cmd
18902    if test -f "${new_path}.exe"; then
18903      input_to_shortpath="${new_path}.exe"
18904    elif test -f "${new_path}.cmd"; then
18905      input_to_shortpath="${new_path}.cmd"
18906    else
18907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18908$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18909      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18910$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18911      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18912    fi
18913  else
18914    input_to_shortpath="$new_path"
18915  fi
18916
18917  # Call helper function which possibly converts this using DOS-style short mode.
18918  # If so, the updated path is stored in $new_path.
18919  new_path="$input_to_shortpath"
18920
18921  input_path="$input_to_shortpath"
18922  # Check if we need to convert this using DOS-style short mode. If the path
18923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18924  # take no chances and rewrite it.
18925  # Note: m4 eats our [], so we need to use [ and ] instead.
18926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18927  if test "x$has_forbidden_chars" != x; then
18928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18932      # Going to short mode and back again did indeed matter. Since short mode is
18933      # case insensitive, let's make it lowercase to improve readability.
18934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18935      # Now convert it back to Unix-style (cygpath)
18936      input_path=`$CYGPATH -u "$shortmode_path"`
18937      new_path="$input_path"
18938    fi
18939  fi
18940
18941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18942  if test "x$test_cygdrive_prefix" = x; then
18943    # As a simple fix, exclude /usr/bin since it's not a real path.
18944    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18946      # a path prefixed by /cygdrive for fixpath to work.
18947      new_path="$CYGWIN_ROOT_PATH$input_path"
18948    fi
18949  fi
18950
18951  # remove trailing .exe if any
18952  new_path="${new_path/%.exe/}"
18953
18954    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18955
18956  # First separate the path from the arguments. This will split at the first
18957  # space.
18958  complete="$FOUND_MAKE"
18959  path="${complete%% *}"
18960  tmp="$complete EOL"
18961  arguments="${tmp#* }"
18962
18963  # Input might be given as Windows format, start by converting to
18964  # unix format.
18965  new_path="$path"
18966
18967  windows_path="$new_path"
18968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18969    unix_path=`$CYGPATH -u "$windows_path"`
18970    new_path="$unix_path"
18971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18973    new_path="$unix_path"
18974  fi
18975
18976
18977  # Now try to locate executable using which
18978  new_path=`$WHICH "$new_path" 2> /dev/null`
18979
18980  if test "x$new_path" = x; then
18981    # Oops. Which didn't find the executable.
18982    # The splitting of arguments from the executable at a space might have been incorrect,
18983    # since paths with space are more likely in Windows. Give it another try with the whole
18984    # argument.
18985    path="$complete"
18986    arguments="EOL"
18987    new_path="$path"
18988
18989  windows_path="$new_path"
18990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18991    unix_path=`$CYGPATH -u "$windows_path"`
18992    new_path="$unix_path"
18993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18995    new_path="$unix_path"
18996  fi
18997
18998
18999    new_path=`$WHICH "$new_path" 2> /dev/null`
19000    # bat and cmd files are not always considered executable in MSYS causing which
19001    # to not find them
19002    if test "x$new_path" = x \
19003        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19004        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19005      new_path="$path"
19006
19007  windows_path="$new_path"
19008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19009    unix_path=`$CYGPATH -u "$windows_path"`
19010    new_path="$unix_path"
19011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19013    new_path="$unix_path"
19014  fi
19015
19016    fi
19017
19018    if test "x$new_path" = x; then
19019      # It's still not found. Now this is an unrecoverable error.
19020      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19021$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19022      has_space=`$ECHO "$complete" | $GREP " "`
19023      if test "x$has_space" != x; then
19024        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19025$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19026      fi
19027      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19028    fi
19029  fi
19030
19031  # Now new_path has a complete unix path to the binary
19032  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19033    # Keep paths in /bin as-is, but remove trailing .exe if any
19034    new_path="${new_path/%.exe/}"
19035    # Do not save /bin paths to all_fixpath_prefixes!
19036  else
19037    # Not in mixed or Windows style, start by that.
19038    new_path=`cmd //c echo $new_path`
19039
19040  input_path="$new_path"
19041  # Check if we need to convert this using DOS-style short mode. If the path
19042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19043  # take no chances and rewrite it.
19044  # Note: m4 eats our [], so we need to use [ and ] instead.
19045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19046  if test "x$has_forbidden_chars" != x; then
19047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19049  fi
19050
19051    # Output is in $new_path
19052
19053  windows_path="$new_path"
19054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19055    unix_path=`$CYGPATH -u "$windows_path"`
19056    new_path="$unix_path"
19057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19059    new_path="$unix_path"
19060  fi
19061
19062    # remove trailing .exe if any
19063    new_path="${new_path/%.exe/}"
19064
19065    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19066    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19067  fi
19068
19069    else
19070      # We're on a unix platform. Hooray! :)
19071      # First separate the path from the arguments. This will split at the first
19072      # space.
19073      complete="$FOUND_MAKE"
19074      path="${complete%% *}"
19075      tmp="$complete EOL"
19076      arguments="${tmp#* }"
19077
19078      # Cannot rely on the command "which" here since it doesn't always work.
19079      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19080      if test -z "$is_absolute_path"; then
19081        # Path to executable is not absolute. Find it.
19082        IFS_save="$IFS"
19083        IFS=:
19084        for p in $PATH; do
19085          if test -f "$p/$path" && test -x "$p/$path"; then
19086            new_path="$p/$path"
19087            break
19088          fi
19089        done
19090        IFS="$IFS_save"
19091      else
19092        # This is an absolute path, we can use it without further modifications.
19093        new_path="$path"
19094      fi
19095
19096      if test "x$new_path" = x; then
19097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19098$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19099        has_space=`$ECHO "$complete" | $GREP " "`
19100        if test "x$has_space" != x; then
19101          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19102$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19103        fi
19104        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19105      fi
19106    fi
19107
19108    # Now join together the path and the arguments once again
19109    if test "x$arguments" != xEOL; then
19110      new_complete="$new_path ${arguments% *}"
19111    else
19112      new_complete="$new_path"
19113    fi
19114
19115    if test "x$complete" != "x$new_complete"; then
19116      FOUND_MAKE="$new_complete"
19117      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19118$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19119    fi
19120  fi
19121
19122        fi
19123      fi
19124    fi
19125  fi
19126
19127        fi
19128        PATH=$OLD_PATH
19129      fi
19130    fi
19131
19132    if test "x$FOUND_MAKE" = x; then
19133      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
19134    fi
19135
19136  else
19137    # The variable is set, but is it from the command line or the environment?
19138
19139    # Try to remove the string !MAKE! from our list.
19140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19142      # If it failed, the variable was not from the command line. Ignore it,
19143      # but warn the user (except for BASH, which is always set by the calling BASH).
19144      if test "xMAKE" != xBASH; then
19145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19146$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19147      fi
19148      # Try to locate tool using the code snippet
19149
19150    # Try our hardest to locate a correct version of GNU make
19151    for ac_prog in gmake
19152do
19153  # Extract the first word of "$ac_prog", so it can be a program name with args.
19154set dummy $ac_prog; ac_word=$2
19155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19156$as_echo_n "checking for $ac_word... " >&6; }
19157if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19158  $as_echo_n "(cached) " >&6
19159else
19160  case $CHECK_GMAKE in
19161  [\\/]* | ?:[\\/]*)
19162  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19163  ;;
19164  *)
19165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19166for as_dir in $PATH
19167do
19168  IFS=$as_save_IFS
19169  test -z "$as_dir" && as_dir=.
19170    for ac_exec_ext in '' $ac_executable_extensions; do
19171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19172    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19174    break 2
19175  fi
19176done
19177  done
19178IFS=$as_save_IFS
19179
19180  ;;
19181esac
19182fi
19183CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19184if test -n "$CHECK_GMAKE"; then
19185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19186$as_echo "$CHECK_GMAKE" >&6; }
19187else
19188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19189$as_echo "no" >&6; }
19190fi
19191
19192
19193  test -n "$CHECK_GMAKE" && break
19194done
19195
19196
19197  MAKE_CANDIDATE=""$CHECK_GMAKE""
19198  DESCRIPTION="gmake in PATH"
19199
19200  # On Cygwin, we require a newer version of make than on other platforms
19201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19202    MAKE_VERSION_EXPR="-e 4\."
19203    MAKE_REQUIRED_VERSION="4.0"
19204   else
19205    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19206    MAKE_REQUIRED_VERSION="3.81"
19207  fi
19208
19209  if test "x$MAKE_CANDIDATE" != x; then
19210    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19211$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19212    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19213    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19214    if test "x$IS_GNU_MAKE" = x; then
19215      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19216$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19217    else
19218      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19219      if test "x$IS_MODERN_MAKE" = x; then
19220        { $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
19221$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;}
19222      else
19223        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19224          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19225            MAKE_EXPECTED_ENV='cygwin'
19226          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19227            MAKE_EXPECTED_ENV='msys'
19228          else
19229            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19230          fi
19231          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19232          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19233        else
19234          # Not relevant for non-Windows
19235          IS_MAKE_CORRECT_ENV=true
19236        fi
19237        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19238          { $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
19239$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;}
19240        else
19241          FOUND_MAKE=$MAKE_CANDIDATE
19242
19243  # Only process if variable expands to non-empty
19244
19245  if test "x$FOUND_MAKE" != x; then
19246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19247
19248  # First separate the path from the arguments. This will split at the first
19249  # space.
19250  complete="$FOUND_MAKE"
19251  path="${complete%% *}"
19252  tmp="$complete EOL"
19253  arguments="${tmp#* }"
19254
19255  # Input might be given as Windows format, start by converting to
19256  # unix format.
19257  new_path=`$CYGPATH -u "$path"`
19258
19259  # Now try to locate executable using which
19260  new_path=`$WHICH "$new_path" 2> /dev/null`
19261  # bat and cmd files are not always considered executable in cygwin causing which
19262  # to not find them
19263  if test "x$new_path" = x \
19264      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19265      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19266    new_path=`$CYGPATH -u "$path"`
19267  fi
19268  if test "x$new_path" = x; then
19269    # Oops. Which didn't find the executable.
19270    # The splitting of arguments from the executable at a space might have been incorrect,
19271    # since paths with space are more likely in Windows. Give it another try with the whole
19272    # argument.
19273    path="$complete"
19274    arguments="EOL"
19275    new_path=`$CYGPATH -u "$path"`
19276    new_path=`$WHICH "$new_path" 2> /dev/null`
19277    # bat and cmd files are not always considered executable in cygwin causing which
19278    # to not find them
19279    if test "x$new_path" = x \
19280        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19281        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19282      new_path=`$CYGPATH -u "$path"`
19283    fi
19284    if test "x$new_path" = x; then
19285      # It's still not found. Now this is an unrecoverable error.
19286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19287$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19288      has_space=`$ECHO "$complete" | $GREP " "`
19289      if test "x$has_space" != x; then
19290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19292      fi
19293      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19294    fi
19295  fi
19296
19297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19300  # "foo.exe" is OK but "foo" is an error.
19301  #
19302  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19303  # It is also a way to make sure we got the proper file name for the real test later on.
19304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19305  if test "x$test_shortpath" = x; then
19306    # Short path failed, file does not exist as specified.
19307    # Try adding .exe or .cmd
19308    if test -f "${new_path}.exe"; then
19309      input_to_shortpath="${new_path}.exe"
19310    elif test -f "${new_path}.cmd"; then
19311      input_to_shortpath="${new_path}.cmd"
19312    else
19313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19314$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19315      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19316$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19317      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19318    fi
19319  else
19320    input_to_shortpath="$new_path"
19321  fi
19322
19323  # Call helper function which possibly converts this using DOS-style short mode.
19324  # If so, the updated path is stored in $new_path.
19325  new_path="$input_to_shortpath"
19326
19327  input_path="$input_to_shortpath"
19328  # Check if we need to convert this using DOS-style short mode. If the path
19329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19330  # take no chances and rewrite it.
19331  # Note: m4 eats our [], so we need to use [ and ] instead.
19332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19333  if test "x$has_forbidden_chars" != x; then
19334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19338      # Going to short mode and back again did indeed matter. Since short mode is
19339      # case insensitive, let's make it lowercase to improve readability.
19340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19341      # Now convert it back to Unix-style (cygpath)
19342      input_path=`$CYGPATH -u "$shortmode_path"`
19343      new_path="$input_path"
19344    fi
19345  fi
19346
19347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19348  if test "x$test_cygdrive_prefix" = x; then
19349    # As a simple fix, exclude /usr/bin since it's not a real path.
19350    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19352      # a path prefixed by /cygdrive for fixpath to work.
19353      new_path="$CYGWIN_ROOT_PATH$input_path"
19354    fi
19355  fi
19356
19357  # remove trailing .exe if any
19358  new_path="${new_path/%.exe/}"
19359
19360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19361
19362  # First separate the path from the arguments. This will split at the first
19363  # space.
19364  complete="$FOUND_MAKE"
19365  path="${complete%% *}"
19366  tmp="$complete EOL"
19367  arguments="${tmp#* }"
19368
19369  # Input might be given as Windows format, start by converting to
19370  # unix format.
19371  new_path="$path"
19372
19373  windows_path="$new_path"
19374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19375    unix_path=`$CYGPATH -u "$windows_path"`
19376    new_path="$unix_path"
19377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19379    new_path="$unix_path"
19380  fi
19381
19382
19383  # Now try to locate executable using which
19384  new_path=`$WHICH "$new_path" 2> /dev/null`
19385
19386  if test "x$new_path" = x; then
19387    # Oops. Which didn't find the executable.
19388    # The splitting of arguments from the executable at a space might have been incorrect,
19389    # since paths with space are more likely in Windows. Give it another try with the whole
19390    # argument.
19391    path="$complete"
19392    arguments="EOL"
19393    new_path="$path"
19394
19395  windows_path="$new_path"
19396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19397    unix_path=`$CYGPATH -u "$windows_path"`
19398    new_path="$unix_path"
19399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19401    new_path="$unix_path"
19402  fi
19403
19404
19405    new_path=`$WHICH "$new_path" 2> /dev/null`
19406    # bat and cmd files are not always considered executable in MSYS causing which
19407    # to not find them
19408    if test "x$new_path" = x \
19409        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19410        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19411      new_path="$path"
19412
19413  windows_path="$new_path"
19414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19415    unix_path=`$CYGPATH -u "$windows_path"`
19416    new_path="$unix_path"
19417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19419    new_path="$unix_path"
19420  fi
19421
19422    fi
19423
19424    if test "x$new_path" = x; then
19425      # It's still not found. Now this is an unrecoverable error.
19426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19427$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19428      has_space=`$ECHO "$complete" | $GREP " "`
19429      if test "x$has_space" != x; then
19430        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19431$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19432      fi
19433      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19434    fi
19435  fi
19436
19437  # Now new_path has a complete unix path to the binary
19438  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19439    # Keep paths in /bin as-is, but remove trailing .exe if any
19440    new_path="${new_path/%.exe/}"
19441    # Do not save /bin paths to all_fixpath_prefixes!
19442  else
19443    # Not in mixed or Windows style, start by that.
19444    new_path=`cmd //c echo $new_path`
19445
19446  input_path="$new_path"
19447  # Check if we need to convert this using DOS-style short mode. If the path
19448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19449  # take no chances and rewrite it.
19450  # Note: m4 eats our [], so we need to use [ and ] instead.
19451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19452  if test "x$has_forbidden_chars" != x; then
19453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19455  fi
19456
19457    # Output is in $new_path
19458
19459  windows_path="$new_path"
19460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19461    unix_path=`$CYGPATH -u "$windows_path"`
19462    new_path="$unix_path"
19463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19465    new_path="$unix_path"
19466  fi
19467
19468    # remove trailing .exe if any
19469    new_path="${new_path/%.exe/}"
19470
19471    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19472    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19473  fi
19474
19475    else
19476      # We're on a unix platform. Hooray! :)
19477      # First separate the path from the arguments. This will split at the first
19478      # space.
19479      complete="$FOUND_MAKE"
19480      path="${complete%% *}"
19481      tmp="$complete EOL"
19482      arguments="${tmp#* }"
19483
19484      # Cannot rely on the command "which" here since it doesn't always work.
19485      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19486      if test -z "$is_absolute_path"; then
19487        # Path to executable is not absolute. Find it.
19488        IFS_save="$IFS"
19489        IFS=:
19490        for p in $PATH; do
19491          if test -f "$p/$path" && test -x "$p/$path"; then
19492            new_path="$p/$path"
19493            break
19494          fi
19495        done
19496        IFS="$IFS_save"
19497      else
19498        # This is an absolute path, we can use it without further modifications.
19499        new_path="$path"
19500      fi
19501
19502      if test "x$new_path" = x; then
19503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19504$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19505        has_space=`$ECHO "$complete" | $GREP " "`
19506        if test "x$has_space" != x; then
19507          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19508$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19509        fi
19510        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19511      fi
19512    fi
19513
19514    # Now join together the path and the arguments once again
19515    if test "x$arguments" != xEOL; then
19516      new_complete="$new_path ${arguments% *}"
19517    else
19518      new_complete="$new_path"
19519    fi
19520
19521    if test "x$complete" != "x$new_complete"; then
19522      FOUND_MAKE="$new_complete"
19523      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19524$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19525    fi
19526  fi
19527
19528        fi
19529      fi
19530    fi
19531  fi
19532
19533
19534    if test "x$FOUND_MAKE" = x; then
19535      for ac_prog in make
19536do
19537  # Extract the first word of "$ac_prog", so it can be a program name with args.
19538set dummy $ac_prog; ac_word=$2
19539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19540$as_echo_n "checking for $ac_word... " >&6; }
19541if ${ac_cv_path_CHECK_MAKE+:} false; then :
19542  $as_echo_n "(cached) " >&6
19543else
19544  case $CHECK_MAKE in
19545  [\\/]* | ?:[\\/]*)
19546  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19547  ;;
19548  *)
19549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19550for as_dir in $PATH
19551do
19552  IFS=$as_save_IFS
19553  test -z "$as_dir" && as_dir=.
19554    for ac_exec_ext in '' $ac_executable_extensions; do
19555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19556    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19558    break 2
19559  fi
19560done
19561  done
19562IFS=$as_save_IFS
19563
19564  ;;
19565esac
19566fi
19567CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19568if test -n "$CHECK_MAKE"; then
19569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19570$as_echo "$CHECK_MAKE" >&6; }
19571else
19572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19573$as_echo "no" >&6; }
19574fi
19575
19576
19577  test -n "$CHECK_MAKE" && break
19578done
19579
19580
19581  MAKE_CANDIDATE=""$CHECK_MAKE""
19582  DESCRIPTION="make in PATH"
19583
19584  # On Cygwin, we require a newer version of make than on other platforms
19585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19586    MAKE_VERSION_EXPR="-e 4\."
19587    MAKE_REQUIRED_VERSION="4.0"
19588   else
19589    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19590    MAKE_REQUIRED_VERSION="3.81"
19591  fi
19592
19593  if test "x$MAKE_CANDIDATE" != x; then
19594    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19595$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19596    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19597    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19598    if test "x$IS_GNU_MAKE" = x; then
19599      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19600$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19601    else
19602      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19603      if test "x$IS_MODERN_MAKE" = x; then
19604        { $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
19605$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;}
19606      else
19607        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19608          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19609            MAKE_EXPECTED_ENV='cygwin'
19610          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19611            MAKE_EXPECTED_ENV='msys'
19612          else
19613            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19614          fi
19615          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19616          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19617        else
19618          # Not relevant for non-Windows
19619          IS_MAKE_CORRECT_ENV=true
19620        fi
19621        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19622          { $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
19623$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;}
19624        else
19625          FOUND_MAKE=$MAKE_CANDIDATE
19626
19627  # Only process if variable expands to non-empty
19628
19629  if test "x$FOUND_MAKE" != x; then
19630    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19631
19632  # First separate the path from the arguments. This will split at the first
19633  # space.
19634  complete="$FOUND_MAKE"
19635  path="${complete%% *}"
19636  tmp="$complete EOL"
19637  arguments="${tmp#* }"
19638
19639  # Input might be given as Windows format, start by converting to
19640  # unix format.
19641  new_path=`$CYGPATH -u "$path"`
19642
19643  # Now try to locate executable using which
19644  new_path=`$WHICH "$new_path" 2> /dev/null`
19645  # bat and cmd files are not always considered executable in cygwin causing which
19646  # to not find them
19647  if test "x$new_path" = x \
19648      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19649      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19650    new_path=`$CYGPATH -u "$path"`
19651  fi
19652  if test "x$new_path" = x; then
19653    # Oops. Which didn't find the executable.
19654    # The splitting of arguments from the executable at a space might have been incorrect,
19655    # since paths with space are more likely in Windows. Give it another try with the whole
19656    # argument.
19657    path="$complete"
19658    arguments="EOL"
19659    new_path=`$CYGPATH -u "$path"`
19660    new_path=`$WHICH "$new_path" 2> /dev/null`
19661    # bat and cmd files are not always considered executable in cygwin causing which
19662    # to not find them
19663    if test "x$new_path" = x \
19664        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19665        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19666      new_path=`$CYGPATH -u "$path"`
19667    fi
19668    if test "x$new_path" = x; then
19669      # It's still not found. Now this is an unrecoverable error.
19670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19671$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19672      has_space=`$ECHO "$complete" | $GREP " "`
19673      if test "x$has_space" != x; then
19674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19676      fi
19677      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19678    fi
19679  fi
19680
19681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19684  # "foo.exe" is OK but "foo" is an error.
19685  #
19686  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19687  # It is also a way to make sure we got the proper file name for the real test later on.
19688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19689  if test "x$test_shortpath" = x; then
19690    # Short path failed, file does not exist as specified.
19691    # Try adding .exe or .cmd
19692    if test -f "${new_path}.exe"; then
19693      input_to_shortpath="${new_path}.exe"
19694    elif test -f "${new_path}.cmd"; then
19695      input_to_shortpath="${new_path}.cmd"
19696    else
19697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19698$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19699      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19700$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19701      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19702    fi
19703  else
19704    input_to_shortpath="$new_path"
19705  fi
19706
19707  # Call helper function which possibly converts this using DOS-style short mode.
19708  # If so, the updated path is stored in $new_path.
19709  new_path="$input_to_shortpath"
19710
19711  input_path="$input_to_shortpath"
19712  # Check if we need to convert this using DOS-style short mode. If the path
19713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19714  # take no chances and rewrite it.
19715  # Note: m4 eats our [], so we need to use [ and ] instead.
19716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19717  if test "x$has_forbidden_chars" != x; then
19718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19722      # Going to short mode and back again did indeed matter. Since short mode is
19723      # case insensitive, let's make it lowercase to improve readability.
19724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19725      # Now convert it back to Unix-style (cygpath)
19726      input_path=`$CYGPATH -u "$shortmode_path"`
19727      new_path="$input_path"
19728    fi
19729  fi
19730
19731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19732  if test "x$test_cygdrive_prefix" = x; then
19733    # As a simple fix, exclude /usr/bin since it's not a real path.
19734    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19736      # a path prefixed by /cygdrive for fixpath to work.
19737      new_path="$CYGWIN_ROOT_PATH$input_path"
19738    fi
19739  fi
19740
19741  # remove trailing .exe if any
19742  new_path="${new_path/%.exe/}"
19743
19744    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19745
19746  # First separate the path from the arguments. This will split at the first
19747  # space.
19748  complete="$FOUND_MAKE"
19749  path="${complete%% *}"
19750  tmp="$complete EOL"
19751  arguments="${tmp#* }"
19752
19753  # Input might be given as Windows format, start by converting to
19754  # unix format.
19755  new_path="$path"
19756
19757  windows_path="$new_path"
19758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19759    unix_path=`$CYGPATH -u "$windows_path"`
19760    new_path="$unix_path"
19761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19763    new_path="$unix_path"
19764  fi
19765
19766
19767  # Now try to locate executable using which
19768  new_path=`$WHICH "$new_path" 2> /dev/null`
19769
19770  if test "x$new_path" = x; then
19771    # Oops. Which didn't find the executable.
19772    # The splitting of arguments from the executable at a space might have been incorrect,
19773    # since paths with space are more likely in Windows. Give it another try with the whole
19774    # argument.
19775    path="$complete"
19776    arguments="EOL"
19777    new_path="$path"
19778
19779  windows_path="$new_path"
19780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19781    unix_path=`$CYGPATH -u "$windows_path"`
19782    new_path="$unix_path"
19783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19785    new_path="$unix_path"
19786  fi
19787
19788
19789    new_path=`$WHICH "$new_path" 2> /dev/null`
19790    # bat and cmd files are not always considered executable in MSYS causing which
19791    # to not find them
19792    if test "x$new_path" = x \
19793        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19794        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19795      new_path="$path"
19796
19797  windows_path="$new_path"
19798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19799    unix_path=`$CYGPATH -u "$windows_path"`
19800    new_path="$unix_path"
19801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19803    new_path="$unix_path"
19804  fi
19805
19806    fi
19807
19808    if test "x$new_path" = x; then
19809      # It's still not found. Now this is an unrecoverable error.
19810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19811$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19812      has_space=`$ECHO "$complete" | $GREP " "`
19813      if test "x$has_space" != x; then
19814        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19815$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19816      fi
19817      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19818    fi
19819  fi
19820
19821  # Now new_path has a complete unix path to the binary
19822  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19823    # Keep paths in /bin as-is, but remove trailing .exe if any
19824    new_path="${new_path/%.exe/}"
19825    # Do not save /bin paths to all_fixpath_prefixes!
19826  else
19827    # Not in mixed or Windows style, start by that.
19828    new_path=`cmd //c echo $new_path`
19829
19830  input_path="$new_path"
19831  # Check if we need to convert this using DOS-style short mode. If the path
19832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19833  # take no chances and rewrite it.
19834  # Note: m4 eats our [], so we need to use [ and ] instead.
19835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19836  if test "x$has_forbidden_chars" != x; then
19837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19839  fi
19840
19841    # Output is in $new_path
19842
19843  windows_path="$new_path"
19844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19845    unix_path=`$CYGPATH -u "$windows_path"`
19846    new_path="$unix_path"
19847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19849    new_path="$unix_path"
19850  fi
19851
19852    # remove trailing .exe if any
19853    new_path="${new_path/%.exe/}"
19854
19855    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19856    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19857  fi
19858
19859    else
19860      # We're on a unix platform. Hooray! :)
19861      # First separate the path from the arguments. This will split at the first
19862      # space.
19863      complete="$FOUND_MAKE"
19864      path="${complete%% *}"
19865      tmp="$complete EOL"
19866      arguments="${tmp#* }"
19867
19868      # Cannot rely on the command "which" here since it doesn't always work.
19869      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19870      if test -z "$is_absolute_path"; then
19871        # Path to executable is not absolute. Find it.
19872        IFS_save="$IFS"
19873        IFS=:
19874        for p in $PATH; do
19875          if test -f "$p/$path" && test -x "$p/$path"; then
19876            new_path="$p/$path"
19877            break
19878          fi
19879        done
19880        IFS="$IFS_save"
19881      else
19882        # This is an absolute path, we can use it without further modifications.
19883        new_path="$path"
19884      fi
19885
19886      if test "x$new_path" = x; then
19887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19888$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19889        has_space=`$ECHO "$complete" | $GREP " "`
19890        if test "x$has_space" != x; then
19891          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19892$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19893        fi
19894        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19895      fi
19896    fi
19897
19898    # Now join together the path and the arguments once again
19899    if test "x$arguments" != xEOL; then
19900      new_complete="$new_path ${arguments% *}"
19901    else
19902      new_complete="$new_path"
19903    fi
19904
19905    if test "x$complete" != "x$new_complete"; then
19906      FOUND_MAKE="$new_complete"
19907      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19908$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19909    fi
19910  fi
19911
19912        fi
19913      fi
19914    fi
19915  fi
19916
19917    fi
19918
19919    if test "x$FOUND_MAKE" = x; then
19920      if test "x$TOOLCHAIN_PATH" != x; then
19921        # We have a toolchain path, check that as well before giving up.
19922        OLD_PATH=$PATH
19923        PATH=$TOOLCHAIN_PATH:$PATH
19924        for ac_prog in gmake
19925do
19926  # Extract the first word of "$ac_prog", so it can be a program name with args.
19927set dummy $ac_prog; ac_word=$2
19928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19929$as_echo_n "checking for $ac_word... " >&6; }
19930if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19931  $as_echo_n "(cached) " >&6
19932else
19933  case $CHECK_TOOLSDIR_GMAKE in
19934  [\\/]* | ?:[\\/]*)
19935  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19936  ;;
19937  *)
19938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19939for as_dir in $PATH
19940do
19941  IFS=$as_save_IFS
19942  test -z "$as_dir" && as_dir=.
19943    for ac_exec_ext in '' $ac_executable_extensions; do
19944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19945    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19947    break 2
19948  fi
19949done
19950  done
19951IFS=$as_save_IFS
19952
19953  ;;
19954esac
19955fi
19956CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19957if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19959$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19960else
19961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19962$as_echo "no" >&6; }
19963fi
19964
19965
19966  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19967done
19968
19969
19970  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19971  DESCRIPTION="gmake in tools-dir"
19972
19973  # On Cygwin, we require a newer version of make than on other platforms
19974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19975    MAKE_VERSION_EXPR="-e 4\."
19976    MAKE_REQUIRED_VERSION="4.0"
19977   else
19978    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19979    MAKE_REQUIRED_VERSION="3.81"
19980  fi
19981
19982  if test "x$MAKE_CANDIDATE" != x; then
19983    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19984$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19985    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19986    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19987    if test "x$IS_GNU_MAKE" = x; then
19988      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19989$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19990    else
19991      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19992      if test "x$IS_MODERN_MAKE" = x; then
19993        { $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
19994$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;}
19995      else
19996        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19997          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19998            MAKE_EXPECTED_ENV='cygwin'
19999          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20000            MAKE_EXPECTED_ENV='msys'
20001          else
20002            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20003          fi
20004          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20005          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20006        else
20007          # Not relevant for non-Windows
20008          IS_MAKE_CORRECT_ENV=true
20009        fi
20010        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20011          { $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
20012$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;}
20013        else
20014          FOUND_MAKE=$MAKE_CANDIDATE
20015
20016  # Only process if variable expands to non-empty
20017
20018  if test "x$FOUND_MAKE" != x; then
20019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20020
20021  # First separate the path from the arguments. This will split at the first
20022  # space.
20023  complete="$FOUND_MAKE"
20024  path="${complete%% *}"
20025  tmp="$complete EOL"
20026  arguments="${tmp#* }"
20027
20028  # Input might be given as Windows format, start by converting to
20029  # unix format.
20030  new_path=`$CYGPATH -u "$path"`
20031
20032  # Now try to locate executable using which
20033  new_path=`$WHICH "$new_path" 2> /dev/null`
20034  # bat and cmd files are not always considered executable in cygwin causing which
20035  # to not find them
20036  if test "x$new_path" = x \
20037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20039    new_path=`$CYGPATH -u "$path"`
20040  fi
20041  if test "x$new_path" = x; then
20042    # Oops. Which didn't find the executable.
20043    # The splitting of arguments from the executable at a space might have been incorrect,
20044    # since paths with space are more likely in Windows. Give it another try with the whole
20045    # argument.
20046    path="$complete"
20047    arguments="EOL"
20048    new_path=`$CYGPATH -u "$path"`
20049    new_path=`$WHICH "$new_path" 2> /dev/null`
20050    # bat and cmd files are not always considered executable in cygwin causing which
20051    # to not find them
20052    if test "x$new_path" = x \
20053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20055      new_path=`$CYGPATH -u "$path"`
20056    fi
20057    if test "x$new_path" = x; then
20058      # It's still not found. Now this is an unrecoverable error.
20059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20060$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20061      has_space=`$ECHO "$complete" | $GREP " "`
20062      if test "x$has_space" != x; then
20063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20065      fi
20066      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20067    fi
20068  fi
20069
20070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20073  # "foo.exe" is OK but "foo" is an error.
20074  #
20075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20076  # It is also a way to make sure we got the proper file name for the real test later on.
20077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20078  if test "x$test_shortpath" = x; then
20079    # Short path failed, file does not exist as specified.
20080    # Try adding .exe or .cmd
20081    if test -f "${new_path}.exe"; then
20082      input_to_shortpath="${new_path}.exe"
20083    elif test -f "${new_path}.cmd"; then
20084      input_to_shortpath="${new_path}.cmd"
20085    else
20086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20087$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20090      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20091    fi
20092  else
20093    input_to_shortpath="$new_path"
20094  fi
20095
20096  # Call helper function which possibly converts this using DOS-style short mode.
20097  # If so, the updated path is stored in $new_path.
20098  new_path="$input_to_shortpath"
20099
20100  input_path="$input_to_shortpath"
20101  # Check if we need to convert this using DOS-style short mode. If the path
20102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20103  # take no chances and rewrite it.
20104  # Note: m4 eats our [], so we need to use [ and ] instead.
20105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20106  if test "x$has_forbidden_chars" != x; then
20107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20111      # Going to short mode and back again did indeed matter. Since short mode is
20112      # case insensitive, let's make it lowercase to improve readability.
20113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20114      # Now convert it back to Unix-style (cygpath)
20115      input_path=`$CYGPATH -u "$shortmode_path"`
20116      new_path="$input_path"
20117    fi
20118  fi
20119
20120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20121  if test "x$test_cygdrive_prefix" = x; then
20122    # As a simple fix, exclude /usr/bin since it's not a real path.
20123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20125      # a path prefixed by /cygdrive for fixpath to work.
20126      new_path="$CYGWIN_ROOT_PATH$input_path"
20127    fi
20128  fi
20129
20130  # remove trailing .exe if any
20131  new_path="${new_path/%.exe/}"
20132
20133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20134
20135  # First separate the path from the arguments. This will split at the first
20136  # space.
20137  complete="$FOUND_MAKE"
20138  path="${complete%% *}"
20139  tmp="$complete EOL"
20140  arguments="${tmp#* }"
20141
20142  # Input might be given as Windows format, start by converting to
20143  # unix format.
20144  new_path="$path"
20145
20146  windows_path="$new_path"
20147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20148    unix_path=`$CYGPATH -u "$windows_path"`
20149    new_path="$unix_path"
20150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20152    new_path="$unix_path"
20153  fi
20154
20155
20156  # Now try to locate executable using which
20157  new_path=`$WHICH "$new_path" 2> /dev/null`
20158
20159  if test "x$new_path" = x; then
20160    # Oops. Which didn't find the executable.
20161    # The splitting of arguments from the executable at a space might have been incorrect,
20162    # since paths with space are more likely in Windows. Give it another try with the whole
20163    # argument.
20164    path="$complete"
20165    arguments="EOL"
20166    new_path="$path"
20167
20168  windows_path="$new_path"
20169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20170    unix_path=`$CYGPATH -u "$windows_path"`
20171    new_path="$unix_path"
20172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20174    new_path="$unix_path"
20175  fi
20176
20177
20178    new_path=`$WHICH "$new_path" 2> /dev/null`
20179    # bat and cmd files are not always considered executable in MSYS causing which
20180    # to not find them
20181    if test "x$new_path" = x \
20182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20184      new_path="$path"
20185
20186  windows_path="$new_path"
20187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20188    unix_path=`$CYGPATH -u "$windows_path"`
20189    new_path="$unix_path"
20190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20192    new_path="$unix_path"
20193  fi
20194
20195    fi
20196
20197    if test "x$new_path" = x; then
20198      # It's still not found. Now this is an unrecoverable error.
20199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20200$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20201      has_space=`$ECHO "$complete" | $GREP " "`
20202      if test "x$has_space" != x; then
20203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20205      fi
20206      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20207    fi
20208  fi
20209
20210  # Now new_path has a complete unix path to the binary
20211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20212    # Keep paths in /bin as-is, but remove trailing .exe if any
20213    new_path="${new_path/%.exe/}"
20214    # Do not save /bin paths to all_fixpath_prefixes!
20215  else
20216    # Not in mixed or Windows style, start by that.
20217    new_path=`cmd //c echo $new_path`
20218
20219  input_path="$new_path"
20220  # Check if we need to convert this using DOS-style short mode. If the path
20221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20222  # take no chances and rewrite it.
20223  # Note: m4 eats our [], so we need to use [ and ] instead.
20224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20225  if test "x$has_forbidden_chars" != x; then
20226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20228  fi
20229
20230    # Output is in $new_path
20231
20232  windows_path="$new_path"
20233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20234    unix_path=`$CYGPATH -u "$windows_path"`
20235    new_path="$unix_path"
20236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20238    new_path="$unix_path"
20239  fi
20240
20241    # remove trailing .exe if any
20242    new_path="${new_path/%.exe/}"
20243
20244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20246  fi
20247
20248    else
20249      # We're on a unix platform. Hooray! :)
20250      # First separate the path from the arguments. This will split at the first
20251      # space.
20252      complete="$FOUND_MAKE"
20253      path="${complete%% *}"
20254      tmp="$complete EOL"
20255      arguments="${tmp#* }"
20256
20257      # Cannot rely on the command "which" here since it doesn't always work.
20258      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20259      if test -z "$is_absolute_path"; then
20260        # Path to executable is not absolute. Find it.
20261        IFS_save="$IFS"
20262        IFS=:
20263        for p in $PATH; do
20264          if test -f "$p/$path" && test -x "$p/$path"; then
20265            new_path="$p/$path"
20266            break
20267          fi
20268        done
20269        IFS="$IFS_save"
20270      else
20271        # This is an absolute path, we can use it without further modifications.
20272        new_path="$path"
20273      fi
20274
20275      if test "x$new_path" = x; then
20276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20277$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20278        has_space=`$ECHO "$complete" | $GREP " "`
20279        if test "x$has_space" != x; then
20280          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20282        fi
20283        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20284      fi
20285    fi
20286
20287    # Now join together the path and the arguments once again
20288    if test "x$arguments" != xEOL; then
20289      new_complete="$new_path ${arguments% *}"
20290    else
20291      new_complete="$new_path"
20292    fi
20293
20294    if test "x$complete" != "x$new_complete"; then
20295      FOUND_MAKE="$new_complete"
20296      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20297$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20298    fi
20299  fi
20300
20301        fi
20302      fi
20303    fi
20304  fi
20305
20306        if test "x$FOUND_MAKE" = x; then
20307          for ac_prog in make
20308do
20309  # Extract the first word of "$ac_prog", so it can be a program name with args.
20310set dummy $ac_prog; ac_word=$2
20311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20312$as_echo_n "checking for $ac_word... " >&6; }
20313if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20314  $as_echo_n "(cached) " >&6
20315else
20316  case $CHECK_TOOLSDIR_MAKE in
20317  [\\/]* | ?:[\\/]*)
20318  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20319  ;;
20320  *)
20321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20322for as_dir in $PATH
20323do
20324  IFS=$as_save_IFS
20325  test -z "$as_dir" && as_dir=.
20326    for ac_exec_ext in '' $ac_executable_extensions; do
20327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20328    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20330    break 2
20331  fi
20332done
20333  done
20334IFS=$as_save_IFS
20335
20336  ;;
20337esac
20338fi
20339CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20340if test -n "$CHECK_TOOLSDIR_MAKE"; then
20341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20342$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20343else
20344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20345$as_echo "no" >&6; }
20346fi
20347
20348
20349  test -n "$CHECK_TOOLSDIR_MAKE" && break
20350done
20351
20352
20353  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20354  DESCRIPTION="make in tools-dir"
20355
20356  # On Cygwin, we require a newer version of make than on other platforms
20357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20358    MAKE_VERSION_EXPR="-e 4\."
20359    MAKE_REQUIRED_VERSION="4.0"
20360   else
20361    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20362    MAKE_REQUIRED_VERSION="3.81"
20363  fi
20364
20365  if test "x$MAKE_CANDIDATE" != x; then
20366    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20367$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20368    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20369    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20370    if test "x$IS_GNU_MAKE" = x; then
20371      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20372$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20373    else
20374      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20375      if test "x$IS_MODERN_MAKE" = x; then
20376        { $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
20377$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;}
20378      else
20379        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20380          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20381            MAKE_EXPECTED_ENV='cygwin'
20382          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20383            MAKE_EXPECTED_ENV='msys'
20384          else
20385            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20386          fi
20387          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20388          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20389        else
20390          # Not relevant for non-Windows
20391          IS_MAKE_CORRECT_ENV=true
20392        fi
20393        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20394          { $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
20395$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;}
20396        else
20397          FOUND_MAKE=$MAKE_CANDIDATE
20398
20399  # Only process if variable expands to non-empty
20400
20401  if test "x$FOUND_MAKE" != x; then
20402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20403
20404  # First separate the path from the arguments. This will split at the first
20405  # space.
20406  complete="$FOUND_MAKE"
20407  path="${complete%% *}"
20408  tmp="$complete EOL"
20409  arguments="${tmp#* }"
20410
20411  # Input might be given as Windows format, start by converting to
20412  # unix format.
20413  new_path=`$CYGPATH -u "$path"`
20414
20415  # Now try to locate executable using which
20416  new_path=`$WHICH "$new_path" 2> /dev/null`
20417  # bat and cmd files are not always considered executable in cygwin causing which
20418  # to not find them
20419  if test "x$new_path" = x \
20420      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20421      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20422    new_path=`$CYGPATH -u "$path"`
20423  fi
20424  if test "x$new_path" = x; then
20425    # Oops. Which didn't find the executable.
20426    # The splitting of arguments from the executable at a space might have been incorrect,
20427    # since paths with space are more likely in Windows. Give it another try with the whole
20428    # argument.
20429    path="$complete"
20430    arguments="EOL"
20431    new_path=`$CYGPATH -u "$path"`
20432    new_path=`$WHICH "$new_path" 2> /dev/null`
20433    # bat and cmd files are not always considered executable in cygwin causing which
20434    # to not find them
20435    if test "x$new_path" = x \
20436        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20437        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20438      new_path=`$CYGPATH -u "$path"`
20439    fi
20440    if test "x$new_path" = x; then
20441      # It's still not found. Now this is an unrecoverable error.
20442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20443$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20444      has_space=`$ECHO "$complete" | $GREP " "`
20445      if test "x$has_space" != x; then
20446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20448      fi
20449      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20450    fi
20451  fi
20452
20453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20456  # "foo.exe" is OK but "foo" is an error.
20457  #
20458  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20459  # It is also a way to make sure we got the proper file name for the real test later on.
20460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20461  if test "x$test_shortpath" = x; then
20462    # Short path failed, file does not exist as specified.
20463    # Try adding .exe or .cmd
20464    if test -f "${new_path}.exe"; then
20465      input_to_shortpath="${new_path}.exe"
20466    elif test -f "${new_path}.cmd"; then
20467      input_to_shortpath="${new_path}.cmd"
20468    else
20469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20470$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20471      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20472$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20473      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20474    fi
20475  else
20476    input_to_shortpath="$new_path"
20477  fi
20478
20479  # Call helper function which possibly converts this using DOS-style short mode.
20480  # If so, the updated path is stored in $new_path.
20481  new_path="$input_to_shortpath"
20482
20483  input_path="$input_to_shortpath"
20484  # Check if we need to convert this using DOS-style short mode. If the path
20485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20486  # take no chances and rewrite it.
20487  # Note: m4 eats our [], so we need to use [ and ] instead.
20488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20489  if test "x$has_forbidden_chars" != x; then
20490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20494      # Going to short mode and back again did indeed matter. Since short mode is
20495      # case insensitive, let's make it lowercase to improve readability.
20496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20497      # Now convert it back to Unix-style (cygpath)
20498      input_path=`$CYGPATH -u "$shortmode_path"`
20499      new_path="$input_path"
20500    fi
20501  fi
20502
20503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20504  if test "x$test_cygdrive_prefix" = x; then
20505    # As a simple fix, exclude /usr/bin since it's not a real path.
20506    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20508      # a path prefixed by /cygdrive for fixpath to work.
20509      new_path="$CYGWIN_ROOT_PATH$input_path"
20510    fi
20511  fi
20512
20513  # remove trailing .exe if any
20514  new_path="${new_path/%.exe/}"
20515
20516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20517
20518  # First separate the path from the arguments. This will split at the first
20519  # space.
20520  complete="$FOUND_MAKE"
20521  path="${complete%% *}"
20522  tmp="$complete EOL"
20523  arguments="${tmp#* }"
20524
20525  # Input might be given as Windows format, start by converting to
20526  # unix format.
20527  new_path="$path"
20528
20529  windows_path="$new_path"
20530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20531    unix_path=`$CYGPATH -u "$windows_path"`
20532    new_path="$unix_path"
20533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20535    new_path="$unix_path"
20536  fi
20537
20538
20539  # Now try to locate executable using which
20540  new_path=`$WHICH "$new_path" 2> /dev/null`
20541
20542  if test "x$new_path" = x; then
20543    # Oops. Which didn't find the executable.
20544    # The splitting of arguments from the executable at a space might have been incorrect,
20545    # since paths with space are more likely in Windows. Give it another try with the whole
20546    # argument.
20547    path="$complete"
20548    arguments="EOL"
20549    new_path="$path"
20550
20551  windows_path="$new_path"
20552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20553    unix_path=`$CYGPATH -u "$windows_path"`
20554    new_path="$unix_path"
20555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20557    new_path="$unix_path"
20558  fi
20559
20560
20561    new_path=`$WHICH "$new_path" 2> /dev/null`
20562    # bat and cmd files are not always considered executable in MSYS causing which
20563    # to not find them
20564    if test "x$new_path" = x \
20565        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20566        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20567      new_path="$path"
20568
20569  windows_path="$new_path"
20570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20571    unix_path=`$CYGPATH -u "$windows_path"`
20572    new_path="$unix_path"
20573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20575    new_path="$unix_path"
20576  fi
20577
20578    fi
20579
20580    if test "x$new_path" = x; then
20581      # It's still not found. Now this is an unrecoverable error.
20582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20583$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20584      has_space=`$ECHO "$complete" | $GREP " "`
20585      if test "x$has_space" != x; then
20586        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20587$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20588      fi
20589      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20590    fi
20591  fi
20592
20593  # Now new_path has a complete unix path to the binary
20594  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20595    # Keep paths in /bin as-is, but remove trailing .exe if any
20596    new_path="${new_path/%.exe/}"
20597    # Do not save /bin paths to all_fixpath_prefixes!
20598  else
20599    # Not in mixed or Windows style, start by that.
20600    new_path=`cmd //c echo $new_path`
20601
20602  input_path="$new_path"
20603  # Check if we need to convert this using DOS-style short mode. If the path
20604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20605  # take no chances and rewrite it.
20606  # Note: m4 eats our [], so we need to use [ and ] instead.
20607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20608  if test "x$has_forbidden_chars" != x; then
20609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20611  fi
20612
20613    # Output is in $new_path
20614
20615  windows_path="$new_path"
20616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20617    unix_path=`$CYGPATH -u "$windows_path"`
20618    new_path="$unix_path"
20619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20621    new_path="$unix_path"
20622  fi
20623
20624    # remove trailing .exe if any
20625    new_path="${new_path/%.exe/}"
20626
20627    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20628    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20629  fi
20630
20631    else
20632      # We're on a unix platform. Hooray! :)
20633      # First separate the path from the arguments. This will split at the first
20634      # space.
20635      complete="$FOUND_MAKE"
20636      path="${complete%% *}"
20637      tmp="$complete EOL"
20638      arguments="${tmp#* }"
20639
20640      # Cannot rely on the command "which" here since it doesn't always work.
20641      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20642      if test -z "$is_absolute_path"; then
20643        # Path to executable is not absolute. Find it.
20644        IFS_save="$IFS"
20645        IFS=:
20646        for p in $PATH; do
20647          if test -f "$p/$path" && test -x "$p/$path"; then
20648            new_path="$p/$path"
20649            break
20650          fi
20651        done
20652        IFS="$IFS_save"
20653      else
20654        # This is an absolute path, we can use it without further modifications.
20655        new_path="$path"
20656      fi
20657
20658      if test "x$new_path" = x; then
20659        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20660$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20661        has_space=`$ECHO "$complete" | $GREP " "`
20662        if test "x$has_space" != x; then
20663          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20664$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20665        fi
20666        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20667      fi
20668    fi
20669
20670    # Now join together the path and the arguments once again
20671    if test "x$arguments" != xEOL; then
20672      new_complete="$new_path ${arguments% *}"
20673    else
20674      new_complete="$new_path"
20675    fi
20676
20677    if test "x$complete" != "x$new_complete"; then
20678      FOUND_MAKE="$new_complete"
20679      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20680$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20681    fi
20682  fi
20683
20684        fi
20685      fi
20686    fi
20687  fi
20688
20689        fi
20690        PATH=$OLD_PATH
20691      fi
20692    fi
20693
20694    if test "x$FOUND_MAKE" = x; then
20695      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
20696    fi
20697
20698    else
20699      # If it succeeded, then it was overridden by the user. We will use it
20700      # for the tool.
20701
20702      # First remove it from the list of overridden variables, so we can test
20703      # for unknown variables in the end.
20704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20705
20706      # Check if we try to supply an empty value
20707      if test "x$MAKE" = x; then
20708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20709$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20711$as_echo_n "checking for MAKE... " >&6; }
20712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20713$as_echo "disabled" >&6; }
20714      else
20715        # Check if the provided tool contains a complete path.
20716        tool_specified="$MAKE"
20717        tool_basename="${tool_specified##*/}"
20718        if test "x$tool_basename" = "x$tool_specified"; then
20719          # A command without a complete path is provided, search $PATH.
20720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20721$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20722          # Extract the first word of "$tool_basename", so it can be a program name with args.
20723set dummy $tool_basename; ac_word=$2
20724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20725$as_echo_n "checking for $ac_word... " >&6; }
20726if ${ac_cv_path_MAKE+:} false; then :
20727  $as_echo_n "(cached) " >&6
20728else
20729  case $MAKE in
20730  [\\/]* | ?:[\\/]*)
20731  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20732  ;;
20733  *)
20734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20735for as_dir in $PATH
20736do
20737  IFS=$as_save_IFS
20738  test -z "$as_dir" && as_dir=.
20739    for ac_exec_ext in '' $ac_executable_extensions; do
20740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20741    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20743    break 2
20744  fi
20745done
20746  done
20747IFS=$as_save_IFS
20748
20749  ;;
20750esac
20751fi
20752MAKE=$ac_cv_path_MAKE
20753if test -n "$MAKE"; then
20754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20755$as_echo "$MAKE" >&6; }
20756else
20757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20758$as_echo "no" >&6; }
20759fi
20760
20761
20762          if test "x$MAKE" = x; then
20763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20764          fi
20765        else
20766          # Otherwise we believe it is a complete path. Use it as it is.
20767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20768$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20770$as_echo_n "checking for MAKE... " >&6; }
20771          if test ! -x "$tool_specified"; then
20772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20773$as_echo "not found" >&6; }
20774            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20775          fi
20776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20777$as_echo "$tool_specified" >&6; }
20778        fi
20779      fi
20780    fi
20781
20782    # If MAKE was set by user, verify the version
20783
20784  MAKE_CANDIDATE=""$MAKE""
20785  DESCRIPTION="user supplied MAKE=$MAKE"
20786
20787  # On Cygwin, we require a newer version of make than on other platforms
20788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20789    MAKE_VERSION_EXPR="-e 4\."
20790    MAKE_REQUIRED_VERSION="4.0"
20791   else
20792    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20793    MAKE_REQUIRED_VERSION="3.81"
20794  fi
20795
20796  if test "x$MAKE_CANDIDATE" != x; then
20797    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20798$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20799    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20800    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20801    if test "x$IS_GNU_MAKE" = x; then
20802      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20803$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20804    else
20805      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20806      if test "x$IS_MODERN_MAKE" = x; then
20807        { $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
20808$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;}
20809      else
20810        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20811          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20812            MAKE_EXPECTED_ENV='cygwin'
20813          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20814            MAKE_EXPECTED_ENV='msys'
20815          else
20816            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20817          fi
20818          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20819          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20820        else
20821          # Not relevant for non-Windows
20822          IS_MAKE_CORRECT_ENV=true
20823        fi
20824        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20825          { $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
20826$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;}
20827        else
20828          FOUND_MAKE=$MAKE_CANDIDATE
20829
20830  # Only process if variable expands to non-empty
20831
20832  if test "x$FOUND_MAKE" != x; then
20833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20834
20835  # First separate the path from the arguments. This will split at the first
20836  # space.
20837  complete="$FOUND_MAKE"
20838  path="${complete%% *}"
20839  tmp="$complete EOL"
20840  arguments="${tmp#* }"
20841
20842  # Input might be given as Windows format, start by converting to
20843  # unix format.
20844  new_path=`$CYGPATH -u "$path"`
20845
20846  # Now try to locate executable using which
20847  new_path=`$WHICH "$new_path" 2> /dev/null`
20848  # bat and cmd files are not always considered executable in cygwin causing which
20849  # to not find them
20850  if test "x$new_path" = x \
20851      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20852      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20853    new_path=`$CYGPATH -u "$path"`
20854  fi
20855  if test "x$new_path" = x; then
20856    # Oops. Which didn't find the executable.
20857    # The splitting of arguments from the executable at a space might have been incorrect,
20858    # since paths with space are more likely in Windows. Give it another try with the whole
20859    # argument.
20860    path="$complete"
20861    arguments="EOL"
20862    new_path=`$CYGPATH -u "$path"`
20863    new_path=`$WHICH "$new_path" 2> /dev/null`
20864    # bat and cmd files are not always considered executable in cygwin causing which
20865    # to not find them
20866    if test "x$new_path" = x \
20867        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20868        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20869      new_path=`$CYGPATH -u "$path"`
20870    fi
20871    if test "x$new_path" = x; then
20872      # It's still not found. Now this is an unrecoverable error.
20873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20874$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20875      has_space=`$ECHO "$complete" | $GREP " "`
20876      if test "x$has_space" != x; then
20877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20879      fi
20880      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20881    fi
20882  fi
20883
20884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20887  # "foo.exe" is OK but "foo" is an error.
20888  #
20889  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20890  # It is also a way to make sure we got the proper file name for the real test later on.
20891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20892  if test "x$test_shortpath" = x; then
20893    # Short path failed, file does not exist as specified.
20894    # Try adding .exe or .cmd
20895    if test -f "${new_path}.exe"; then
20896      input_to_shortpath="${new_path}.exe"
20897    elif test -f "${new_path}.cmd"; then
20898      input_to_shortpath="${new_path}.cmd"
20899    else
20900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20901$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20902      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20903$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20904      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20905    fi
20906  else
20907    input_to_shortpath="$new_path"
20908  fi
20909
20910  # Call helper function which possibly converts this using DOS-style short mode.
20911  # If so, the updated path is stored in $new_path.
20912  new_path="$input_to_shortpath"
20913
20914  input_path="$input_to_shortpath"
20915  # Check if we need to convert this using DOS-style short mode. If the path
20916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20917  # take no chances and rewrite it.
20918  # Note: m4 eats our [], so we need to use [ and ] instead.
20919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20920  if test "x$has_forbidden_chars" != x; then
20921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20925      # Going to short mode and back again did indeed matter. Since short mode is
20926      # case insensitive, let's make it lowercase to improve readability.
20927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20928      # Now convert it back to Unix-style (cygpath)
20929      input_path=`$CYGPATH -u "$shortmode_path"`
20930      new_path="$input_path"
20931    fi
20932  fi
20933
20934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20935  if test "x$test_cygdrive_prefix" = x; then
20936    # As a simple fix, exclude /usr/bin since it's not a real path.
20937    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20939      # a path prefixed by /cygdrive for fixpath to work.
20940      new_path="$CYGWIN_ROOT_PATH$input_path"
20941    fi
20942  fi
20943
20944  # remove trailing .exe if any
20945  new_path="${new_path/%.exe/}"
20946
20947    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20948
20949  # First separate the path from the arguments. This will split at the first
20950  # space.
20951  complete="$FOUND_MAKE"
20952  path="${complete%% *}"
20953  tmp="$complete EOL"
20954  arguments="${tmp#* }"
20955
20956  # Input might be given as Windows format, start by converting to
20957  # unix format.
20958  new_path="$path"
20959
20960  windows_path="$new_path"
20961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20962    unix_path=`$CYGPATH -u "$windows_path"`
20963    new_path="$unix_path"
20964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20966    new_path="$unix_path"
20967  fi
20968
20969
20970  # Now try to locate executable using which
20971  new_path=`$WHICH "$new_path" 2> /dev/null`
20972
20973  if test "x$new_path" = x; then
20974    # Oops. Which didn't find the executable.
20975    # The splitting of arguments from the executable at a space might have been incorrect,
20976    # since paths with space are more likely in Windows. Give it another try with the whole
20977    # argument.
20978    path="$complete"
20979    arguments="EOL"
20980    new_path="$path"
20981
20982  windows_path="$new_path"
20983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20984    unix_path=`$CYGPATH -u "$windows_path"`
20985    new_path="$unix_path"
20986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20988    new_path="$unix_path"
20989  fi
20990
20991
20992    new_path=`$WHICH "$new_path" 2> /dev/null`
20993    # bat and cmd files are not always considered executable in MSYS causing which
20994    # to not find them
20995    if test "x$new_path" = x \
20996        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20997        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20998      new_path="$path"
20999
21000  windows_path="$new_path"
21001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21002    unix_path=`$CYGPATH -u "$windows_path"`
21003    new_path="$unix_path"
21004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21006    new_path="$unix_path"
21007  fi
21008
21009    fi
21010
21011    if test "x$new_path" = x; then
21012      # It's still not found. Now this is an unrecoverable error.
21013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21014$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21015      has_space=`$ECHO "$complete" | $GREP " "`
21016      if test "x$has_space" != x; then
21017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21019      fi
21020      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21021    fi
21022  fi
21023
21024  # Now new_path has a complete unix path to the binary
21025  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21026    # Keep paths in /bin as-is, but remove trailing .exe if any
21027    new_path="${new_path/%.exe/}"
21028    # Do not save /bin paths to all_fixpath_prefixes!
21029  else
21030    # Not in mixed or Windows style, start by that.
21031    new_path=`cmd //c echo $new_path`
21032
21033  input_path="$new_path"
21034  # Check if we need to convert this using DOS-style short mode. If the path
21035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21036  # take no chances and rewrite it.
21037  # Note: m4 eats our [], so we need to use [ and ] instead.
21038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21039  if test "x$has_forbidden_chars" != x; then
21040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21042  fi
21043
21044    # Output is in $new_path
21045
21046  windows_path="$new_path"
21047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21048    unix_path=`$CYGPATH -u "$windows_path"`
21049    new_path="$unix_path"
21050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21052    new_path="$unix_path"
21053  fi
21054
21055    # remove trailing .exe if any
21056    new_path="${new_path/%.exe/}"
21057
21058    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21059    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21060  fi
21061
21062    else
21063      # We're on a unix platform. Hooray! :)
21064      # First separate the path from the arguments. This will split at the first
21065      # space.
21066      complete="$FOUND_MAKE"
21067      path="${complete%% *}"
21068      tmp="$complete EOL"
21069      arguments="${tmp#* }"
21070
21071      # Cannot rely on the command "which" here since it doesn't always work.
21072      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21073      if test -z "$is_absolute_path"; then
21074        # Path to executable is not absolute. Find it.
21075        IFS_save="$IFS"
21076        IFS=:
21077        for p in $PATH; do
21078          if test -f "$p/$path" && test -x "$p/$path"; then
21079            new_path="$p/$path"
21080            break
21081          fi
21082        done
21083        IFS="$IFS_save"
21084      else
21085        # This is an absolute path, we can use it without further modifications.
21086        new_path="$path"
21087      fi
21088
21089      if test "x$new_path" = x; then
21090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21091$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21092        has_space=`$ECHO "$complete" | $GREP " "`
21093        if test "x$has_space" != x; then
21094          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21095$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21096        fi
21097        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21098      fi
21099    fi
21100
21101    # Now join together the path and the arguments once again
21102    if test "x$arguments" != xEOL; then
21103      new_complete="$new_path ${arguments% *}"
21104    else
21105      new_complete="$new_path"
21106    fi
21107
21108    if test "x$complete" != "x$new_complete"; then
21109      FOUND_MAKE="$new_complete"
21110      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21111$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21112    fi
21113  fi
21114
21115        fi
21116      fi
21117    fi
21118  fi
21119
21120    if test "x$FOUND_MAKE" = x; then
21121      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21122    fi
21123
21124  fi
21125
21126
21127  MAKE=$FOUND_MAKE
21128
21129  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21130$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21131
21132
21133  # Check if make supports the output sync option and if so, setup using it.
21134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21135$as_echo_n "checking if make --output-sync is supported... " >&6; }
21136  if $MAKE --version -O > /dev/null 2>&1; then
21137    OUTPUT_SYNC_SUPPORTED=true
21138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21139$as_echo "yes" >&6; }
21140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21141$as_echo_n "checking for output-sync value... " >&6; }
21142
21143# Check whether --with-output-sync was given.
21144if test "${with_output_sync+set}" = set; then :
21145  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21146fi
21147
21148    if test "x$OUTPUT_SYNC" = "x"; then
21149      OUTPUT_SYNC=none
21150    fi
21151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21152$as_echo "$OUTPUT_SYNC" >&6; }
21153    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21154      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21155    fi
21156  else
21157    OUTPUT_SYNC_SUPPORTED=false
21158    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21159$as_echo "no" >&6; }
21160  fi
21161
21162
21163
21164
21165
21166
21167  # Test if find supports -delete
21168  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21169$as_echo_n "checking if find supports -delete... " >&6; }
21170  FIND_DELETE="-delete"
21171
21172  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21173
21174  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21175
21176  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21177  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21178    # No, it does not.
21179    $RM $DELETEDIR/TestIfFindSupportsDelete
21180    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21181      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21182      FIND_DELETE="-print | $XARGS $RM"
21183    else
21184      FIND_DELETE="-exec $RM \{\} \+"
21185    fi
21186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21187$as_echo "no" >&6; }
21188  else
21189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21190$as_echo "yes" >&6; }
21191  fi
21192  $RMDIR $DELETEDIR
21193
21194
21195
21196  # Test which kind of tar was found
21197  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21198    TAR_TYPE="gnu"
21199  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21200    TAR_TYPE="bsd"
21201  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21202    TAR_TYPE="bsd"
21203  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21204    TAR_TYPE="solaris"
21205  fi
21206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21207$as_echo_n "checking what type of tar was found... " >&6; }
21208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21209$as_echo "$TAR_TYPE" >&6; }
21210
21211  TAR_CREATE_FILE_PARAM=""
21212
21213  if test "x$TAR_TYPE" = "xgnu"; then
21214    TAR_INCLUDE_PARAM="T"
21215    TAR_SUPPORTS_TRANSFORM="true"
21216    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21217      # When using gnu tar for Solaris targets, need to use compatibility mode
21218      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21219    fi
21220  else
21221    TAR_INCLUDE_PARAM="I"
21222    TAR_SUPPORTS_TRANSFORM="false"
21223  fi
21224
21225
21226
21227
21228
21229
21230  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21231  # This is a problem for the grep resident on AIX.
21232  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21233$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21234  # Multiple subsequent spaces..
21235  STACK_SPACES='aaa   bbb   ccc'
21236  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21237  # patterns in it.
21238  STACK_LIST=${STACK_SPACES// /$'\n'}
21239  NEEDLE_SPACES='ccc bbb aaa'
21240  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21241  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21242  if test "x$RESULT" == "x"; then
21243    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21244$as_echo "yes" >&6; }
21245  else
21246    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21247      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21248    fi
21249    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21250  fi
21251
21252
21253  # These tools might not be installed by default,
21254  # need hint on how to install them.
21255
21256
21257
21258  # Publish this variable in the help.
21259
21260
21261  if [ -z "${UNZIP+x}" ]; then
21262    # The variable is not set by user, try to locate tool using the code snippet
21263    for ac_prog in unzip
21264do
21265  # Extract the first word of "$ac_prog", so it can be a program name with args.
21266set dummy $ac_prog; ac_word=$2
21267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21268$as_echo_n "checking for $ac_word... " >&6; }
21269if ${ac_cv_path_UNZIP+:} false; then :
21270  $as_echo_n "(cached) " >&6
21271else
21272  case $UNZIP in
21273  [\\/]* | ?:[\\/]*)
21274  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21275  ;;
21276  *)
21277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21278for as_dir in $PATH
21279do
21280  IFS=$as_save_IFS
21281  test -z "$as_dir" && as_dir=.
21282    for ac_exec_ext in '' $ac_executable_extensions; do
21283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21284    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21286    break 2
21287  fi
21288done
21289  done
21290IFS=$as_save_IFS
21291
21292  ;;
21293esac
21294fi
21295UNZIP=$ac_cv_path_UNZIP
21296if test -n "$UNZIP"; then
21297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21298$as_echo "$UNZIP" >&6; }
21299else
21300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21301$as_echo "no" >&6; }
21302fi
21303
21304
21305  test -n "$UNZIP" && break
21306done
21307
21308  else
21309    # The variable is set, but is it from the command line or the environment?
21310
21311    # Try to remove the string !UNZIP! from our list.
21312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21314      # If it failed, the variable was not from the command line. Ignore it,
21315      # but warn the user (except for BASH, which is always set by the calling BASH).
21316      if test "xUNZIP" != xBASH; then
21317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21318$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21319      fi
21320      # Try to locate tool using the code snippet
21321      for ac_prog in unzip
21322do
21323  # Extract the first word of "$ac_prog", so it can be a program name with args.
21324set dummy $ac_prog; ac_word=$2
21325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21326$as_echo_n "checking for $ac_word... " >&6; }
21327if ${ac_cv_path_UNZIP+:} false; then :
21328  $as_echo_n "(cached) " >&6
21329else
21330  case $UNZIP in
21331  [\\/]* | ?:[\\/]*)
21332  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21333  ;;
21334  *)
21335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21336for as_dir in $PATH
21337do
21338  IFS=$as_save_IFS
21339  test -z "$as_dir" && as_dir=.
21340    for ac_exec_ext in '' $ac_executable_extensions; do
21341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21342    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21344    break 2
21345  fi
21346done
21347  done
21348IFS=$as_save_IFS
21349
21350  ;;
21351esac
21352fi
21353UNZIP=$ac_cv_path_UNZIP
21354if test -n "$UNZIP"; then
21355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21356$as_echo "$UNZIP" >&6; }
21357else
21358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21359$as_echo "no" >&6; }
21360fi
21361
21362
21363  test -n "$UNZIP" && break
21364done
21365
21366    else
21367      # If it succeeded, then it was overridden by the user. We will use it
21368      # for the tool.
21369
21370      # First remove it from the list of overridden variables, so we can test
21371      # for unknown variables in the end.
21372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21373
21374      # Check if we try to supply an empty value
21375      if test "x$UNZIP" = x; then
21376        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21377$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21379$as_echo_n "checking for UNZIP... " >&6; }
21380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21381$as_echo "disabled" >&6; }
21382      else
21383        # Check if the provided tool contains a complete path.
21384        tool_specified="$UNZIP"
21385        tool_basename="${tool_specified##*/}"
21386        if test "x$tool_basename" = "x$tool_specified"; then
21387          # A command without a complete path is provided, search $PATH.
21388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21389$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21390          # Extract the first word of "$tool_basename", so it can be a program name with args.
21391set dummy $tool_basename; ac_word=$2
21392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21393$as_echo_n "checking for $ac_word... " >&6; }
21394if ${ac_cv_path_UNZIP+:} false; then :
21395  $as_echo_n "(cached) " >&6
21396else
21397  case $UNZIP in
21398  [\\/]* | ?:[\\/]*)
21399  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21400  ;;
21401  *)
21402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21403for as_dir in $PATH
21404do
21405  IFS=$as_save_IFS
21406  test -z "$as_dir" && as_dir=.
21407    for ac_exec_ext in '' $ac_executable_extensions; do
21408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21409    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21411    break 2
21412  fi
21413done
21414  done
21415IFS=$as_save_IFS
21416
21417  ;;
21418esac
21419fi
21420UNZIP=$ac_cv_path_UNZIP
21421if test -n "$UNZIP"; then
21422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21423$as_echo "$UNZIP" >&6; }
21424else
21425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21426$as_echo "no" >&6; }
21427fi
21428
21429
21430          if test "x$UNZIP" = x; then
21431            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21432          fi
21433        else
21434          # Otherwise we believe it is a complete path. Use it as it is.
21435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21436$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21437          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21438$as_echo_n "checking for UNZIP... " >&6; }
21439          if test ! -x "$tool_specified"; then
21440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21441$as_echo "not found" >&6; }
21442            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21443          fi
21444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21445$as_echo "$tool_specified" >&6; }
21446        fi
21447      fi
21448    fi
21449
21450  fi
21451
21452
21453
21454  if test "x$UNZIP" = x; then
21455    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21456  fi
21457
21458
21459  # Since zip uses "ZIP" as a environment variable for passing options, we need
21460  # to name our variable differently, hence ZIPEXE.
21461
21462
21463
21464  # Publish this variable in the help.
21465
21466
21467  if [ -z "${ZIPEXE+x}" ]; then
21468    # The variable is not set by user, try to locate tool using the code snippet
21469    for ac_prog in zip
21470do
21471  # Extract the first word of "$ac_prog", so it can be a program name with args.
21472set dummy $ac_prog; ac_word=$2
21473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21474$as_echo_n "checking for $ac_word... " >&6; }
21475if ${ac_cv_path_ZIPEXE+:} false; then :
21476  $as_echo_n "(cached) " >&6
21477else
21478  case $ZIPEXE in
21479  [\\/]* | ?:[\\/]*)
21480  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21481  ;;
21482  *)
21483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21484for as_dir in $PATH
21485do
21486  IFS=$as_save_IFS
21487  test -z "$as_dir" && as_dir=.
21488    for ac_exec_ext in '' $ac_executable_extensions; do
21489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21490    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21492    break 2
21493  fi
21494done
21495  done
21496IFS=$as_save_IFS
21497
21498  ;;
21499esac
21500fi
21501ZIPEXE=$ac_cv_path_ZIPEXE
21502if test -n "$ZIPEXE"; then
21503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21504$as_echo "$ZIPEXE" >&6; }
21505else
21506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21507$as_echo "no" >&6; }
21508fi
21509
21510
21511  test -n "$ZIPEXE" && break
21512done
21513
21514  else
21515    # The variable is set, but is it from the command line or the environment?
21516
21517    # Try to remove the string !ZIPEXE! from our list.
21518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21520      # If it failed, the variable was not from the command line. Ignore it,
21521      # but warn the user (except for BASH, which is always set by the calling BASH).
21522      if test "xZIPEXE" != xBASH; then
21523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21524$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21525      fi
21526      # Try to locate tool using the code snippet
21527      for ac_prog in zip
21528do
21529  # Extract the first word of "$ac_prog", so it can be a program name with args.
21530set dummy $ac_prog; ac_word=$2
21531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21532$as_echo_n "checking for $ac_word... " >&6; }
21533if ${ac_cv_path_ZIPEXE+:} false; then :
21534  $as_echo_n "(cached) " >&6
21535else
21536  case $ZIPEXE in
21537  [\\/]* | ?:[\\/]*)
21538  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21539  ;;
21540  *)
21541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21542for as_dir in $PATH
21543do
21544  IFS=$as_save_IFS
21545  test -z "$as_dir" && as_dir=.
21546    for ac_exec_ext in '' $ac_executable_extensions; do
21547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21548    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21550    break 2
21551  fi
21552done
21553  done
21554IFS=$as_save_IFS
21555
21556  ;;
21557esac
21558fi
21559ZIPEXE=$ac_cv_path_ZIPEXE
21560if test -n "$ZIPEXE"; then
21561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21562$as_echo "$ZIPEXE" >&6; }
21563else
21564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21565$as_echo "no" >&6; }
21566fi
21567
21568
21569  test -n "$ZIPEXE" && break
21570done
21571
21572    else
21573      # If it succeeded, then it was overridden by the user. We will use it
21574      # for the tool.
21575
21576      # First remove it from the list of overridden variables, so we can test
21577      # for unknown variables in the end.
21578      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21579
21580      # Check if we try to supply an empty value
21581      if test "x$ZIPEXE" = x; then
21582        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21583$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21584        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21585$as_echo_n "checking for ZIPEXE... " >&6; }
21586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21587$as_echo "disabled" >&6; }
21588      else
21589        # Check if the provided tool contains a complete path.
21590        tool_specified="$ZIPEXE"
21591        tool_basename="${tool_specified##*/}"
21592        if test "x$tool_basename" = "x$tool_specified"; then
21593          # A command without a complete path is provided, search $PATH.
21594          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21595$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21596          # Extract the first word of "$tool_basename", so it can be a program name with args.
21597set dummy $tool_basename; ac_word=$2
21598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21599$as_echo_n "checking for $ac_word... " >&6; }
21600if ${ac_cv_path_ZIPEXE+:} false; then :
21601  $as_echo_n "(cached) " >&6
21602else
21603  case $ZIPEXE in
21604  [\\/]* | ?:[\\/]*)
21605  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21606  ;;
21607  *)
21608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21609for as_dir in $PATH
21610do
21611  IFS=$as_save_IFS
21612  test -z "$as_dir" && as_dir=.
21613    for ac_exec_ext in '' $ac_executable_extensions; do
21614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21615    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21617    break 2
21618  fi
21619done
21620  done
21621IFS=$as_save_IFS
21622
21623  ;;
21624esac
21625fi
21626ZIPEXE=$ac_cv_path_ZIPEXE
21627if test -n "$ZIPEXE"; then
21628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21629$as_echo "$ZIPEXE" >&6; }
21630else
21631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21632$as_echo "no" >&6; }
21633fi
21634
21635
21636          if test "x$ZIPEXE" = x; then
21637            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21638          fi
21639        else
21640          # Otherwise we believe it is a complete path. Use it as it is.
21641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21642$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21643          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21644$as_echo_n "checking for ZIPEXE... " >&6; }
21645          if test ! -x "$tool_specified"; then
21646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21647$as_echo "not found" >&6; }
21648            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21649          fi
21650          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21651$as_echo "$tool_specified" >&6; }
21652        fi
21653      fi
21654    fi
21655
21656  fi
21657
21658
21659
21660  if test "x$ZIPEXE" = x; then
21661    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21662  fi
21663
21664
21665
21666  # Non-required basic tools
21667
21668
21669
21670  # Publish this variable in the help.
21671
21672
21673  if [ -z "${LDD+x}" ]; then
21674    # The variable is not set by user, try to locate tool using the code snippet
21675    for ac_prog in ldd
21676do
21677  # Extract the first word of "$ac_prog", so it can be a program name with args.
21678set dummy $ac_prog; ac_word=$2
21679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21680$as_echo_n "checking for $ac_word... " >&6; }
21681if ${ac_cv_path_LDD+:} false; then :
21682  $as_echo_n "(cached) " >&6
21683else
21684  case $LDD in
21685  [\\/]* | ?:[\\/]*)
21686  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21687  ;;
21688  *)
21689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21690for as_dir in $PATH
21691do
21692  IFS=$as_save_IFS
21693  test -z "$as_dir" && as_dir=.
21694    for ac_exec_ext in '' $ac_executable_extensions; do
21695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21696    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21698    break 2
21699  fi
21700done
21701  done
21702IFS=$as_save_IFS
21703
21704  ;;
21705esac
21706fi
21707LDD=$ac_cv_path_LDD
21708if test -n "$LDD"; then
21709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21710$as_echo "$LDD" >&6; }
21711else
21712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21713$as_echo "no" >&6; }
21714fi
21715
21716
21717  test -n "$LDD" && break
21718done
21719
21720  else
21721    # The variable is set, but is it from the command line or the environment?
21722
21723    # Try to remove the string !LDD! from our list.
21724    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21725    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21726      # If it failed, the variable was not from the command line. Ignore it,
21727      # but warn the user (except for BASH, which is always set by the calling BASH).
21728      if test "xLDD" != xBASH; then
21729        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21730$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21731      fi
21732      # Try to locate tool using the code snippet
21733      for ac_prog in ldd
21734do
21735  # Extract the first word of "$ac_prog", so it can be a program name with args.
21736set dummy $ac_prog; ac_word=$2
21737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21738$as_echo_n "checking for $ac_word... " >&6; }
21739if ${ac_cv_path_LDD+:} false; then :
21740  $as_echo_n "(cached) " >&6
21741else
21742  case $LDD in
21743  [\\/]* | ?:[\\/]*)
21744  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21745  ;;
21746  *)
21747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21748for as_dir in $PATH
21749do
21750  IFS=$as_save_IFS
21751  test -z "$as_dir" && as_dir=.
21752    for ac_exec_ext in '' $ac_executable_extensions; do
21753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21754    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21756    break 2
21757  fi
21758done
21759  done
21760IFS=$as_save_IFS
21761
21762  ;;
21763esac
21764fi
21765LDD=$ac_cv_path_LDD
21766if test -n "$LDD"; then
21767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21768$as_echo "$LDD" >&6; }
21769else
21770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21771$as_echo "no" >&6; }
21772fi
21773
21774
21775  test -n "$LDD" && break
21776done
21777
21778    else
21779      # If it succeeded, then it was overridden by the user. We will use it
21780      # for the tool.
21781
21782      # First remove it from the list of overridden variables, so we can test
21783      # for unknown variables in the end.
21784      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21785
21786      # Check if we try to supply an empty value
21787      if test "x$LDD" = x; then
21788        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21789$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21790        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21791$as_echo_n "checking for LDD... " >&6; }
21792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21793$as_echo "disabled" >&6; }
21794      else
21795        # Check if the provided tool contains a complete path.
21796        tool_specified="$LDD"
21797        tool_basename="${tool_specified##*/}"
21798        if test "x$tool_basename" = "x$tool_specified"; then
21799          # A command without a complete path is provided, search $PATH.
21800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21801$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21802          # Extract the first word of "$tool_basename", so it can be a program name with args.
21803set dummy $tool_basename; ac_word=$2
21804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21805$as_echo_n "checking for $ac_word... " >&6; }
21806if ${ac_cv_path_LDD+:} false; then :
21807  $as_echo_n "(cached) " >&6
21808else
21809  case $LDD in
21810  [\\/]* | ?:[\\/]*)
21811  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21812  ;;
21813  *)
21814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21815for as_dir in $PATH
21816do
21817  IFS=$as_save_IFS
21818  test -z "$as_dir" && as_dir=.
21819    for ac_exec_ext in '' $ac_executable_extensions; do
21820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21821    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21823    break 2
21824  fi
21825done
21826  done
21827IFS=$as_save_IFS
21828
21829  ;;
21830esac
21831fi
21832LDD=$ac_cv_path_LDD
21833if test -n "$LDD"; then
21834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21835$as_echo "$LDD" >&6; }
21836else
21837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21838$as_echo "no" >&6; }
21839fi
21840
21841
21842          if test "x$LDD" = x; then
21843            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21844          fi
21845        else
21846          # Otherwise we believe it is a complete path. Use it as it is.
21847          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21848$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21849          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21850$as_echo_n "checking for LDD... " >&6; }
21851          if test ! -x "$tool_specified"; then
21852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21853$as_echo "not found" >&6; }
21854            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21855          fi
21856          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21857$as_echo "$tool_specified" >&6; }
21858        fi
21859      fi
21860    fi
21861
21862  fi
21863
21864
21865  if test "x$LDD" = "x"; then
21866    # List shared lib dependencies is used for
21867    # debug output and checking for forbidden dependencies.
21868    # We can build without it.
21869    LDD="true"
21870  fi
21871
21872
21873  # Publish this variable in the help.
21874
21875
21876  if [ -z "${OTOOL+x}" ]; then
21877    # The variable is not set by user, try to locate tool using the code snippet
21878    for ac_prog in otool
21879do
21880  # Extract the first word of "$ac_prog", so it can be a program name with args.
21881set dummy $ac_prog; ac_word=$2
21882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21883$as_echo_n "checking for $ac_word... " >&6; }
21884if ${ac_cv_path_OTOOL+:} false; then :
21885  $as_echo_n "(cached) " >&6
21886else
21887  case $OTOOL in
21888  [\\/]* | ?:[\\/]*)
21889  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21890  ;;
21891  *)
21892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21893for as_dir in $PATH
21894do
21895  IFS=$as_save_IFS
21896  test -z "$as_dir" && as_dir=.
21897    for ac_exec_ext in '' $ac_executable_extensions; do
21898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21899    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21901    break 2
21902  fi
21903done
21904  done
21905IFS=$as_save_IFS
21906
21907  ;;
21908esac
21909fi
21910OTOOL=$ac_cv_path_OTOOL
21911if test -n "$OTOOL"; then
21912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21913$as_echo "$OTOOL" >&6; }
21914else
21915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21916$as_echo "no" >&6; }
21917fi
21918
21919
21920  test -n "$OTOOL" && break
21921done
21922
21923  else
21924    # The variable is set, but is it from the command line or the environment?
21925
21926    # Try to remove the string !OTOOL! from our list.
21927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21929      # If it failed, the variable was not from the command line. Ignore it,
21930      # but warn the user (except for BASH, which is always set by the calling BASH).
21931      if test "xOTOOL" != xBASH; then
21932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21933$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21934      fi
21935      # Try to locate tool using the code snippet
21936      for ac_prog in otool
21937do
21938  # Extract the first word of "$ac_prog", so it can be a program name with args.
21939set dummy $ac_prog; ac_word=$2
21940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21941$as_echo_n "checking for $ac_word... " >&6; }
21942if ${ac_cv_path_OTOOL+:} false; then :
21943  $as_echo_n "(cached) " >&6
21944else
21945  case $OTOOL in
21946  [\\/]* | ?:[\\/]*)
21947  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21948  ;;
21949  *)
21950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21951for as_dir in $PATH
21952do
21953  IFS=$as_save_IFS
21954  test -z "$as_dir" && as_dir=.
21955    for ac_exec_ext in '' $ac_executable_extensions; do
21956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21957    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21959    break 2
21960  fi
21961done
21962  done
21963IFS=$as_save_IFS
21964
21965  ;;
21966esac
21967fi
21968OTOOL=$ac_cv_path_OTOOL
21969if test -n "$OTOOL"; then
21970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21971$as_echo "$OTOOL" >&6; }
21972else
21973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21974$as_echo "no" >&6; }
21975fi
21976
21977
21978  test -n "$OTOOL" && break
21979done
21980
21981    else
21982      # If it succeeded, then it was overridden by the user. We will use it
21983      # for the tool.
21984
21985      # First remove it from the list of overridden variables, so we can test
21986      # for unknown variables in the end.
21987      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21988
21989      # Check if we try to supply an empty value
21990      if test "x$OTOOL" = x; then
21991        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21992$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21993        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21994$as_echo_n "checking for OTOOL... " >&6; }
21995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21996$as_echo "disabled" >&6; }
21997      else
21998        # Check if the provided tool contains a complete path.
21999        tool_specified="$OTOOL"
22000        tool_basename="${tool_specified##*/}"
22001        if test "x$tool_basename" = "x$tool_specified"; then
22002          # A command without a complete path is provided, search $PATH.
22003          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22004$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22005          # Extract the first word of "$tool_basename", so it can be a program name with args.
22006set dummy $tool_basename; ac_word=$2
22007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22008$as_echo_n "checking for $ac_word... " >&6; }
22009if ${ac_cv_path_OTOOL+:} false; then :
22010  $as_echo_n "(cached) " >&6
22011else
22012  case $OTOOL in
22013  [\\/]* | ?:[\\/]*)
22014  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22015  ;;
22016  *)
22017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22018for as_dir in $PATH
22019do
22020  IFS=$as_save_IFS
22021  test -z "$as_dir" && as_dir=.
22022    for ac_exec_ext in '' $ac_executable_extensions; do
22023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22024    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22026    break 2
22027  fi
22028done
22029  done
22030IFS=$as_save_IFS
22031
22032  ;;
22033esac
22034fi
22035OTOOL=$ac_cv_path_OTOOL
22036if test -n "$OTOOL"; then
22037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22038$as_echo "$OTOOL" >&6; }
22039else
22040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22041$as_echo "no" >&6; }
22042fi
22043
22044
22045          if test "x$OTOOL" = x; then
22046            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22047          fi
22048        else
22049          # Otherwise we believe it is a complete path. Use it as it is.
22050          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22051$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22052          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22053$as_echo_n "checking for OTOOL... " >&6; }
22054          if test ! -x "$tool_specified"; then
22055            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22056$as_echo "not found" >&6; }
22057            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22058          fi
22059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22060$as_echo "$tool_specified" >&6; }
22061        fi
22062      fi
22063    fi
22064
22065  fi
22066
22067
22068  if test "x$OTOOL" = "x"; then
22069    OTOOL="true"
22070  fi
22071
22072
22073  # Publish this variable in the help.
22074
22075
22076  if [ -z "${READELF+x}" ]; then
22077    # The variable is not set by user, try to locate tool using the code snippet
22078    for ac_prog in greadelf readelf
22079do
22080  # Extract the first word of "$ac_prog", so it can be a program name with args.
22081set dummy $ac_prog; ac_word=$2
22082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22083$as_echo_n "checking for $ac_word... " >&6; }
22084if ${ac_cv_path_READELF+:} false; then :
22085  $as_echo_n "(cached) " >&6
22086else
22087  case $READELF in
22088  [\\/]* | ?:[\\/]*)
22089  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22090  ;;
22091  *)
22092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22093for as_dir in $PATH
22094do
22095  IFS=$as_save_IFS
22096  test -z "$as_dir" && as_dir=.
22097    for ac_exec_ext in '' $ac_executable_extensions; do
22098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22099    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22101    break 2
22102  fi
22103done
22104  done
22105IFS=$as_save_IFS
22106
22107  ;;
22108esac
22109fi
22110READELF=$ac_cv_path_READELF
22111if test -n "$READELF"; then
22112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22113$as_echo "$READELF" >&6; }
22114else
22115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22116$as_echo "no" >&6; }
22117fi
22118
22119
22120  test -n "$READELF" && break
22121done
22122
22123  else
22124    # The variable is set, but is it from the command line or the environment?
22125
22126    # Try to remove the string !READELF! from our list.
22127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22129      # If it failed, the variable was not from the command line. Ignore it,
22130      # but warn the user (except for BASH, which is always set by the calling BASH).
22131      if test "xREADELF" != xBASH; then
22132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22133$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22134      fi
22135      # Try to locate tool using the code snippet
22136      for ac_prog in greadelf readelf
22137do
22138  # Extract the first word of "$ac_prog", so it can be a program name with args.
22139set dummy $ac_prog; ac_word=$2
22140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22141$as_echo_n "checking for $ac_word... " >&6; }
22142if ${ac_cv_path_READELF+:} false; then :
22143  $as_echo_n "(cached) " >&6
22144else
22145  case $READELF in
22146  [\\/]* | ?:[\\/]*)
22147  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22148  ;;
22149  *)
22150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22151for as_dir in $PATH
22152do
22153  IFS=$as_save_IFS
22154  test -z "$as_dir" && as_dir=.
22155    for ac_exec_ext in '' $ac_executable_extensions; do
22156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22157    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22159    break 2
22160  fi
22161done
22162  done
22163IFS=$as_save_IFS
22164
22165  ;;
22166esac
22167fi
22168READELF=$ac_cv_path_READELF
22169if test -n "$READELF"; then
22170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22171$as_echo "$READELF" >&6; }
22172else
22173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22174$as_echo "no" >&6; }
22175fi
22176
22177
22178  test -n "$READELF" && break
22179done
22180
22181    else
22182      # If it succeeded, then it was overridden by the user. We will use it
22183      # for the tool.
22184
22185      # First remove it from the list of overridden variables, so we can test
22186      # for unknown variables in the end.
22187      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22188
22189      # Check if we try to supply an empty value
22190      if test "x$READELF" = x; then
22191        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22192$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22194$as_echo_n "checking for READELF... " >&6; }
22195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22196$as_echo "disabled" >&6; }
22197      else
22198        # Check if the provided tool contains a complete path.
22199        tool_specified="$READELF"
22200        tool_basename="${tool_specified##*/}"
22201        if test "x$tool_basename" = "x$tool_specified"; then
22202          # A command without a complete path is provided, search $PATH.
22203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22204$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22205          # Extract the first word of "$tool_basename", so it can be a program name with args.
22206set dummy $tool_basename; ac_word=$2
22207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22208$as_echo_n "checking for $ac_word... " >&6; }
22209if ${ac_cv_path_READELF+:} false; then :
22210  $as_echo_n "(cached) " >&6
22211else
22212  case $READELF in
22213  [\\/]* | ?:[\\/]*)
22214  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22215  ;;
22216  *)
22217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22218for as_dir in $PATH
22219do
22220  IFS=$as_save_IFS
22221  test -z "$as_dir" && as_dir=.
22222    for ac_exec_ext in '' $ac_executable_extensions; do
22223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22224    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22226    break 2
22227  fi
22228done
22229  done
22230IFS=$as_save_IFS
22231
22232  ;;
22233esac
22234fi
22235READELF=$ac_cv_path_READELF
22236if test -n "$READELF"; then
22237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22238$as_echo "$READELF" >&6; }
22239else
22240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22241$as_echo "no" >&6; }
22242fi
22243
22244
22245          if test "x$READELF" = x; then
22246            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22247          fi
22248        else
22249          # Otherwise we believe it is a complete path. Use it as it is.
22250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22251$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22252          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22253$as_echo_n "checking for READELF... " >&6; }
22254          if test ! -x "$tool_specified"; then
22255            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22256$as_echo "not found" >&6; }
22257            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22258          fi
22259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22260$as_echo "$tool_specified" >&6; }
22261        fi
22262      fi
22263    fi
22264
22265  fi
22266
22267
22268
22269
22270  # Publish this variable in the help.
22271
22272
22273  if [ -z "${HG+x}" ]; then
22274    # The variable is not set by user, try to locate tool using the code snippet
22275    for ac_prog in hg
22276do
22277  # Extract the first word of "$ac_prog", so it can be a program name with args.
22278set dummy $ac_prog; ac_word=$2
22279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22280$as_echo_n "checking for $ac_word... " >&6; }
22281if ${ac_cv_path_HG+:} false; then :
22282  $as_echo_n "(cached) " >&6
22283else
22284  case $HG in
22285  [\\/]* | ?:[\\/]*)
22286  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22287  ;;
22288  *)
22289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22290for as_dir in $PATH
22291do
22292  IFS=$as_save_IFS
22293  test -z "$as_dir" && as_dir=.
22294    for ac_exec_ext in '' $ac_executable_extensions; do
22295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22296    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22298    break 2
22299  fi
22300done
22301  done
22302IFS=$as_save_IFS
22303
22304  ;;
22305esac
22306fi
22307HG=$ac_cv_path_HG
22308if test -n "$HG"; then
22309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22310$as_echo "$HG" >&6; }
22311else
22312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22313$as_echo "no" >&6; }
22314fi
22315
22316
22317  test -n "$HG" && break
22318done
22319
22320  else
22321    # The variable is set, but is it from the command line or the environment?
22322
22323    # Try to remove the string !HG! from our list.
22324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22326      # If it failed, the variable was not from the command line. Ignore it,
22327      # but warn the user (except for BASH, which is always set by the calling BASH).
22328      if test "xHG" != xBASH; then
22329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22330$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22331      fi
22332      # Try to locate tool using the code snippet
22333      for ac_prog in hg
22334do
22335  # Extract the first word of "$ac_prog", so it can be a program name with args.
22336set dummy $ac_prog; ac_word=$2
22337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22338$as_echo_n "checking for $ac_word... " >&6; }
22339if ${ac_cv_path_HG+:} false; then :
22340  $as_echo_n "(cached) " >&6
22341else
22342  case $HG in
22343  [\\/]* | ?:[\\/]*)
22344  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22345  ;;
22346  *)
22347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22348for as_dir in $PATH
22349do
22350  IFS=$as_save_IFS
22351  test -z "$as_dir" && as_dir=.
22352    for ac_exec_ext in '' $ac_executable_extensions; do
22353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22354    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22356    break 2
22357  fi
22358done
22359  done
22360IFS=$as_save_IFS
22361
22362  ;;
22363esac
22364fi
22365HG=$ac_cv_path_HG
22366if test -n "$HG"; then
22367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22368$as_echo "$HG" >&6; }
22369else
22370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22371$as_echo "no" >&6; }
22372fi
22373
22374
22375  test -n "$HG" && break
22376done
22377
22378    else
22379      # If it succeeded, then it was overridden by the user. We will use it
22380      # for the tool.
22381
22382      # First remove it from the list of overridden variables, so we can test
22383      # for unknown variables in the end.
22384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22385
22386      # Check if we try to supply an empty value
22387      if test "x$HG" = x; then
22388        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22389$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22391$as_echo_n "checking for HG... " >&6; }
22392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22393$as_echo "disabled" >&6; }
22394      else
22395        # Check if the provided tool contains a complete path.
22396        tool_specified="$HG"
22397        tool_basename="${tool_specified##*/}"
22398        if test "x$tool_basename" = "x$tool_specified"; then
22399          # A command without a complete path is provided, search $PATH.
22400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22401$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22402          # Extract the first word of "$tool_basename", so it can be a program name with args.
22403set dummy $tool_basename; ac_word=$2
22404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22405$as_echo_n "checking for $ac_word... " >&6; }
22406if ${ac_cv_path_HG+:} false; then :
22407  $as_echo_n "(cached) " >&6
22408else
22409  case $HG in
22410  [\\/]* | ?:[\\/]*)
22411  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22412  ;;
22413  *)
22414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22415for as_dir in $PATH
22416do
22417  IFS=$as_save_IFS
22418  test -z "$as_dir" && as_dir=.
22419    for ac_exec_ext in '' $ac_executable_extensions; do
22420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22421    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22423    break 2
22424  fi
22425done
22426  done
22427IFS=$as_save_IFS
22428
22429  ;;
22430esac
22431fi
22432HG=$ac_cv_path_HG
22433if test -n "$HG"; then
22434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22435$as_echo "$HG" >&6; }
22436else
22437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22438$as_echo "no" >&6; }
22439fi
22440
22441
22442          if test "x$HG" = x; then
22443            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22444          fi
22445        else
22446          # Otherwise we believe it is a complete path. Use it as it is.
22447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22448$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22450$as_echo_n "checking for HG... " >&6; }
22451          if test ! -x "$tool_specified"; then
22452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22453$as_echo "not found" >&6; }
22454            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22455          fi
22456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22457$as_echo "$tool_specified" >&6; }
22458        fi
22459      fi
22460    fi
22461
22462  fi
22463
22464
22465
22466
22467  # Publish this variable in the help.
22468
22469
22470  if [ -z "${STAT+x}" ]; then
22471    # The variable is not set by user, try to locate tool using the code snippet
22472    for ac_prog in stat
22473do
22474  # Extract the first word of "$ac_prog", so it can be a program name with args.
22475set dummy $ac_prog; ac_word=$2
22476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22477$as_echo_n "checking for $ac_word... " >&6; }
22478if ${ac_cv_path_STAT+:} false; then :
22479  $as_echo_n "(cached) " >&6
22480else
22481  case $STAT in
22482  [\\/]* | ?:[\\/]*)
22483  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22484  ;;
22485  *)
22486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22487for as_dir in $PATH
22488do
22489  IFS=$as_save_IFS
22490  test -z "$as_dir" && as_dir=.
22491    for ac_exec_ext in '' $ac_executable_extensions; do
22492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22493    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22495    break 2
22496  fi
22497done
22498  done
22499IFS=$as_save_IFS
22500
22501  ;;
22502esac
22503fi
22504STAT=$ac_cv_path_STAT
22505if test -n "$STAT"; then
22506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22507$as_echo "$STAT" >&6; }
22508else
22509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22510$as_echo "no" >&6; }
22511fi
22512
22513
22514  test -n "$STAT" && break
22515done
22516
22517  else
22518    # The variable is set, but is it from the command line or the environment?
22519
22520    # Try to remove the string !STAT! from our list.
22521    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22522    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22523      # If it failed, the variable was not from the command line. Ignore it,
22524      # but warn the user (except for BASH, which is always set by the calling BASH).
22525      if test "xSTAT" != xBASH; then
22526        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22527$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22528      fi
22529      # Try to locate tool using the code snippet
22530      for ac_prog in stat
22531do
22532  # Extract the first word of "$ac_prog", so it can be a program name with args.
22533set dummy $ac_prog; ac_word=$2
22534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22535$as_echo_n "checking for $ac_word... " >&6; }
22536if ${ac_cv_path_STAT+:} false; then :
22537  $as_echo_n "(cached) " >&6
22538else
22539  case $STAT in
22540  [\\/]* | ?:[\\/]*)
22541  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22542  ;;
22543  *)
22544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22545for as_dir in $PATH
22546do
22547  IFS=$as_save_IFS
22548  test -z "$as_dir" && as_dir=.
22549    for ac_exec_ext in '' $ac_executable_extensions; do
22550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22551    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22553    break 2
22554  fi
22555done
22556  done
22557IFS=$as_save_IFS
22558
22559  ;;
22560esac
22561fi
22562STAT=$ac_cv_path_STAT
22563if test -n "$STAT"; then
22564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22565$as_echo "$STAT" >&6; }
22566else
22567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22568$as_echo "no" >&6; }
22569fi
22570
22571
22572  test -n "$STAT" && break
22573done
22574
22575    else
22576      # If it succeeded, then it was overridden by the user. We will use it
22577      # for the tool.
22578
22579      # First remove it from the list of overridden variables, so we can test
22580      # for unknown variables in the end.
22581      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22582
22583      # Check if we try to supply an empty value
22584      if test "x$STAT" = x; then
22585        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22586$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22587        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22588$as_echo_n "checking for STAT... " >&6; }
22589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22590$as_echo "disabled" >&6; }
22591      else
22592        # Check if the provided tool contains a complete path.
22593        tool_specified="$STAT"
22594        tool_basename="${tool_specified##*/}"
22595        if test "x$tool_basename" = "x$tool_specified"; then
22596          # A command without a complete path is provided, search $PATH.
22597          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22598$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22599          # Extract the first word of "$tool_basename", so it can be a program name with args.
22600set dummy $tool_basename; ac_word=$2
22601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22602$as_echo_n "checking for $ac_word... " >&6; }
22603if ${ac_cv_path_STAT+:} false; then :
22604  $as_echo_n "(cached) " >&6
22605else
22606  case $STAT in
22607  [\\/]* | ?:[\\/]*)
22608  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22609  ;;
22610  *)
22611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22612for as_dir in $PATH
22613do
22614  IFS=$as_save_IFS
22615  test -z "$as_dir" && as_dir=.
22616    for ac_exec_ext in '' $ac_executable_extensions; do
22617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22618    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22620    break 2
22621  fi
22622done
22623  done
22624IFS=$as_save_IFS
22625
22626  ;;
22627esac
22628fi
22629STAT=$ac_cv_path_STAT
22630if test -n "$STAT"; then
22631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22632$as_echo "$STAT" >&6; }
22633else
22634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22635$as_echo "no" >&6; }
22636fi
22637
22638
22639          if test "x$STAT" = x; then
22640            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22641          fi
22642        else
22643          # Otherwise we believe it is a complete path. Use it as it is.
22644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22645$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22646          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22647$as_echo_n "checking for STAT... " >&6; }
22648          if test ! -x "$tool_specified"; then
22649            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22650$as_echo "not found" >&6; }
22651            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22652          fi
22653          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22654$as_echo "$tool_specified" >&6; }
22655        fi
22656      fi
22657    fi
22658
22659  fi
22660
22661
22662
22663
22664  # Publish this variable in the help.
22665
22666
22667  if [ -z "${TIME+x}" ]; then
22668    # The variable is not set by user, try to locate tool using the code snippet
22669    for ac_prog in time
22670do
22671  # Extract the first word of "$ac_prog", so it can be a program name with args.
22672set dummy $ac_prog; ac_word=$2
22673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22674$as_echo_n "checking for $ac_word... " >&6; }
22675if ${ac_cv_path_TIME+:} false; then :
22676  $as_echo_n "(cached) " >&6
22677else
22678  case $TIME in
22679  [\\/]* | ?:[\\/]*)
22680  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22681  ;;
22682  *)
22683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22684for as_dir in $PATH
22685do
22686  IFS=$as_save_IFS
22687  test -z "$as_dir" && as_dir=.
22688    for ac_exec_ext in '' $ac_executable_extensions; do
22689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22690    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22692    break 2
22693  fi
22694done
22695  done
22696IFS=$as_save_IFS
22697
22698  ;;
22699esac
22700fi
22701TIME=$ac_cv_path_TIME
22702if test -n "$TIME"; then
22703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22704$as_echo "$TIME" >&6; }
22705else
22706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22707$as_echo "no" >&6; }
22708fi
22709
22710
22711  test -n "$TIME" && break
22712done
22713
22714  else
22715    # The variable is set, but is it from the command line or the environment?
22716
22717    # Try to remove the string !TIME! from our list.
22718    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22719    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22720      # If it failed, the variable was not from the command line. Ignore it,
22721      # but warn the user (except for BASH, which is always set by the calling BASH).
22722      if test "xTIME" != xBASH; then
22723        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22724$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22725      fi
22726      # Try to locate tool using the code snippet
22727      for ac_prog in time
22728do
22729  # Extract the first word of "$ac_prog", so it can be a program name with args.
22730set dummy $ac_prog; ac_word=$2
22731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22732$as_echo_n "checking for $ac_word... " >&6; }
22733if ${ac_cv_path_TIME+:} false; then :
22734  $as_echo_n "(cached) " >&6
22735else
22736  case $TIME in
22737  [\\/]* | ?:[\\/]*)
22738  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22739  ;;
22740  *)
22741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22742for as_dir in $PATH
22743do
22744  IFS=$as_save_IFS
22745  test -z "$as_dir" && as_dir=.
22746    for ac_exec_ext in '' $ac_executable_extensions; do
22747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22748    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22750    break 2
22751  fi
22752done
22753  done
22754IFS=$as_save_IFS
22755
22756  ;;
22757esac
22758fi
22759TIME=$ac_cv_path_TIME
22760if test -n "$TIME"; then
22761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22762$as_echo "$TIME" >&6; }
22763else
22764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22765$as_echo "no" >&6; }
22766fi
22767
22768
22769  test -n "$TIME" && break
22770done
22771
22772    else
22773      # If it succeeded, then it was overridden by the user. We will use it
22774      # for the tool.
22775
22776      # First remove it from the list of overridden variables, so we can test
22777      # for unknown variables in the end.
22778      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22779
22780      # Check if we try to supply an empty value
22781      if test "x$TIME" = x; then
22782        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22783$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22785$as_echo_n "checking for TIME... " >&6; }
22786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22787$as_echo "disabled" >&6; }
22788      else
22789        # Check if the provided tool contains a complete path.
22790        tool_specified="$TIME"
22791        tool_basename="${tool_specified##*/}"
22792        if test "x$tool_basename" = "x$tool_specified"; then
22793          # A command without a complete path is provided, search $PATH.
22794          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22795$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22796          # Extract the first word of "$tool_basename", so it can be a program name with args.
22797set dummy $tool_basename; ac_word=$2
22798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22799$as_echo_n "checking for $ac_word... " >&6; }
22800if ${ac_cv_path_TIME+:} false; then :
22801  $as_echo_n "(cached) " >&6
22802else
22803  case $TIME in
22804  [\\/]* | ?:[\\/]*)
22805  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22806  ;;
22807  *)
22808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22809for as_dir in $PATH
22810do
22811  IFS=$as_save_IFS
22812  test -z "$as_dir" && as_dir=.
22813    for ac_exec_ext in '' $ac_executable_extensions; do
22814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22815    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22817    break 2
22818  fi
22819done
22820  done
22821IFS=$as_save_IFS
22822
22823  ;;
22824esac
22825fi
22826TIME=$ac_cv_path_TIME
22827if test -n "$TIME"; then
22828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22829$as_echo "$TIME" >&6; }
22830else
22831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22832$as_echo "no" >&6; }
22833fi
22834
22835
22836          if test "x$TIME" = x; then
22837            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22838          fi
22839        else
22840          # Otherwise we believe it is a complete path. Use it as it is.
22841          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22842$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22843          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22844$as_echo_n "checking for TIME... " >&6; }
22845          if test ! -x "$tool_specified"; then
22846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22847$as_echo "not found" >&6; }
22848            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22849          fi
22850          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22851$as_echo "$tool_specified" >&6; }
22852        fi
22853      fi
22854    fi
22855
22856  fi
22857
22858
22859  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22860  # be in the user path.
22861
22862
22863  # Publish this variable in the help.
22864
22865
22866  if [ -z "${DTRACE+x}" ]; then
22867    # The variable is not set by user, try to locate tool using the code snippet
22868    for ac_prog in dtrace
22869do
22870  # Extract the first word of "$ac_prog", so it can be a program name with args.
22871set dummy $ac_prog; ac_word=$2
22872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22873$as_echo_n "checking for $ac_word... " >&6; }
22874if ${ac_cv_path_DTRACE+:} false; then :
22875  $as_echo_n "(cached) " >&6
22876else
22877  case $DTRACE in
22878  [\\/]* | ?:[\\/]*)
22879  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22880  ;;
22881  *)
22882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22883as_dummy="$PATH:/usr/sbin"
22884for as_dir in $as_dummy
22885do
22886  IFS=$as_save_IFS
22887  test -z "$as_dir" && as_dir=.
22888    for ac_exec_ext in '' $ac_executable_extensions; do
22889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22890    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22892    break 2
22893  fi
22894done
22895  done
22896IFS=$as_save_IFS
22897
22898  ;;
22899esac
22900fi
22901DTRACE=$ac_cv_path_DTRACE
22902if test -n "$DTRACE"; then
22903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22904$as_echo "$DTRACE" >&6; }
22905else
22906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22907$as_echo "no" >&6; }
22908fi
22909
22910
22911  test -n "$DTRACE" && break
22912done
22913
22914  else
22915    # The variable is set, but is it from the command line or the environment?
22916
22917    # Try to remove the string !DTRACE! from our list.
22918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22920      # If it failed, the variable was not from the command line. Ignore it,
22921      # but warn the user (except for BASH, which is always set by the calling BASH).
22922      if test "xDTRACE" != xBASH; then
22923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22924$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22925      fi
22926      # Try to locate tool using the code snippet
22927      for ac_prog in dtrace
22928do
22929  # Extract the first word of "$ac_prog", so it can be a program name with args.
22930set dummy $ac_prog; ac_word=$2
22931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22932$as_echo_n "checking for $ac_word... " >&6; }
22933if ${ac_cv_path_DTRACE+:} false; then :
22934  $as_echo_n "(cached) " >&6
22935else
22936  case $DTRACE in
22937  [\\/]* | ?:[\\/]*)
22938  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22939  ;;
22940  *)
22941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22942as_dummy="$PATH:/usr/sbin"
22943for as_dir in $as_dummy
22944do
22945  IFS=$as_save_IFS
22946  test -z "$as_dir" && as_dir=.
22947    for ac_exec_ext in '' $ac_executable_extensions; do
22948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22949    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22951    break 2
22952  fi
22953done
22954  done
22955IFS=$as_save_IFS
22956
22957  ;;
22958esac
22959fi
22960DTRACE=$ac_cv_path_DTRACE
22961if test -n "$DTRACE"; then
22962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22963$as_echo "$DTRACE" >&6; }
22964else
22965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22966$as_echo "no" >&6; }
22967fi
22968
22969
22970  test -n "$DTRACE" && break
22971done
22972
22973    else
22974      # If it succeeded, then it was overridden by the user. We will use it
22975      # for the tool.
22976
22977      # First remove it from the list of overridden variables, so we can test
22978      # for unknown variables in the end.
22979      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22980
22981      # Check if we try to supply an empty value
22982      if test "x$DTRACE" = x; then
22983        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22984$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22985        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22986$as_echo_n "checking for DTRACE... " >&6; }
22987        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22988$as_echo "disabled" >&6; }
22989      else
22990        # Check if the provided tool contains a complete path.
22991        tool_specified="$DTRACE"
22992        tool_basename="${tool_specified##*/}"
22993        if test "x$tool_basename" = "x$tool_specified"; then
22994          # A command without a complete path is provided, search $PATH.
22995          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22996$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22997          # Extract the first word of "$tool_basename", so it can be a program name with args.
22998set dummy $tool_basename; ac_word=$2
22999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23000$as_echo_n "checking for $ac_word... " >&6; }
23001if ${ac_cv_path_DTRACE+:} false; then :
23002  $as_echo_n "(cached) " >&6
23003else
23004  case $DTRACE in
23005  [\\/]* | ?:[\\/]*)
23006  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23007  ;;
23008  *)
23009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23010for as_dir in $PATH
23011do
23012  IFS=$as_save_IFS
23013  test -z "$as_dir" && as_dir=.
23014    for ac_exec_ext in '' $ac_executable_extensions; do
23015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23016    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23018    break 2
23019  fi
23020done
23021  done
23022IFS=$as_save_IFS
23023
23024  ;;
23025esac
23026fi
23027DTRACE=$ac_cv_path_DTRACE
23028if test -n "$DTRACE"; then
23029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23030$as_echo "$DTRACE" >&6; }
23031else
23032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23033$as_echo "no" >&6; }
23034fi
23035
23036
23037          if test "x$DTRACE" = x; then
23038            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23039          fi
23040        else
23041          # Otherwise we believe it is a complete path. Use it as it is.
23042          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23043$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23044          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23045$as_echo_n "checking for DTRACE... " >&6; }
23046          if test ! -x "$tool_specified"; then
23047            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23048$as_echo "not found" >&6; }
23049            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23050          fi
23051          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23052$as_echo "$tool_specified" >&6; }
23053        fi
23054      fi
23055    fi
23056
23057  fi
23058
23059
23060
23061
23062  # Publish this variable in the help.
23063
23064
23065  if [ -z "${PATCH+x}" ]; then
23066    # The variable is not set by user, try to locate tool using the code snippet
23067    for ac_prog in gpatch patch
23068do
23069  # Extract the first word of "$ac_prog", so it can be a program name with args.
23070set dummy $ac_prog; ac_word=$2
23071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23072$as_echo_n "checking for $ac_word... " >&6; }
23073if ${ac_cv_path_PATCH+:} false; then :
23074  $as_echo_n "(cached) " >&6
23075else
23076  case $PATCH in
23077  [\\/]* | ?:[\\/]*)
23078  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23079  ;;
23080  *)
23081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23082for as_dir in $PATH
23083do
23084  IFS=$as_save_IFS
23085  test -z "$as_dir" && as_dir=.
23086    for ac_exec_ext in '' $ac_executable_extensions; do
23087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23088    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23090    break 2
23091  fi
23092done
23093  done
23094IFS=$as_save_IFS
23095
23096  ;;
23097esac
23098fi
23099PATCH=$ac_cv_path_PATCH
23100if test -n "$PATCH"; then
23101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23102$as_echo "$PATCH" >&6; }
23103else
23104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23105$as_echo "no" >&6; }
23106fi
23107
23108
23109  test -n "$PATCH" && break
23110done
23111
23112  else
23113    # The variable is set, but is it from the command line or the environment?
23114
23115    # Try to remove the string !PATCH! from our list.
23116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23118      # If it failed, the variable was not from the command line. Ignore it,
23119      # but warn the user (except for BASH, which is always set by the calling BASH).
23120      if test "xPATCH" != xBASH; then
23121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23122$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23123      fi
23124      # Try to locate tool using the code snippet
23125      for ac_prog in gpatch patch
23126do
23127  # Extract the first word of "$ac_prog", so it can be a program name with args.
23128set dummy $ac_prog; ac_word=$2
23129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23130$as_echo_n "checking for $ac_word... " >&6; }
23131if ${ac_cv_path_PATCH+:} false; then :
23132  $as_echo_n "(cached) " >&6
23133else
23134  case $PATCH in
23135  [\\/]* | ?:[\\/]*)
23136  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23137  ;;
23138  *)
23139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23140for as_dir in $PATH
23141do
23142  IFS=$as_save_IFS
23143  test -z "$as_dir" && as_dir=.
23144    for ac_exec_ext in '' $ac_executable_extensions; do
23145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23146    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23148    break 2
23149  fi
23150done
23151  done
23152IFS=$as_save_IFS
23153
23154  ;;
23155esac
23156fi
23157PATCH=$ac_cv_path_PATCH
23158if test -n "$PATCH"; then
23159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23160$as_echo "$PATCH" >&6; }
23161else
23162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23163$as_echo "no" >&6; }
23164fi
23165
23166
23167  test -n "$PATCH" && break
23168done
23169
23170    else
23171      # If it succeeded, then it was overridden by the user. We will use it
23172      # for the tool.
23173
23174      # First remove it from the list of overridden variables, so we can test
23175      # for unknown variables in the end.
23176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23177
23178      # Check if we try to supply an empty value
23179      if test "x$PATCH" = x; then
23180        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23181$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23183$as_echo_n "checking for PATCH... " >&6; }
23184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23185$as_echo "disabled" >&6; }
23186      else
23187        # Check if the provided tool contains a complete path.
23188        tool_specified="$PATCH"
23189        tool_basename="${tool_specified##*/}"
23190        if test "x$tool_basename" = "x$tool_specified"; then
23191          # A command without a complete path is provided, search $PATH.
23192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23193$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23194          # Extract the first word of "$tool_basename", so it can be a program name with args.
23195set dummy $tool_basename; ac_word=$2
23196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23197$as_echo_n "checking for $ac_word... " >&6; }
23198if ${ac_cv_path_PATCH+:} false; then :
23199  $as_echo_n "(cached) " >&6
23200else
23201  case $PATCH in
23202  [\\/]* | ?:[\\/]*)
23203  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23204  ;;
23205  *)
23206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23207for as_dir in $PATH
23208do
23209  IFS=$as_save_IFS
23210  test -z "$as_dir" && as_dir=.
23211    for ac_exec_ext in '' $ac_executable_extensions; do
23212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23213    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23215    break 2
23216  fi
23217done
23218  done
23219IFS=$as_save_IFS
23220
23221  ;;
23222esac
23223fi
23224PATCH=$ac_cv_path_PATCH
23225if test -n "$PATCH"; then
23226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23227$as_echo "$PATCH" >&6; }
23228else
23229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23230$as_echo "no" >&6; }
23231fi
23232
23233
23234          if test "x$PATCH" = x; then
23235            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23236          fi
23237        else
23238          # Otherwise we believe it is a complete path. Use it as it is.
23239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23240$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23241          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23242$as_echo_n "checking for PATCH... " >&6; }
23243          if test ! -x "$tool_specified"; then
23244            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23245$as_echo "not found" >&6; }
23246            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23247          fi
23248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23249$as_echo "$tool_specified" >&6; }
23250        fi
23251      fi
23252    fi
23253
23254  fi
23255
23256
23257  # Check if it's GNU time
23258  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23259  if test "x$IS_GNU_TIME" != x; then
23260    IS_GNU_TIME=yes
23261  else
23262    IS_GNU_TIME=no
23263  fi
23264
23265
23266  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23267
23268
23269
23270  # Publish this variable in the help.
23271
23272
23273  if [ -z "${DSYMUTIL+x}" ]; then
23274    # The variable is not set by user, try to locate tool using the code snippet
23275    for ac_prog in dsymutil
23276do
23277  # Extract the first word of "$ac_prog", so it can be a program name with args.
23278set dummy $ac_prog; ac_word=$2
23279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23280$as_echo_n "checking for $ac_word... " >&6; }
23281if ${ac_cv_path_DSYMUTIL+:} false; then :
23282  $as_echo_n "(cached) " >&6
23283else
23284  case $DSYMUTIL in
23285  [\\/]* | ?:[\\/]*)
23286  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23287  ;;
23288  *)
23289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23290for as_dir in $PATH
23291do
23292  IFS=$as_save_IFS
23293  test -z "$as_dir" && as_dir=.
23294    for ac_exec_ext in '' $ac_executable_extensions; do
23295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23296    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23298    break 2
23299  fi
23300done
23301  done
23302IFS=$as_save_IFS
23303
23304  ;;
23305esac
23306fi
23307DSYMUTIL=$ac_cv_path_DSYMUTIL
23308if test -n "$DSYMUTIL"; then
23309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23310$as_echo "$DSYMUTIL" >&6; }
23311else
23312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23313$as_echo "no" >&6; }
23314fi
23315
23316
23317  test -n "$DSYMUTIL" && break
23318done
23319
23320  else
23321    # The variable is set, but is it from the command line or the environment?
23322
23323    # Try to remove the string !DSYMUTIL! from our list.
23324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23326      # If it failed, the variable was not from the command line. Ignore it,
23327      # but warn the user (except for BASH, which is always set by the calling BASH).
23328      if test "xDSYMUTIL" != xBASH; then
23329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23330$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23331      fi
23332      # Try to locate tool using the code snippet
23333      for ac_prog in dsymutil
23334do
23335  # Extract the first word of "$ac_prog", so it can be a program name with args.
23336set dummy $ac_prog; ac_word=$2
23337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23338$as_echo_n "checking for $ac_word... " >&6; }
23339if ${ac_cv_path_DSYMUTIL+:} false; then :
23340  $as_echo_n "(cached) " >&6
23341else
23342  case $DSYMUTIL in
23343  [\\/]* | ?:[\\/]*)
23344  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23345  ;;
23346  *)
23347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23348for as_dir in $PATH
23349do
23350  IFS=$as_save_IFS
23351  test -z "$as_dir" && as_dir=.
23352    for ac_exec_ext in '' $ac_executable_extensions; do
23353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23354    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23356    break 2
23357  fi
23358done
23359  done
23360IFS=$as_save_IFS
23361
23362  ;;
23363esac
23364fi
23365DSYMUTIL=$ac_cv_path_DSYMUTIL
23366if test -n "$DSYMUTIL"; then
23367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23368$as_echo "$DSYMUTIL" >&6; }
23369else
23370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23371$as_echo "no" >&6; }
23372fi
23373
23374
23375  test -n "$DSYMUTIL" && break
23376done
23377
23378    else
23379      # If it succeeded, then it was overridden by the user. We will use it
23380      # for the tool.
23381
23382      # First remove it from the list of overridden variables, so we can test
23383      # for unknown variables in the end.
23384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23385
23386      # Check if we try to supply an empty value
23387      if test "x$DSYMUTIL" = x; then
23388        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23389$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23391$as_echo_n "checking for DSYMUTIL... " >&6; }
23392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23393$as_echo "disabled" >&6; }
23394      else
23395        # Check if the provided tool contains a complete path.
23396        tool_specified="$DSYMUTIL"
23397        tool_basename="${tool_specified##*/}"
23398        if test "x$tool_basename" = "x$tool_specified"; then
23399          # A command without a complete path is provided, search $PATH.
23400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23401$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23402          # Extract the first word of "$tool_basename", so it can be a program name with args.
23403set dummy $tool_basename; ac_word=$2
23404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23405$as_echo_n "checking for $ac_word... " >&6; }
23406if ${ac_cv_path_DSYMUTIL+:} false; then :
23407  $as_echo_n "(cached) " >&6
23408else
23409  case $DSYMUTIL in
23410  [\\/]* | ?:[\\/]*)
23411  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23412  ;;
23413  *)
23414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23415for as_dir in $PATH
23416do
23417  IFS=$as_save_IFS
23418  test -z "$as_dir" && as_dir=.
23419    for ac_exec_ext in '' $ac_executable_extensions; do
23420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23421    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23423    break 2
23424  fi
23425done
23426  done
23427IFS=$as_save_IFS
23428
23429  ;;
23430esac
23431fi
23432DSYMUTIL=$ac_cv_path_DSYMUTIL
23433if test -n "$DSYMUTIL"; then
23434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23435$as_echo "$DSYMUTIL" >&6; }
23436else
23437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23438$as_echo "no" >&6; }
23439fi
23440
23441
23442          if test "x$DSYMUTIL" = x; then
23443            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23444          fi
23445        else
23446          # Otherwise we believe it is a complete path. Use it as it is.
23447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23448$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23450$as_echo_n "checking for DSYMUTIL... " >&6; }
23451          if test ! -x "$tool_specified"; then
23452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23453$as_echo "not found" >&6; }
23454            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23455          fi
23456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23457$as_echo "$tool_specified" >&6; }
23458        fi
23459      fi
23460    fi
23461
23462  fi
23463
23464
23465
23466  if test "x$DSYMUTIL" = x; then
23467    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23468  fi
23469
23470
23471
23472
23473
23474  # Publish this variable in the help.
23475
23476
23477  if [ -z "${XATTR+x}" ]; then
23478    # The variable is not set by user, try to locate tool using the code snippet
23479    for ac_prog in xattr
23480do
23481  # Extract the first word of "$ac_prog", so it can be a program name with args.
23482set dummy $ac_prog; ac_word=$2
23483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23484$as_echo_n "checking for $ac_word... " >&6; }
23485if ${ac_cv_path_XATTR+:} false; then :
23486  $as_echo_n "(cached) " >&6
23487else
23488  case $XATTR in
23489  [\\/]* | ?:[\\/]*)
23490  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23491  ;;
23492  *)
23493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23494for as_dir in $PATH
23495do
23496  IFS=$as_save_IFS
23497  test -z "$as_dir" && as_dir=.
23498    for ac_exec_ext in '' $ac_executable_extensions; do
23499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23500    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23502    break 2
23503  fi
23504done
23505  done
23506IFS=$as_save_IFS
23507
23508  ;;
23509esac
23510fi
23511XATTR=$ac_cv_path_XATTR
23512if test -n "$XATTR"; then
23513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23514$as_echo "$XATTR" >&6; }
23515else
23516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23517$as_echo "no" >&6; }
23518fi
23519
23520
23521  test -n "$XATTR" && break
23522done
23523
23524  else
23525    # The variable is set, but is it from the command line or the environment?
23526
23527    # Try to remove the string !XATTR! from our list.
23528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23530      # If it failed, the variable was not from the command line. Ignore it,
23531      # but warn the user (except for BASH, which is always set by the calling BASH).
23532      if test "xXATTR" != xBASH; then
23533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23534$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23535      fi
23536      # Try to locate tool using the code snippet
23537      for ac_prog in xattr
23538do
23539  # Extract the first word of "$ac_prog", so it can be a program name with args.
23540set dummy $ac_prog; ac_word=$2
23541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23542$as_echo_n "checking for $ac_word... " >&6; }
23543if ${ac_cv_path_XATTR+:} false; then :
23544  $as_echo_n "(cached) " >&6
23545else
23546  case $XATTR in
23547  [\\/]* | ?:[\\/]*)
23548  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23549  ;;
23550  *)
23551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23552for as_dir in $PATH
23553do
23554  IFS=$as_save_IFS
23555  test -z "$as_dir" && as_dir=.
23556    for ac_exec_ext in '' $ac_executable_extensions; do
23557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23558    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23560    break 2
23561  fi
23562done
23563  done
23564IFS=$as_save_IFS
23565
23566  ;;
23567esac
23568fi
23569XATTR=$ac_cv_path_XATTR
23570if test -n "$XATTR"; then
23571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23572$as_echo "$XATTR" >&6; }
23573else
23574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23575$as_echo "no" >&6; }
23576fi
23577
23578
23579  test -n "$XATTR" && break
23580done
23581
23582    else
23583      # If it succeeded, then it was overridden by the user. We will use it
23584      # for the tool.
23585
23586      # First remove it from the list of overridden variables, so we can test
23587      # for unknown variables in the end.
23588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23589
23590      # Check if we try to supply an empty value
23591      if test "x$XATTR" = x; then
23592        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23593$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23594        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23595$as_echo_n "checking for XATTR... " >&6; }
23596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23597$as_echo "disabled" >&6; }
23598      else
23599        # Check if the provided tool contains a complete path.
23600        tool_specified="$XATTR"
23601        tool_basename="${tool_specified##*/}"
23602        if test "x$tool_basename" = "x$tool_specified"; then
23603          # A command without a complete path is provided, search $PATH.
23604          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23605$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23606          # Extract the first word of "$tool_basename", so it can be a program name with args.
23607set dummy $tool_basename; ac_word=$2
23608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23609$as_echo_n "checking for $ac_word... " >&6; }
23610if ${ac_cv_path_XATTR+:} false; then :
23611  $as_echo_n "(cached) " >&6
23612else
23613  case $XATTR in
23614  [\\/]* | ?:[\\/]*)
23615  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23616  ;;
23617  *)
23618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23619for as_dir in $PATH
23620do
23621  IFS=$as_save_IFS
23622  test -z "$as_dir" && as_dir=.
23623    for ac_exec_ext in '' $ac_executable_extensions; do
23624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23625    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23627    break 2
23628  fi
23629done
23630  done
23631IFS=$as_save_IFS
23632
23633  ;;
23634esac
23635fi
23636XATTR=$ac_cv_path_XATTR
23637if test -n "$XATTR"; then
23638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23639$as_echo "$XATTR" >&6; }
23640else
23641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23642$as_echo "no" >&6; }
23643fi
23644
23645
23646          if test "x$XATTR" = x; then
23647            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23648          fi
23649        else
23650          # Otherwise we believe it is a complete path. Use it as it is.
23651          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23652$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23653          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23654$as_echo_n "checking for XATTR... " >&6; }
23655          if test ! -x "$tool_specified"; then
23656            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23657$as_echo "not found" >&6; }
23658            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23659          fi
23660          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23661$as_echo "$tool_specified" >&6; }
23662        fi
23663      fi
23664    fi
23665
23666  fi
23667
23668
23669
23670  if test "x$XATTR" = x; then
23671    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23672  fi
23673
23674
23675
23676
23677  # Publish this variable in the help.
23678
23679
23680  if [ -z "${CODESIGN+x}" ]; then
23681    # The variable is not set by user, try to locate tool using the code snippet
23682    for ac_prog in codesign
23683do
23684  # Extract the first word of "$ac_prog", so it can be a program name with args.
23685set dummy $ac_prog; ac_word=$2
23686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23687$as_echo_n "checking for $ac_word... " >&6; }
23688if ${ac_cv_path_CODESIGN+:} false; then :
23689  $as_echo_n "(cached) " >&6
23690else
23691  case $CODESIGN in
23692  [\\/]* | ?:[\\/]*)
23693  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23694  ;;
23695  *)
23696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23697for as_dir in $PATH
23698do
23699  IFS=$as_save_IFS
23700  test -z "$as_dir" && as_dir=.
23701    for ac_exec_ext in '' $ac_executable_extensions; do
23702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23703    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23705    break 2
23706  fi
23707done
23708  done
23709IFS=$as_save_IFS
23710
23711  ;;
23712esac
23713fi
23714CODESIGN=$ac_cv_path_CODESIGN
23715if test -n "$CODESIGN"; then
23716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23717$as_echo "$CODESIGN" >&6; }
23718else
23719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23720$as_echo "no" >&6; }
23721fi
23722
23723
23724  test -n "$CODESIGN" && break
23725done
23726
23727  else
23728    # The variable is set, but is it from the command line or the environment?
23729
23730    # Try to remove the string !CODESIGN! from our list.
23731    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23732    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23733      # If it failed, the variable was not from the command line. Ignore it,
23734      # but warn the user (except for BASH, which is always set by the calling BASH).
23735      if test "xCODESIGN" != xBASH; then
23736        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23737$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23738      fi
23739      # Try to locate tool using the code snippet
23740      for ac_prog in codesign
23741do
23742  # Extract the first word of "$ac_prog", so it can be a program name with args.
23743set dummy $ac_prog; ac_word=$2
23744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23745$as_echo_n "checking for $ac_word... " >&6; }
23746if ${ac_cv_path_CODESIGN+:} false; then :
23747  $as_echo_n "(cached) " >&6
23748else
23749  case $CODESIGN in
23750  [\\/]* | ?:[\\/]*)
23751  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23752  ;;
23753  *)
23754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23755for as_dir in $PATH
23756do
23757  IFS=$as_save_IFS
23758  test -z "$as_dir" && as_dir=.
23759    for ac_exec_ext in '' $ac_executable_extensions; do
23760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23761    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23763    break 2
23764  fi
23765done
23766  done
23767IFS=$as_save_IFS
23768
23769  ;;
23770esac
23771fi
23772CODESIGN=$ac_cv_path_CODESIGN
23773if test -n "$CODESIGN"; then
23774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23775$as_echo "$CODESIGN" >&6; }
23776else
23777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23778$as_echo "no" >&6; }
23779fi
23780
23781
23782  test -n "$CODESIGN" && break
23783done
23784
23785    else
23786      # If it succeeded, then it was overridden by the user. We will use it
23787      # for the tool.
23788
23789      # First remove it from the list of overridden variables, so we can test
23790      # for unknown variables in the end.
23791      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23792
23793      # Check if we try to supply an empty value
23794      if test "x$CODESIGN" = x; then
23795        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23796$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23798$as_echo_n "checking for CODESIGN... " >&6; }
23799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23800$as_echo "disabled" >&6; }
23801      else
23802        # Check if the provided tool contains a complete path.
23803        tool_specified="$CODESIGN"
23804        tool_basename="${tool_specified##*/}"
23805        if test "x$tool_basename" = "x$tool_specified"; then
23806          # A command without a complete path is provided, search $PATH.
23807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23808$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23809          # Extract the first word of "$tool_basename", so it can be a program name with args.
23810set dummy $tool_basename; ac_word=$2
23811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23812$as_echo_n "checking for $ac_word... " >&6; }
23813if ${ac_cv_path_CODESIGN+:} false; then :
23814  $as_echo_n "(cached) " >&6
23815else
23816  case $CODESIGN in
23817  [\\/]* | ?:[\\/]*)
23818  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23819  ;;
23820  *)
23821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23822for as_dir in $PATH
23823do
23824  IFS=$as_save_IFS
23825  test -z "$as_dir" && as_dir=.
23826    for ac_exec_ext in '' $ac_executable_extensions; do
23827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23828    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23830    break 2
23831  fi
23832done
23833  done
23834IFS=$as_save_IFS
23835
23836  ;;
23837esac
23838fi
23839CODESIGN=$ac_cv_path_CODESIGN
23840if test -n "$CODESIGN"; then
23841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23842$as_echo "$CODESIGN" >&6; }
23843else
23844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23845$as_echo "no" >&6; }
23846fi
23847
23848
23849          if test "x$CODESIGN" = x; then
23850            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23851          fi
23852        else
23853          # Otherwise we believe it is a complete path. Use it as it is.
23854          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23855$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23856          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23857$as_echo_n "checking for CODESIGN... " >&6; }
23858          if test ! -x "$tool_specified"; then
23859            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23860$as_echo "not found" >&6; }
23861            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23862          fi
23863          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23864$as_echo "$tool_specified" >&6; }
23865        fi
23866      fi
23867    fi
23868
23869  fi
23870
23871
23872    if test "x$CODESIGN" != "x"; then
23873      # Verify that the openjdk_codesign certificate is present
23874      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23875$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23876      $RM codesign-testfile
23877      $TOUCH codesign-testfile
23878      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23879      $RM codesign-testfile
23880      if test "x$CODESIGN" = x; then
23881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23882$as_echo "no" >&6; }
23883      else
23884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23885$as_echo "yes" >&6; }
23886      fi
23887    fi
23888
23889
23890
23891  # Publish this variable in the help.
23892
23893
23894  if [ -z "${SETFILE+x}" ]; then
23895    # The variable is not set by user, try to locate tool using the code snippet
23896    for ac_prog in SetFile
23897do
23898  # Extract the first word of "$ac_prog", so it can be a program name with args.
23899set dummy $ac_prog; ac_word=$2
23900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23901$as_echo_n "checking for $ac_word... " >&6; }
23902if ${ac_cv_path_SETFILE+:} false; then :
23903  $as_echo_n "(cached) " >&6
23904else
23905  case $SETFILE in
23906  [\\/]* | ?:[\\/]*)
23907  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23908  ;;
23909  *)
23910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23911for as_dir in $PATH
23912do
23913  IFS=$as_save_IFS
23914  test -z "$as_dir" && as_dir=.
23915    for ac_exec_ext in '' $ac_executable_extensions; do
23916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23917    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23919    break 2
23920  fi
23921done
23922  done
23923IFS=$as_save_IFS
23924
23925  ;;
23926esac
23927fi
23928SETFILE=$ac_cv_path_SETFILE
23929if test -n "$SETFILE"; then
23930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23931$as_echo "$SETFILE" >&6; }
23932else
23933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23934$as_echo "no" >&6; }
23935fi
23936
23937
23938  test -n "$SETFILE" && break
23939done
23940
23941  else
23942    # The variable is set, but is it from the command line or the environment?
23943
23944    # Try to remove the string !SETFILE! from our list.
23945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23947      # If it failed, the variable was not from the command line. Ignore it,
23948      # but warn the user (except for BASH, which is always set by the calling BASH).
23949      if test "xSETFILE" != xBASH; then
23950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23951$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23952      fi
23953      # Try to locate tool using the code snippet
23954      for ac_prog in SetFile
23955do
23956  # Extract the first word of "$ac_prog", so it can be a program name with args.
23957set dummy $ac_prog; ac_word=$2
23958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23959$as_echo_n "checking for $ac_word... " >&6; }
23960if ${ac_cv_path_SETFILE+:} false; then :
23961  $as_echo_n "(cached) " >&6
23962else
23963  case $SETFILE in
23964  [\\/]* | ?:[\\/]*)
23965  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23966  ;;
23967  *)
23968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23969for as_dir in $PATH
23970do
23971  IFS=$as_save_IFS
23972  test -z "$as_dir" && as_dir=.
23973    for ac_exec_ext in '' $ac_executable_extensions; do
23974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23975    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23977    break 2
23978  fi
23979done
23980  done
23981IFS=$as_save_IFS
23982
23983  ;;
23984esac
23985fi
23986SETFILE=$ac_cv_path_SETFILE
23987if test -n "$SETFILE"; then
23988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23989$as_echo "$SETFILE" >&6; }
23990else
23991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23992$as_echo "no" >&6; }
23993fi
23994
23995
23996  test -n "$SETFILE" && break
23997done
23998
23999    else
24000      # If it succeeded, then it was overridden by the user. We will use it
24001      # for the tool.
24002
24003      # First remove it from the list of overridden variables, so we can test
24004      # for unknown variables in the end.
24005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24006
24007      # Check if we try to supply an empty value
24008      if test "x$SETFILE" = x; then
24009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24010$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24012$as_echo_n "checking for SETFILE... " >&6; }
24013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24014$as_echo "disabled" >&6; }
24015      else
24016        # Check if the provided tool contains a complete path.
24017        tool_specified="$SETFILE"
24018        tool_basename="${tool_specified##*/}"
24019        if test "x$tool_basename" = "x$tool_specified"; then
24020          # A command without a complete path is provided, search $PATH.
24021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24022$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24023          # Extract the first word of "$tool_basename", so it can be a program name with args.
24024set dummy $tool_basename; ac_word=$2
24025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24026$as_echo_n "checking for $ac_word... " >&6; }
24027if ${ac_cv_path_SETFILE+:} false; then :
24028  $as_echo_n "(cached) " >&6
24029else
24030  case $SETFILE in
24031  [\\/]* | ?:[\\/]*)
24032  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24033  ;;
24034  *)
24035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24036for as_dir in $PATH
24037do
24038  IFS=$as_save_IFS
24039  test -z "$as_dir" && as_dir=.
24040    for ac_exec_ext in '' $ac_executable_extensions; do
24041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24042    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24044    break 2
24045  fi
24046done
24047  done
24048IFS=$as_save_IFS
24049
24050  ;;
24051esac
24052fi
24053SETFILE=$ac_cv_path_SETFILE
24054if test -n "$SETFILE"; then
24055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24056$as_echo "$SETFILE" >&6; }
24057else
24058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24059$as_echo "no" >&6; }
24060fi
24061
24062
24063          if test "x$SETFILE" = x; then
24064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24065          fi
24066        else
24067          # Otherwise we believe it is a complete path. Use it as it is.
24068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24069$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24071$as_echo_n "checking for SETFILE... " >&6; }
24072          if test ! -x "$tool_specified"; then
24073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24074$as_echo "not found" >&6; }
24075            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24076          fi
24077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24078$as_echo "$tool_specified" >&6; }
24079        fi
24080      fi
24081    fi
24082
24083  fi
24084
24085
24086
24087  if test "x$SETFILE" = x; then
24088    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24089  fi
24090
24091
24092  fi
24093
24094
24095  # Check bash version
24096  # Extra [ ] to stop m4 mangling
24097   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24099$as_echo_n "checking bash version... " >&6; }
24100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24101$as_echo "$BASH_VER" >&6; }
24102
24103  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24104  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24105  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24106    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24107  fi
24108
24109  # Test if bash supports pipefail.
24110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24111$as_echo_n "checking if bash supports pipefail... " >&6; }
24112  if ${BASH} -c 'set -o pipefail'; then
24113    BASH_ARGS="$BASH_ARGS -o pipefail"
24114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24115$as_echo "yes" >&6; }
24116  else
24117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24118$as_echo "no" >&6; }
24119  fi
24120
24121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24122$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24123  if ${BASH} -e -c 'true'; then
24124    BASH_ARGS="$BASH_ARGS -e"
24125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24126$as_echo "yes" >&6; }
24127  else
24128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24129$as_echo "no" >&6; }
24130  fi
24131
24132
24133
24134
24135# Check if pkg-config is available.
24136
24137
24138if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24139	if test -n "$ac_tool_prefix"; then
24140  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24141set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24143$as_echo_n "checking for $ac_word... " >&6; }
24144if ${ac_cv_path_PKG_CONFIG+:} false; then :
24145  $as_echo_n "(cached) " >&6
24146else
24147  case $PKG_CONFIG in
24148  [\\/]* | ?:[\\/]*)
24149  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24150  ;;
24151  *)
24152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24153for as_dir in $PATH
24154do
24155  IFS=$as_save_IFS
24156  test -z "$as_dir" && as_dir=.
24157    for ac_exec_ext in '' $ac_executable_extensions; do
24158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24159    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24161    break 2
24162  fi
24163done
24164  done
24165IFS=$as_save_IFS
24166
24167  ;;
24168esac
24169fi
24170PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24171if test -n "$PKG_CONFIG"; then
24172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24173$as_echo "$PKG_CONFIG" >&6; }
24174else
24175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24176$as_echo "no" >&6; }
24177fi
24178
24179
24180fi
24181if test -z "$ac_cv_path_PKG_CONFIG"; then
24182  ac_pt_PKG_CONFIG=$PKG_CONFIG
24183  # Extract the first word of "pkg-config", so it can be a program name with args.
24184set dummy pkg-config; ac_word=$2
24185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24186$as_echo_n "checking for $ac_word... " >&6; }
24187if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24188  $as_echo_n "(cached) " >&6
24189else
24190  case $ac_pt_PKG_CONFIG in
24191  [\\/]* | ?:[\\/]*)
24192  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24193  ;;
24194  *)
24195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24196for as_dir in $PATH
24197do
24198  IFS=$as_save_IFS
24199  test -z "$as_dir" && as_dir=.
24200    for ac_exec_ext in '' $ac_executable_extensions; do
24201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24202    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24204    break 2
24205  fi
24206done
24207  done
24208IFS=$as_save_IFS
24209
24210  ;;
24211esac
24212fi
24213ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24214if test -n "$ac_pt_PKG_CONFIG"; then
24215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24216$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24217else
24218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24219$as_echo "no" >&6; }
24220fi
24221
24222  if test "x$ac_pt_PKG_CONFIG" = x; then
24223    PKG_CONFIG=""
24224  else
24225    case $cross_compiling:$ac_tool_warned in
24226yes:)
24227{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24228$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24229ac_tool_warned=yes ;;
24230esac
24231    PKG_CONFIG=$ac_pt_PKG_CONFIG
24232  fi
24233else
24234  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24235fi
24236
24237fi
24238if test -n "$PKG_CONFIG"; then
24239	_pkg_min_version=0.9.0
24240	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24241$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24242	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24243		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24244$as_echo "yes" >&6; }
24245	else
24246		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24247$as_echo "no" >&6; }
24248		PKG_CONFIG=""
24249	fi
24250
24251fi
24252
24253# After basic tools have been setup, we can check build os specific details.
24254
24255  ###############################################################################
24256
24257  # Note that this is the build platform OS version!
24258
24259  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24260  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24261  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24262  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24263
24264
24265
24266
24267
24268# Misc basic settings
24269
24270
24271# Check whether --with-default-make-target was given.
24272if test "${with_default_make_target+set}" = set; then :
24273  withval=$with_default_make_target;
24274fi
24275
24276  if test "x$with_default_make_target" = "x" \
24277      || test "x$with_default_make_target" = "xyes"; then
24278    DEFAULT_MAKE_TARGET="exploded-image"
24279  elif test "x$with_default_make_target" = "xno"; then
24280    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24281  else
24282    DEFAULT_MAKE_TARGET="$with_default_make_target"
24283  fi
24284
24285
24286
24287
24288###############################################################################
24289#
24290# Determine OpenJDK variants, options and version numbers.
24291#
24292###############################################################################
24293
24294# We need build & target for this.
24295
24296  # Should we build a JDK without a graphical UI?
24297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24298$as_echo_n "checking headless only... " >&6; }
24299  # Check whether --enable-headless-only was given.
24300if test "${enable_headless_only+set}" = set; then :
24301  enableval=$enable_headless_only;
24302fi
24303
24304
24305  if test "x$enable_headless_only" = "xyes"; then
24306    ENABLE_HEADLESS_ONLY="true"
24307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24308$as_echo "yes" >&6; }
24309  elif test "x$enable_headless_only" = "xno"; then
24310    ENABLE_HEADLESS_ONLY="false"
24311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24312$as_echo "no" >&6; }
24313  elif test "x$enable_headless_only" = "x"; then
24314    ENABLE_HEADLESS_ONLY="false"
24315    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24316$as_echo "no" >&6; }
24317  else
24318    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24319  fi
24320
24321
24322
24323  # Choose cacerts source file
24324
24325# Check whether --with-cacerts-file was given.
24326if test "${with_cacerts_file+set}" = set; then :
24327  withval=$with_cacerts_file;
24328fi
24329
24330  if test "x$with_cacerts_file" != x; then
24331    CACERTS_FILE=$with_cacerts_file
24332  fi
24333
24334
24335  # Enable or disable unlimited crypto
24336  # Check whether --enable-unlimited-crypto was given.
24337if test "${enable_unlimited_crypto+set}" = set; then :
24338  enableval=$enable_unlimited_crypto;
24339else
24340  enable_unlimited_crypto=yes
24341fi
24342
24343  if test "x$enable_unlimited_crypto" = "xyes"; then
24344    UNLIMITED_CRYPTO=true
24345  else
24346    UNLIMITED_CRYPTO=false
24347  fi
24348
24349
24350  # Should we build the serviceability agent (SA)?
24351  INCLUDE_SA=true
24352  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24353    INCLUDE_SA=false
24354  fi
24355  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24356    INCLUDE_SA=false
24357  fi
24358
24359
24360  # Compress jars
24361  COMPRESS_JARS=false
24362
24363
24364
24365  # Setup default copyright year. Mostly overridden when building close to a new year.
24366
24367# Check whether --with-copyright-year was given.
24368if test "${with_copyright_year+set}" = set; then :
24369  withval=$with_copyright_year;
24370fi
24371
24372  if test "x$with_copyright_year" = xyes; then
24373    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24374  elif test "x$with_copyright_year" != x; then
24375    COPYRIGHT_YEAR="$with_copyright_year"
24376  else
24377    COPYRIGHT_YEAR=`$DATE +'%Y'`
24378  fi
24379
24380
24381
24382  # Check whether --enable-keep-packaged-modules was given.
24383if test "${enable_keep_packaged_modules+set}" = set; then :
24384  enableval=$enable_keep_packaged_modules;
24385fi
24386
24387
24388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24389$as_echo_n "checking if packaged modules are kept... " >&6; }
24390  if test "x$enable_keep_packaged_modules" = "xyes"; then
24391    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24392$as_echo "yes" >&6; }
24393    JLINK_KEEP_PACKAGED_MODULES=true
24394  elif test "x$enable_keep_packaged_modules" = "xno"; then
24395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24396$as_echo "no" >&6; }
24397    JLINK_KEEP_PACKAGED_MODULES=false
24398  elif test "x$enable_keep_packaged_modules" = "x"; then
24399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24400$as_echo "yes (default)" >&6; }
24401    JLINK_KEEP_PACKAGED_MODULES=true
24402  else
24403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24404$as_echo "error" >&6; }
24405    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24406  fi
24407
24408
24409
24410
24411  # Warn user that old version arguments are deprecated.
24412
24413
24414# Check whether --with-milestone was given.
24415if test "${with_milestone+set}" = set; then :
24416  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24417$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24418fi
24419
24420
24421
24422
24423# Check whether --with-update-version was given.
24424if test "${with_update_version+set}" = set; then :
24425  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24426$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24427fi
24428
24429
24430
24431
24432# Check whether --with-user-release-suffix was given.
24433if test "${with_user_release_suffix+set}" = set; then :
24434  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
24435$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24436fi
24437
24438
24439
24440
24441# Check whether --with-build-number was given.
24442if test "${with_build_number+set}" = set; then :
24443  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24444$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24445fi
24446
24447
24448
24449  # Source the version numbers file
24450  . $AUTOCONF_DIR/version-numbers
24451
24452  # Some non-version number information is set in that file
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462  # Override version from arguments
24463
24464  # If --with-version-string is set, process it first. It is possible to
24465  # override parts with more specific flags, since these are processed later.
24466
24467# Check whether --with-version-string was given.
24468if test "${with_version_string+set}" = set; then :
24469  withval=$with_version_string;
24470fi
24471
24472  if test "x$with_version_string" = xyes; then
24473    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24474  elif test "x$with_version_string" != x; then
24475    # Additional [] needed to keep m4 from mangling shell constructs.
24476    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24477      VERSION_MAJOR=${BASH_REMATCH[1]}
24478      VERSION_MINOR=${BASH_REMATCH[3]}
24479      VERSION_SECURITY=${BASH_REMATCH[5]}
24480      VERSION_PATCH=${BASH_REMATCH[7]}
24481      VERSION_PRE=${BASH_REMATCH[9]}
24482      version_plus_separator=${BASH_REMATCH[11]}
24483      VERSION_BUILD=${BASH_REMATCH[12]}
24484      VERSION_OPT=${BASH_REMATCH[14]}
24485      # Unspecified numerical fields are interpreted as 0.
24486      if test "x$VERSION_MINOR" = x; then
24487        VERSION_MINOR=0
24488      fi
24489      if test "x$VERSION_SECURITY" = x; then
24490        VERSION_SECURITY=0
24491      fi
24492      if test "x$VERSION_PATCH" = x; then
24493        VERSION_PATCH=0
24494      fi
24495      if test "x$version_plus_separator" != x \
24496          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24497        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24498      fi
24499      # Stop the version part process from setting default values.
24500      # We still allow them to explicitly override though.
24501      NO_DEFAULT_VERSION_PARTS=true
24502    else
24503      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24504    fi
24505  fi
24506
24507
24508# Check whether --with-version-pre was given.
24509if test "${with_version_pre+set}" = set; then :
24510  withval=$with_version_pre; with_version_pre_present=true
24511else
24512  with_version_pre_present=false
24513fi
24514
24515
24516  if test "x$with_version_pre_present" = xtrue; then
24517    if test "x$with_version_pre" = xyes; then
24518      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24519    elif test "x$with_version_pre" = xno; then
24520      # Interpret --without-* as empty string instead of the literal "no"
24521      VERSION_PRE=
24522    else
24523      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24524       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24525      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24526        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24527$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24528      fi
24529    fi
24530  else
24531    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24532      # Default is to use "internal" as pre
24533      VERSION_PRE="internal"
24534    fi
24535  fi
24536
24537
24538# Check whether --with-version-opt was given.
24539if test "${with_version_opt+set}" = set; then :
24540  withval=$with_version_opt; with_version_opt_present=true
24541else
24542  with_version_opt_present=false
24543fi
24544
24545
24546  if test "x$with_version_opt_present" = xtrue; then
24547    if test "x$with_version_opt" = xyes; then
24548      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24549    elif test "x$with_version_opt" = xno; then
24550      # Interpret --without-* as empty string instead of the literal "no"
24551      VERSION_OPT=
24552    else
24553      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24554       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24555      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24557$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24558      fi
24559    fi
24560  else
24561    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24562      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24563      # Outer [ ] to quote m4.
24564       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24565      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24566    fi
24567  fi
24568
24569
24570# Check whether --with-version-build was given.
24571if test "${with_version_build+set}" = set; then :
24572  withval=$with_version_build; with_version_build_present=true
24573else
24574  with_version_build_present=false
24575fi
24576
24577
24578  if test "x$with_version_build_present" = xtrue; then
24579    if test "x$with_version_build" = xyes; then
24580      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24581    elif test "x$with_version_build" = xno; then
24582      # Interpret --without-* as empty string instead of the literal "no"
24583      VERSION_BUILD=
24584    elif test "x$with_version_build" = x; then
24585      VERSION_BUILD=
24586    else
24587
24588  # Additional [] needed to keep m4 from mangling shell constructs.
24589  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24590    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24591  fi
24592  # Extract the version number without leading zeros.
24593  cleaned_value=${BASH_REMATCH[1]}
24594  if test "x$cleaned_value" = x; then
24595    # Special case for zero
24596    cleaned_value=${BASH_REMATCH[2]}
24597  fi
24598
24599  if test $cleaned_value -gt 255; then
24600    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24601  fi
24602  if test "x$cleaned_value" != "x$with_version_build"; then
24603    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24604$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24605  fi
24606  VERSION_BUILD=$cleaned_value
24607
24608    fi
24609  else
24610    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24611      # Default is to not have a build number.
24612      VERSION_BUILD=""
24613      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24614      VERSION_BUILD=0
24615    fi
24616  fi
24617
24618
24619# Check whether --with-version-major was given.
24620if test "${with_version_major+set}" = set; then :
24621  withval=$with_version_major; with_version_major_present=true
24622else
24623  with_version_major_present=false
24624fi
24625
24626
24627  if test "x$with_version_major_present" = xtrue; then
24628    if test "x$with_version_major" = xyes; then
24629      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24630    else
24631
24632  # Additional [] needed to keep m4 from mangling shell constructs.
24633  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24634    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24635  fi
24636  # Extract the version number without leading zeros.
24637  cleaned_value=${BASH_REMATCH[1]}
24638  if test "x$cleaned_value" = x; then
24639    # Special case for zero
24640    cleaned_value=${BASH_REMATCH[2]}
24641  fi
24642
24643  if test $cleaned_value -gt 255; then
24644    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24645  fi
24646  if test "x$cleaned_value" != "x$with_version_major"; then
24647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24648$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24649  fi
24650  VERSION_MAJOR=$cleaned_value
24651
24652    fi
24653  else
24654    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24655      # Default is to get value from version-numbers
24656      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24657    fi
24658  fi
24659
24660
24661# Check whether --with-version-minor was given.
24662if test "${with_version_minor+set}" = set; then :
24663  withval=$with_version_minor; with_version_minor_present=true
24664else
24665  with_version_minor_present=false
24666fi
24667
24668
24669  if test "x$with_version_minor_present" = xtrue; then
24670    if test "x$with_version_minor" = xyes; then
24671      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24672    elif test "x$with_version_minor" = xno; then
24673      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24674      VERSION_MINOR=0
24675    elif test "x$with_version_minor" = x; then
24676      VERSION_MINOR=0
24677    else
24678
24679  # Additional [] needed to keep m4 from mangling shell constructs.
24680  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24681    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24682  fi
24683  # Extract the version number without leading zeros.
24684  cleaned_value=${BASH_REMATCH[1]}
24685  if test "x$cleaned_value" = x; then
24686    # Special case for zero
24687    cleaned_value=${BASH_REMATCH[2]}
24688  fi
24689
24690  if test $cleaned_value -gt 255; then
24691    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24692  fi
24693  if test "x$cleaned_value" != "x$with_version_minor"; then
24694    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24695$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24696  fi
24697  VERSION_MINOR=$cleaned_value
24698
24699    fi
24700  else
24701    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24702      # Default is 0, if unspecified
24703      VERSION_MINOR=$DEFAULT_VERSION_MINOR
24704    fi
24705  fi
24706
24707
24708# Check whether --with-version-security was given.
24709if test "${with_version_security+set}" = set; then :
24710  withval=$with_version_security; with_version_security_present=true
24711else
24712  with_version_security_present=false
24713fi
24714
24715
24716  if test "x$with_version_security_present" = xtrue; then
24717    if test "x$with_version_security" = xyes; then
24718      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24719    elif test "x$with_version_security" = xno; then
24720      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24721      VERSION_SECURITY=0
24722    elif test "x$with_version_security" = x; then
24723      VERSION_SECURITY=0
24724    else
24725
24726  # Additional [] needed to keep m4 from mangling shell constructs.
24727  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24728    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24729  fi
24730  # Extract the version number without leading zeros.
24731  cleaned_value=${BASH_REMATCH[1]}
24732  if test "x$cleaned_value" = x; then
24733    # Special case for zero
24734    cleaned_value=${BASH_REMATCH[2]}
24735  fi
24736
24737  if test $cleaned_value -gt 255; then
24738    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24739  fi
24740  if test "x$cleaned_value" != "x$with_version_security"; then
24741    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24742$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24743  fi
24744  VERSION_SECURITY=$cleaned_value
24745
24746    fi
24747  else
24748    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24749      # Default is 0, if unspecified
24750      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
24751    fi
24752  fi
24753
24754
24755# Check whether --with-version-patch was given.
24756if test "${with_version_patch+set}" = set; then :
24757  withval=$with_version_patch; with_version_patch_present=true
24758else
24759  with_version_patch_present=false
24760fi
24761
24762
24763  if test "x$with_version_patch_present" = xtrue; then
24764    if test "x$with_version_patch" = xyes; then
24765      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24766    elif test "x$with_version_patch" = xno; then
24767      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24768      VERSION_PATCH=0
24769    elif test "x$with_version_patch" = x; then
24770      VERSION_PATCH=0
24771    else
24772
24773  # Additional [] needed to keep m4 from mangling shell constructs.
24774  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24775    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24776  fi
24777  # Extract the version number without leading zeros.
24778  cleaned_value=${BASH_REMATCH[1]}
24779  if test "x$cleaned_value" = x; then
24780    # Special case for zero
24781    cleaned_value=${BASH_REMATCH[2]}
24782  fi
24783
24784  if test $cleaned_value -gt 255; then
24785    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24786  fi
24787  if test "x$cleaned_value" != "x$with_version_patch"; then
24788    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24789$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24790  fi
24791  VERSION_PATCH=$cleaned_value
24792
24793    fi
24794  else
24795    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24796      # Default is 0, if unspecified
24797      VERSION_PATCH=$DEFAULT_VERSION_PATCH
24798    fi
24799  fi
24800
24801  # Calculate derived version properties
24802
24803  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24804  if test "x$VERSION_PRE" = x; then
24805    VERSION_IS_GA=true
24806  else
24807    VERSION_IS_GA=false
24808  fi
24809
24810  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24811  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24812
24813  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24814  # Strip trailing zeroes from stripped_version_number
24815  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24816  VERSION_NUMBER=$stripped_version_number
24817
24818  # The complete version string, with additional build information
24819  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24820    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24821  else
24822    # If either build or opt is set, we need a + separator
24823    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24824  fi
24825
24826  # The short version string, just VERSION_NUMBER and PRE, if present.
24827  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24828
24829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24830$as_echo_n "checking for version string... " >&6; }
24831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24832$as_echo "$VERSION_STRING" >&6; }
24833
24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848###############################################################################
24849#
24850# Setup BootJDK, used to bootstrap the build.
24851#
24852###############################################################################
24853
24854
24855  BOOT_JDK_FOUND=no
24856
24857# Check whether --with-boot-jdk was given.
24858if test "${with_boot_jdk+set}" = set; then :
24859  withval=$with_boot_jdk;
24860fi
24861
24862
24863  # We look for the Boot JDK through various means, going from more certain to
24864  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24865  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24866  # must check if this is indeed valid; otherwise we'll continue looking.
24867
24868  # Test: Is bootjdk explicitly set by command line arguments?
24869
24870  if test "x$BOOT_JDK_FOUND" = xno; then
24871    # Now execute the test
24872
24873  if test "x$with_boot_jdk" != x; then
24874    BOOT_JDK=$with_boot_jdk
24875    BOOT_JDK_FOUND=maybe
24876    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24877$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24878  fi
24879
24880
24881    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24882    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24883      # Do we have a bin/java?
24884      if test ! -x "$BOOT_JDK/bin/java"; then
24885        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24886$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24887        BOOT_JDK_FOUND=no
24888      else
24889        # Do we have a bin/javac?
24890        if test ! -x "$BOOT_JDK/bin/javac"; then
24891          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24893          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24894$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24895          BOOT_JDK_FOUND=no
24896        else
24897          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24898          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24899
24900          # Extra M4 quote needed to protect [] in grep expression.
24901          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24902          if test "x$FOUND_CORRECT_VERSION" = x; then
24903            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24905            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24906$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24907            BOOT_JDK_FOUND=no
24908          else
24909            # We're done! :-)
24910            BOOT_JDK_FOUND=yes
24911
24912  # Only process if variable expands to non-empty
24913
24914  if test "x$BOOT_JDK" != x; then
24915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24916
24917  # Input might be given as Windows format, start by converting to
24918  # unix format.
24919  path="$BOOT_JDK"
24920  new_path=`$CYGPATH -u "$path"`
24921
24922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24925  # "foo.exe" is OK but "foo" is an error.
24926  #
24927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24928  # It is also a way to make sure we got the proper file name for the real test later on.
24929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24930  if test "x$test_shortpath" = x; then
24931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24932$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24933    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24934  fi
24935
24936  # Call helper function which possibly converts this using DOS-style short mode.
24937  # If so, the updated path is stored in $new_path.
24938
24939  input_path="$new_path"
24940  # Check if we need to convert this using DOS-style short mode. If the path
24941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24942  # take no chances and rewrite it.
24943  # Note: m4 eats our [], so we need to use [ and ] instead.
24944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24945  if test "x$has_forbidden_chars" != x; then
24946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24950      # Going to short mode and back again did indeed matter. Since short mode is
24951      # case insensitive, let's make it lowercase to improve readability.
24952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24953      # Now convert it back to Unix-style (cygpath)
24954      input_path=`$CYGPATH -u "$shortmode_path"`
24955      new_path="$input_path"
24956    fi
24957  fi
24958
24959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24960  if test "x$test_cygdrive_prefix" = x; then
24961    # As a simple fix, exclude /usr/bin since it's not a real path.
24962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24964      # a path prefixed by /cygdrive for fixpath to work.
24965      new_path="$CYGWIN_ROOT_PATH$input_path"
24966    fi
24967  fi
24968
24969
24970  if test "x$path" != "x$new_path"; then
24971    BOOT_JDK="$new_path"
24972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24973$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24974  fi
24975
24976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24977
24978  path="$BOOT_JDK"
24979  has_colon=`$ECHO $path | $GREP ^.:`
24980  new_path="$path"
24981  if test "x$has_colon" = x; then
24982    # Not in mixed or Windows style, start by that.
24983    new_path=`cmd //c echo $path`
24984  fi
24985
24986
24987  input_path="$new_path"
24988  # Check if we need to convert this using DOS-style short mode. If the path
24989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24990  # take no chances and rewrite it.
24991  # Note: m4 eats our [], so we need to use [ and ] instead.
24992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24993  if test "x$has_forbidden_chars" != x; then
24994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24996  fi
24997
24998
24999  windows_path="$new_path"
25000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25001    unix_path=`$CYGPATH -u "$windows_path"`
25002    new_path="$unix_path"
25003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25005    new_path="$unix_path"
25006  fi
25007
25008  if test "x$path" != "x$new_path"; then
25009    BOOT_JDK="$new_path"
25010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25011$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25012  fi
25013
25014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25016
25017    else
25018      # We're on a unix platform. Hooray! :)
25019      path="$BOOT_JDK"
25020      has_space=`$ECHO "$path" | $GREP " "`
25021      if test "x$has_space" != x; then
25022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25023$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25025      fi
25026
25027      # Use eval to expand a potential ~
25028      eval path="$path"
25029      if test ! -f "$path" && test ! -d "$path"; then
25030        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25031      fi
25032
25033      if test -d "$path"; then
25034        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25035      else
25036        dir="`$DIRNAME "$path"`"
25037        base="`$BASENAME "$path"`"
25038        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25039      fi
25040    fi
25041  fi
25042
25043            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25044$as_echo_n "checking for Boot JDK... " >&6; }
25045            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25046$as_echo "$BOOT_JDK" >&6; }
25047            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25048$as_echo_n "checking Boot JDK version... " >&6; }
25049            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25051$as_echo "$BOOT_JDK_VERSION" >&6; }
25052          fi # end check jdk version
25053        fi # end check javac
25054      fi # end check java
25055    fi # end check boot jdk found
25056  fi
25057
25058  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25059    # Having specified an argument which is incorrect will produce an instant failure;
25060    # we should not go on looking
25061    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25062  fi
25063
25064  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25065
25066  if test "x$BOOT_JDK_FOUND" = xno; then
25067    # Now execute the test
25068
25069  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25070    # First check at user selected default
25071
25072  if test "x$BOOT_JDK_FOUND" = xno; then
25073    # Now execute the test
25074
25075  if test -x /usr/libexec/java_home; then
25076    BOOT_JDK=`/usr/libexec/java_home `
25077    BOOT_JDK_FOUND=maybe
25078    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25079$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25080  fi
25081
25082
25083    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25084    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25085      # Do we have a bin/java?
25086      if test ! -x "$BOOT_JDK/bin/java"; then
25087        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25089        BOOT_JDK_FOUND=no
25090      else
25091        # Do we have a bin/javac?
25092        if test ! -x "$BOOT_JDK/bin/javac"; then
25093          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25095          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25096$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25097          BOOT_JDK_FOUND=no
25098        else
25099          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25100          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25101
25102          # Extra M4 quote needed to protect [] in grep expression.
25103          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25104          if test "x$FOUND_CORRECT_VERSION" = x; then
25105            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25107            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25108$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25109            BOOT_JDK_FOUND=no
25110          else
25111            # We're done! :-)
25112            BOOT_JDK_FOUND=yes
25113
25114  # Only process if variable expands to non-empty
25115
25116  if test "x$BOOT_JDK" != x; then
25117    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25118
25119  # Input might be given as Windows format, start by converting to
25120  # unix format.
25121  path="$BOOT_JDK"
25122  new_path=`$CYGPATH -u "$path"`
25123
25124  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25125  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25126  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25127  # "foo.exe" is OK but "foo" is an error.
25128  #
25129  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25130  # It is also a way to make sure we got the proper file name for the real test later on.
25131  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25132  if test "x$test_shortpath" = x; then
25133    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25134$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25135    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25136  fi
25137
25138  # Call helper function which possibly converts this using DOS-style short mode.
25139  # If so, the updated path is stored in $new_path.
25140
25141  input_path="$new_path"
25142  # Check if we need to convert this using DOS-style short mode. If the path
25143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25144  # take no chances and rewrite it.
25145  # Note: m4 eats our [], so we need to use [ and ] instead.
25146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25147  if test "x$has_forbidden_chars" != x; then
25148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25149    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25150    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25151    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25152      # Going to short mode and back again did indeed matter. Since short mode is
25153      # case insensitive, let's make it lowercase to improve readability.
25154      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25155      # Now convert it back to Unix-style (cygpath)
25156      input_path=`$CYGPATH -u "$shortmode_path"`
25157      new_path="$input_path"
25158    fi
25159  fi
25160
25161  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25162  if test "x$test_cygdrive_prefix" = x; then
25163    # As a simple fix, exclude /usr/bin since it's not a real path.
25164    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25165      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25166      # a path prefixed by /cygdrive for fixpath to work.
25167      new_path="$CYGWIN_ROOT_PATH$input_path"
25168    fi
25169  fi
25170
25171
25172  if test "x$path" != "x$new_path"; then
25173    BOOT_JDK="$new_path"
25174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25175$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25176  fi
25177
25178    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25179
25180  path="$BOOT_JDK"
25181  has_colon=`$ECHO $path | $GREP ^.:`
25182  new_path="$path"
25183  if test "x$has_colon" = x; then
25184    # Not in mixed or Windows style, start by that.
25185    new_path=`cmd //c echo $path`
25186  fi
25187
25188
25189  input_path="$new_path"
25190  # Check if we need to convert this using DOS-style short mode. If the path
25191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25192  # take no chances and rewrite it.
25193  # Note: m4 eats our [], so we need to use [ and ] instead.
25194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25195  if test "x$has_forbidden_chars" != x; then
25196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25197    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25198  fi
25199
25200
25201  windows_path="$new_path"
25202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25203    unix_path=`$CYGPATH -u "$windows_path"`
25204    new_path="$unix_path"
25205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25207    new_path="$unix_path"
25208  fi
25209
25210  if test "x$path" != "x$new_path"; then
25211    BOOT_JDK="$new_path"
25212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25213$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25214  fi
25215
25216  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25217  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25218
25219    else
25220      # We're on a unix platform. Hooray! :)
25221      path="$BOOT_JDK"
25222      has_space=`$ECHO "$path" | $GREP " "`
25223      if test "x$has_space" != x; then
25224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25226        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25227      fi
25228
25229      # Use eval to expand a potential ~
25230      eval path="$path"
25231      if test ! -f "$path" && test ! -d "$path"; then
25232        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25233      fi
25234
25235      if test -d "$path"; then
25236        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25237      else
25238        dir="`$DIRNAME "$path"`"
25239        base="`$BASENAME "$path"`"
25240        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25241      fi
25242    fi
25243  fi
25244
25245            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25246$as_echo_n "checking for Boot JDK... " >&6; }
25247            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25248$as_echo "$BOOT_JDK" >&6; }
25249            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25250$as_echo_n "checking Boot JDK version... " >&6; }
25251            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25253$as_echo "$BOOT_JDK_VERSION" >&6; }
25254          fi # end check jdk version
25255        fi # end check javac
25256      fi # end check java
25257    fi # end check boot jdk found
25258  fi
25259
25260    # If that did not work out (e.g. too old), try explicit versions instead
25261
25262  if test "x$BOOT_JDK_FOUND" = xno; then
25263    # Now execute the test
25264
25265  if test -x /usr/libexec/java_home; then
25266    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25267    BOOT_JDK_FOUND=maybe
25268    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25269$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25270  fi
25271
25272
25273    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25274    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25275      # Do we have a bin/java?
25276      if test ! -x "$BOOT_JDK/bin/java"; then
25277        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25279        BOOT_JDK_FOUND=no
25280      else
25281        # Do we have a bin/javac?
25282        if test ! -x "$BOOT_JDK/bin/javac"; then
25283          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25284$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25285          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25286$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25287          BOOT_JDK_FOUND=no
25288        else
25289          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25290          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25291
25292          # Extra M4 quote needed to protect [] in grep expression.
25293          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25294          if test "x$FOUND_CORRECT_VERSION" = x; then
25295            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25297            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25298$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25299            BOOT_JDK_FOUND=no
25300          else
25301            # We're done! :-)
25302            BOOT_JDK_FOUND=yes
25303
25304  # Only process if variable expands to non-empty
25305
25306  if test "x$BOOT_JDK" != x; then
25307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25308
25309  # Input might be given as Windows format, start by converting to
25310  # unix format.
25311  path="$BOOT_JDK"
25312  new_path=`$CYGPATH -u "$path"`
25313
25314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25317  # "foo.exe" is OK but "foo" is an error.
25318  #
25319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25320  # It is also a way to make sure we got the proper file name for the real test later on.
25321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25322  if test "x$test_shortpath" = x; then
25323    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25324$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25325    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25326  fi
25327
25328  # Call helper function which possibly converts this using DOS-style short mode.
25329  # If so, the updated path is stored in $new_path.
25330
25331  input_path="$new_path"
25332  # Check if we need to convert this using DOS-style short mode. If the path
25333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25334  # take no chances and rewrite it.
25335  # Note: m4 eats our [], so we need to use [ and ] instead.
25336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25337  if test "x$has_forbidden_chars" != x; then
25338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25342      # Going to short mode and back again did indeed matter. Since short mode is
25343      # case insensitive, let's make it lowercase to improve readability.
25344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25345      # Now convert it back to Unix-style (cygpath)
25346      input_path=`$CYGPATH -u "$shortmode_path"`
25347      new_path="$input_path"
25348    fi
25349  fi
25350
25351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25352  if test "x$test_cygdrive_prefix" = x; then
25353    # As a simple fix, exclude /usr/bin since it's not a real path.
25354    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25356      # a path prefixed by /cygdrive for fixpath to work.
25357      new_path="$CYGWIN_ROOT_PATH$input_path"
25358    fi
25359  fi
25360
25361
25362  if test "x$path" != "x$new_path"; then
25363    BOOT_JDK="$new_path"
25364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25365$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25366  fi
25367
25368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25369
25370  path="$BOOT_JDK"
25371  has_colon=`$ECHO $path | $GREP ^.:`
25372  new_path="$path"
25373  if test "x$has_colon" = x; then
25374    # Not in mixed or Windows style, start by that.
25375    new_path=`cmd //c echo $path`
25376  fi
25377
25378
25379  input_path="$new_path"
25380  # Check if we need to convert this using DOS-style short mode. If the path
25381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25382  # take no chances and rewrite it.
25383  # Note: m4 eats our [], so we need to use [ and ] instead.
25384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25385  if test "x$has_forbidden_chars" != x; then
25386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25388  fi
25389
25390
25391  windows_path="$new_path"
25392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25393    unix_path=`$CYGPATH -u "$windows_path"`
25394    new_path="$unix_path"
25395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25397    new_path="$unix_path"
25398  fi
25399
25400  if test "x$path" != "x$new_path"; then
25401    BOOT_JDK="$new_path"
25402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25403$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25404  fi
25405
25406  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25407  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25408
25409    else
25410      # We're on a unix platform. Hooray! :)
25411      path="$BOOT_JDK"
25412      has_space=`$ECHO "$path" | $GREP " "`
25413      if test "x$has_space" != x; then
25414        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25415$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25416        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25417      fi
25418
25419      # Use eval to expand a potential ~
25420      eval path="$path"
25421      if test ! -f "$path" && test ! -d "$path"; then
25422        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25423      fi
25424
25425      if test -d "$path"; then
25426        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25427      else
25428        dir="`$DIRNAME "$path"`"
25429        base="`$BASENAME "$path"`"
25430        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25431      fi
25432    fi
25433  fi
25434
25435            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25436$as_echo_n "checking for Boot JDK... " >&6; }
25437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25438$as_echo "$BOOT_JDK" >&6; }
25439            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25440$as_echo_n "checking Boot JDK version... " >&6; }
25441            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25442            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25443$as_echo "$BOOT_JDK_VERSION" >&6; }
25444          fi # end check jdk version
25445        fi # end check javac
25446      fi # end check java
25447    fi # end check boot jdk found
25448  fi
25449
25450
25451  if test "x$BOOT_JDK_FOUND" = xno; then
25452    # Now execute the test
25453
25454  if test -x /usr/libexec/java_home; then
25455    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25456    BOOT_JDK_FOUND=maybe
25457    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25458$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25459  fi
25460
25461
25462    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25463    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25464      # Do we have a bin/java?
25465      if test ! -x "$BOOT_JDK/bin/java"; then
25466        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25467$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25468        BOOT_JDK_FOUND=no
25469      else
25470        # Do we have a bin/javac?
25471        if test ! -x "$BOOT_JDK/bin/javac"; then
25472          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25473$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25474          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25475$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25476          BOOT_JDK_FOUND=no
25477        else
25478          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25479          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25480
25481          # Extra M4 quote needed to protect [] in grep expression.
25482          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25483          if test "x$FOUND_CORRECT_VERSION" = x; then
25484            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25485$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25486            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25487$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25488            BOOT_JDK_FOUND=no
25489          else
25490            # We're done! :-)
25491            BOOT_JDK_FOUND=yes
25492
25493  # Only process if variable expands to non-empty
25494
25495  if test "x$BOOT_JDK" != x; then
25496    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25497
25498  # Input might be given as Windows format, start by converting to
25499  # unix format.
25500  path="$BOOT_JDK"
25501  new_path=`$CYGPATH -u "$path"`
25502
25503  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25504  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25505  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25506  # "foo.exe" is OK but "foo" is an error.
25507  #
25508  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25509  # It is also a way to make sure we got the proper file name for the real test later on.
25510  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25511  if test "x$test_shortpath" = x; then
25512    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25513$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25514    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25515  fi
25516
25517  # Call helper function which possibly converts this using DOS-style short mode.
25518  # If so, the updated path is stored in $new_path.
25519
25520  input_path="$new_path"
25521  # Check if we need to convert this using DOS-style short mode. If the path
25522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25523  # take no chances and rewrite it.
25524  # Note: m4 eats our [], so we need to use [ and ] instead.
25525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25526  if test "x$has_forbidden_chars" != x; then
25527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25528    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25529    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25530    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25531      # Going to short mode and back again did indeed matter. Since short mode is
25532      # case insensitive, let's make it lowercase to improve readability.
25533      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25534      # Now convert it back to Unix-style (cygpath)
25535      input_path=`$CYGPATH -u "$shortmode_path"`
25536      new_path="$input_path"
25537    fi
25538  fi
25539
25540  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25541  if test "x$test_cygdrive_prefix" = x; then
25542    # As a simple fix, exclude /usr/bin since it's not a real path.
25543    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25544      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25545      # a path prefixed by /cygdrive for fixpath to work.
25546      new_path="$CYGWIN_ROOT_PATH$input_path"
25547    fi
25548  fi
25549
25550
25551  if test "x$path" != "x$new_path"; then
25552    BOOT_JDK="$new_path"
25553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25554$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25555  fi
25556
25557    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25558
25559  path="$BOOT_JDK"
25560  has_colon=`$ECHO $path | $GREP ^.:`
25561  new_path="$path"
25562  if test "x$has_colon" = x; then
25563    # Not in mixed or Windows style, start by that.
25564    new_path=`cmd //c echo $path`
25565  fi
25566
25567
25568  input_path="$new_path"
25569  # Check if we need to convert this using DOS-style short mode. If the path
25570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25571  # take no chances and rewrite it.
25572  # Note: m4 eats our [], so we need to use [ and ] instead.
25573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25574  if test "x$has_forbidden_chars" != x; then
25575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25576    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25577  fi
25578
25579
25580  windows_path="$new_path"
25581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25582    unix_path=`$CYGPATH -u "$windows_path"`
25583    new_path="$unix_path"
25584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25586    new_path="$unix_path"
25587  fi
25588
25589  if test "x$path" != "x$new_path"; then
25590    BOOT_JDK="$new_path"
25591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25592$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25593  fi
25594
25595  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25596  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25597
25598    else
25599      # We're on a unix platform. Hooray! :)
25600      path="$BOOT_JDK"
25601      has_space=`$ECHO "$path" | $GREP " "`
25602      if test "x$has_space" != x; then
25603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25604$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25605        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25606      fi
25607
25608      # Use eval to expand a potential ~
25609      eval path="$path"
25610      if test ! -f "$path" && test ! -d "$path"; then
25611        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25612      fi
25613
25614      if test -d "$path"; then
25615        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25616      else
25617        dir="`$DIRNAME "$path"`"
25618        base="`$BASENAME "$path"`"
25619        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25620      fi
25621    fi
25622  fi
25623
25624            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25625$as_echo_n "checking for Boot JDK... " >&6; }
25626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25627$as_echo "$BOOT_JDK" >&6; }
25628            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25629$as_echo_n "checking Boot JDK version... " >&6; }
25630            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25632$as_echo "$BOOT_JDK_VERSION" >&6; }
25633          fi # end check jdk version
25634        fi # end check javac
25635      fi # end check java
25636    fi # end check boot jdk found
25637  fi
25638
25639
25640  if test "x$BOOT_JDK_FOUND" = xno; then
25641    # Now execute the test
25642
25643  if test -x /usr/libexec/java_home; then
25644    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25645    BOOT_JDK_FOUND=maybe
25646    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25647$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25648  fi
25649
25650
25651    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25652    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25653      # Do we have a bin/java?
25654      if test ! -x "$BOOT_JDK/bin/java"; then
25655        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25657        BOOT_JDK_FOUND=no
25658      else
25659        # Do we have a bin/javac?
25660        if test ! -x "$BOOT_JDK/bin/javac"; then
25661          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25663          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25664$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25665          BOOT_JDK_FOUND=no
25666        else
25667          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25668          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25669
25670          # Extra M4 quote needed to protect [] in grep expression.
25671          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25672          if test "x$FOUND_CORRECT_VERSION" = x; then
25673            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25675            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25676$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25677            BOOT_JDK_FOUND=no
25678          else
25679            # We're done! :-)
25680            BOOT_JDK_FOUND=yes
25681
25682  # Only process if variable expands to non-empty
25683
25684  if test "x$BOOT_JDK" != x; then
25685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25686
25687  # Input might be given as Windows format, start by converting to
25688  # unix format.
25689  path="$BOOT_JDK"
25690  new_path=`$CYGPATH -u "$path"`
25691
25692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25695  # "foo.exe" is OK but "foo" is an error.
25696  #
25697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25698  # It is also a way to make sure we got the proper file name for the real test later on.
25699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25700  if test "x$test_shortpath" = x; then
25701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25702$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25703    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25704  fi
25705
25706  # Call helper function which possibly converts this using DOS-style short mode.
25707  # If so, the updated path is stored in $new_path.
25708
25709  input_path="$new_path"
25710  # Check if we need to convert this using DOS-style short mode. If the path
25711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25712  # take no chances and rewrite it.
25713  # Note: m4 eats our [], so we need to use [ and ] instead.
25714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25715  if test "x$has_forbidden_chars" != x; then
25716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25720      # Going to short mode and back again did indeed matter. Since short mode is
25721      # case insensitive, let's make it lowercase to improve readability.
25722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25723      # Now convert it back to Unix-style (cygpath)
25724      input_path=`$CYGPATH -u "$shortmode_path"`
25725      new_path="$input_path"
25726    fi
25727  fi
25728
25729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25730  if test "x$test_cygdrive_prefix" = x; then
25731    # As a simple fix, exclude /usr/bin since it's not a real path.
25732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25734      # a path prefixed by /cygdrive for fixpath to work.
25735      new_path="$CYGWIN_ROOT_PATH$input_path"
25736    fi
25737  fi
25738
25739
25740  if test "x$path" != "x$new_path"; then
25741    BOOT_JDK="$new_path"
25742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25743$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25744  fi
25745
25746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25747
25748  path="$BOOT_JDK"
25749  has_colon=`$ECHO $path | $GREP ^.:`
25750  new_path="$path"
25751  if test "x$has_colon" = x; then
25752    # Not in mixed or Windows style, start by that.
25753    new_path=`cmd //c echo $path`
25754  fi
25755
25756
25757  input_path="$new_path"
25758  # Check if we need to convert this using DOS-style short mode. If the path
25759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25760  # take no chances and rewrite it.
25761  # Note: m4 eats our [], so we need to use [ and ] instead.
25762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25763  if test "x$has_forbidden_chars" != x; then
25764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25766  fi
25767
25768
25769  windows_path="$new_path"
25770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25771    unix_path=`$CYGPATH -u "$windows_path"`
25772    new_path="$unix_path"
25773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25775    new_path="$unix_path"
25776  fi
25777
25778  if test "x$path" != "x$new_path"; then
25779    BOOT_JDK="$new_path"
25780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25781$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25782  fi
25783
25784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25786
25787    else
25788      # We're on a unix platform. Hooray! :)
25789      path="$BOOT_JDK"
25790      has_space=`$ECHO "$path" | $GREP " "`
25791      if test "x$has_space" != x; then
25792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25794        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25795      fi
25796
25797      # Use eval to expand a potential ~
25798      eval path="$path"
25799      if test ! -f "$path" && test ! -d "$path"; then
25800        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25801      fi
25802
25803      if test -d "$path"; then
25804        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25805      else
25806        dir="`$DIRNAME "$path"`"
25807        base="`$BASENAME "$path"`"
25808        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25809      fi
25810    fi
25811  fi
25812
25813            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25814$as_echo_n "checking for Boot JDK... " >&6; }
25815            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25816$as_echo "$BOOT_JDK" >&6; }
25817            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25818$as_echo_n "checking Boot JDK version... " >&6; }
25819            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25820            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25821$as_echo "$BOOT_JDK_VERSION" >&6; }
25822          fi # end check jdk version
25823        fi # end check javac
25824      fi # end check java
25825    fi # end check boot jdk found
25826  fi
25827
25828  fi
25829
25830
25831    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25832    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25833      # Do we have a bin/java?
25834      if test ! -x "$BOOT_JDK/bin/java"; then
25835        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25837        BOOT_JDK_FOUND=no
25838      else
25839        # Do we have a bin/javac?
25840        if test ! -x "$BOOT_JDK/bin/javac"; then
25841          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25843          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25844$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25845          BOOT_JDK_FOUND=no
25846        else
25847          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25848          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25849
25850          # Extra M4 quote needed to protect [] in grep expression.
25851          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25852          if test "x$FOUND_CORRECT_VERSION" = x; then
25853            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25855            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25856$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25857            BOOT_JDK_FOUND=no
25858          else
25859            # We're done! :-)
25860            BOOT_JDK_FOUND=yes
25861
25862  # Only process if variable expands to non-empty
25863
25864  if test "x$BOOT_JDK" != x; then
25865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25866
25867  # Input might be given as Windows format, start by converting to
25868  # unix format.
25869  path="$BOOT_JDK"
25870  new_path=`$CYGPATH -u "$path"`
25871
25872  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25873  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25874  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25875  # "foo.exe" is OK but "foo" is an error.
25876  #
25877  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25878  # It is also a way to make sure we got the proper file name for the real test later on.
25879  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25880  if test "x$test_shortpath" = x; then
25881    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25882$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25883    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25884  fi
25885
25886  # Call helper function which possibly converts this using DOS-style short mode.
25887  # If so, the updated path is stored in $new_path.
25888
25889  input_path="$new_path"
25890  # Check if we need to convert this using DOS-style short mode. If the path
25891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25892  # take no chances and rewrite it.
25893  # Note: m4 eats our [], so we need to use [ and ] instead.
25894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25895  if test "x$has_forbidden_chars" != x; then
25896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25900      # Going to short mode and back again did indeed matter. Since short mode is
25901      # case insensitive, let's make it lowercase to improve readability.
25902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25903      # Now convert it back to Unix-style (cygpath)
25904      input_path=`$CYGPATH -u "$shortmode_path"`
25905      new_path="$input_path"
25906    fi
25907  fi
25908
25909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25910  if test "x$test_cygdrive_prefix" = x; then
25911    # As a simple fix, exclude /usr/bin since it's not a real path.
25912    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25914      # a path prefixed by /cygdrive for fixpath to work.
25915      new_path="$CYGWIN_ROOT_PATH$input_path"
25916    fi
25917  fi
25918
25919
25920  if test "x$path" != "x$new_path"; then
25921    BOOT_JDK="$new_path"
25922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25923$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25924  fi
25925
25926    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25927
25928  path="$BOOT_JDK"
25929  has_colon=`$ECHO $path | $GREP ^.:`
25930  new_path="$path"
25931  if test "x$has_colon" = x; then
25932    # Not in mixed or Windows style, start by that.
25933    new_path=`cmd //c echo $path`
25934  fi
25935
25936
25937  input_path="$new_path"
25938  # Check if we need to convert this using DOS-style short mode. If the path
25939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25940  # take no chances and rewrite it.
25941  # Note: m4 eats our [], so we need to use [ and ] instead.
25942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25943  if test "x$has_forbidden_chars" != x; then
25944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25946  fi
25947
25948
25949  windows_path="$new_path"
25950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25951    unix_path=`$CYGPATH -u "$windows_path"`
25952    new_path="$unix_path"
25953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25955    new_path="$unix_path"
25956  fi
25957
25958  if test "x$path" != "x$new_path"; then
25959    BOOT_JDK="$new_path"
25960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25961$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25962  fi
25963
25964  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25965  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25966
25967    else
25968      # We're on a unix platform. Hooray! :)
25969      path="$BOOT_JDK"
25970      has_space=`$ECHO "$path" | $GREP " "`
25971      if test "x$has_space" != x; then
25972        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25973$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25974        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25975      fi
25976
25977      # Use eval to expand a potential ~
25978      eval path="$path"
25979      if test ! -f "$path" && test ! -d "$path"; then
25980        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25981      fi
25982
25983      if test -d "$path"; then
25984        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25985      else
25986        dir="`$DIRNAME "$path"`"
25987        base="`$BASENAME "$path"`"
25988        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25989      fi
25990    fi
25991  fi
25992
25993            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25994$as_echo_n "checking for Boot JDK... " >&6; }
25995            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25996$as_echo "$BOOT_JDK" >&6; }
25997            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25998$as_echo_n "checking Boot JDK version... " >&6; }
25999            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26000            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26001$as_echo "$BOOT_JDK_VERSION" >&6; }
26002          fi # end check jdk version
26003        fi # end check javac
26004      fi # end check java
26005    fi # end check boot jdk found
26006  fi
26007
26008
26009  # Test: Is $JAVA_HOME set?
26010
26011  if test "x$BOOT_JDK_FOUND" = xno; then
26012    # Now execute the test
26013
26014  if test "x$JAVA_HOME" != x; then
26015    JAVA_HOME_PROCESSED="$JAVA_HOME"
26016
26017  # Only process if variable expands to non-empty
26018
26019  if test "x$JAVA_HOME_PROCESSED" != x; then
26020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26021
26022  # Input might be given as Windows format, start by converting to
26023  # unix format.
26024  path="$JAVA_HOME_PROCESSED"
26025  new_path=`$CYGPATH -u "$path"`
26026
26027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26030  # "foo.exe" is OK but "foo" is an error.
26031  #
26032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26033  # It is also a way to make sure we got the proper file name for the real test later on.
26034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26035  if test "x$test_shortpath" = x; then
26036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26037$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26038    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26039  fi
26040
26041  # Call helper function which possibly converts this using DOS-style short mode.
26042  # If so, the updated path is stored in $new_path.
26043
26044  input_path="$new_path"
26045  # Check if we need to convert this using DOS-style short mode. If the path
26046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26047  # take no chances and rewrite it.
26048  # Note: m4 eats our [], so we need to use [ and ] instead.
26049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26050  if test "x$has_forbidden_chars" != x; then
26051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26055      # Going to short mode and back again did indeed matter. Since short mode is
26056      # case insensitive, let's make it lowercase to improve readability.
26057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26058      # Now convert it back to Unix-style (cygpath)
26059      input_path=`$CYGPATH -u "$shortmode_path"`
26060      new_path="$input_path"
26061    fi
26062  fi
26063
26064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26065  if test "x$test_cygdrive_prefix" = x; then
26066    # As a simple fix, exclude /usr/bin since it's not a real path.
26067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26069      # a path prefixed by /cygdrive for fixpath to work.
26070      new_path="$CYGWIN_ROOT_PATH$input_path"
26071    fi
26072  fi
26073
26074
26075  if test "x$path" != "x$new_path"; then
26076    JAVA_HOME_PROCESSED="$new_path"
26077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26078$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26079  fi
26080
26081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26082
26083  path="$JAVA_HOME_PROCESSED"
26084  has_colon=`$ECHO $path | $GREP ^.:`
26085  new_path="$path"
26086  if test "x$has_colon" = x; then
26087    # Not in mixed or Windows style, start by that.
26088    new_path=`cmd //c echo $path`
26089  fi
26090
26091
26092  input_path="$new_path"
26093  # Check if we need to convert this using DOS-style short mode. If the path
26094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26095  # take no chances and rewrite it.
26096  # Note: m4 eats our [], so we need to use [ and ] instead.
26097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26098  if test "x$has_forbidden_chars" != x; then
26099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26101  fi
26102
26103
26104  windows_path="$new_path"
26105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26106    unix_path=`$CYGPATH -u "$windows_path"`
26107    new_path="$unix_path"
26108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26110    new_path="$unix_path"
26111  fi
26112
26113  if test "x$path" != "x$new_path"; then
26114    JAVA_HOME_PROCESSED="$new_path"
26115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26116$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26117  fi
26118
26119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26121
26122    else
26123      # We're on a unix platform. Hooray! :)
26124      path="$JAVA_HOME_PROCESSED"
26125      has_space=`$ECHO "$path" | $GREP " "`
26126      if test "x$has_space" != x; then
26127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26128$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26129        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26130      fi
26131
26132      # Use eval to expand a potential ~
26133      eval path="$path"
26134      if test ! -f "$path" && test ! -d "$path"; then
26135        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26136      fi
26137
26138      if test -d "$path"; then
26139        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26140      else
26141        dir="`$DIRNAME "$path"`"
26142        base="`$BASENAME "$path"`"
26143        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26144      fi
26145    fi
26146  fi
26147
26148    if test ! -d "$JAVA_HOME_PROCESSED"; then
26149      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26150$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26151    else
26152      # Aha, the user has set a JAVA_HOME
26153      # let us use that as the Boot JDK.
26154      BOOT_JDK="$JAVA_HOME_PROCESSED"
26155      BOOT_JDK_FOUND=maybe
26156      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26157$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26158    fi
26159  fi
26160
26161
26162    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26163    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26164      # Do we have a bin/java?
26165      if test ! -x "$BOOT_JDK/bin/java"; then
26166        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26168        BOOT_JDK_FOUND=no
26169      else
26170        # Do we have a bin/javac?
26171        if test ! -x "$BOOT_JDK/bin/javac"; then
26172          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26174          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26175$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26176          BOOT_JDK_FOUND=no
26177        else
26178          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26179          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26180
26181          # Extra M4 quote needed to protect [] in grep expression.
26182          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26183          if test "x$FOUND_CORRECT_VERSION" = x; then
26184            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26186            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26187$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26188            BOOT_JDK_FOUND=no
26189          else
26190            # We're done! :-)
26191            BOOT_JDK_FOUND=yes
26192
26193  # Only process if variable expands to non-empty
26194
26195  if test "x$BOOT_JDK" != x; then
26196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26197
26198  # Input might be given as Windows format, start by converting to
26199  # unix format.
26200  path="$BOOT_JDK"
26201  new_path=`$CYGPATH -u "$path"`
26202
26203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26206  # "foo.exe" is OK but "foo" is an error.
26207  #
26208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26209  # It is also a way to make sure we got the proper file name for the real test later on.
26210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26211  if test "x$test_shortpath" = x; then
26212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26213$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26214    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26215  fi
26216
26217  # Call helper function which possibly converts this using DOS-style short mode.
26218  # If so, the updated path is stored in $new_path.
26219
26220  input_path="$new_path"
26221  # Check if we need to convert this using DOS-style short mode. If the path
26222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26223  # take no chances and rewrite it.
26224  # Note: m4 eats our [], so we need to use [ and ] instead.
26225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26226  if test "x$has_forbidden_chars" != x; then
26227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26231      # Going to short mode and back again did indeed matter. Since short mode is
26232      # case insensitive, let's make it lowercase to improve readability.
26233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26234      # Now convert it back to Unix-style (cygpath)
26235      input_path=`$CYGPATH -u "$shortmode_path"`
26236      new_path="$input_path"
26237    fi
26238  fi
26239
26240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26241  if test "x$test_cygdrive_prefix" = x; then
26242    # As a simple fix, exclude /usr/bin since it's not a real path.
26243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26245      # a path prefixed by /cygdrive for fixpath to work.
26246      new_path="$CYGWIN_ROOT_PATH$input_path"
26247    fi
26248  fi
26249
26250
26251  if test "x$path" != "x$new_path"; then
26252    BOOT_JDK="$new_path"
26253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26254$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26255  fi
26256
26257    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26258
26259  path="$BOOT_JDK"
26260  has_colon=`$ECHO $path | $GREP ^.:`
26261  new_path="$path"
26262  if test "x$has_colon" = x; then
26263    # Not in mixed or Windows style, start by that.
26264    new_path=`cmd //c echo $path`
26265  fi
26266
26267
26268  input_path="$new_path"
26269  # Check if we need to convert this using DOS-style short mode. If the path
26270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26271  # take no chances and rewrite it.
26272  # Note: m4 eats our [], so we need to use [ and ] instead.
26273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26274  if test "x$has_forbidden_chars" != x; then
26275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26277  fi
26278
26279
26280  windows_path="$new_path"
26281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26282    unix_path=`$CYGPATH -u "$windows_path"`
26283    new_path="$unix_path"
26284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26286    new_path="$unix_path"
26287  fi
26288
26289  if test "x$path" != "x$new_path"; then
26290    BOOT_JDK="$new_path"
26291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26292$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26293  fi
26294
26295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26297
26298    else
26299      # We're on a unix platform. Hooray! :)
26300      path="$BOOT_JDK"
26301      has_space=`$ECHO "$path" | $GREP " "`
26302      if test "x$has_space" != x; then
26303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26304$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26305        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26306      fi
26307
26308      # Use eval to expand a potential ~
26309      eval path="$path"
26310      if test ! -f "$path" && test ! -d "$path"; then
26311        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26312      fi
26313
26314      if test -d "$path"; then
26315        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26316      else
26317        dir="`$DIRNAME "$path"`"
26318        base="`$BASENAME "$path"`"
26319        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26320      fi
26321    fi
26322  fi
26323
26324            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26325$as_echo_n "checking for Boot JDK... " >&6; }
26326            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26327$as_echo "$BOOT_JDK" >&6; }
26328            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26329$as_echo_n "checking Boot JDK version... " >&6; }
26330            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26332$as_echo "$BOOT_JDK_VERSION" >&6; }
26333          fi # end check jdk version
26334        fi # end check javac
26335      fi # end check java
26336    fi # end check boot jdk found
26337  fi
26338
26339
26340  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26341
26342  if test "x$BOOT_JDK_FOUND" = xno; then
26343    # Now execute the test
26344
26345  # Extract the first word of "javac", so it can be a program name with args.
26346set dummy javac; ac_word=$2
26347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26348$as_echo_n "checking for $ac_word... " >&6; }
26349if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26350  $as_echo_n "(cached) " >&6
26351else
26352  case $JAVAC_CHECK in
26353  [\\/]* | ?:[\\/]*)
26354  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26355  ;;
26356  *)
26357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26358for as_dir in $PATH
26359do
26360  IFS=$as_save_IFS
26361  test -z "$as_dir" && as_dir=.
26362    for ac_exec_ext in '' $ac_executable_extensions; do
26363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26364    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26366    break 2
26367  fi
26368done
26369  done
26370IFS=$as_save_IFS
26371
26372  ;;
26373esac
26374fi
26375JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26376if test -n "$JAVAC_CHECK"; then
26377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26378$as_echo "$JAVAC_CHECK" >&6; }
26379else
26380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26381$as_echo "no" >&6; }
26382fi
26383
26384
26385  # Extract the first word of "java", so it can be a program name with args.
26386set dummy java; ac_word=$2
26387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26388$as_echo_n "checking for $ac_word... " >&6; }
26389if ${ac_cv_path_JAVA_CHECK+:} false; then :
26390  $as_echo_n "(cached) " >&6
26391else
26392  case $JAVA_CHECK in
26393  [\\/]* | ?:[\\/]*)
26394  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26395  ;;
26396  *)
26397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26398for as_dir in $PATH
26399do
26400  IFS=$as_save_IFS
26401  test -z "$as_dir" && as_dir=.
26402    for ac_exec_ext in '' $ac_executable_extensions; do
26403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26404    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26406    break 2
26407  fi
26408done
26409  done
26410IFS=$as_save_IFS
26411
26412  ;;
26413esac
26414fi
26415JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26416if test -n "$JAVA_CHECK"; then
26417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26418$as_echo "$JAVA_CHECK" >&6; }
26419else
26420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26421$as_echo "no" >&6; }
26422fi
26423
26424
26425  BINARY="$JAVAC_CHECK"
26426  if test "x$JAVAC_CHECK" = x; then
26427    BINARY="$JAVA_CHECK"
26428  fi
26429  if test "x$BINARY" != x; then
26430    # So there is a java(c) binary, it might be part of a JDK.
26431    # Lets find the JDK/JRE directory by following symbolic links.
26432    # Linux/GNU systems often have links from /usr/bin/java to
26433    # /etc/alternatives/java to the real JDK binary.
26434
26435  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26436    # Follow a chain of symbolic links. Use readlink
26437    # where it exists, else fall back to horribly
26438    # complicated shell code.
26439    if test "x$READLINK_TESTED" != yes; then
26440      # On MacOSX there is a readlink tool with a different
26441      # purpose than the GNU readlink tool. Check the found readlink.
26442      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26443      if test "x$ISGNU" = x; then
26444        # A readlink that we do not know how to use.
26445        # Are there other non-GNU readlinks out there?
26446        READLINK_TESTED=yes
26447        READLINK=
26448      fi
26449    fi
26450
26451    if test "x$READLINK" != x; then
26452      BINARY=`$READLINK -f $BINARY`
26453    else
26454      # Save the current directory for restoring afterwards
26455      STARTDIR=$PWD
26456      COUNTER=0
26457      sym_link_dir=`$DIRNAME $BINARY`
26458      sym_link_file=`$BASENAME $BINARY`
26459      cd $sym_link_dir
26460      # Use -P flag to resolve symlinks in directories.
26461      cd `$THEPWDCMD -P`
26462      sym_link_dir=`$THEPWDCMD -P`
26463      # Resolve file symlinks
26464      while test $COUNTER -lt 20; do
26465        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26466        if test "x$ISLINK" == x; then
26467          # This is not a symbolic link! We are done!
26468          break
26469        fi
26470        # Again resolve directory symlinks since the target of the just found
26471        # link could be in a different directory
26472        cd `$DIRNAME $ISLINK`
26473        sym_link_dir=`$THEPWDCMD -P`
26474        sym_link_file=`$BASENAME $ISLINK`
26475        let COUNTER=COUNTER+1
26476      done
26477      cd $STARTDIR
26478      BINARY=$sym_link_dir/$sym_link_file
26479    fi
26480  fi
26481
26482    BOOT_JDK=`dirname "$BINARY"`
26483    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26484    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26485      # Looks like we found ourselves an JDK
26486      BOOT_JDK_FOUND=maybe
26487      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26488$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26489    fi
26490  fi
26491
26492
26493    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26494    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26495      # Do we have a bin/java?
26496      if test ! -x "$BOOT_JDK/bin/java"; then
26497        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26499        BOOT_JDK_FOUND=no
26500      else
26501        # Do we have a bin/javac?
26502        if test ! -x "$BOOT_JDK/bin/javac"; then
26503          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26505          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26506$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26507          BOOT_JDK_FOUND=no
26508        else
26509          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26510          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26511
26512          # Extra M4 quote needed to protect [] in grep expression.
26513          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26514          if test "x$FOUND_CORRECT_VERSION" = x; then
26515            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26517            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26518$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26519            BOOT_JDK_FOUND=no
26520          else
26521            # We're done! :-)
26522            BOOT_JDK_FOUND=yes
26523
26524  # Only process if variable expands to non-empty
26525
26526  if test "x$BOOT_JDK" != x; then
26527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26528
26529  # Input might be given as Windows format, start by converting to
26530  # unix format.
26531  path="$BOOT_JDK"
26532  new_path=`$CYGPATH -u "$path"`
26533
26534  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26535  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26536  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26537  # "foo.exe" is OK but "foo" is an error.
26538  #
26539  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26540  # It is also a way to make sure we got the proper file name for the real test later on.
26541  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26542  if test "x$test_shortpath" = x; then
26543    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26544$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26545    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26546  fi
26547
26548  # Call helper function which possibly converts this using DOS-style short mode.
26549  # If so, the updated path is stored in $new_path.
26550
26551  input_path="$new_path"
26552  # Check if we need to convert this using DOS-style short mode. If the path
26553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26554  # take no chances and rewrite it.
26555  # Note: m4 eats our [], so we need to use [ and ] instead.
26556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26557  if test "x$has_forbidden_chars" != x; then
26558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26559    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26562      # Going to short mode and back again did indeed matter. Since short mode is
26563      # case insensitive, let's make it lowercase to improve readability.
26564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26565      # Now convert it back to Unix-style (cygpath)
26566      input_path=`$CYGPATH -u "$shortmode_path"`
26567      new_path="$input_path"
26568    fi
26569  fi
26570
26571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26572  if test "x$test_cygdrive_prefix" = x; then
26573    # As a simple fix, exclude /usr/bin since it's not a real path.
26574    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26576      # a path prefixed by /cygdrive for fixpath to work.
26577      new_path="$CYGWIN_ROOT_PATH$input_path"
26578    fi
26579  fi
26580
26581
26582  if test "x$path" != "x$new_path"; then
26583    BOOT_JDK="$new_path"
26584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26585$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26586  fi
26587
26588    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26589
26590  path="$BOOT_JDK"
26591  has_colon=`$ECHO $path | $GREP ^.:`
26592  new_path="$path"
26593  if test "x$has_colon" = x; then
26594    # Not in mixed or Windows style, start by that.
26595    new_path=`cmd //c echo $path`
26596  fi
26597
26598
26599  input_path="$new_path"
26600  # Check if we need to convert this using DOS-style short mode. If the path
26601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26602  # take no chances and rewrite it.
26603  # Note: m4 eats our [], so we need to use [ and ] instead.
26604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26605  if test "x$has_forbidden_chars" != x; then
26606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26607    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26608  fi
26609
26610
26611  windows_path="$new_path"
26612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26613    unix_path=`$CYGPATH -u "$windows_path"`
26614    new_path="$unix_path"
26615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26617    new_path="$unix_path"
26618  fi
26619
26620  if test "x$path" != "x$new_path"; then
26621    BOOT_JDK="$new_path"
26622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26623$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26624  fi
26625
26626  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26627  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26628
26629    else
26630      # We're on a unix platform. Hooray! :)
26631      path="$BOOT_JDK"
26632      has_space=`$ECHO "$path" | $GREP " "`
26633      if test "x$has_space" != x; then
26634        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26635$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26636        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26637      fi
26638
26639      # Use eval to expand a potential ~
26640      eval path="$path"
26641      if test ! -f "$path" && test ! -d "$path"; then
26642        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26643      fi
26644
26645      if test -d "$path"; then
26646        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26647      else
26648        dir="`$DIRNAME "$path"`"
26649        base="`$BASENAME "$path"`"
26650        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26651      fi
26652    fi
26653  fi
26654
26655            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26656$as_echo_n "checking for Boot JDK... " >&6; }
26657            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26658$as_echo "$BOOT_JDK" >&6; }
26659            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26660$as_echo_n "checking Boot JDK version... " >&6; }
26661            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26663$as_echo "$BOOT_JDK_VERSION" >&6; }
26664          fi # end check jdk version
26665        fi # end check javac
26666      fi # end check java
26667    fi # end check boot jdk found
26668  fi
26669
26670
26671  # Test: Is there a JDK installed in default, well-known locations?
26672
26673  if test "x$BOOT_JDK_FOUND" = xno; then
26674    # Now execute the test
26675
26676  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26677
26678  if test "x$BOOT_JDK_FOUND" = xno; then
26679    # Now execute the test
26680
26681  if test "x$ProgramW6432" != x; then
26682    VIRTUAL_DIR="$ProgramW6432/Java"
26683
26684  windows_path="$VIRTUAL_DIR"
26685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26686    unix_path=`$CYGPATH -u "$windows_path"`
26687    VIRTUAL_DIR="$unix_path"
26688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26690    VIRTUAL_DIR="$unix_path"
26691  fi
26692
26693
26694  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26695  BOOT_JDK_SUFFIX=""
26696  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26697  if test "x$ALL_JDKS_FOUND" != x; then
26698    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26699
26700  if test "x$BOOT_JDK_FOUND" = xno; then
26701    # Now execute the test
26702
26703        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26704        if test -d "$BOOT_JDK"; then
26705          BOOT_JDK_FOUND=maybe
26706          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26707$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26708        fi
26709
26710
26711    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26712    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26713      # Do we have a bin/java?
26714      if test ! -x "$BOOT_JDK/bin/java"; then
26715        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26716$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26717        BOOT_JDK_FOUND=no
26718      else
26719        # Do we have a bin/javac?
26720        if test ! -x "$BOOT_JDK/bin/javac"; then
26721          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26723          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26724$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26725          BOOT_JDK_FOUND=no
26726        else
26727          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26728          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26729
26730          # Extra M4 quote needed to protect [] in grep expression.
26731          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26732          if test "x$FOUND_CORRECT_VERSION" = x; then
26733            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26734$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26735            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26736$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26737            BOOT_JDK_FOUND=no
26738          else
26739            # We're done! :-)
26740            BOOT_JDK_FOUND=yes
26741
26742  # Only process if variable expands to non-empty
26743
26744  if test "x$BOOT_JDK" != x; then
26745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26746
26747  # Input might be given as Windows format, start by converting to
26748  # unix format.
26749  path="$BOOT_JDK"
26750  new_path=`$CYGPATH -u "$path"`
26751
26752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26755  # "foo.exe" is OK but "foo" is an error.
26756  #
26757  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26758  # It is also a way to make sure we got the proper file name for the real test later on.
26759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26760  if test "x$test_shortpath" = x; then
26761    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26762$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26763    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26764  fi
26765
26766  # Call helper function which possibly converts this using DOS-style short mode.
26767  # If so, the updated path is stored in $new_path.
26768
26769  input_path="$new_path"
26770  # Check if we need to convert this using DOS-style short mode. If the path
26771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26772  # take no chances and rewrite it.
26773  # Note: m4 eats our [], so we need to use [ and ] instead.
26774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26775  if test "x$has_forbidden_chars" != x; then
26776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26780      # Going to short mode and back again did indeed matter. Since short mode is
26781      # case insensitive, let's make it lowercase to improve readability.
26782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26783      # Now convert it back to Unix-style (cygpath)
26784      input_path=`$CYGPATH -u "$shortmode_path"`
26785      new_path="$input_path"
26786    fi
26787  fi
26788
26789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26790  if test "x$test_cygdrive_prefix" = x; then
26791    # As a simple fix, exclude /usr/bin since it's not a real path.
26792    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26794      # a path prefixed by /cygdrive for fixpath to work.
26795      new_path="$CYGWIN_ROOT_PATH$input_path"
26796    fi
26797  fi
26798
26799
26800  if test "x$path" != "x$new_path"; then
26801    BOOT_JDK="$new_path"
26802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26803$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26804  fi
26805
26806    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26807
26808  path="$BOOT_JDK"
26809  has_colon=`$ECHO $path | $GREP ^.:`
26810  new_path="$path"
26811  if test "x$has_colon" = x; then
26812    # Not in mixed or Windows style, start by that.
26813    new_path=`cmd //c echo $path`
26814  fi
26815
26816
26817  input_path="$new_path"
26818  # Check if we need to convert this using DOS-style short mode. If the path
26819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26820  # take no chances and rewrite it.
26821  # Note: m4 eats our [], so we need to use [ and ] instead.
26822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26823  if test "x$has_forbidden_chars" != x; then
26824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26826  fi
26827
26828
26829  windows_path="$new_path"
26830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26831    unix_path=`$CYGPATH -u "$windows_path"`
26832    new_path="$unix_path"
26833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26835    new_path="$unix_path"
26836  fi
26837
26838  if test "x$path" != "x$new_path"; then
26839    BOOT_JDK="$new_path"
26840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26841$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26842  fi
26843
26844  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26845  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26846
26847    else
26848      # We're on a unix platform. Hooray! :)
26849      path="$BOOT_JDK"
26850      has_space=`$ECHO "$path" | $GREP " "`
26851      if test "x$has_space" != x; then
26852        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26854        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26855      fi
26856
26857      # Use eval to expand a potential ~
26858      eval path="$path"
26859      if test ! -f "$path" && test ! -d "$path"; then
26860        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26861      fi
26862
26863      if test -d "$path"; then
26864        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26865      else
26866        dir="`$DIRNAME "$path"`"
26867        base="`$BASENAME "$path"`"
26868        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26869      fi
26870    fi
26871  fi
26872
26873            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26874$as_echo_n "checking for Boot JDK... " >&6; }
26875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26876$as_echo "$BOOT_JDK" >&6; }
26877            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26878$as_echo_n "checking Boot JDK version... " >&6; }
26879            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26881$as_echo "$BOOT_JDK_VERSION" >&6; }
26882          fi # end check jdk version
26883        fi # end check javac
26884      fi # end check java
26885    fi # end check boot jdk found
26886  fi
26887
26888    done
26889  fi
26890
26891  fi
26892
26893
26894    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26895    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26896      # Do we have a bin/java?
26897      if test ! -x "$BOOT_JDK/bin/java"; then
26898        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26900        BOOT_JDK_FOUND=no
26901      else
26902        # Do we have a bin/javac?
26903        if test ! -x "$BOOT_JDK/bin/javac"; then
26904          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26905$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26906          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26907$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26908          BOOT_JDK_FOUND=no
26909        else
26910          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26911          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26912
26913          # Extra M4 quote needed to protect [] in grep expression.
26914          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26915          if test "x$FOUND_CORRECT_VERSION" = x; then
26916            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26918            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26919$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26920            BOOT_JDK_FOUND=no
26921          else
26922            # We're done! :-)
26923            BOOT_JDK_FOUND=yes
26924
26925  # Only process if variable expands to non-empty
26926
26927  if test "x$BOOT_JDK" != x; then
26928    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26929
26930  # Input might be given as Windows format, start by converting to
26931  # unix format.
26932  path="$BOOT_JDK"
26933  new_path=`$CYGPATH -u "$path"`
26934
26935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26938  # "foo.exe" is OK but "foo" is an error.
26939  #
26940  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26941  # It is also a way to make sure we got the proper file name for the real test later on.
26942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26943  if test "x$test_shortpath" = x; then
26944    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26945$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26946    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26947  fi
26948
26949  # Call helper function which possibly converts this using DOS-style short mode.
26950  # If so, the updated path is stored in $new_path.
26951
26952  input_path="$new_path"
26953  # Check if we need to convert this using DOS-style short mode. If the path
26954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26955  # take no chances and rewrite it.
26956  # Note: m4 eats our [], so we need to use [ and ] instead.
26957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26958  if test "x$has_forbidden_chars" != x; then
26959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26963      # Going to short mode and back again did indeed matter. Since short mode is
26964      # case insensitive, let's make it lowercase to improve readability.
26965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26966      # Now convert it back to Unix-style (cygpath)
26967      input_path=`$CYGPATH -u "$shortmode_path"`
26968      new_path="$input_path"
26969    fi
26970  fi
26971
26972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26973  if test "x$test_cygdrive_prefix" = x; then
26974    # As a simple fix, exclude /usr/bin since it's not a real path.
26975    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26977      # a path prefixed by /cygdrive for fixpath to work.
26978      new_path="$CYGWIN_ROOT_PATH$input_path"
26979    fi
26980  fi
26981
26982
26983  if test "x$path" != "x$new_path"; then
26984    BOOT_JDK="$new_path"
26985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26986$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26987  fi
26988
26989    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26990
26991  path="$BOOT_JDK"
26992  has_colon=`$ECHO $path | $GREP ^.:`
26993  new_path="$path"
26994  if test "x$has_colon" = x; then
26995    # Not in mixed or Windows style, start by that.
26996    new_path=`cmd //c echo $path`
26997  fi
26998
26999
27000  input_path="$new_path"
27001  # Check if we need to convert this using DOS-style short mode. If the path
27002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27003  # take no chances and rewrite it.
27004  # Note: m4 eats our [], so we need to use [ and ] instead.
27005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27006  if test "x$has_forbidden_chars" != x; then
27007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27009  fi
27010
27011
27012  windows_path="$new_path"
27013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27014    unix_path=`$CYGPATH -u "$windows_path"`
27015    new_path="$unix_path"
27016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27018    new_path="$unix_path"
27019  fi
27020
27021  if test "x$path" != "x$new_path"; then
27022    BOOT_JDK="$new_path"
27023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27024$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27025  fi
27026
27027  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27028  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27029
27030    else
27031      # We're on a unix platform. Hooray! :)
27032      path="$BOOT_JDK"
27033      has_space=`$ECHO "$path" | $GREP " "`
27034      if test "x$has_space" != x; then
27035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27036$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27037        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27038      fi
27039
27040      # Use eval to expand a potential ~
27041      eval path="$path"
27042      if test ! -f "$path" && test ! -d "$path"; then
27043        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27044      fi
27045
27046      if test -d "$path"; then
27047        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27048      else
27049        dir="`$DIRNAME "$path"`"
27050        base="`$BASENAME "$path"`"
27051        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27052      fi
27053    fi
27054  fi
27055
27056            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27057$as_echo_n "checking for Boot JDK... " >&6; }
27058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27059$as_echo "$BOOT_JDK" >&6; }
27060            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27061$as_echo_n "checking Boot JDK version... " >&6; }
27062            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27063            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27064$as_echo "$BOOT_JDK_VERSION" >&6; }
27065          fi # end check jdk version
27066        fi # end check javac
27067      fi # end check java
27068    fi # end check boot jdk found
27069  fi
27070
27071
27072  if test "x$BOOT_JDK_FOUND" = xno; then
27073    # Now execute the test
27074
27075  if test "x$PROGRAMW6432" != x; then
27076    VIRTUAL_DIR="$PROGRAMW6432/Java"
27077
27078  windows_path="$VIRTUAL_DIR"
27079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27080    unix_path=`$CYGPATH -u "$windows_path"`
27081    VIRTUAL_DIR="$unix_path"
27082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27084    VIRTUAL_DIR="$unix_path"
27085  fi
27086
27087
27088  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27089  BOOT_JDK_SUFFIX=""
27090  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27091  if test "x$ALL_JDKS_FOUND" != x; then
27092    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27093
27094  if test "x$BOOT_JDK_FOUND" = xno; then
27095    # Now execute the test
27096
27097        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27098        if test -d "$BOOT_JDK"; then
27099          BOOT_JDK_FOUND=maybe
27100          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27101$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27102        fi
27103
27104
27105    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27106    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27107      # Do we have a bin/java?
27108      if test ! -x "$BOOT_JDK/bin/java"; then
27109        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27111        BOOT_JDK_FOUND=no
27112      else
27113        # Do we have a bin/javac?
27114        if test ! -x "$BOOT_JDK/bin/javac"; then
27115          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27116$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27117          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27118$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27119          BOOT_JDK_FOUND=no
27120        else
27121          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27122          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27123
27124          # Extra M4 quote needed to protect [] in grep expression.
27125          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27126          if test "x$FOUND_CORRECT_VERSION" = x; then
27127            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27129            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27130$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27131            BOOT_JDK_FOUND=no
27132          else
27133            # We're done! :-)
27134            BOOT_JDK_FOUND=yes
27135
27136  # Only process if variable expands to non-empty
27137
27138  if test "x$BOOT_JDK" != x; then
27139    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27140
27141  # Input might be given as Windows format, start by converting to
27142  # unix format.
27143  path="$BOOT_JDK"
27144  new_path=`$CYGPATH -u "$path"`
27145
27146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27149  # "foo.exe" is OK but "foo" is an error.
27150  #
27151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27152  # It is also a way to make sure we got the proper file name for the real test later on.
27153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27154  if test "x$test_shortpath" = x; then
27155    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27156$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27157    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27158  fi
27159
27160  # Call helper function which possibly converts this using DOS-style short mode.
27161  # If so, the updated path is stored in $new_path.
27162
27163  input_path="$new_path"
27164  # Check if we need to convert this using DOS-style short mode. If the path
27165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27166  # take no chances and rewrite it.
27167  # Note: m4 eats our [], so we need to use [ and ] instead.
27168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27169  if test "x$has_forbidden_chars" != x; then
27170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27174      # Going to short mode and back again did indeed matter. Since short mode is
27175      # case insensitive, let's make it lowercase to improve readability.
27176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27177      # Now convert it back to Unix-style (cygpath)
27178      input_path=`$CYGPATH -u "$shortmode_path"`
27179      new_path="$input_path"
27180    fi
27181  fi
27182
27183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27184  if test "x$test_cygdrive_prefix" = x; then
27185    # As a simple fix, exclude /usr/bin since it's not a real path.
27186    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27188      # a path prefixed by /cygdrive for fixpath to work.
27189      new_path="$CYGWIN_ROOT_PATH$input_path"
27190    fi
27191  fi
27192
27193
27194  if test "x$path" != "x$new_path"; then
27195    BOOT_JDK="$new_path"
27196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27197$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27198  fi
27199
27200    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27201
27202  path="$BOOT_JDK"
27203  has_colon=`$ECHO $path | $GREP ^.:`
27204  new_path="$path"
27205  if test "x$has_colon" = x; then
27206    # Not in mixed or Windows style, start by that.
27207    new_path=`cmd //c echo $path`
27208  fi
27209
27210
27211  input_path="$new_path"
27212  # Check if we need to convert this using DOS-style short mode. If the path
27213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27214  # take no chances and rewrite it.
27215  # Note: m4 eats our [], so we need to use [ and ] instead.
27216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27217  if test "x$has_forbidden_chars" != x; then
27218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27220  fi
27221
27222
27223  windows_path="$new_path"
27224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27225    unix_path=`$CYGPATH -u "$windows_path"`
27226    new_path="$unix_path"
27227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27229    new_path="$unix_path"
27230  fi
27231
27232  if test "x$path" != "x$new_path"; then
27233    BOOT_JDK="$new_path"
27234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27235$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27236  fi
27237
27238  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27239  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27240
27241    else
27242      # We're on a unix platform. Hooray! :)
27243      path="$BOOT_JDK"
27244      has_space=`$ECHO "$path" | $GREP " "`
27245      if test "x$has_space" != x; then
27246        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27247$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27248        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27249      fi
27250
27251      # Use eval to expand a potential ~
27252      eval path="$path"
27253      if test ! -f "$path" && test ! -d "$path"; then
27254        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27255      fi
27256
27257      if test -d "$path"; then
27258        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27259      else
27260        dir="`$DIRNAME "$path"`"
27261        base="`$BASENAME "$path"`"
27262        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27263      fi
27264    fi
27265  fi
27266
27267            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27268$as_echo_n "checking for Boot JDK... " >&6; }
27269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27270$as_echo "$BOOT_JDK" >&6; }
27271            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27272$as_echo_n "checking Boot JDK version... " >&6; }
27273            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27274            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27275$as_echo "$BOOT_JDK_VERSION" >&6; }
27276          fi # end check jdk version
27277        fi # end check javac
27278      fi # end check java
27279    fi # end check boot jdk found
27280  fi
27281
27282    done
27283  fi
27284
27285  fi
27286
27287
27288    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27289    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27290      # Do we have a bin/java?
27291      if test ! -x "$BOOT_JDK/bin/java"; then
27292        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27294        BOOT_JDK_FOUND=no
27295      else
27296        # Do we have a bin/javac?
27297        if test ! -x "$BOOT_JDK/bin/javac"; then
27298          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27299$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27300          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27301$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27302          BOOT_JDK_FOUND=no
27303        else
27304          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27305          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27306
27307          # Extra M4 quote needed to protect [] in grep expression.
27308          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27309          if test "x$FOUND_CORRECT_VERSION" = x; then
27310            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27312            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27313$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27314            BOOT_JDK_FOUND=no
27315          else
27316            # We're done! :-)
27317            BOOT_JDK_FOUND=yes
27318
27319  # Only process if variable expands to non-empty
27320
27321  if test "x$BOOT_JDK" != x; then
27322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27323
27324  # Input might be given as Windows format, start by converting to
27325  # unix format.
27326  path="$BOOT_JDK"
27327  new_path=`$CYGPATH -u "$path"`
27328
27329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27332  # "foo.exe" is OK but "foo" is an error.
27333  #
27334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27335  # It is also a way to make sure we got the proper file name for the real test later on.
27336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27337  if test "x$test_shortpath" = x; then
27338    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27339$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27340    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27341  fi
27342
27343  # Call helper function which possibly converts this using DOS-style short mode.
27344  # If so, the updated path is stored in $new_path.
27345
27346  input_path="$new_path"
27347  # Check if we need to convert this using DOS-style short mode. If the path
27348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27349  # take no chances and rewrite it.
27350  # Note: m4 eats our [], so we need to use [ and ] instead.
27351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27352  if test "x$has_forbidden_chars" != x; then
27353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27357      # Going to short mode and back again did indeed matter. Since short mode is
27358      # case insensitive, let's make it lowercase to improve readability.
27359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27360      # Now convert it back to Unix-style (cygpath)
27361      input_path=`$CYGPATH -u "$shortmode_path"`
27362      new_path="$input_path"
27363    fi
27364  fi
27365
27366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27367  if test "x$test_cygdrive_prefix" = x; then
27368    # As a simple fix, exclude /usr/bin since it's not a real path.
27369    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27371      # a path prefixed by /cygdrive for fixpath to work.
27372      new_path="$CYGWIN_ROOT_PATH$input_path"
27373    fi
27374  fi
27375
27376
27377  if test "x$path" != "x$new_path"; then
27378    BOOT_JDK="$new_path"
27379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27380$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27381  fi
27382
27383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27384
27385  path="$BOOT_JDK"
27386  has_colon=`$ECHO $path | $GREP ^.:`
27387  new_path="$path"
27388  if test "x$has_colon" = x; then
27389    # Not in mixed or Windows style, start by that.
27390    new_path=`cmd //c echo $path`
27391  fi
27392
27393
27394  input_path="$new_path"
27395  # Check if we need to convert this using DOS-style short mode. If the path
27396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27397  # take no chances and rewrite it.
27398  # Note: m4 eats our [], so we need to use [ and ] instead.
27399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27400  if test "x$has_forbidden_chars" != x; then
27401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27403  fi
27404
27405
27406  windows_path="$new_path"
27407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27408    unix_path=`$CYGPATH -u "$windows_path"`
27409    new_path="$unix_path"
27410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27412    new_path="$unix_path"
27413  fi
27414
27415  if test "x$path" != "x$new_path"; then
27416    BOOT_JDK="$new_path"
27417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27418$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27419  fi
27420
27421  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27422  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27423
27424    else
27425      # We're on a unix platform. Hooray! :)
27426      path="$BOOT_JDK"
27427      has_space=`$ECHO "$path" | $GREP " "`
27428      if test "x$has_space" != x; then
27429        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27430$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27431        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27432      fi
27433
27434      # Use eval to expand a potential ~
27435      eval path="$path"
27436      if test ! -f "$path" && test ! -d "$path"; then
27437        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27438      fi
27439
27440      if test -d "$path"; then
27441        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27442      else
27443        dir="`$DIRNAME "$path"`"
27444        base="`$BASENAME "$path"`"
27445        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27446      fi
27447    fi
27448  fi
27449
27450            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27451$as_echo_n "checking for Boot JDK... " >&6; }
27452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27453$as_echo "$BOOT_JDK" >&6; }
27454            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27455$as_echo_n "checking Boot JDK version... " >&6; }
27456            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27457            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27458$as_echo "$BOOT_JDK_VERSION" >&6; }
27459          fi # end check jdk version
27460        fi # end check javac
27461      fi # end check java
27462    fi # end check boot jdk found
27463  fi
27464
27465
27466  if test "x$BOOT_JDK_FOUND" = xno; then
27467    # Now execute the test
27468
27469  if test "x$PROGRAMFILES" != x; then
27470    VIRTUAL_DIR="$PROGRAMFILES/Java"
27471
27472  windows_path="$VIRTUAL_DIR"
27473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27474    unix_path=`$CYGPATH -u "$windows_path"`
27475    VIRTUAL_DIR="$unix_path"
27476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27478    VIRTUAL_DIR="$unix_path"
27479  fi
27480
27481
27482  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27483  BOOT_JDK_SUFFIX=""
27484  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27485  if test "x$ALL_JDKS_FOUND" != x; then
27486    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27487
27488  if test "x$BOOT_JDK_FOUND" = xno; then
27489    # Now execute the test
27490
27491        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27492        if test -d "$BOOT_JDK"; then
27493          BOOT_JDK_FOUND=maybe
27494          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27495$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27496        fi
27497
27498
27499    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27500    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27501      # Do we have a bin/java?
27502      if test ! -x "$BOOT_JDK/bin/java"; then
27503        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27505        BOOT_JDK_FOUND=no
27506      else
27507        # Do we have a bin/javac?
27508        if test ! -x "$BOOT_JDK/bin/javac"; then
27509          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27511          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27512$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27513          BOOT_JDK_FOUND=no
27514        else
27515          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27516          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27517
27518          # Extra M4 quote needed to protect [] in grep expression.
27519          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27520          if test "x$FOUND_CORRECT_VERSION" = x; then
27521            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27523            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27524$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27525            BOOT_JDK_FOUND=no
27526          else
27527            # We're done! :-)
27528            BOOT_JDK_FOUND=yes
27529
27530  # Only process if variable expands to non-empty
27531
27532  if test "x$BOOT_JDK" != x; then
27533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27534
27535  # Input might be given as Windows format, start by converting to
27536  # unix format.
27537  path="$BOOT_JDK"
27538  new_path=`$CYGPATH -u "$path"`
27539
27540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27543  # "foo.exe" is OK but "foo" is an error.
27544  #
27545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27546  # It is also a way to make sure we got the proper file name for the real test later on.
27547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27548  if test "x$test_shortpath" = x; then
27549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27550$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27551    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27552  fi
27553
27554  # Call helper function which possibly converts this using DOS-style short mode.
27555  # If so, the updated path is stored in $new_path.
27556
27557  input_path="$new_path"
27558  # Check if we need to convert this using DOS-style short mode. If the path
27559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27560  # take no chances and rewrite it.
27561  # Note: m4 eats our [], so we need to use [ and ] instead.
27562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27563  if test "x$has_forbidden_chars" != x; then
27564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27568      # Going to short mode and back again did indeed matter. Since short mode is
27569      # case insensitive, let's make it lowercase to improve readability.
27570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27571      # Now convert it back to Unix-style (cygpath)
27572      input_path=`$CYGPATH -u "$shortmode_path"`
27573      new_path="$input_path"
27574    fi
27575  fi
27576
27577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27578  if test "x$test_cygdrive_prefix" = x; then
27579    # As a simple fix, exclude /usr/bin since it's not a real path.
27580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27582      # a path prefixed by /cygdrive for fixpath to work.
27583      new_path="$CYGWIN_ROOT_PATH$input_path"
27584    fi
27585  fi
27586
27587
27588  if test "x$path" != "x$new_path"; then
27589    BOOT_JDK="$new_path"
27590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27591$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27592  fi
27593
27594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27595
27596  path="$BOOT_JDK"
27597  has_colon=`$ECHO $path | $GREP ^.:`
27598  new_path="$path"
27599  if test "x$has_colon" = x; then
27600    # Not in mixed or Windows style, start by that.
27601    new_path=`cmd //c echo $path`
27602  fi
27603
27604
27605  input_path="$new_path"
27606  # Check if we need to convert this using DOS-style short mode. If the path
27607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27608  # take no chances and rewrite it.
27609  # Note: m4 eats our [], so we need to use [ and ] instead.
27610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27611  if test "x$has_forbidden_chars" != x; then
27612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27614  fi
27615
27616
27617  windows_path="$new_path"
27618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27619    unix_path=`$CYGPATH -u "$windows_path"`
27620    new_path="$unix_path"
27621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27623    new_path="$unix_path"
27624  fi
27625
27626  if test "x$path" != "x$new_path"; then
27627    BOOT_JDK="$new_path"
27628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27629$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27630  fi
27631
27632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27634
27635    else
27636      # We're on a unix platform. Hooray! :)
27637      path="$BOOT_JDK"
27638      has_space=`$ECHO "$path" | $GREP " "`
27639      if test "x$has_space" != x; then
27640        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27641$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27642        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27643      fi
27644
27645      # Use eval to expand a potential ~
27646      eval path="$path"
27647      if test ! -f "$path" && test ! -d "$path"; then
27648        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27649      fi
27650
27651      if test -d "$path"; then
27652        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27653      else
27654        dir="`$DIRNAME "$path"`"
27655        base="`$BASENAME "$path"`"
27656        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27657      fi
27658    fi
27659  fi
27660
27661            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27662$as_echo_n "checking for Boot JDK... " >&6; }
27663            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27664$as_echo "$BOOT_JDK" >&6; }
27665            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27666$as_echo_n "checking Boot JDK version... " >&6; }
27667            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27668            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27669$as_echo "$BOOT_JDK_VERSION" >&6; }
27670          fi # end check jdk version
27671        fi # end check javac
27672      fi # end check java
27673    fi # end check boot jdk found
27674  fi
27675
27676    done
27677  fi
27678
27679  fi
27680
27681
27682    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27683    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27684      # Do we have a bin/java?
27685      if test ! -x "$BOOT_JDK/bin/java"; then
27686        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27688        BOOT_JDK_FOUND=no
27689      else
27690        # Do we have a bin/javac?
27691        if test ! -x "$BOOT_JDK/bin/javac"; then
27692          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27694          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27695$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27696          BOOT_JDK_FOUND=no
27697        else
27698          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27699          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27700
27701          # Extra M4 quote needed to protect [] in grep expression.
27702          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27703          if test "x$FOUND_CORRECT_VERSION" = x; then
27704            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27706            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27707$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27708            BOOT_JDK_FOUND=no
27709          else
27710            # We're done! :-)
27711            BOOT_JDK_FOUND=yes
27712
27713  # Only process if variable expands to non-empty
27714
27715  if test "x$BOOT_JDK" != x; then
27716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27717
27718  # Input might be given as Windows format, start by converting to
27719  # unix format.
27720  path="$BOOT_JDK"
27721  new_path=`$CYGPATH -u "$path"`
27722
27723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27726  # "foo.exe" is OK but "foo" is an error.
27727  #
27728  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27729  # It is also a way to make sure we got the proper file name for the real test later on.
27730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27731  if test "x$test_shortpath" = x; then
27732    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27733$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27734    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27735  fi
27736
27737  # Call helper function which possibly converts this using DOS-style short mode.
27738  # If so, the updated path is stored in $new_path.
27739
27740  input_path="$new_path"
27741  # Check if we need to convert this using DOS-style short mode. If the path
27742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27743  # take no chances and rewrite it.
27744  # Note: m4 eats our [], so we need to use [ and ] instead.
27745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27746  if test "x$has_forbidden_chars" != x; then
27747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27751      # Going to short mode and back again did indeed matter. Since short mode is
27752      # case insensitive, let's make it lowercase to improve readability.
27753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27754      # Now convert it back to Unix-style (cygpath)
27755      input_path=`$CYGPATH -u "$shortmode_path"`
27756      new_path="$input_path"
27757    fi
27758  fi
27759
27760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27761  if test "x$test_cygdrive_prefix" = x; then
27762    # As a simple fix, exclude /usr/bin since it's not a real path.
27763    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27765      # a path prefixed by /cygdrive for fixpath to work.
27766      new_path="$CYGWIN_ROOT_PATH$input_path"
27767    fi
27768  fi
27769
27770
27771  if test "x$path" != "x$new_path"; then
27772    BOOT_JDK="$new_path"
27773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27774$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27775  fi
27776
27777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27778
27779  path="$BOOT_JDK"
27780  has_colon=`$ECHO $path | $GREP ^.:`
27781  new_path="$path"
27782  if test "x$has_colon" = x; then
27783    # Not in mixed or Windows style, start by that.
27784    new_path=`cmd //c echo $path`
27785  fi
27786
27787
27788  input_path="$new_path"
27789  # Check if we need to convert this using DOS-style short mode. If the path
27790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27791  # take no chances and rewrite it.
27792  # Note: m4 eats our [], so we need to use [ and ] instead.
27793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27794  if test "x$has_forbidden_chars" != x; then
27795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27797  fi
27798
27799
27800  windows_path="$new_path"
27801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27802    unix_path=`$CYGPATH -u "$windows_path"`
27803    new_path="$unix_path"
27804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27806    new_path="$unix_path"
27807  fi
27808
27809  if test "x$path" != "x$new_path"; then
27810    BOOT_JDK="$new_path"
27811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27812$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27813  fi
27814
27815  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27816  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27817
27818    else
27819      # We're on a unix platform. Hooray! :)
27820      path="$BOOT_JDK"
27821      has_space=`$ECHO "$path" | $GREP " "`
27822      if test "x$has_space" != x; then
27823        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27824$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27825        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27826      fi
27827
27828      # Use eval to expand a potential ~
27829      eval path="$path"
27830      if test ! -f "$path" && test ! -d "$path"; then
27831        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27832      fi
27833
27834      if test -d "$path"; then
27835        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27836      else
27837        dir="`$DIRNAME "$path"`"
27838        base="`$BASENAME "$path"`"
27839        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27840      fi
27841    fi
27842  fi
27843
27844            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27845$as_echo_n "checking for Boot JDK... " >&6; }
27846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27847$as_echo "$BOOT_JDK" >&6; }
27848            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27849$as_echo_n "checking Boot JDK version... " >&6; }
27850            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27851            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27852$as_echo "$BOOT_JDK_VERSION" >&6; }
27853          fi # end check jdk version
27854        fi # end check javac
27855      fi # end check java
27856    fi # end check boot jdk found
27857  fi
27858
27859
27860  if test "x$BOOT_JDK_FOUND" = xno; then
27861    # Now execute the test
27862
27863  if test "x$ProgramFiles" != x; then
27864    VIRTUAL_DIR="$ProgramFiles/Java"
27865
27866  windows_path="$VIRTUAL_DIR"
27867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27868    unix_path=`$CYGPATH -u "$windows_path"`
27869    VIRTUAL_DIR="$unix_path"
27870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27872    VIRTUAL_DIR="$unix_path"
27873  fi
27874
27875
27876  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27877  BOOT_JDK_SUFFIX=""
27878  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27879  if test "x$ALL_JDKS_FOUND" != x; then
27880    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27881
27882  if test "x$BOOT_JDK_FOUND" = xno; then
27883    # Now execute the test
27884
27885        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27886        if test -d "$BOOT_JDK"; then
27887          BOOT_JDK_FOUND=maybe
27888          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27889$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27890        fi
27891
27892
27893    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27894    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27895      # Do we have a bin/java?
27896      if test ! -x "$BOOT_JDK/bin/java"; then
27897        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27899        BOOT_JDK_FOUND=no
27900      else
27901        # Do we have a bin/javac?
27902        if test ! -x "$BOOT_JDK/bin/javac"; then
27903          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27905          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27906$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27907          BOOT_JDK_FOUND=no
27908        else
27909          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27910          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27911
27912          # Extra M4 quote needed to protect [] in grep expression.
27913          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27914          if test "x$FOUND_CORRECT_VERSION" = x; then
27915            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27917            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27918$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27919            BOOT_JDK_FOUND=no
27920          else
27921            # We're done! :-)
27922            BOOT_JDK_FOUND=yes
27923
27924  # Only process if variable expands to non-empty
27925
27926  if test "x$BOOT_JDK" != x; then
27927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27928
27929  # Input might be given as Windows format, start by converting to
27930  # unix format.
27931  path="$BOOT_JDK"
27932  new_path=`$CYGPATH -u "$path"`
27933
27934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27937  # "foo.exe" is OK but "foo" is an error.
27938  #
27939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27940  # It is also a way to make sure we got the proper file name for the real test later on.
27941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27942  if test "x$test_shortpath" = x; then
27943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27945    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27946  fi
27947
27948  # Call helper function which possibly converts this using DOS-style short mode.
27949  # If so, the updated path is stored in $new_path.
27950
27951  input_path="$new_path"
27952  # Check if we need to convert this using DOS-style short mode. If the path
27953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27954  # take no chances and rewrite it.
27955  # Note: m4 eats our [], so we need to use [ and ] instead.
27956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27957  if test "x$has_forbidden_chars" != x; then
27958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27962      # Going to short mode and back again did indeed matter. Since short mode is
27963      # case insensitive, let's make it lowercase to improve readability.
27964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27965      # Now convert it back to Unix-style (cygpath)
27966      input_path=`$CYGPATH -u "$shortmode_path"`
27967      new_path="$input_path"
27968    fi
27969  fi
27970
27971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27972  if test "x$test_cygdrive_prefix" = x; then
27973    # As a simple fix, exclude /usr/bin since it's not a real path.
27974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27976      # a path prefixed by /cygdrive for fixpath to work.
27977      new_path="$CYGWIN_ROOT_PATH$input_path"
27978    fi
27979  fi
27980
27981
27982  if test "x$path" != "x$new_path"; then
27983    BOOT_JDK="$new_path"
27984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27986  fi
27987
27988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27989
27990  path="$BOOT_JDK"
27991  has_colon=`$ECHO $path | $GREP ^.:`
27992  new_path="$path"
27993  if test "x$has_colon" = x; then
27994    # Not in mixed or Windows style, start by that.
27995    new_path=`cmd //c echo $path`
27996  fi
27997
27998
27999  input_path="$new_path"
28000  # Check if we need to convert this using DOS-style short mode. If the path
28001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28002  # take no chances and rewrite it.
28003  # Note: m4 eats our [], so we need to use [ and ] instead.
28004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28005  if test "x$has_forbidden_chars" != x; then
28006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28008  fi
28009
28010
28011  windows_path="$new_path"
28012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28013    unix_path=`$CYGPATH -u "$windows_path"`
28014    new_path="$unix_path"
28015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28017    new_path="$unix_path"
28018  fi
28019
28020  if test "x$path" != "x$new_path"; then
28021    BOOT_JDK="$new_path"
28022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28023$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28024  fi
28025
28026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28028
28029    else
28030      # We're on a unix platform. Hooray! :)
28031      path="$BOOT_JDK"
28032      has_space=`$ECHO "$path" | $GREP " "`
28033      if test "x$has_space" != x; then
28034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28036        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28037      fi
28038
28039      # Use eval to expand a potential ~
28040      eval path="$path"
28041      if test ! -f "$path" && test ! -d "$path"; then
28042        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28043      fi
28044
28045      if test -d "$path"; then
28046        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28047      else
28048        dir="`$DIRNAME "$path"`"
28049        base="`$BASENAME "$path"`"
28050        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28051      fi
28052    fi
28053  fi
28054
28055            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28056$as_echo_n "checking for Boot JDK... " >&6; }
28057            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28058$as_echo "$BOOT_JDK" >&6; }
28059            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28060$as_echo_n "checking Boot JDK version... " >&6; }
28061            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28062            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28063$as_echo "$BOOT_JDK_VERSION" >&6; }
28064          fi # end check jdk version
28065        fi # end check javac
28066      fi # end check java
28067    fi # end check boot jdk found
28068  fi
28069
28070    done
28071  fi
28072
28073  fi
28074
28075
28076    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28077    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28078      # Do we have a bin/java?
28079      if test ! -x "$BOOT_JDK/bin/java"; then
28080        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28081$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28082        BOOT_JDK_FOUND=no
28083      else
28084        # Do we have a bin/javac?
28085        if test ! -x "$BOOT_JDK/bin/javac"; then
28086          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28088          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28089$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28090          BOOT_JDK_FOUND=no
28091        else
28092          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28093          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28094
28095          # Extra M4 quote needed to protect [] in grep expression.
28096          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28097          if test "x$FOUND_CORRECT_VERSION" = x; then
28098            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28100            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28101$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28102            BOOT_JDK_FOUND=no
28103          else
28104            # We're done! :-)
28105            BOOT_JDK_FOUND=yes
28106
28107  # Only process if variable expands to non-empty
28108
28109  if test "x$BOOT_JDK" != x; then
28110    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28111
28112  # Input might be given as Windows format, start by converting to
28113  # unix format.
28114  path="$BOOT_JDK"
28115  new_path=`$CYGPATH -u "$path"`
28116
28117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28120  # "foo.exe" is OK but "foo" is an error.
28121  #
28122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28123  # It is also a way to make sure we got the proper file name for the real test later on.
28124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28125  if test "x$test_shortpath" = x; then
28126    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28127$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28128    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28129  fi
28130
28131  # Call helper function which possibly converts this using DOS-style short mode.
28132  # If so, the updated path is stored in $new_path.
28133
28134  input_path="$new_path"
28135  # Check if we need to convert this using DOS-style short mode. If the path
28136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28137  # take no chances and rewrite it.
28138  # Note: m4 eats our [], so we need to use [ and ] instead.
28139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28140  if test "x$has_forbidden_chars" != x; then
28141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28145      # Going to short mode and back again did indeed matter. Since short mode is
28146      # case insensitive, let's make it lowercase to improve readability.
28147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28148      # Now convert it back to Unix-style (cygpath)
28149      input_path=`$CYGPATH -u "$shortmode_path"`
28150      new_path="$input_path"
28151    fi
28152  fi
28153
28154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28155  if test "x$test_cygdrive_prefix" = x; then
28156    # As a simple fix, exclude /usr/bin since it's not a real path.
28157    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28159      # a path prefixed by /cygdrive for fixpath to work.
28160      new_path="$CYGWIN_ROOT_PATH$input_path"
28161    fi
28162  fi
28163
28164
28165  if test "x$path" != "x$new_path"; then
28166    BOOT_JDK="$new_path"
28167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28168$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28169  fi
28170
28171    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28172
28173  path="$BOOT_JDK"
28174  has_colon=`$ECHO $path | $GREP ^.:`
28175  new_path="$path"
28176  if test "x$has_colon" = x; then
28177    # Not in mixed or Windows style, start by that.
28178    new_path=`cmd //c echo $path`
28179  fi
28180
28181
28182  input_path="$new_path"
28183  # Check if we need to convert this using DOS-style short mode. If the path
28184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28185  # take no chances and rewrite it.
28186  # Note: m4 eats our [], so we need to use [ and ] instead.
28187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28188  if test "x$has_forbidden_chars" != x; then
28189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28191  fi
28192
28193
28194  windows_path="$new_path"
28195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28196    unix_path=`$CYGPATH -u "$windows_path"`
28197    new_path="$unix_path"
28198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28200    new_path="$unix_path"
28201  fi
28202
28203  if test "x$path" != "x$new_path"; then
28204    BOOT_JDK="$new_path"
28205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28206$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28207  fi
28208
28209  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28210  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28211
28212    else
28213      # We're on a unix platform. Hooray! :)
28214      path="$BOOT_JDK"
28215      has_space=`$ECHO "$path" | $GREP " "`
28216      if test "x$has_space" != x; then
28217        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28218$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28219        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28220      fi
28221
28222      # Use eval to expand a potential ~
28223      eval path="$path"
28224      if test ! -f "$path" && test ! -d "$path"; then
28225        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28226      fi
28227
28228      if test -d "$path"; then
28229        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28230      else
28231        dir="`$DIRNAME "$path"`"
28232        base="`$BASENAME "$path"`"
28233        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28234      fi
28235    fi
28236  fi
28237
28238            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28239$as_echo_n "checking for Boot JDK... " >&6; }
28240            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28241$as_echo "$BOOT_JDK" >&6; }
28242            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28243$as_echo_n "checking Boot JDK version... " >&6; }
28244            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28245            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28246$as_echo "$BOOT_JDK_VERSION" >&6; }
28247          fi # end check jdk version
28248        fi # end check javac
28249      fi # end check java
28250    fi # end check boot jdk found
28251  fi
28252
28253
28254  if test "x$BOOT_JDK_FOUND" = xno; then
28255    # Now execute the test
28256
28257  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28258  BOOT_JDK_SUFFIX=""
28259  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28260  if test "x$ALL_JDKS_FOUND" != x; then
28261    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28262
28263  if test "x$BOOT_JDK_FOUND" = xno; then
28264    # Now execute the test
28265
28266        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28267        if test -d "$BOOT_JDK"; then
28268          BOOT_JDK_FOUND=maybe
28269          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28270$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28271        fi
28272
28273
28274    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28275    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28276      # Do we have a bin/java?
28277      if test ! -x "$BOOT_JDK/bin/java"; then
28278        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28280        BOOT_JDK_FOUND=no
28281      else
28282        # Do we have a bin/javac?
28283        if test ! -x "$BOOT_JDK/bin/javac"; then
28284          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28286          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28287$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28288          BOOT_JDK_FOUND=no
28289        else
28290          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28291          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28292
28293          # Extra M4 quote needed to protect [] in grep expression.
28294          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28295          if test "x$FOUND_CORRECT_VERSION" = x; then
28296            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28298            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28299$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28300            BOOT_JDK_FOUND=no
28301          else
28302            # We're done! :-)
28303            BOOT_JDK_FOUND=yes
28304
28305  # Only process if variable expands to non-empty
28306
28307  if test "x$BOOT_JDK" != x; then
28308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28309
28310  # Input might be given as Windows format, start by converting to
28311  # unix format.
28312  path="$BOOT_JDK"
28313  new_path=`$CYGPATH -u "$path"`
28314
28315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28318  # "foo.exe" is OK but "foo" is an error.
28319  #
28320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28321  # It is also a way to make sure we got the proper file name for the real test later on.
28322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28323  if test "x$test_shortpath" = x; then
28324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28325$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28326    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28327  fi
28328
28329  # Call helper function which possibly converts this using DOS-style short mode.
28330  # If so, the updated path is stored in $new_path.
28331
28332  input_path="$new_path"
28333  # Check if we need to convert this using DOS-style short mode. If the path
28334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28335  # take no chances and rewrite it.
28336  # Note: m4 eats our [], so we need to use [ and ] instead.
28337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28338  if test "x$has_forbidden_chars" != x; then
28339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28343      # Going to short mode and back again did indeed matter. Since short mode is
28344      # case insensitive, let's make it lowercase to improve readability.
28345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28346      # Now convert it back to Unix-style (cygpath)
28347      input_path=`$CYGPATH -u "$shortmode_path"`
28348      new_path="$input_path"
28349    fi
28350  fi
28351
28352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28353  if test "x$test_cygdrive_prefix" = x; then
28354    # As a simple fix, exclude /usr/bin since it's not a real path.
28355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28357      # a path prefixed by /cygdrive for fixpath to work.
28358      new_path="$CYGWIN_ROOT_PATH$input_path"
28359    fi
28360  fi
28361
28362
28363  if test "x$path" != "x$new_path"; then
28364    BOOT_JDK="$new_path"
28365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28366$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28367  fi
28368
28369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28370
28371  path="$BOOT_JDK"
28372  has_colon=`$ECHO $path | $GREP ^.:`
28373  new_path="$path"
28374  if test "x$has_colon" = x; then
28375    # Not in mixed or Windows style, start by that.
28376    new_path=`cmd //c echo $path`
28377  fi
28378
28379
28380  input_path="$new_path"
28381  # Check if we need to convert this using DOS-style short mode. If the path
28382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28383  # take no chances and rewrite it.
28384  # Note: m4 eats our [], so we need to use [ and ] instead.
28385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28386  if test "x$has_forbidden_chars" != x; then
28387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28389  fi
28390
28391
28392  windows_path="$new_path"
28393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28394    unix_path=`$CYGPATH -u "$windows_path"`
28395    new_path="$unix_path"
28396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28398    new_path="$unix_path"
28399  fi
28400
28401  if test "x$path" != "x$new_path"; then
28402    BOOT_JDK="$new_path"
28403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28405  fi
28406
28407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28409
28410    else
28411      # We're on a unix platform. Hooray! :)
28412      path="$BOOT_JDK"
28413      has_space=`$ECHO "$path" | $GREP " "`
28414      if test "x$has_space" != x; then
28415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28416$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28418      fi
28419
28420      # Use eval to expand a potential ~
28421      eval path="$path"
28422      if test ! -f "$path" && test ! -d "$path"; then
28423        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28424      fi
28425
28426      if test -d "$path"; then
28427        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28428      else
28429        dir="`$DIRNAME "$path"`"
28430        base="`$BASENAME "$path"`"
28431        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28432      fi
28433    fi
28434  fi
28435
28436            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28437$as_echo_n "checking for Boot JDK... " >&6; }
28438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28439$as_echo "$BOOT_JDK" >&6; }
28440            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28441$as_echo_n "checking Boot JDK version... " >&6; }
28442            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28444$as_echo "$BOOT_JDK_VERSION" >&6; }
28445          fi # end check jdk version
28446        fi # end check javac
28447      fi # end check java
28448    fi # end check boot jdk found
28449  fi
28450
28451    done
28452  fi
28453
28454
28455    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28456    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28457      # Do we have a bin/java?
28458      if test ! -x "$BOOT_JDK/bin/java"; then
28459        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28461        BOOT_JDK_FOUND=no
28462      else
28463        # Do we have a bin/javac?
28464        if test ! -x "$BOOT_JDK/bin/javac"; then
28465          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28466$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28467          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28468$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28469          BOOT_JDK_FOUND=no
28470        else
28471          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28472          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28473
28474          # Extra M4 quote needed to protect [] in grep expression.
28475          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28476          if test "x$FOUND_CORRECT_VERSION" = x; then
28477            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28479            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28480$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28481            BOOT_JDK_FOUND=no
28482          else
28483            # We're done! :-)
28484            BOOT_JDK_FOUND=yes
28485
28486  # Only process if variable expands to non-empty
28487
28488  if test "x$BOOT_JDK" != x; then
28489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28490
28491  # Input might be given as Windows format, start by converting to
28492  # unix format.
28493  path="$BOOT_JDK"
28494  new_path=`$CYGPATH -u "$path"`
28495
28496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28499  # "foo.exe" is OK but "foo" is an error.
28500  #
28501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28502  # It is also a way to make sure we got the proper file name for the real test later on.
28503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28504  if test "x$test_shortpath" = x; then
28505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28506$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28507    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28508  fi
28509
28510  # Call helper function which possibly converts this using DOS-style short mode.
28511  # If so, the updated path is stored in $new_path.
28512
28513  input_path="$new_path"
28514  # Check if we need to convert this using DOS-style short mode. If the path
28515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28516  # take no chances and rewrite it.
28517  # Note: m4 eats our [], so we need to use [ and ] instead.
28518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28519  if test "x$has_forbidden_chars" != x; then
28520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28524      # Going to short mode and back again did indeed matter. Since short mode is
28525      # case insensitive, let's make it lowercase to improve readability.
28526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28527      # Now convert it back to Unix-style (cygpath)
28528      input_path=`$CYGPATH -u "$shortmode_path"`
28529      new_path="$input_path"
28530    fi
28531  fi
28532
28533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28534  if test "x$test_cygdrive_prefix" = x; then
28535    # As a simple fix, exclude /usr/bin since it's not a real path.
28536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28538      # a path prefixed by /cygdrive for fixpath to work.
28539      new_path="$CYGWIN_ROOT_PATH$input_path"
28540    fi
28541  fi
28542
28543
28544  if test "x$path" != "x$new_path"; then
28545    BOOT_JDK="$new_path"
28546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28547$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28548  fi
28549
28550    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28551
28552  path="$BOOT_JDK"
28553  has_colon=`$ECHO $path | $GREP ^.:`
28554  new_path="$path"
28555  if test "x$has_colon" = x; then
28556    # Not in mixed or Windows style, start by that.
28557    new_path=`cmd //c echo $path`
28558  fi
28559
28560
28561  input_path="$new_path"
28562  # Check if we need to convert this using DOS-style short mode. If the path
28563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28564  # take no chances and rewrite it.
28565  # Note: m4 eats our [], so we need to use [ and ] instead.
28566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28567  if test "x$has_forbidden_chars" != x; then
28568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28570  fi
28571
28572
28573  windows_path="$new_path"
28574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28575    unix_path=`$CYGPATH -u "$windows_path"`
28576    new_path="$unix_path"
28577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28579    new_path="$unix_path"
28580  fi
28581
28582  if test "x$path" != "x$new_path"; then
28583    BOOT_JDK="$new_path"
28584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28585$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28586  fi
28587
28588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28590
28591    else
28592      # We're on a unix platform. Hooray! :)
28593      path="$BOOT_JDK"
28594      has_space=`$ECHO "$path" | $GREP " "`
28595      if test "x$has_space" != x; then
28596        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28598        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28599      fi
28600
28601      # Use eval to expand a potential ~
28602      eval path="$path"
28603      if test ! -f "$path" && test ! -d "$path"; then
28604        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28605      fi
28606
28607      if test -d "$path"; then
28608        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28609      else
28610        dir="`$DIRNAME "$path"`"
28611        base="`$BASENAME "$path"`"
28612        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28613      fi
28614    fi
28615  fi
28616
28617            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28618$as_echo_n "checking for Boot JDK... " >&6; }
28619            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28620$as_echo "$BOOT_JDK" >&6; }
28621            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28622$as_echo_n "checking Boot JDK version... " >&6; }
28623            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28624            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28625$as_echo "$BOOT_JDK_VERSION" >&6; }
28626          fi # end check jdk version
28627        fi # end check javac
28628      fi # end check java
28629    fi # end check boot jdk found
28630  fi
28631
28632  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28633
28634  if test "x$BOOT_JDK_FOUND" = xno; then
28635    # Now execute the test
28636
28637  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28638  BOOT_JDK_SUFFIX="/Contents/Home"
28639  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28640  if test "x$ALL_JDKS_FOUND" != x; then
28641    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28642
28643  if test "x$BOOT_JDK_FOUND" = xno; then
28644    # Now execute the test
28645
28646        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28647        if test -d "$BOOT_JDK"; then
28648          BOOT_JDK_FOUND=maybe
28649          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28650$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28651        fi
28652
28653
28654    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28655    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28656      # Do we have a bin/java?
28657      if test ! -x "$BOOT_JDK/bin/java"; then
28658        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28659$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28660        BOOT_JDK_FOUND=no
28661      else
28662        # Do we have a bin/javac?
28663        if test ! -x "$BOOT_JDK/bin/javac"; then
28664          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28666          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28667$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28668          BOOT_JDK_FOUND=no
28669        else
28670          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28671          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28672
28673          # Extra M4 quote needed to protect [] in grep expression.
28674          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28675          if test "x$FOUND_CORRECT_VERSION" = x; then
28676            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28678            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28679$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28680            BOOT_JDK_FOUND=no
28681          else
28682            # We're done! :-)
28683            BOOT_JDK_FOUND=yes
28684
28685  # Only process if variable expands to non-empty
28686
28687  if test "x$BOOT_JDK" != x; then
28688    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28689
28690  # Input might be given as Windows format, start by converting to
28691  # unix format.
28692  path="$BOOT_JDK"
28693  new_path=`$CYGPATH -u "$path"`
28694
28695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28698  # "foo.exe" is OK but "foo" is an error.
28699  #
28700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28701  # It is also a way to make sure we got the proper file name for the real test later on.
28702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28703  if test "x$test_shortpath" = x; then
28704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28705$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28706    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28707  fi
28708
28709  # Call helper function which possibly converts this using DOS-style short mode.
28710  # If so, the updated path is stored in $new_path.
28711
28712  input_path="$new_path"
28713  # Check if we need to convert this using DOS-style short mode. If the path
28714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28715  # take no chances and rewrite it.
28716  # Note: m4 eats our [], so we need to use [ and ] instead.
28717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28718  if test "x$has_forbidden_chars" != x; then
28719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28723      # Going to short mode and back again did indeed matter. Since short mode is
28724      # case insensitive, let's make it lowercase to improve readability.
28725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28726      # Now convert it back to Unix-style (cygpath)
28727      input_path=`$CYGPATH -u "$shortmode_path"`
28728      new_path="$input_path"
28729    fi
28730  fi
28731
28732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28733  if test "x$test_cygdrive_prefix" = x; then
28734    # As a simple fix, exclude /usr/bin since it's not a real path.
28735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28737      # a path prefixed by /cygdrive for fixpath to work.
28738      new_path="$CYGWIN_ROOT_PATH$input_path"
28739    fi
28740  fi
28741
28742
28743  if test "x$path" != "x$new_path"; then
28744    BOOT_JDK="$new_path"
28745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28746$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28747  fi
28748
28749    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28750
28751  path="$BOOT_JDK"
28752  has_colon=`$ECHO $path | $GREP ^.:`
28753  new_path="$path"
28754  if test "x$has_colon" = x; then
28755    # Not in mixed or Windows style, start by that.
28756    new_path=`cmd //c echo $path`
28757  fi
28758
28759
28760  input_path="$new_path"
28761  # Check if we need to convert this using DOS-style short mode. If the path
28762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28763  # take no chances and rewrite it.
28764  # Note: m4 eats our [], so we need to use [ and ] instead.
28765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28766  if test "x$has_forbidden_chars" != x; then
28767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28769  fi
28770
28771
28772  windows_path="$new_path"
28773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28774    unix_path=`$CYGPATH -u "$windows_path"`
28775    new_path="$unix_path"
28776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28778    new_path="$unix_path"
28779  fi
28780
28781  if test "x$path" != "x$new_path"; then
28782    BOOT_JDK="$new_path"
28783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28784$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28785  fi
28786
28787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28789
28790    else
28791      # We're on a unix platform. Hooray! :)
28792      path="$BOOT_JDK"
28793      has_space=`$ECHO "$path" | $GREP " "`
28794      if test "x$has_space" != x; then
28795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28796$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28797        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28798      fi
28799
28800      # Use eval to expand a potential ~
28801      eval path="$path"
28802      if test ! -f "$path" && test ! -d "$path"; then
28803        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28804      fi
28805
28806      if test -d "$path"; then
28807        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28808      else
28809        dir="`$DIRNAME "$path"`"
28810        base="`$BASENAME "$path"`"
28811        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28812      fi
28813    fi
28814  fi
28815
28816            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28817$as_echo_n "checking for Boot JDK... " >&6; }
28818            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28819$as_echo "$BOOT_JDK" >&6; }
28820            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28821$as_echo_n "checking Boot JDK version... " >&6; }
28822            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28823            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28824$as_echo "$BOOT_JDK_VERSION" >&6; }
28825          fi # end check jdk version
28826        fi # end check javac
28827      fi # end check java
28828    fi # end check boot jdk found
28829  fi
28830
28831    done
28832  fi
28833
28834
28835    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28836    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28837      # Do we have a bin/java?
28838      if test ! -x "$BOOT_JDK/bin/java"; then
28839        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28840$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28841        BOOT_JDK_FOUND=no
28842      else
28843        # Do we have a bin/javac?
28844        if test ! -x "$BOOT_JDK/bin/javac"; then
28845          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28846$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28847          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28848$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28849          BOOT_JDK_FOUND=no
28850        else
28851          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28852          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28853
28854          # Extra M4 quote needed to protect [] in grep expression.
28855          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28856          if test "x$FOUND_CORRECT_VERSION" = x; then
28857            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28859            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28860$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28861            BOOT_JDK_FOUND=no
28862          else
28863            # We're done! :-)
28864            BOOT_JDK_FOUND=yes
28865
28866  # Only process if variable expands to non-empty
28867
28868  if test "x$BOOT_JDK" != x; then
28869    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28870
28871  # Input might be given as Windows format, start by converting to
28872  # unix format.
28873  path="$BOOT_JDK"
28874  new_path=`$CYGPATH -u "$path"`
28875
28876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28879  # "foo.exe" is OK but "foo" is an error.
28880  #
28881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28882  # It is also a way to make sure we got the proper file name for the real test later on.
28883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28884  if test "x$test_shortpath" = x; then
28885    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28886$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28887    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28888  fi
28889
28890  # Call helper function which possibly converts this using DOS-style short mode.
28891  # If so, the updated path is stored in $new_path.
28892
28893  input_path="$new_path"
28894  # Check if we need to convert this using DOS-style short mode. If the path
28895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28896  # take no chances and rewrite it.
28897  # Note: m4 eats our [], so we need to use [ and ] instead.
28898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28899  if test "x$has_forbidden_chars" != x; then
28900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28904      # Going to short mode and back again did indeed matter. Since short mode is
28905      # case insensitive, let's make it lowercase to improve readability.
28906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28907      # Now convert it back to Unix-style (cygpath)
28908      input_path=`$CYGPATH -u "$shortmode_path"`
28909      new_path="$input_path"
28910    fi
28911  fi
28912
28913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28914  if test "x$test_cygdrive_prefix" = x; then
28915    # As a simple fix, exclude /usr/bin since it's not a real path.
28916    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28918      # a path prefixed by /cygdrive for fixpath to work.
28919      new_path="$CYGWIN_ROOT_PATH$input_path"
28920    fi
28921  fi
28922
28923
28924  if test "x$path" != "x$new_path"; then
28925    BOOT_JDK="$new_path"
28926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28927$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28928  fi
28929
28930    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28931
28932  path="$BOOT_JDK"
28933  has_colon=`$ECHO $path | $GREP ^.:`
28934  new_path="$path"
28935  if test "x$has_colon" = x; then
28936    # Not in mixed or Windows style, start by that.
28937    new_path=`cmd //c echo $path`
28938  fi
28939
28940
28941  input_path="$new_path"
28942  # Check if we need to convert this using DOS-style short mode. If the path
28943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28944  # take no chances and rewrite it.
28945  # Note: m4 eats our [], so we need to use [ and ] instead.
28946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28947  if test "x$has_forbidden_chars" != x; then
28948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28950  fi
28951
28952
28953  windows_path="$new_path"
28954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28955    unix_path=`$CYGPATH -u "$windows_path"`
28956    new_path="$unix_path"
28957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28959    new_path="$unix_path"
28960  fi
28961
28962  if test "x$path" != "x$new_path"; then
28963    BOOT_JDK="$new_path"
28964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28966  fi
28967
28968  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28969  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28970
28971    else
28972      # We're on a unix platform. Hooray! :)
28973      path="$BOOT_JDK"
28974      has_space=`$ECHO "$path" | $GREP " "`
28975      if test "x$has_space" != x; then
28976        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28977$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28978        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28979      fi
28980
28981      # Use eval to expand a potential ~
28982      eval path="$path"
28983      if test ! -f "$path" && test ! -d "$path"; then
28984        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28985      fi
28986
28987      if test -d "$path"; then
28988        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28989      else
28990        dir="`$DIRNAME "$path"`"
28991        base="`$BASENAME "$path"`"
28992        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28993      fi
28994    fi
28995  fi
28996
28997            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28998$as_echo_n "checking for Boot JDK... " >&6; }
28999            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29000$as_echo "$BOOT_JDK" >&6; }
29001            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29002$as_echo_n "checking Boot JDK version... " >&6; }
29003            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29004            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29005$as_echo "$BOOT_JDK_VERSION" >&6; }
29006          fi # end check jdk version
29007        fi # end check javac
29008      fi # end check java
29009    fi # end check boot jdk found
29010  fi
29011
29012
29013  if test "x$BOOT_JDK_FOUND" = xno; then
29014    # Now execute the test
29015
29016  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29017  BOOT_JDK_SUFFIX="/Contents/Home"
29018  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29019  if test "x$ALL_JDKS_FOUND" != x; then
29020    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29021
29022  if test "x$BOOT_JDK_FOUND" = xno; then
29023    # Now execute the test
29024
29025        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29026        if test -d "$BOOT_JDK"; then
29027          BOOT_JDK_FOUND=maybe
29028          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29029$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29030        fi
29031
29032
29033    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29034    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29035      # Do we have a bin/java?
29036      if test ! -x "$BOOT_JDK/bin/java"; then
29037        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29039        BOOT_JDK_FOUND=no
29040      else
29041        # Do we have a bin/javac?
29042        if test ! -x "$BOOT_JDK/bin/javac"; then
29043          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29045          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29046$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29047          BOOT_JDK_FOUND=no
29048        else
29049          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29050          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29051
29052          # Extra M4 quote needed to protect [] in grep expression.
29053          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29054          if test "x$FOUND_CORRECT_VERSION" = x; then
29055            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29057            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29058$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29059            BOOT_JDK_FOUND=no
29060          else
29061            # We're done! :-)
29062            BOOT_JDK_FOUND=yes
29063
29064  # Only process if variable expands to non-empty
29065
29066  if test "x$BOOT_JDK" != x; then
29067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29068
29069  # Input might be given as Windows format, start by converting to
29070  # unix format.
29071  path="$BOOT_JDK"
29072  new_path=`$CYGPATH -u "$path"`
29073
29074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29077  # "foo.exe" is OK but "foo" is an error.
29078  #
29079  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29080  # It is also a way to make sure we got the proper file name for the real test later on.
29081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29082  if test "x$test_shortpath" = x; then
29083    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29084$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29085    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29086  fi
29087
29088  # Call helper function which possibly converts this using DOS-style short mode.
29089  # If so, the updated path is stored in $new_path.
29090
29091  input_path="$new_path"
29092  # Check if we need to convert this using DOS-style short mode. If the path
29093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29094  # take no chances and rewrite it.
29095  # Note: m4 eats our [], so we need to use [ and ] instead.
29096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29097  if test "x$has_forbidden_chars" != x; then
29098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29102      # Going to short mode and back again did indeed matter. Since short mode is
29103      # case insensitive, let's make it lowercase to improve readability.
29104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29105      # Now convert it back to Unix-style (cygpath)
29106      input_path=`$CYGPATH -u "$shortmode_path"`
29107      new_path="$input_path"
29108    fi
29109  fi
29110
29111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29112  if test "x$test_cygdrive_prefix" = x; then
29113    # As a simple fix, exclude /usr/bin since it's not a real path.
29114    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29116      # a path prefixed by /cygdrive for fixpath to work.
29117      new_path="$CYGWIN_ROOT_PATH$input_path"
29118    fi
29119  fi
29120
29121
29122  if test "x$path" != "x$new_path"; then
29123    BOOT_JDK="$new_path"
29124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29125$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29126  fi
29127
29128    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29129
29130  path="$BOOT_JDK"
29131  has_colon=`$ECHO $path | $GREP ^.:`
29132  new_path="$path"
29133  if test "x$has_colon" = x; then
29134    # Not in mixed or Windows style, start by that.
29135    new_path=`cmd //c echo $path`
29136  fi
29137
29138
29139  input_path="$new_path"
29140  # Check if we need to convert this using DOS-style short mode. If the path
29141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29142  # take no chances and rewrite it.
29143  # Note: m4 eats our [], so we need to use [ and ] instead.
29144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29145  if test "x$has_forbidden_chars" != x; then
29146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29147    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29148  fi
29149
29150
29151  windows_path="$new_path"
29152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29153    unix_path=`$CYGPATH -u "$windows_path"`
29154    new_path="$unix_path"
29155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29157    new_path="$unix_path"
29158  fi
29159
29160  if test "x$path" != "x$new_path"; then
29161    BOOT_JDK="$new_path"
29162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29163$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29164  fi
29165
29166  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29167  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29168
29169    else
29170      # We're on a unix platform. Hooray! :)
29171      path="$BOOT_JDK"
29172      has_space=`$ECHO "$path" | $GREP " "`
29173      if test "x$has_space" != x; then
29174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29175$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29176        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29177      fi
29178
29179      # Use eval to expand a potential ~
29180      eval path="$path"
29181      if test ! -f "$path" && test ! -d "$path"; then
29182        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29183      fi
29184
29185      if test -d "$path"; then
29186        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29187      else
29188        dir="`$DIRNAME "$path"`"
29189        base="`$BASENAME "$path"`"
29190        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29191      fi
29192    fi
29193  fi
29194
29195            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29196$as_echo_n "checking for Boot JDK... " >&6; }
29197            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29198$as_echo "$BOOT_JDK" >&6; }
29199            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29200$as_echo_n "checking Boot JDK version... " >&6; }
29201            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29202            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29203$as_echo "$BOOT_JDK_VERSION" >&6; }
29204          fi # end check jdk version
29205        fi # end check javac
29206      fi # end check java
29207    fi # end check boot jdk found
29208  fi
29209
29210    done
29211  fi
29212
29213
29214    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29215    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29216      # Do we have a bin/java?
29217      if test ! -x "$BOOT_JDK/bin/java"; then
29218        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29220        BOOT_JDK_FOUND=no
29221      else
29222        # Do we have a bin/javac?
29223        if test ! -x "$BOOT_JDK/bin/javac"; then
29224          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29225$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29226          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29227$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29228          BOOT_JDK_FOUND=no
29229        else
29230          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29231          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29232
29233          # Extra M4 quote needed to protect [] in grep expression.
29234          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29235          if test "x$FOUND_CORRECT_VERSION" = x; then
29236            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29238            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29239$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29240            BOOT_JDK_FOUND=no
29241          else
29242            # We're done! :-)
29243            BOOT_JDK_FOUND=yes
29244
29245  # Only process if variable expands to non-empty
29246
29247  if test "x$BOOT_JDK" != x; then
29248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29249
29250  # Input might be given as Windows format, start by converting to
29251  # unix format.
29252  path="$BOOT_JDK"
29253  new_path=`$CYGPATH -u "$path"`
29254
29255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29258  # "foo.exe" is OK but "foo" is an error.
29259  #
29260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29261  # It is also a way to make sure we got the proper file name for the real test later on.
29262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29263  if test "x$test_shortpath" = x; then
29264    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29266    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29267  fi
29268
29269  # Call helper function which possibly converts this using DOS-style short mode.
29270  # If so, the updated path is stored in $new_path.
29271
29272  input_path="$new_path"
29273  # Check if we need to convert this using DOS-style short mode. If the path
29274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29275  # take no chances and rewrite it.
29276  # Note: m4 eats our [], so we need to use [ and ] instead.
29277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29278  if test "x$has_forbidden_chars" != x; then
29279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29283      # Going to short mode and back again did indeed matter. Since short mode is
29284      # case insensitive, let's make it lowercase to improve readability.
29285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29286      # Now convert it back to Unix-style (cygpath)
29287      input_path=`$CYGPATH -u "$shortmode_path"`
29288      new_path="$input_path"
29289    fi
29290  fi
29291
29292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29293  if test "x$test_cygdrive_prefix" = x; then
29294    # As a simple fix, exclude /usr/bin since it's not a real path.
29295    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29297      # a path prefixed by /cygdrive for fixpath to work.
29298      new_path="$CYGWIN_ROOT_PATH$input_path"
29299    fi
29300  fi
29301
29302
29303  if test "x$path" != "x$new_path"; then
29304    BOOT_JDK="$new_path"
29305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29306$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29307  fi
29308
29309    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29310
29311  path="$BOOT_JDK"
29312  has_colon=`$ECHO $path | $GREP ^.:`
29313  new_path="$path"
29314  if test "x$has_colon" = x; then
29315    # Not in mixed or Windows style, start by that.
29316    new_path=`cmd //c echo $path`
29317  fi
29318
29319
29320  input_path="$new_path"
29321  # Check if we need to convert this using DOS-style short mode. If the path
29322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29323  # take no chances and rewrite it.
29324  # Note: m4 eats our [], so we need to use [ and ] instead.
29325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29326  if test "x$has_forbidden_chars" != x; then
29327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29329  fi
29330
29331
29332  windows_path="$new_path"
29333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29334    unix_path=`$CYGPATH -u "$windows_path"`
29335    new_path="$unix_path"
29336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29338    new_path="$unix_path"
29339  fi
29340
29341  if test "x$path" != "x$new_path"; then
29342    BOOT_JDK="$new_path"
29343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29344$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29345  fi
29346
29347  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29348  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29349
29350    else
29351      # We're on a unix platform. Hooray! :)
29352      path="$BOOT_JDK"
29353      has_space=`$ECHO "$path" | $GREP " "`
29354      if test "x$has_space" != x; then
29355        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29357        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29358      fi
29359
29360      # Use eval to expand a potential ~
29361      eval path="$path"
29362      if test ! -f "$path" && test ! -d "$path"; then
29363        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29364      fi
29365
29366      if test -d "$path"; then
29367        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29368      else
29369        dir="`$DIRNAME "$path"`"
29370        base="`$BASENAME "$path"`"
29371        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29372      fi
29373    fi
29374  fi
29375
29376            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29377$as_echo_n "checking for Boot JDK... " >&6; }
29378            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29379$as_echo "$BOOT_JDK" >&6; }
29380            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29381$as_echo_n "checking Boot JDK version... " >&6; }
29382            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29383            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29384$as_echo "$BOOT_JDK_VERSION" >&6; }
29385          fi # end check jdk version
29386        fi # end check javac
29387      fi # end check java
29388    fi # end check boot jdk found
29389  fi
29390
29391  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29392
29393  if test "x$BOOT_JDK_FOUND" = xno; then
29394    # Now execute the test
29395
29396  BOOT_JDK_PREFIX="/usr/lib/jvm"
29397  BOOT_JDK_SUFFIX=""
29398  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29399  if test "x$ALL_JDKS_FOUND" != x; then
29400    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29401
29402  if test "x$BOOT_JDK_FOUND" = xno; then
29403    # Now execute the test
29404
29405        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29406        if test -d "$BOOT_JDK"; then
29407          BOOT_JDK_FOUND=maybe
29408          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29409$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29410        fi
29411
29412
29413    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29414    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29415      # Do we have a bin/java?
29416      if test ! -x "$BOOT_JDK/bin/java"; then
29417        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29419        BOOT_JDK_FOUND=no
29420      else
29421        # Do we have a bin/javac?
29422        if test ! -x "$BOOT_JDK/bin/javac"; then
29423          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29425          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29426$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29427          BOOT_JDK_FOUND=no
29428        else
29429          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29430          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29431
29432          # Extra M4 quote needed to protect [] in grep expression.
29433          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29434          if test "x$FOUND_CORRECT_VERSION" = x; then
29435            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29436$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29437            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29438$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29439            BOOT_JDK_FOUND=no
29440          else
29441            # We're done! :-)
29442            BOOT_JDK_FOUND=yes
29443
29444  # Only process if variable expands to non-empty
29445
29446  if test "x$BOOT_JDK" != x; then
29447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29448
29449  # Input might be given as Windows format, start by converting to
29450  # unix format.
29451  path="$BOOT_JDK"
29452  new_path=`$CYGPATH -u "$path"`
29453
29454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29457  # "foo.exe" is OK but "foo" is an error.
29458  #
29459  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29460  # It is also a way to make sure we got the proper file name for the real test later on.
29461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29462  if test "x$test_shortpath" = x; then
29463    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29464$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29465    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29466  fi
29467
29468  # Call helper function which possibly converts this using DOS-style short mode.
29469  # If so, the updated path is stored in $new_path.
29470
29471  input_path="$new_path"
29472  # Check if we need to convert this using DOS-style short mode. If the path
29473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29474  # take no chances and rewrite it.
29475  # Note: m4 eats our [], so we need to use [ and ] instead.
29476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29477  if test "x$has_forbidden_chars" != x; then
29478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29482      # Going to short mode and back again did indeed matter. Since short mode is
29483      # case insensitive, let's make it lowercase to improve readability.
29484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29485      # Now convert it back to Unix-style (cygpath)
29486      input_path=`$CYGPATH -u "$shortmode_path"`
29487      new_path="$input_path"
29488    fi
29489  fi
29490
29491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29492  if test "x$test_cygdrive_prefix" = x; then
29493    # As a simple fix, exclude /usr/bin since it's not a real path.
29494    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29496      # a path prefixed by /cygdrive for fixpath to work.
29497      new_path="$CYGWIN_ROOT_PATH$input_path"
29498    fi
29499  fi
29500
29501
29502  if test "x$path" != "x$new_path"; then
29503    BOOT_JDK="$new_path"
29504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29505$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29506  fi
29507
29508    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29509
29510  path="$BOOT_JDK"
29511  has_colon=`$ECHO $path | $GREP ^.:`
29512  new_path="$path"
29513  if test "x$has_colon" = x; then
29514    # Not in mixed or Windows style, start by that.
29515    new_path=`cmd //c echo $path`
29516  fi
29517
29518
29519  input_path="$new_path"
29520  # Check if we need to convert this using DOS-style short mode. If the path
29521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29522  # take no chances and rewrite it.
29523  # Note: m4 eats our [], so we need to use [ and ] instead.
29524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29525  if test "x$has_forbidden_chars" != x; then
29526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29528  fi
29529
29530
29531  windows_path="$new_path"
29532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29533    unix_path=`$CYGPATH -u "$windows_path"`
29534    new_path="$unix_path"
29535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29537    new_path="$unix_path"
29538  fi
29539
29540  if test "x$path" != "x$new_path"; then
29541    BOOT_JDK="$new_path"
29542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29543$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29544  fi
29545
29546  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29547  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29548
29549    else
29550      # We're on a unix platform. Hooray! :)
29551      path="$BOOT_JDK"
29552      has_space=`$ECHO "$path" | $GREP " "`
29553      if test "x$has_space" != x; then
29554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29555$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29556        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29557      fi
29558
29559      # Use eval to expand a potential ~
29560      eval path="$path"
29561      if test ! -f "$path" && test ! -d "$path"; then
29562        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29563      fi
29564
29565      if test -d "$path"; then
29566        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29567      else
29568        dir="`$DIRNAME "$path"`"
29569        base="`$BASENAME "$path"`"
29570        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29571      fi
29572    fi
29573  fi
29574
29575            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29576$as_echo_n "checking for Boot JDK... " >&6; }
29577            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29578$as_echo "$BOOT_JDK" >&6; }
29579            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29580$as_echo_n "checking Boot JDK version... " >&6; }
29581            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29582            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29583$as_echo "$BOOT_JDK_VERSION" >&6; }
29584          fi # end check jdk version
29585        fi # end check javac
29586      fi # end check java
29587    fi # end check boot jdk found
29588  fi
29589
29590    done
29591  fi
29592
29593
29594    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29595    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29596      # Do we have a bin/java?
29597      if test ! -x "$BOOT_JDK/bin/java"; then
29598        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29600        BOOT_JDK_FOUND=no
29601      else
29602        # Do we have a bin/javac?
29603        if test ! -x "$BOOT_JDK/bin/javac"; then
29604          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29606          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29607$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29608          BOOT_JDK_FOUND=no
29609        else
29610          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29611          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29612
29613          # Extra M4 quote needed to protect [] in grep expression.
29614          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29615          if test "x$FOUND_CORRECT_VERSION" = x; then
29616            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29618            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29619$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29620            BOOT_JDK_FOUND=no
29621          else
29622            # We're done! :-)
29623            BOOT_JDK_FOUND=yes
29624
29625  # Only process if variable expands to non-empty
29626
29627  if test "x$BOOT_JDK" != x; then
29628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29629
29630  # Input might be given as Windows format, start by converting to
29631  # unix format.
29632  path="$BOOT_JDK"
29633  new_path=`$CYGPATH -u "$path"`
29634
29635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29638  # "foo.exe" is OK but "foo" is an error.
29639  #
29640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29641  # It is also a way to make sure we got the proper file name for the real test later on.
29642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29643  if test "x$test_shortpath" = x; then
29644    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29645$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29646    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29647  fi
29648
29649  # Call helper function which possibly converts this using DOS-style short mode.
29650  # If so, the updated path is stored in $new_path.
29651
29652  input_path="$new_path"
29653  # Check if we need to convert this using DOS-style short mode. If the path
29654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29655  # take no chances and rewrite it.
29656  # Note: m4 eats our [], so we need to use [ and ] instead.
29657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29658  if test "x$has_forbidden_chars" != x; then
29659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29663      # Going to short mode and back again did indeed matter. Since short mode is
29664      # case insensitive, let's make it lowercase to improve readability.
29665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29666      # Now convert it back to Unix-style (cygpath)
29667      input_path=`$CYGPATH -u "$shortmode_path"`
29668      new_path="$input_path"
29669    fi
29670  fi
29671
29672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29673  if test "x$test_cygdrive_prefix" = x; then
29674    # As a simple fix, exclude /usr/bin since it's not a real path.
29675    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29677      # a path prefixed by /cygdrive for fixpath to work.
29678      new_path="$CYGWIN_ROOT_PATH$input_path"
29679    fi
29680  fi
29681
29682
29683  if test "x$path" != "x$new_path"; then
29684    BOOT_JDK="$new_path"
29685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29686$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29687  fi
29688
29689    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29690
29691  path="$BOOT_JDK"
29692  has_colon=`$ECHO $path | $GREP ^.:`
29693  new_path="$path"
29694  if test "x$has_colon" = x; then
29695    # Not in mixed or Windows style, start by that.
29696    new_path=`cmd //c echo $path`
29697  fi
29698
29699
29700  input_path="$new_path"
29701  # Check if we need to convert this using DOS-style short mode. If the path
29702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29703  # take no chances and rewrite it.
29704  # Note: m4 eats our [], so we need to use [ and ] instead.
29705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29706  if test "x$has_forbidden_chars" != x; then
29707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29709  fi
29710
29711
29712  windows_path="$new_path"
29713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29714    unix_path=`$CYGPATH -u "$windows_path"`
29715    new_path="$unix_path"
29716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29718    new_path="$unix_path"
29719  fi
29720
29721  if test "x$path" != "x$new_path"; then
29722    BOOT_JDK="$new_path"
29723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29724$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29725  fi
29726
29727  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29728  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29729
29730    else
29731      # We're on a unix platform. Hooray! :)
29732      path="$BOOT_JDK"
29733      has_space=`$ECHO "$path" | $GREP " "`
29734      if test "x$has_space" != x; then
29735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29736$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29737        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29738      fi
29739
29740      # Use eval to expand a potential ~
29741      eval path="$path"
29742      if test ! -f "$path" && test ! -d "$path"; then
29743        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29744      fi
29745
29746      if test -d "$path"; then
29747        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29748      else
29749        dir="`$DIRNAME "$path"`"
29750        base="`$BASENAME "$path"`"
29751        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29752      fi
29753    fi
29754  fi
29755
29756            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29757$as_echo_n "checking for Boot JDK... " >&6; }
29758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29759$as_echo "$BOOT_JDK" >&6; }
29760            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29761$as_echo_n "checking Boot JDK version... " >&6; }
29762            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29764$as_echo "$BOOT_JDK_VERSION" >&6; }
29765          fi # end check jdk version
29766        fi # end check javac
29767      fi # end check java
29768    fi # end check boot jdk found
29769  fi
29770
29771  fi
29772
29773
29774    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29775    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29776      # Do we have a bin/java?
29777      if test ! -x "$BOOT_JDK/bin/java"; then
29778        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29780        BOOT_JDK_FOUND=no
29781      else
29782        # Do we have a bin/javac?
29783        if test ! -x "$BOOT_JDK/bin/javac"; then
29784          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29786          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29787$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29788          BOOT_JDK_FOUND=no
29789        else
29790          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29791          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29792
29793          # Extra M4 quote needed to protect [] in grep expression.
29794          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29795          if test "x$FOUND_CORRECT_VERSION" = x; then
29796            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29798            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29799$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29800            BOOT_JDK_FOUND=no
29801          else
29802            # We're done! :-)
29803            BOOT_JDK_FOUND=yes
29804
29805  # Only process if variable expands to non-empty
29806
29807  if test "x$BOOT_JDK" != x; then
29808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29809
29810  # Input might be given as Windows format, start by converting to
29811  # unix format.
29812  path="$BOOT_JDK"
29813  new_path=`$CYGPATH -u "$path"`
29814
29815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29818  # "foo.exe" is OK but "foo" is an error.
29819  #
29820  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29821  # It is also a way to make sure we got the proper file name for the real test later on.
29822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29823  if test "x$test_shortpath" = x; then
29824    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29825$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29826    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29827  fi
29828
29829  # Call helper function which possibly converts this using DOS-style short mode.
29830  # If so, the updated path is stored in $new_path.
29831
29832  input_path="$new_path"
29833  # Check if we need to convert this using DOS-style short mode. If the path
29834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29835  # take no chances and rewrite it.
29836  # Note: m4 eats our [], so we need to use [ and ] instead.
29837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29838  if test "x$has_forbidden_chars" != x; then
29839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29843      # Going to short mode and back again did indeed matter. Since short mode is
29844      # case insensitive, let's make it lowercase to improve readability.
29845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29846      # Now convert it back to Unix-style (cygpath)
29847      input_path=`$CYGPATH -u "$shortmode_path"`
29848      new_path="$input_path"
29849    fi
29850  fi
29851
29852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29853  if test "x$test_cygdrive_prefix" = x; then
29854    # As a simple fix, exclude /usr/bin since it's not a real path.
29855    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29857      # a path prefixed by /cygdrive for fixpath to work.
29858      new_path="$CYGWIN_ROOT_PATH$input_path"
29859    fi
29860  fi
29861
29862
29863  if test "x$path" != "x$new_path"; then
29864    BOOT_JDK="$new_path"
29865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29867  fi
29868
29869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29870
29871  path="$BOOT_JDK"
29872  has_colon=`$ECHO $path | $GREP ^.:`
29873  new_path="$path"
29874  if test "x$has_colon" = x; then
29875    # Not in mixed or Windows style, start by that.
29876    new_path=`cmd //c echo $path`
29877  fi
29878
29879
29880  input_path="$new_path"
29881  # Check if we need to convert this using DOS-style short mode. If the path
29882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29883  # take no chances and rewrite it.
29884  # Note: m4 eats our [], so we need to use [ and ] instead.
29885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29886  if test "x$has_forbidden_chars" != x; then
29887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29889  fi
29890
29891
29892  windows_path="$new_path"
29893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29894    unix_path=`$CYGPATH -u "$windows_path"`
29895    new_path="$unix_path"
29896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29898    new_path="$unix_path"
29899  fi
29900
29901  if test "x$path" != "x$new_path"; then
29902    BOOT_JDK="$new_path"
29903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29905  fi
29906
29907  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29908  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29909
29910    else
29911      # We're on a unix platform. Hooray! :)
29912      path="$BOOT_JDK"
29913      has_space=`$ECHO "$path" | $GREP " "`
29914      if test "x$has_space" != x; then
29915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29917        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29918      fi
29919
29920      # Use eval to expand a potential ~
29921      eval path="$path"
29922      if test ! -f "$path" && test ! -d "$path"; then
29923        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29924      fi
29925
29926      if test -d "$path"; then
29927        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29928      else
29929        dir="`$DIRNAME "$path"`"
29930        base="`$BASENAME "$path"`"
29931        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29932      fi
29933    fi
29934  fi
29935
29936            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29937$as_echo_n "checking for Boot JDK... " >&6; }
29938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29939$as_echo "$BOOT_JDK" >&6; }
29940            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29941$as_echo_n "checking Boot JDK version... " >&6; }
29942            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29943            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29944$as_echo "$BOOT_JDK_VERSION" >&6; }
29945          fi # end check jdk version
29946        fi # end check javac
29947      fi # end check java
29948    fi # end check boot jdk found
29949  fi
29950
29951
29952  # If we haven't found anything yet, we've truly lost. Give up.
29953  if test "x$BOOT_JDK_FOUND" = xno; then
29954
29955  # Print a helpful message on how to acquire the necessary build dependency.
29956  # openjdk is the help tag: freetype, cups, alsa etc
29957  MISSING_DEPENDENCY=openjdk
29958
29959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29960    cygwin_help $MISSING_DEPENDENCY
29961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29962    msys_help $MISSING_DEPENDENCY
29963  else
29964    PKGHANDLER_COMMAND=
29965
29966    case $PKGHANDLER in
29967      apt-get)
29968        apt_help     $MISSING_DEPENDENCY ;;
29969      yum)
29970        yum_help     $MISSING_DEPENDENCY ;;
29971      brew)
29972        brew_help    $MISSING_DEPENDENCY ;;
29973      port)
29974        port_help    $MISSING_DEPENDENCY ;;
29975      pkgutil)
29976        pkgutil_help $MISSING_DEPENDENCY ;;
29977      pkgadd)
29978        pkgadd_help  $MISSING_DEPENDENCY ;;
29979    esac
29980
29981    if test "x$PKGHANDLER_COMMAND" != x; then
29982      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29983    fi
29984  fi
29985
29986    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29987$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29988    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29989$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29990    as_fn_error $? "Cannot continue" "$LINENO" 5
29991  fi
29992
29993
29994
29995  # Setup tools from the Boot JDK.
29996
29997  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29998
29999  # Publish this variable in the help.
30000
30001
30002  if [ -z "${JAVA+x}" ]; then
30003    # The variable is not set by user, try to locate tool using the code snippet
30004
30005      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30006$as_echo_n "checking for java in Boot JDK... " >&6; }
30007      JAVA=$BOOT_JDK/bin/java
30008      if test ! -x $JAVA; then
30009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30010$as_echo "not found" >&6; }
30011        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30012$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30013        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30014      fi
30015      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30016$as_echo "ok" >&6; }
30017
30018
30019  else
30020    # The variable is set, but is it from the command line or the environment?
30021
30022    # Try to remove the string !JAVA! from our list.
30023    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30024    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30025      # If it failed, the variable was not from the command line. Ignore it,
30026      # but warn the user (except for BASH, which is always set by the calling BASH).
30027      if test "xJAVA" != xBASH; then
30028        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30029$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30030      fi
30031      # Try to locate tool using the code snippet
30032
30033      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30034$as_echo_n "checking for java in Boot JDK... " >&6; }
30035      JAVA=$BOOT_JDK/bin/java
30036      if test ! -x $JAVA; then
30037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30038$as_echo "not found" >&6; }
30039        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30040$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30041        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30042      fi
30043      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30044$as_echo "ok" >&6; }
30045
30046
30047    else
30048      # If it succeeded, then it was overridden by the user. We will use it
30049      # for the tool.
30050
30051      # First remove it from the list of overridden variables, so we can test
30052      # for unknown variables in the end.
30053      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30054
30055      # Check if we try to supply an empty value
30056      if test "x$JAVA" = x; then
30057        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30058$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30060$as_echo_n "checking for JAVA... " >&6; }
30061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30062$as_echo "disabled" >&6; }
30063      else
30064        # Check if the provided tool contains a complete path.
30065        tool_specified="$JAVA"
30066        tool_basename="${tool_specified##*/}"
30067        if test "x$tool_basename" = "x$tool_specified"; then
30068          # A command without a complete path is provided, search $PATH.
30069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30070$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30071          # Extract the first word of "$tool_basename", so it can be a program name with args.
30072set dummy $tool_basename; ac_word=$2
30073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30074$as_echo_n "checking for $ac_word... " >&6; }
30075if ${ac_cv_path_JAVA+:} false; then :
30076  $as_echo_n "(cached) " >&6
30077else
30078  case $JAVA in
30079  [\\/]* | ?:[\\/]*)
30080  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30081  ;;
30082  *)
30083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30084for as_dir in $PATH
30085do
30086  IFS=$as_save_IFS
30087  test -z "$as_dir" && as_dir=.
30088    for ac_exec_ext in '' $ac_executable_extensions; do
30089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30090    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30092    break 2
30093  fi
30094done
30095  done
30096IFS=$as_save_IFS
30097
30098  ;;
30099esac
30100fi
30101JAVA=$ac_cv_path_JAVA
30102if test -n "$JAVA"; then
30103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30104$as_echo "$JAVA" >&6; }
30105else
30106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30107$as_echo "no" >&6; }
30108fi
30109
30110
30111          if test "x$JAVA" = x; then
30112            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30113          fi
30114        else
30115          # Otherwise we believe it is a complete path. Use it as it is.
30116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30117$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30118          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30119$as_echo_n "checking for JAVA... " >&6; }
30120          if test ! -x "$tool_specified"; then
30121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30122$as_echo "not found" >&6; }
30123            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30124          fi
30125          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30126$as_echo "$tool_specified" >&6; }
30127        fi
30128      fi
30129    fi
30130
30131  fi
30132
30133
30134
30135  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30136
30137  # Publish this variable in the help.
30138
30139
30140  if [ -z "${JAVAC+x}" ]; then
30141    # The variable is not set by user, try to locate tool using the code snippet
30142
30143      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30144$as_echo_n "checking for javac in Boot JDK... " >&6; }
30145      JAVAC=$BOOT_JDK/bin/javac
30146      if test ! -x $JAVAC; then
30147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30148$as_echo "not found" >&6; }
30149        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30150$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30151        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30152      fi
30153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30154$as_echo "ok" >&6; }
30155
30156
30157  else
30158    # The variable is set, but is it from the command line or the environment?
30159
30160    # Try to remove the string !JAVAC! from our list.
30161    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30162    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30163      # If it failed, the variable was not from the command line. Ignore it,
30164      # but warn the user (except for BASH, which is always set by the calling BASH).
30165      if test "xJAVAC" != xBASH; then
30166        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30167$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30168      fi
30169      # Try to locate tool using the code snippet
30170
30171      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30172$as_echo_n "checking for javac in Boot JDK... " >&6; }
30173      JAVAC=$BOOT_JDK/bin/javac
30174      if test ! -x $JAVAC; then
30175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30176$as_echo "not found" >&6; }
30177        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30178$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30179        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30180      fi
30181      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30182$as_echo "ok" >&6; }
30183
30184
30185    else
30186      # If it succeeded, then it was overridden by the user. We will use it
30187      # for the tool.
30188
30189      # First remove it from the list of overridden variables, so we can test
30190      # for unknown variables in the end.
30191      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30192
30193      # Check if we try to supply an empty value
30194      if test "x$JAVAC" = x; then
30195        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30196$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30197        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30198$as_echo_n "checking for JAVAC... " >&6; }
30199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30200$as_echo "disabled" >&6; }
30201      else
30202        # Check if the provided tool contains a complete path.
30203        tool_specified="$JAVAC"
30204        tool_basename="${tool_specified##*/}"
30205        if test "x$tool_basename" = "x$tool_specified"; then
30206          # A command without a complete path is provided, search $PATH.
30207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30208$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30209          # Extract the first word of "$tool_basename", so it can be a program name with args.
30210set dummy $tool_basename; ac_word=$2
30211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30212$as_echo_n "checking for $ac_word... " >&6; }
30213if ${ac_cv_path_JAVAC+:} false; then :
30214  $as_echo_n "(cached) " >&6
30215else
30216  case $JAVAC in
30217  [\\/]* | ?:[\\/]*)
30218  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30219  ;;
30220  *)
30221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30222for as_dir in $PATH
30223do
30224  IFS=$as_save_IFS
30225  test -z "$as_dir" && as_dir=.
30226    for ac_exec_ext in '' $ac_executable_extensions; do
30227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30228    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30230    break 2
30231  fi
30232done
30233  done
30234IFS=$as_save_IFS
30235
30236  ;;
30237esac
30238fi
30239JAVAC=$ac_cv_path_JAVAC
30240if test -n "$JAVAC"; then
30241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30242$as_echo "$JAVAC" >&6; }
30243else
30244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30245$as_echo "no" >&6; }
30246fi
30247
30248
30249          if test "x$JAVAC" = x; then
30250            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30251          fi
30252        else
30253          # Otherwise we believe it is a complete path. Use it as it is.
30254          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30255$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30256          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30257$as_echo_n "checking for JAVAC... " >&6; }
30258          if test ! -x "$tool_specified"; then
30259            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30260$as_echo "not found" >&6; }
30261            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30262          fi
30263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30264$as_echo "$tool_specified" >&6; }
30265        fi
30266      fi
30267    fi
30268
30269  fi
30270
30271
30272
30273  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30274
30275  # Publish this variable in the help.
30276
30277
30278  if [ -z "${JAVAH+x}" ]; then
30279    # The variable is not set by user, try to locate tool using the code snippet
30280
30281      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30282$as_echo_n "checking for javah in Boot JDK... " >&6; }
30283      JAVAH=$BOOT_JDK/bin/javah
30284      if test ! -x $JAVAH; then
30285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30286$as_echo "not found" >&6; }
30287        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30288$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30289        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30290      fi
30291      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30292$as_echo "ok" >&6; }
30293
30294
30295  else
30296    # The variable is set, but is it from the command line or the environment?
30297
30298    # Try to remove the string !JAVAH! from our list.
30299    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30300    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30301      # If it failed, the variable was not from the command line. Ignore it,
30302      # but warn the user (except for BASH, which is always set by the calling BASH).
30303      if test "xJAVAH" != xBASH; then
30304        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30305$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30306      fi
30307      # Try to locate tool using the code snippet
30308
30309      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30310$as_echo_n "checking for javah in Boot JDK... " >&6; }
30311      JAVAH=$BOOT_JDK/bin/javah
30312      if test ! -x $JAVAH; then
30313        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30314$as_echo "not found" >&6; }
30315        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30316$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30317        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30318      fi
30319      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30320$as_echo "ok" >&6; }
30321
30322
30323    else
30324      # If it succeeded, then it was overridden by the user. We will use it
30325      # for the tool.
30326
30327      # First remove it from the list of overridden variables, so we can test
30328      # for unknown variables in the end.
30329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30330
30331      # Check if we try to supply an empty value
30332      if test "x$JAVAH" = x; then
30333        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30334$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30336$as_echo_n "checking for JAVAH... " >&6; }
30337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30338$as_echo "disabled" >&6; }
30339      else
30340        # Check if the provided tool contains a complete path.
30341        tool_specified="$JAVAH"
30342        tool_basename="${tool_specified##*/}"
30343        if test "x$tool_basename" = "x$tool_specified"; then
30344          # A command without a complete path is provided, search $PATH.
30345          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30346$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30347          # Extract the first word of "$tool_basename", so it can be a program name with args.
30348set dummy $tool_basename; ac_word=$2
30349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30350$as_echo_n "checking for $ac_word... " >&6; }
30351if ${ac_cv_path_JAVAH+:} false; then :
30352  $as_echo_n "(cached) " >&6
30353else
30354  case $JAVAH in
30355  [\\/]* | ?:[\\/]*)
30356  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30357  ;;
30358  *)
30359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30360for as_dir in $PATH
30361do
30362  IFS=$as_save_IFS
30363  test -z "$as_dir" && as_dir=.
30364    for ac_exec_ext in '' $ac_executable_extensions; do
30365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30366    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30368    break 2
30369  fi
30370done
30371  done
30372IFS=$as_save_IFS
30373
30374  ;;
30375esac
30376fi
30377JAVAH=$ac_cv_path_JAVAH
30378if test -n "$JAVAH"; then
30379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30380$as_echo "$JAVAH" >&6; }
30381else
30382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30383$as_echo "no" >&6; }
30384fi
30385
30386
30387          if test "x$JAVAH" = x; then
30388            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30389          fi
30390        else
30391          # Otherwise we believe it is a complete path. Use it as it is.
30392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30393$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30394          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30395$as_echo_n "checking for JAVAH... " >&6; }
30396          if test ! -x "$tool_specified"; then
30397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30398$as_echo "not found" >&6; }
30399            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30400          fi
30401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30402$as_echo "$tool_specified" >&6; }
30403        fi
30404      fi
30405    fi
30406
30407  fi
30408
30409
30410
30411  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30412
30413  # Publish this variable in the help.
30414
30415
30416  if [ -z "${JAR+x}" ]; then
30417    # The variable is not set by user, try to locate tool using the code snippet
30418
30419      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30420$as_echo_n "checking for jar in Boot JDK... " >&6; }
30421      JAR=$BOOT_JDK/bin/jar
30422      if test ! -x $JAR; then
30423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30424$as_echo "not found" >&6; }
30425        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30426$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30427        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30428      fi
30429      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30430$as_echo "ok" >&6; }
30431
30432
30433  else
30434    # The variable is set, but is it from the command line or the environment?
30435
30436    # Try to remove the string !JAR! from our list.
30437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30439      # If it failed, the variable was not from the command line. Ignore it,
30440      # but warn the user (except for BASH, which is always set by the calling BASH).
30441      if test "xJAR" != xBASH; then
30442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30443$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30444      fi
30445      # Try to locate tool using the code snippet
30446
30447      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30448$as_echo_n "checking for jar in Boot JDK... " >&6; }
30449      JAR=$BOOT_JDK/bin/jar
30450      if test ! -x $JAR; then
30451        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30452$as_echo "not found" >&6; }
30453        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30454$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30455        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30456      fi
30457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30458$as_echo "ok" >&6; }
30459
30460
30461    else
30462      # If it succeeded, then it was overridden by the user. We will use it
30463      # for the tool.
30464
30465      # First remove it from the list of overridden variables, so we can test
30466      # for unknown variables in the end.
30467      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30468
30469      # Check if we try to supply an empty value
30470      if test "x$JAR" = x; then
30471        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30472$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30474$as_echo_n "checking for JAR... " >&6; }
30475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30476$as_echo "disabled" >&6; }
30477      else
30478        # Check if the provided tool contains a complete path.
30479        tool_specified="$JAR"
30480        tool_basename="${tool_specified##*/}"
30481        if test "x$tool_basename" = "x$tool_specified"; then
30482          # A command without a complete path is provided, search $PATH.
30483          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30484$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30485          # Extract the first word of "$tool_basename", so it can be a program name with args.
30486set dummy $tool_basename; ac_word=$2
30487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30488$as_echo_n "checking for $ac_word... " >&6; }
30489if ${ac_cv_path_JAR+:} false; then :
30490  $as_echo_n "(cached) " >&6
30491else
30492  case $JAR in
30493  [\\/]* | ?:[\\/]*)
30494  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30495  ;;
30496  *)
30497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30498for as_dir in $PATH
30499do
30500  IFS=$as_save_IFS
30501  test -z "$as_dir" && as_dir=.
30502    for ac_exec_ext in '' $ac_executable_extensions; do
30503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30504    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30506    break 2
30507  fi
30508done
30509  done
30510IFS=$as_save_IFS
30511
30512  ;;
30513esac
30514fi
30515JAR=$ac_cv_path_JAR
30516if test -n "$JAR"; then
30517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30518$as_echo "$JAR" >&6; }
30519else
30520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30521$as_echo "no" >&6; }
30522fi
30523
30524
30525          if test "x$JAR" = x; then
30526            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30527          fi
30528        else
30529          # Otherwise we believe it is a complete path. Use it as it is.
30530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30531$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30532          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30533$as_echo_n "checking for JAR... " >&6; }
30534          if test ! -x "$tool_specified"; then
30535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30536$as_echo "not found" >&6; }
30537            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30538          fi
30539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30540$as_echo "$tool_specified" >&6; }
30541        fi
30542      fi
30543    fi
30544
30545  fi
30546
30547
30548
30549  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30550
30551  # Publish this variable in the help.
30552
30553
30554  if [ -z "${JARSIGNER+x}" ]; then
30555    # The variable is not set by user, try to locate tool using the code snippet
30556
30557      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30558$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30559      JARSIGNER=$BOOT_JDK/bin/jarsigner
30560      if test ! -x $JARSIGNER; then
30561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30562$as_echo "not found" >&6; }
30563        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30564$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30565        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30566      fi
30567      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30568$as_echo "ok" >&6; }
30569
30570
30571  else
30572    # The variable is set, but is it from the command line or the environment?
30573
30574    # Try to remove the string !JARSIGNER! from our list.
30575    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30576    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30577      # If it failed, the variable was not from the command line. Ignore it,
30578      # but warn the user (except for BASH, which is always set by the calling BASH).
30579      if test "xJARSIGNER" != xBASH; then
30580        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30581$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30582      fi
30583      # Try to locate tool using the code snippet
30584
30585      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30586$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30587      JARSIGNER=$BOOT_JDK/bin/jarsigner
30588      if test ! -x $JARSIGNER; then
30589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30590$as_echo "not found" >&6; }
30591        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30592$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30593        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30594      fi
30595      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30596$as_echo "ok" >&6; }
30597
30598
30599    else
30600      # If it succeeded, then it was overridden by the user. We will use it
30601      # for the tool.
30602
30603      # First remove it from the list of overridden variables, so we can test
30604      # for unknown variables in the end.
30605      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30606
30607      # Check if we try to supply an empty value
30608      if test "x$JARSIGNER" = x; then
30609        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30610$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30612$as_echo_n "checking for JARSIGNER... " >&6; }
30613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30614$as_echo "disabled" >&6; }
30615      else
30616        # Check if the provided tool contains a complete path.
30617        tool_specified="$JARSIGNER"
30618        tool_basename="${tool_specified##*/}"
30619        if test "x$tool_basename" = "x$tool_specified"; then
30620          # A command without a complete path is provided, search $PATH.
30621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30622$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30623          # Extract the first word of "$tool_basename", so it can be a program name with args.
30624set dummy $tool_basename; ac_word=$2
30625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30626$as_echo_n "checking for $ac_word... " >&6; }
30627if ${ac_cv_path_JARSIGNER+:} false; then :
30628  $as_echo_n "(cached) " >&6
30629else
30630  case $JARSIGNER in
30631  [\\/]* | ?:[\\/]*)
30632  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30633  ;;
30634  *)
30635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30636for as_dir in $PATH
30637do
30638  IFS=$as_save_IFS
30639  test -z "$as_dir" && as_dir=.
30640    for ac_exec_ext in '' $ac_executable_extensions; do
30641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30642    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30644    break 2
30645  fi
30646done
30647  done
30648IFS=$as_save_IFS
30649
30650  ;;
30651esac
30652fi
30653JARSIGNER=$ac_cv_path_JARSIGNER
30654if test -n "$JARSIGNER"; then
30655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30656$as_echo "$JARSIGNER" >&6; }
30657else
30658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30659$as_echo "no" >&6; }
30660fi
30661
30662
30663          if test "x$JARSIGNER" = x; then
30664            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30665          fi
30666        else
30667          # Otherwise we believe it is a complete path. Use it as it is.
30668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30669$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30670          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30671$as_echo_n "checking for JARSIGNER... " >&6; }
30672          if test ! -x "$tool_specified"; then
30673            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30674$as_echo "not found" >&6; }
30675            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30676          fi
30677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30678$as_echo "$tool_specified" >&6; }
30679        fi
30680      fi
30681    fi
30682
30683  fi
30684
30685
30686
30687  # Finally, set some other options...
30688
30689  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30690  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30691
30692
30693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30694$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30695  if "$JAVA" --list-modules > /dev/null 2>&1; then
30696    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30697$as_echo "yes" >&6; }
30698    BOOT_JDK_MODULAR="true"
30699  else
30700    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30701$as_echo "no" >&6; }
30702    BOOT_JDK_MODULAR="false"
30703  fi
30704
30705
30706
30707
30708  # Check if the boot jdk is 32 or 64 bit
30709  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30710    BOOT_JDK_BITS="64"
30711  else
30712    BOOT_JDK_BITS="32"
30713  fi
30714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30715$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30717$as_echo "$BOOT_JDK_BITS" >&6; }
30718
30719
30720
30721# Check whether --with-build-jdk was given.
30722if test "${with_build_jdk+set}" = set; then :
30723  withval=$with_build_jdk;
30724fi
30725
30726
30727  CREATE_BUILDJDK=false
30728  EXTERNAL_BUILDJDK=false
30729  BUILD_JDK_FOUND="no"
30730  if test "x$with_build_jdk" != "x"; then
30731
30732  if test "x$BUILD_JDK_FOUND" = xno; then
30733    # Execute the test
30734
30735       if test "x$with_build_jdk" != x; then
30736         BUILD_JDK=$with_build_jdk
30737         BUILD_JDK_FOUND=maybe
30738         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30739$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30740       fi
30741
30742    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30743    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30744      # Do we have a bin/java?
30745      if test ! -x "$BUILD_JDK/bin/java"; then
30746        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30747$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30748        BUILD_JDK_FOUND=no
30749      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30750        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30751$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30752        BUILD_JDK_FOUND=no
30753      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30754        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30755$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30756        BUILD_JDK_FOUND=no
30757      elif test ! -x "$BUILD_JDK/bin/javac"; then
30758        # Do we have a bin/javac?
30759        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30760$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30761        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30762$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30763        BUILD_JDK_FOUND=no
30764      else
30765        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30766        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30767
30768        # Extra M4 quote needed to protect [] in grep expression.
30769        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30770        if test "x$FOUND_CORRECT_VERSION" = x; then
30771          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30772$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30773          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30774$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30775          BUILD_JDK_FOUND=no
30776        else
30777          # We're done!
30778          BUILD_JDK_FOUND=yes
30779
30780  # Only process if variable expands to non-empty
30781
30782  if test "x$BUILD_JDK" != x; then
30783    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30784
30785  # Input might be given as Windows format, start by converting to
30786  # unix format.
30787  path="$BUILD_JDK"
30788  new_path=`$CYGPATH -u "$path"`
30789
30790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30793  # "foo.exe" is OK but "foo" is an error.
30794  #
30795  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30796  # It is also a way to make sure we got the proper file name for the real test later on.
30797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30798  if test "x$test_shortpath" = x; then
30799    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30800$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30801    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30802  fi
30803
30804  # Call helper function which possibly converts this using DOS-style short mode.
30805  # If so, the updated path is stored in $new_path.
30806
30807  input_path="$new_path"
30808  # Check if we need to convert this using DOS-style short mode. If the path
30809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30810  # take no chances and rewrite it.
30811  # Note: m4 eats our [], so we need to use [ and ] instead.
30812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30813  if test "x$has_forbidden_chars" != x; then
30814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30818      # Going to short mode and back again did indeed matter. Since short mode is
30819      # case insensitive, let's make it lowercase to improve readability.
30820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30821      # Now convert it back to Unix-style (cygpath)
30822      input_path=`$CYGPATH -u "$shortmode_path"`
30823      new_path="$input_path"
30824    fi
30825  fi
30826
30827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30828  if test "x$test_cygdrive_prefix" = x; then
30829    # As a simple fix, exclude /usr/bin since it's not a real path.
30830    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30832      # a path prefixed by /cygdrive for fixpath to work.
30833      new_path="$CYGWIN_ROOT_PATH$input_path"
30834    fi
30835  fi
30836
30837
30838  if test "x$path" != "x$new_path"; then
30839    BUILD_JDK="$new_path"
30840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30841$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30842  fi
30843
30844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30845
30846  path="$BUILD_JDK"
30847  has_colon=`$ECHO $path | $GREP ^.:`
30848  new_path="$path"
30849  if test "x$has_colon" = x; then
30850    # Not in mixed or Windows style, start by that.
30851    new_path=`cmd //c echo $path`
30852  fi
30853
30854
30855  input_path="$new_path"
30856  # Check if we need to convert this using DOS-style short mode. If the path
30857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30858  # take no chances and rewrite it.
30859  # Note: m4 eats our [], so we need to use [ and ] instead.
30860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30861  if test "x$has_forbidden_chars" != x; then
30862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30863    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30864  fi
30865
30866
30867  windows_path="$new_path"
30868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30869    unix_path=`$CYGPATH -u "$windows_path"`
30870    new_path="$unix_path"
30871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30873    new_path="$unix_path"
30874  fi
30875
30876  if test "x$path" != "x$new_path"; then
30877    BUILD_JDK="$new_path"
30878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30879$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30880  fi
30881
30882  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30883  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30884
30885    else
30886      # We're on a unix platform. Hooray! :)
30887      path="$BUILD_JDK"
30888      has_space=`$ECHO "$path" | $GREP " "`
30889      if test "x$has_space" != x; then
30890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30891$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30892        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30893      fi
30894
30895      # Use eval to expand a potential ~
30896      eval path="$path"
30897      if test ! -f "$path" && test ! -d "$path"; then
30898        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30899      fi
30900
30901      if test -d "$path"; then
30902        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30903      else
30904        dir="`$DIRNAME "$path"`"
30905        base="`$BASENAME "$path"`"
30906        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30907      fi
30908    fi
30909  fi
30910
30911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30912$as_echo_n "checking for Build JDK... " >&6; }
30913          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30914$as_echo "$BUILD_JDK" >&6; }
30915          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30916$as_echo_n "checking Build JDK version... " >&6; }
30917          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30919$as_echo "$BUILD_JDK_VERSION" >&6; }
30920        fi # end check jdk version
30921      fi # end check java
30922    fi # end check build jdk found
30923  fi
30924
30925    EXTERNAL_BUILDJDK=true
30926  else
30927    if test "x$COMPILE_TYPE" = "xcross"; then
30928      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30929      BUILD_JDK_FOUND=yes
30930      CREATE_BUILDJDK=true
30931      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30932$as_echo_n "checking for Build JDK... " >&6; }
30933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30934$as_echo "yes, will build it for the host platform" >&6; }
30935    else
30936      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30937      BUILD_JDK_FOUND=yes
30938      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30939$as_echo_n "checking for Build JDK... " >&6; }
30940      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30941$as_echo "yes, will use output dir" >&6; }
30942    fi
30943  fi
30944
30945  JMOD="$BUILD_JDK/bin/jmod"
30946  JLINK="$BUILD_JDK/bin/jlink"
30947
30948
30949
30950  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30952$as_echo_n "checking for Build JDK... " >&6; }
30953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30954$as_echo "no" >&6; }
30955    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30956  fi
30957
30958
30959
30960
30961
30962
30963###############################################################################
30964#
30965# Configure the sources to use. We can add or override individual directories.
30966#
30967###############################################################################
30968
30969
30970  # Where are the sources.
30971  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30972  CORBA_TOPDIR="$SRC_ROOT/corba"
30973  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30974  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30975  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30976  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30977  JDK_TOPDIR="$SRC_ROOT/jdk"
30978
30979
30980
30981
30982
30983
30984
30985
30986
30987  # This feature is no longer supported.
30988
30989
30990
30991# Check whether --with-add-source-root was given.
30992if test "${with_add_source_root+set}" = set; then :
30993  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
30994$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30995fi
30996
30997
30998
30999
31000# Check whether --with-override-source-root was given.
31001if test "${with_override_source_root+set}" = set; then :
31002  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
31003$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31004fi
31005
31006
31007
31008
31009# Check whether --with-adds-and-overrides was given.
31010if test "${with_adds_and_overrides+set}" = set; then :
31011  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
31012$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31013fi
31014
31015
31016
31017
31018# Check whether --with-override-langtools was given.
31019if test "${with_override_langtools+set}" = set; then :
31020  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31021$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31022fi
31023
31024
31025
31026
31027# Check whether --with-override-corba was given.
31028if test "${with_override_corba+set}" = set; then :
31029  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31030$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31031fi
31032
31033
31034
31035
31036# Check whether --with-override-jaxp was given.
31037if test "${with_override_jaxp+set}" = set; then :
31038  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31039$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31040fi
31041
31042
31043
31044
31045# Check whether --with-override-jaxws was given.
31046if test "${with_override_jaxws+set}" = set; then :
31047  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31048$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31049fi
31050
31051
31052
31053
31054# Check whether --with-override-hotspot was given.
31055if test "${with_override_hotspot+set}" = set; then :
31056  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31057$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31058fi
31059
31060
31061
31062
31063# Check whether --with-override-nashorn was given.
31064if test "${with_override_nashorn+set}" = set; then :
31065  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31066$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31067fi
31068
31069
31070
31071
31072# Check whether --with-override-jdk was given.
31073if test "${with_override_jdk+set}" = set; then :
31074  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31075$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31076fi
31077
31078
31079
31080
31081  BUILD_OUTPUT="$OUTPUT_ROOT"
31082
31083  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31084
31085
31086
31087# Check whether --with-import_hotspot was given.
31088if test "${with_import_hotspot+set}" = set; then :
31089  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31090$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31091fi
31092
31093
31094
31095
31096
31097
31098# Check whether --with-import-modules was given.
31099if test "${with_import_modules+set}" = set; then :
31100  withval=$with_import_modules;
31101fi
31102
31103
31104  if test "x$with_import_modules" != x \
31105      && test "x$with_import_modules" != "xno"; then
31106    if test -d "$with_import_modules"; then
31107      IMPORT_MODULES_TOPDIR="$with_import_modules"
31108
31109  # Only process if variable expands to non-empty
31110
31111  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31112    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31113
31114  # Input might be given as Windows format, start by converting to
31115  # unix format.
31116  path="$IMPORT_MODULES_TOPDIR"
31117  new_path=`$CYGPATH -u "$path"`
31118
31119  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31120  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31121  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31122  # "foo.exe" is OK but "foo" is an error.
31123  #
31124  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31125  # It is also a way to make sure we got the proper file name for the real test later on.
31126  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31127  if test "x$test_shortpath" = x; then
31128    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31129$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31130    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31131  fi
31132
31133  # Call helper function which possibly converts this using DOS-style short mode.
31134  # If so, the updated path is stored in $new_path.
31135
31136  input_path="$new_path"
31137  # Check if we need to convert this using DOS-style short mode. If the path
31138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31139  # take no chances and rewrite it.
31140  # Note: m4 eats our [], so we need to use [ and ] instead.
31141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31142  if test "x$has_forbidden_chars" != x; then
31143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31144    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31145    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31146    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31147      # Going to short mode and back again did indeed matter. Since short mode is
31148      # case insensitive, let's make it lowercase to improve readability.
31149      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31150      # Now convert it back to Unix-style (cygpath)
31151      input_path=`$CYGPATH -u "$shortmode_path"`
31152      new_path="$input_path"
31153    fi
31154  fi
31155
31156  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31157  if test "x$test_cygdrive_prefix" = x; then
31158    # As a simple fix, exclude /usr/bin since it's not a real path.
31159    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31160      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31161      # a path prefixed by /cygdrive for fixpath to work.
31162      new_path="$CYGWIN_ROOT_PATH$input_path"
31163    fi
31164  fi
31165
31166
31167  if test "x$path" != "x$new_path"; then
31168    IMPORT_MODULES_TOPDIR="$new_path"
31169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31170$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31171  fi
31172
31173    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31174
31175  path="$IMPORT_MODULES_TOPDIR"
31176  has_colon=`$ECHO $path | $GREP ^.:`
31177  new_path="$path"
31178  if test "x$has_colon" = x; then
31179    # Not in mixed or Windows style, start by that.
31180    new_path=`cmd //c echo $path`
31181  fi
31182
31183
31184  input_path="$new_path"
31185  # Check if we need to convert this using DOS-style short mode. If the path
31186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31187  # take no chances and rewrite it.
31188  # Note: m4 eats our [], so we need to use [ and ] instead.
31189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31190  if test "x$has_forbidden_chars" != x; then
31191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31192    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31193  fi
31194
31195
31196  windows_path="$new_path"
31197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31198    unix_path=`$CYGPATH -u "$windows_path"`
31199    new_path="$unix_path"
31200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31202    new_path="$unix_path"
31203  fi
31204
31205  if test "x$path" != "x$new_path"; then
31206    IMPORT_MODULES_TOPDIR="$new_path"
31207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31208$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31209  fi
31210
31211  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31212  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31213
31214    else
31215      # We're on a unix platform. Hooray! :)
31216      path="$IMPORT_MODULES_TOPDIR"
31217      has_space=`$ECHO "$path" | $GREP " "`
31218      if test "x$has_space" != x; then
31219        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31220$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31221        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31222      fi
31223
31224      # Use eval to expand a potential ~
31225      eval path="$path"
31226      if test ! -f "$path" && test ! -d "$path"; then
31227        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31228      fi
31229
31230      if test -d "$path"; then
31231        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31232      else
31233        dir="`$DIRNAME "$path"`"
31234        base="`$BASENAME "$path"`"
31235        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31236      fi
31237    fi
31238  fi
31239
31240    elif test -e "$with_import_modules"; then
31241      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31242      $RM -rf "$IMPORT_MODULES_TOPDIR"
31243      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31244      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31245        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31246      fi
31247    else
31248      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31249    fi
31250  fi
31251
31252  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31253    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31254  fi
31255  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31256    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31257  fi
31258  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31259    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31260  fi
31261  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31262    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31263  fi
31264  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31265    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31266  fi
31267  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31268    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31269  fi
31270  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31271    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31272  fi
31273  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31274    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31275  fi
31276
31277
31278
31279
31280
31281
31282
31283
31284
31285
31286
31287###############################################################################
31288#
31289# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31290# native code.
31291#
31292###############################################################################
31293
31294# See if we are doing a complete static build or not
31295
31296  # Check whether --enable-static-build was given.
31297if test "${enable_static_build+set}" = set; then :
31298  enableval=$enable_static_build;
31299fi
31300
31301  STATIC_BUILD=false
31302  if test "x$enable_static_build" = "xyes"; then
31303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31304$as_echo_n "checking if static build is enabled... " >&6; }
31305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31306$as_echo "yes" >&6; }
31307    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31308      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31309    fi
31310    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31311    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31312    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31313    STATIC_BUILD=true
31314  elif test "x$enable_static_build" = "xno"; then
31315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31316$as_echo_n "checking if static build is enabled... " >&6; }
31317    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31318$as_echo "no" >&6; }
31319  elif test "x$enable_static_build" != "x"; then
31320    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31321  fi
31322
31323
31324
31325
31326# First determine the toolchain type (compiler family)
31327
31328
31329# Check whether --with-toolchain-type was given.
31330if test "${with_toolchain_type+set}" = set; then :
31331  withval=$with_toolchain_type;
31332fi
31333
31334
31335  # Use indirect variable referencing
31336  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31337  VALID_TOOLCHAINS=${!toolchain_var_name}
31338
31339  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31340    if test -n "$XCODEBUILD"; then
31341      # On Mac OS X, default toolchain to clang after Xcode 5
31342      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31343      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31344      if test $? -ne 0; then
31345        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31346      fi
31347      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31348          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31349          $CUT -f 1 -d .`
31350      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31351$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31352      if test $XCODE_MAJOR_VERSION -ge 5; then
31353          DEFAULT_TOOLCHAIN="clang"
31354      else
31355          DEFAULT_TOOLCHAIN="gcc"
31356      fi
31357    else
31358      # If Xcode is not installed, but the command line tools are
31359      # then we can't run xcodebuild. On these systems we should
31360      # default to clang
31361      DEFAULT_TOOLCHAIN="clang"
31362    fi
31363  else
31364    # First toolchain type in the list is the default
31365    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31366  fi
31367
31368  if test "x$with_toolchain_type" = xlist; then
31369    # List all toolchains
31370    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31371$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31372    for toolchain in $VALID_TOOLCHAINS; do
31373      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31374      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31375      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31376    done
31377
31378    exit 0
31379  elif test "x$with_toolchain_type" != x; then
31380    # User override; check that it is valid
31381    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31382      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31383$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31384      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31385$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31386      as_fn_error $? "Cannot continue." "$LINENO" 5
31387    fi
31388    TOOLCHAIN_TYPE=$with_toolchain_type
31389  else
31390    # No flag given, use default
31391    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31392  fi
31393
31394
31395  TOOLCHAIN_CC_BINARY_clang="clang"
31396  TOOLCHAIN_CC_BINARY_gcc="gcc"
31397  TOOLCHAIN_CC_BINARY_microsoft="cl"
31398  TOOLCHAIN_CC_BINARY_solstudio="cc"
31399  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31400
31401  TOOLCHAIN_CXX_BINARY_clang="clang++"
31402  TOOLCHAIN_CXX_BINARY_gcc="g++"
31403  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31404  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31405  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31406
31407  # Use indirect variable referencing
31408  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31409  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31410  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31411  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31412  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31413  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31414  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31415  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31416
31417
31418  # Define filename patterns
31419  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31420    LIBRARY_PREFIX=
31421    SHARED_LIBRARY_SUFFIX='.dll'
31422    STATIC_LIBRARY_SUFFIX='.lib'
31423    SHARED_LIBRARY='$1.dll'
31424    STATIC_LIBRARY='$1.lib'
31425    OBJ_SUFFIX='.obj'
31426    EXE_SUFFIX='.exe'
31427  else
31428    LIBRARY_PREFIX=lib
31429    SHARED_LIBRARY_SUFFIX='.so'
31430    STATIC_LIBRARY_SUFFIX='.a'
31431    SHARED_LIBRARY='lib$1.so'
31432    STATIC_LIBRARY='lib$1.a'
31433    OBJ_SUFFIX='.o'
31434    EXE_SUFFIX=''
31435    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31436      # For full static builds, we're overloading the SHARED_LIBRARY
31437      # variables in order to limit the amount of changes required.
31438      # It would be better to remove SHARED and just use LIBRARY and
31439      # LIBRARY_SUFFIX for libraries that can be built either
31440      # shared or static and use STATIC_* for libraries that are
31441      # always built statically.
31442      if test "x$STATIC_BUILD" = xtrue; then
31443        SHARED_LIBRARY='lib$1.a'
31444        SHARED_LIBRARY_SUFFIX='.a'
31445      else
31446        SHARED_LIBRARY='lib$1.dylib'
31447        SHARED_LIBRARY_SUFFIX='.dylib'
31448      fi
31449    fi
31450  fi
31451
31452
31453
31454
31455
31456
31457
31458
31459
31460
31461  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31462    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31463$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31464  else
31465    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31466$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31467  fi
31468
31469
31470# User supplied flags should be used when configure detects compilers
31471
31472  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31473    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31474$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31475  fi
31476
31477  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31479$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31480  fi
31481
31482  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31484$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31485  fi
31486
31487
31488# Check whether --with-extra-cflags was given.
31489if test "${with_extra_cflags+set}" = set; then :
31490  withval=$with_extra_cflags;
31491fi
31492
31493
31494
31495# Check whether --with-extra-cxxflags was given.
31496if test "${with_extra_cxxflags+set}" = set; then :
31497  withval=$with_extra_cxxflags;
31498fi
31499
31500
31501
31502# Check whether --with-extra-ldflags was given.
31503if test "${with_extra_ldflags+set}" = set; then :
31504  withval=$with_extra_ldflags;
31505fi
31506
31507
31508  EXTRA_CFLAGS="$with_extra_cflags"
31509  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31510  EXTRA_LDFLAGS="$with_extra_ldflags"
31511
31512
31513
31514
31515
31516  # The global CFLAGS and LDLAGS variables are used by configure tests and
31517  # should include the extra parameters
31518  CFLAGS="$EXTRA_CFLAGS"
31519  CXXFLAGS="$EXTRA_CXXFLAGS"
31520  LDFLAGS="$EXTRA_LDFLAGS"
31521  CPPFLAGS=""
31522
31523# The sysroot cflags are needed for configure to be able to run the compilers
31524
31525  if test "x$SYSROOT" != "x"; then
31526    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31527      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31528        # Solaris Studio does not have a concept of sysroot. Instead we must
31529        # make sure the default include and lib dirs are appended to each
31530        # compile and link command line. Must also add -I-xbuiltin to enable
31531        # inlining of system functions and intrinsics.
31532        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31533        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31534            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31535      fi
31536    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31537      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31538      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31539    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31540      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31541      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31542    fi
31543    # The global CFLAGS and LDFLAGS variables need these for configure to function
31544    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31545    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31546    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31547    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31548  fi
31549
31550  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31551    # We also need -iframework<path>/System/Library/Frameworks
31552    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31553    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31554    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31555    # set this here so it doesn't have to be peppered throughout the forest
31556    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31557    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31558  fi
31559
31560
31561
31562
31563
31564# Then detect the actual binaries needed
31565
31566  # FIXME: Is this needed?
31567  ac_ext=cpp
31568ac_cpp='$CXXCPP $CPPFLAGS'
31569ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31570ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31571ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31572
31573
31574  # Store the CFLAGS etc passed to the configure script.
31575  ORG_CFLAGS="$CFLAGS"
31576  ORG_CXXFLAGS="$CXXFLAGS"
31577
31578  # autoconf magic only relies on PATH, so update it if tools dir is specified
31579  OLD_PATH="$PATH"
31580
31581  # On Windows, we need to detect the visual studio installation first.
31582  # This will change the PATH, but we need to keep that new PATH even
31583  # after toolchain detection is done, since the compiler (on x86) uses
31584  # it for DLL resolution in runtime.
31585  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31586      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31587
31588  # Store path to cygwin link.exe to help excluding it when searching for
31589  # VS linker. This must be done before changing the PATH when looking for VS.
31590  # Extract the first word of "link", so it can be a program name with args.
31591set dummy link; ac_word=$2
31592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31593$as_echo_n "checking for $ac_word... " >&6; }
31594if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31595  $as_echo_n "(cached) " >&6
31596else
31597  case $CYGWIN_LINK in
31598  [\\/]* | ?:[\\/]*)
31599  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31600  ;;
31601  *)
31602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31603for as_dir in $PATH
31604do
31605  IFS=$as_save_IFS
31606  test -z "$as_dir" && as_dir=.
31607    for ac_exec_ext in '' $ac_executable_extensions; do
31608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31609    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31611    break 2
31612  fi
31613done
31614  done
31615IFS=$as_save_IFS
31616
31617  ;;
31618esac
31619fi
31620CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31621if test -n "$CYGWIN_LINK"; then
31622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31623$as_echo "$CYGWIN_LINK" >&6; }
31624else
31625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31626$as_echo "no" >&6; }
31627fi
31628
31629
31630  if test "x$CYGWIN_LINK" != x; then
31631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31632$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31633    "$CYGWIN_LINK" --version > /dev/null
31634    if test $? -eq 0 ; then
31635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31636$as_echo "yes" >&6; }
31637    else
31638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31639$as_echo "no" >&6; }
31640      # This might be the VS linker. Don't exclude it later on.
31641      CYGWIN_LINK=""
31642    fi
31643  fi
31644
31645  # First-hand choice is to locate and run the vsvars bat file.
31646
31647
31648# Check whether --with-toolchain-version was given.
31649if test "${with_toolchain_version+set}" = set; then :
31650  withval=$with_toolchain_version;
31651fi
31652
31653
31654  if test "x$with_toolchain_version" = xlist; then
31655    # List all toolchains
31656    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31657$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31658    for version in $VALID_VS_VERSIONS; do
31659      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31660      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31661    done
31662
31663    exit 0
31664  elif test "x$DEVKIT_VS_VERSION" != x; then
31665    VS_VERSION=$DEVKIT_VS_VERSION
31666    TOOLCHAIN_VERSION=$VS_VERSION
31667    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31668    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31669    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31670    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31671    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31672    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31673
31674    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31675    # can still be exported as INCLUDE for compiler invocations without
31676    # SYSROOT_CFLAGS
31677    OLDIFS="$IFS"
31678    IFS=";"
31679    for i in $DEVKIT_VS_INCLUDE; do
31680      ipath=$i
31681
31682  unix_path="$ipath"
31683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31684    windows_path=`$CYGPATH -m "$unix_path"`
31685    ipath="$windows_path"
31686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31687    windows_path=`cmd //c echo $unix_path`
31688    ipath="$windows_path"
31689  fi
31690
31691      VS_INCLUDE="$VS_INCLUDE;$ipath"
31692    done
31693    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31694    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31695    for i in $DEVKIT_VS_LIB; do
31696      libpath=$i
31697
31698  unix_path="$libpath"
31699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31700    windows_path=`$CYGPATH -m "$unix_path"`
31701    libpath="$windows_path"
31702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31703    windows_path=`cmd //c echo $unix_path`
31704    libpath="$windows_path"
31705  fi
31706
31707      VS_LIB="$VS_LIB;$libpath"
31708    done
31709    IFS="$OLDIFS"
31710
31711    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31712$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31713
31714  elif test "x$with_toolchain_version" != x; then
31715    # User override; check that it is valid
31716    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31717      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31718$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31719      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31720$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31721      as_fn_error $? "Cannot continue." "$LINENO" 5
31722    fi
31723    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31724  else
31725    # No flag given, use default
31726    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31727  fi
31728
31729  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31730
31731  VS_VERSION="$VS_VERSION"
31732  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31733  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31734  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31735  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31736
31737  # When using --with-tools-dir, assume it points to the correct and default
31738  # version of Visual Studio or that --with-toolchain-version was also set.
31739  if test "x$with_tools_dir" != x; then
31740
31741  if test "x$VS_ENV_CMD" = x; then
31742    VS_VERSION="${VS_VERSION}"
31743    VS_BASE="$with_tools_dir/../.."
31744    METHOD="--with-tools-dir"
31745
31746    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31747      VCVARSFILE="vc/bin/vcvars32.bat"
31748    else
31749      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31750    fi
31751
31752
31753  windows_path="$VS_BASE"
31754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31755    unix_path=`$CYGPATH -u "$windows_path"`
31756    VS_BASE="$unix_path"
31757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31759    VS_BASE="$unix_path"
31760  fi
31761
31762    if test -d "$VS_BASE"; then
31763      if test -f "$VS_BASE/$VCVARSFILE"; then
31764        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31765$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31766        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31767        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31768        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31769        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31770      else
31771        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31772$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31773        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31774$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31775      fi
31776    fi
31777  fi
31778
31779
31780  if test "x$VS_ENV_CMD" = x; then
31781    VS_VERSION="${VS_VERSION}"
31782    VS_BASE="$with_tools_dir/../../.."
31783    METHOD="--with-tools-dir"
31784
31785    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31786      VCVARSFILE="vc/bin/vcvars32.bat"
31787    else
31788      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31789    fi
31790
31791
31792  windows_path="$VS_BASE"
31793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31794    unix_path=`$CYGPATH -u "$windows_path"`
31795    VS_BASE="$unix_path"
31796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31798    VS_BASE="$unix_path"
31799  fi
31800
31801    if test -d "$VS_BASE"; then
31802      if test -f "$VS_BASE/$VCVARSFILE"; then
31803        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31804$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31805        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31806        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31807        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31808        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31809      else
31810        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31811$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31812        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31813$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31814      fi
31815    fi
31816  fi
31817
31818    if test "x$VS_ENV_CMD" = x; then
31819      # Having specified an argument which is incorrect will produce an instant failure;
31820      # we should not go on looking
31821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31822$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31823      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31824$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31825      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31826$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31827      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31828    fi
31829  fi
31830
31831  VS_ENV_CMD=""
31832  VS_ENV_ARGS=""
31833
31834  if test "x$VS_COMNTOOLS" != x; then
31835
31836  if test "x$VS_ENV_CMD" = x; then
31837    VS_VERSION="${VS_VERSION}"
31838    VS_BASE="$VS_COMNTOOLS/../.."
31839    METHOD="$VS_COMNTOOLS_VAR variable"
31840
31841    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31842      VCVARSFILE="vc/bin/vcvars32.bat"
31843    else
31844      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31845    fi
31846
31847
31848  windows_path="$VS_BASE"
31849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31850    unix_path=`$CYGPATH -u "$windows_path"`
31851    VS_BASE="$unix_path"
31852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31854    VS_BASE="$unix_path"
31855  fi
31856
31857    if test -d "$VS_BASE"; then
31858      if test -f "$VS_BASE/$VCVARSFILE"; then
31859        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31860$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31861        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31862        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31863        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31864        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31865      else
31866        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31867$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31868        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31869$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31870      fi
31871    fi
31872  fi
31873
31874  fi
31875  if test "x$PROGRAMFILES" != x; then
31876
31877  if test "x$VS_ENV_CMD" = x; then
31878    VS_VERSION="${VS_VERSION}"
31879    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31880    METHOD="well-known name"
31881
31882    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31883      VCVARSFILE="vc/bin/vcvars32.bat"
31884    else
31885      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31886    fi
31887
31888
31889  windows_path="$VS_BASE"
31890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31891    unix_path=`$CYGPATH -u "$windows_path"`
31892    VS_BASE="$unix_path"
31893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31895    VS_BASE="$unix_path"
31896  fi
31897
31898    if test -d "$VS_BASE"; then
31899      if test -f "$VS_BASE/$VCVARSFILE"; then
31900        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31901$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31902        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31903        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31904        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31905        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31906      else
31907        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31908$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31909        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31910$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31911      fi
31912    fi
31913  fi
31914
31915  fi
31916  # Work around the insanely named ProgramFiles(x86) env variable
31917  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31918  if test "x$PROGRAMFILES_X86" != x; then
31919
31920  if test "x$VS_ENV_CMD" = x; then
31921    VS_VERSION="${VS_VERSION}"
31922    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31923    METHOD="well-known name"
31924
31925    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31926      VCVARSFILE="vc/bin/vcvars32.bat"
31927    else
31928      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31929    fi
31930
31931
31932  windows_path="$VS_BASE"
31933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31934    unix_path=`$CYGPATH -u "$windows_path"`
31935    VS_BASE="$unix_path"
31936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31938    VS_BASE="$unix_path"
31939  fi
31940
31941    if test -d "$VS_BASE"; then
31942      if test -f "$VS_BASE/$VCVARSFILE"; then
31943        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31944$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31945        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31946        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31947        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31948        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31949      else
31950        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31951$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31952        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31953$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31954      fi
31955    fi
31956  fi
31957
31958  fi
31959
31960  if test "x$VS_ENV_CMD" = x; then
31961    VS_VERSION="${VS_VERSION}"
31962    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31963    METHOD="well-known name"
31964
31965    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31966      VCVARSFILE="vc/bin/vcvars32.bat"
31967    else
31968      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31969    fi
31970
31971
31972  windows_path="$VS_BASE"
31973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31974    unix_path=`$CYGPATH -u "$windows_path"`
31975    VS_BASE="$unix_path"
31976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31978    VS_BASE="$unix_path"
31979  fi
31980
31981    if test -d "$VS_BASE"; then
31982      if test -f "$VS_BASE/$VCVARSFILE"; then
31983        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31984$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31985        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31986        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31987        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31988        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31989      else
31990        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31991$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31992        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31993$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31994      fi
31995    fi
31996  fi
31997
31998
31999  if test "x$VS_ENV_CMD" = x; then
32000    VS_VERSION="${VS_VERSION}"
32001    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32002    METHOD="well-known name"
32003
32004    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32005      VCVARSFILE="vc/bin/vcvars32.bat"
32006    else
32007      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32008    fi
32009
32010
32011  windows_path="$VS_BASE"
32012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32013    unix_path=`$CYGPATH -u "$windows_path"`
32014    VS_BASE="$unix_path"
32015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32017    VS_BASE="$unix_path"
32018  fi
32019
32020    if test -d "$VS_BASE"; then
32021      if test -f "$VS_BASE/$VCVARSFILE"; then
32022        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32023$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32024        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32025        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32026        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32027        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32028      else
32029        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32030$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32031        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32032$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32033      fi
32034    fi
32035  fi
32036
32037
32038  if test "x$SDK_INSTALL_DIR" != x; then
32039    if test "x$ProgramW6432" != x; then
32040
32041  if test "x$VS_ENV_CMD" = x; then
32042    VS_VERSION="${VS_VERSION}"
32043    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32044    METHOD="well-known name"
32045
32046  windows_path="$WIN_SDK_BASE"
32047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32048    unix_path=`$CYGPATH -u "$windows_path"`
32049    WIN_SDK_BASE="$unix_path"
32050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32052    WIN_SDK_BASE="$unix_path"
32053  fi
32054
32055    if test -d "$WIN_SDK_BASE"; then
32056      # There have been cases of partial or broken SDK installations. A missing
32057      # lib dir is not going to work.
32058      if test ! -d "$WIN_SDK_BASE/lib"; then
32059        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32060$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32061        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32062$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32063      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32064        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32065$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32066        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32067        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32068          VS_ENV_ARGS="/x86"
32069        else
32070          VS_ENV_ARGS="/x64"
32071        fi
32072        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32073        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32074        # TODO: improve detection for other versions of SDK
32075        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32076      else
32077        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32078$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32079        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32080$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32081      fi
32082    fi
32083  fi
32084
32085    fi
32086    if test "x$PROGRAMW6432" != x; then
32087
32088  if test "x$VS_ENV_CMD" = x; then
32089    VS_VERSION="${VS_VERSION}"
32090    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32091    METHOD="well-known name"
32092
32093  windows_path="$WIN_SDK_BASE"
32094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32095    unix_path=`$CYGPATH -u "$windows_path"`
32096    WIN_SDK_BASE="$unix_path"
32097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32099    WIN_SDK_BASE="$unix_path"
32100  fi
32101
32102    if test -d "$WIN_SDK_BASE"; then
32103      # There have been cases of partial or broken SDK installations. A missing
32104      # lib dir is not going to work.
32105      if test ! -d "$WIN_SDK_BASE/lib"; then
32106        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32107$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32108        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32109$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32110      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32111        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32112$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32113        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32114        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32115          VS_ENV_ARGS="/x86"
32116        else
32117          VS_ENV_ARGS="/x64"
32118        fi
32119        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32120        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32121        # TODO: improve detection for other versions of SDK
32122        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32123      else
32124        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32125$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32126        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32127$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32128      fi
32129    fi
32130  fi
32131
32132    fi
32133    if test "x$PROGRAMFILES" != x; then
32134
32135  if test "x$VS_ENV_CMD" = x; then
32136    VS_VERSION="${VS_VERSION}"
32137    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32138    METHOD="well-known name"
32139
32140  windows_path="$WIN_SDK_BASE"
32141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32142    unix_path=`$CYGPATH -u "$windows_path"`
32143    WIN_SDK_BASE="$unix_path"
32144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32146    WIN_SDK_BASE="$unix_path"
32147  fi
32148
32149    if test -d "$WIN_SDK_BASE"; then
32150      # There have been cases of partial or broken SDK installations. A missing
32151      # lib dir is not going to work.
32152      if test ! -d "$WIN_SDK_BASE/lib"; then
32153        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32154$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32155        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32156$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32157      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32158        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32159$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32160        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32161        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32162          VS_ENV_ARGS="/x86"
32163        else
32164          VS_ENV_ARGS="/x64"
32165        fi
32166        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32167        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32168        # TODO: improve detection for other versions of SDK
32169        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32170      else
32171        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32172$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32173        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32174$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32175      fi
32176    fi
32177  fi
32178
32179    fi
32180
32181  if test "x$VS_ENV_CMD" = x; then
32182    VS_VERSION="${VS_VERSION}"
32183    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32184    METHOD="well-known name"
32185
32186  windows_path="$WIN_SDK_BASE"
32187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32188    unix_path=`$CYGPATH -u "$windows_path"`
32189    WIN_SDK_BASE="$unix_path"
32190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32192    WIN_SDK_BASE="$unix_path"
32193  fi
32194
32195    if test -d "$WIN_SDK_BASE"; then
32196      # There have been cases of partial or broken SDK installations. A missing
32197      # lib dir is not going to work.
32198      if test ! -d "$WIN_SDK_BASE/lib"; then
32199        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32200$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32201        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32202$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32203      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32204        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32205$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32206        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32207        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32208          VS_ENV_ARGS="/x86"
32209        else
32210          VS_ENV_ARGS="/x64"
32211        fi
32212        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32213        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32214        # TODO: improve detection for other versions of SDK
32215        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32216      else
32217        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32218$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32219        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32220$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32221      fi
32222    fi
32223  fi
32224
32225
32226  if test "x$VS_ENV_CMD" = x; then
32227    VS_VERSION="${VS_VERSION}"
32228    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32229    METHOD="well-known name"
32230
32231  windows_path="$WIN_SDK_BASE"
32232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32233    unix_path=`$CYGPATH -u "$windows_path"`
32234    WIN_SDK_BASE="$unix_path"
32235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32237    WIN_SDK_BASE="$unix_path"
32238  fi
32239
32240    if test -d "$WIN_SDK_BASE"; then
32241      # There have been cases of partial or broken SDK installations. A missing
32242      # lib dir is not going to work.
32243      if test ! -d "$WIN_SDK_BASE/lib"; then
32244        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32245$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32246        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32247$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32248      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32249        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32250$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32251        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32252        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32253          VS_ENV_ARGS="/x86"
32254        else
32255          VS_ENV_ARGS="/x64"
32256        fi
32257        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32258        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32259        # TODO: improve detection for other versions of SDK
32260        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32261      else
32262        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32263$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32264        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32265$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32266      fi
32267    fi
32268  fi
32269
32270  fi
32271
32272    if test "x$VS_ENV_CMD" != x; then
32273      TOOLCHAIN_VERSION=$VS_VERSION
32274      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32275      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32276      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32277      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32278      # The rest of the variables are already evaled while probing
32279      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32280$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32281      break
32282    fi
32283  done
32284
32285
32286  # If we have a devkit, skip all of the below.
32287  if test "x$DEVKIT_VS_VERSION" = x; then
32288    if test "x$VS_ENV_CMD" != x; then
32289      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32290
32291  # Only process if variable expands to non-empty
32292
32293  if test "x$VS_ENV_CMD" != x; then
32294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32295
32296  # First separate the path from the arguments. This will split at the first
32297  # space.
32298  complete="$VS_ENV_CMD"
32299  path="${complete%% *}"
32300  tmp="$complete EOL"
32301  arguments="${tmp#* }"
32302
32303  # Input might be given as Windows format, start by converting to
32304  # unix format.
32305  new_path=`$CYGPATH -u "$path"`
32306
32307  # Now try to locate executable using which
32308  new_path=`$WHICH "$new_path" 2> /dev/null`
32309  # bat and cmd files are not always considered executable in cygwin causing which
32310  # to not find them
32311  if test "x$new_path" = x \
32312      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32313      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32314    new_path=`$CYGPATH -u "$path"`
32315  fi
32316  if test "x$new_path" = x; then
32317    # Oops. Which didn't find the executable.
32318    # The splitting of arguments from the executable at a space might have been incorrect,
32319    # since paths with space are more likely in Windows. Give it another try with the whole
32320    # argument.
32321    path="$complete"
32322    arguments="EOL"
32323    new_path=`$CYGPATH -u "$path"`
32324    new_path=`$WHICH "$new_path" 2> /dev/null`
32325    # bat and cmd files are not always considered executable in cygwin causing which
32326    # to not find them
32327    if test "x$new_path" = x \
32328        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32329        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32330      new_path=`$CYGPATH -u "$path"`
32331    fi
32332    if test "x$new_path" = x; then
32333      # It's still not found. Now this is an unrecoverable error.
32334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32335$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32336      has_space=`$ECHO "$complete" | $GREP " "`
32337      if test "x$has_space" != x; then
32338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32340      fi
32341      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32342    fi
32343  fi
32344
32345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32348  # "foo.exe" is OK but "foo" is an error.
32349  #
32350  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32351  # It is also a way to make sure we got the proper file name for the real test later on.
32352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32353  if test "x$test_shortpath" = x; then
32354    # Short path failed, file does not exist as specified.
32355    # Try adding .exe or .cmd
32356    if test -f "${new_path}.exe"; then
32357      input_to_shortpath="${new_path}.exe"
32358    elif test -f "${new_path}.cmd"; then
32359      input_to_shortpath="${new_path}.cmd"
32360    else
32361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32362$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32363      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32364$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32365      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32366    fi
32367  else
32368    input_to_shortpath="$new_path"
32369  fi
32370
32371  # Call helper function which possibly converts this using DOS-style short mode.
32372  # If so, the updated path is stored in $new_path.
32373  new_path="$input_to_shortpath"
32374
32375  input_path="$input_to_shortpath"
32376  # Check if we need to convert this using DOS-style short mode. If the path
32377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32378  # take no chances and rewrite it.
32379  # Note: m4 eats our [], so we need to use [ and ] instead.
32380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32381  if test "x$has_forbidden_chars" != x; then
32382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32386      # Going to short mode and back again did indeed matter. Since short mode is
32387      # case insensitive, let's make it lowercase to improve readability.
32388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32389      # Now convert it back to Unix-style (cygpath)
32390      input_path=`$CYGPATH -u "$shortmode_path"`
32391      new_path="$input_path"
32392    fi
32393  fi
32394
32395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32396  if test "x$test_cygdrive_prefix" = x; then
32397    # As a simple fix, exclude /usr/bin since it's not a real path.
32398    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32400      # a path prefixed by /cygdrive for fixpath to work.
32401      new_path="$CYGWIN_ROOT_PATH$input_path"
32402    fi
32403  fi
32404
32405  # remove trailing .exe if any
32406  new_path="${new_path/%.exe/}"
32407
32408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32409
32410  # First separate the path from the arguments. This will split at the first
32411  # space.
32412  complete="$VS_ENV_CMD"
32413  path="${complete%% *}"
32414  tmp="$complete EOL"
32415  arguments="${tmp#* }"
32416
32417  # Input might be given as Windows format, start by converting to
32418  # unix format.
32419  new_path="$path"
32420
32421  windows_path="$new_path"
32422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32423    unix_path=`$CYGPATH -u "$windows_path"`
32424    new_path="$unix_path"
32425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32427    new_path="$unix_path"
32428  fi
32429
32430
32431  # Now try to locate executable using which
32432  new_path=`$WHICH "$new_path" 2> /dev/null`
32433
32434  if test "x$new_path" = x; then
32435    # Oops. Which didn't find the executable.
32436    # The splitting of arguments from the executable at a space might have been incorrect,
32437    # since paths with space are more likely in Windows. Give it another try with the whole
32438    # argument.
32439    path="$complete"
32440    arguments="EOL"
32441    new_path="$path"
32442
32443  windows_path="$new_path"
32444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32445    unix_path=`$CYGPATH -u "$windows_path"`
32446    new_path="$unix_path"
32447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32449    new_path="$unix_path"
32450  fi
32451
32452
32453    new_path=`$WHICH "$new_path" 2> /dev/null`
32454    # bat and cmd files are not always considered executable in MSYS causing which
32455    # to not find them
32456    if test "x$new_path" = x \
32457        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32458        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32459      new_path="$path"
32460
32461  windows_path="$new_path"
32462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32463    unix_path=`$CYGPATH -u "$windows_path"`
32464    new_path="$unix_path"
32465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32467    new_path="$unix_path"
32468  fi
32469
32470    fi
32471
32472    if test "x$new_path" = x; then
32473      # It's still not found. Now this is an unrecoverable error.
32474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32475$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32476      has_space=`$ECHO "$complete" | $GREP " "`
32477      if test "x$has_space" != x; then
32478        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32479$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32480      fi
32481      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32482    fi
32483  fi
32484
32485  # Now new_path has a complete unix path to the binary
32486  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32487    # Keep paths in /bin as-is, but remove trailing .exe if any
32488    new_path="${new_path/%.exe/}"
32489    # Do not save /bin paths to all_fixpath_prefixes!
32490  else
32491    # Not in mixed or Windows style, start by that.
32492    new_path=`cmd //c echo $new_path`
32493
32494  input_path="$new_path"
32495  # Check if we need to convert this using DOS-style short mode. If the path
32496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32497  # take no chances and rewrite it.
32498  # Note: m4 eats our [], so we need to use [ and ] instead.
32499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32500  if test "x$has_forbidden_chars" != x; then
32501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32502    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32503  fi
32504
32505    # Output is in $new_path
32506
32507  windows_path="$new_path"
32508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32509    unix_path=`$CYGPATH -u "$windows_path"`
32510    new_path="$unix_path"
32511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32513    new_path="$unix_path"
32514  fi
32515
32516    # remove trailing .exe if any
32517    new_path="${new_path/%.exe/}"
32518
32519    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32520    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32521  fi
32522
32523    else
32524      # We're on a unix platform. Hooray! :)
32525      # First separate the path from the arguments. This will split at the first
32526      # space.
32527      complete="$VS_ENV_CMD"
32528      path="${complete%% *}"
32529      tmp="$complete EOL"
32530      arguments="${tmp#* }"
32531
32532      # Cannot rely on the command "which" here since it doesn't always work.
32533      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32534      if test -z "$is_absolute_path"; then
32535        # Path to executable is not absolute. Find it.
32536        IFS_save="$IFS"
32537        IFS=:
32538        for p in $PATH; do
32539          if test -f "$p/$path" && test -x "$p/$path"; then
32540            new_path="$p/$path"
32541            break
32542          fi
32543        done
32544        IFS="$IFS_save"
32545      else
32546        # This is an absolute path, we can use it without further modifications.
32547        new_path="$path"
32548      fi
32549
32550      if test "x$new_path" = x; then
32551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32552$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32553        has_space=`$ECHO "$complete" | $GREP " "`
32554        if test "x$has_space" != x; then
32555          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32556$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32557        fi
32558        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32559      fi
32560    fi
32561
32562    # Now join together the path and the arguments once again
32563    if test "x$arguments" != xEOL; then
32564      new_complete="$new_path ${arguments% *}"
32565    else
32566      new_complete="$new_path"
32567    fi
32568
32569    if test "x$complete" != "x$new_complete"; then
32570      VS_ENV_CMD="$new_complete"
32571      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32572$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32573    fi
32574  fi
32575
32576
32577      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32578      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32579$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32580
32581      # We need to create a couple of temporary files.
32582      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32583      $MKDIR -p $VS_ENV_TMP_DIR
32584
32585      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32586      # Instead create a shell script which will set the relevant variables when run.
32587      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32588
32589  unix_path="$WINPATH_VS_ENV_CMD"
32590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32591    windows_path=`$CYGPATH -m "$unix_path"`
32592    WINPATH_VS_ENV_CMD="$windows_path"
32593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32594    windows_path=`cmd //c echo $unix_path`
32595    WINPATH_VS_ENV_CMD="$windows_path"
32596  fi
32597
32598      WINPATH_BASH="$BASH"
32599
32600  unix_path="$WINPATH_BASH"
32601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32602    windows_path=`$CYGPATH -m "$unix_path"`
32603    WINPATH_BASH="$windows_path"
32604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32605    windows_path=`cmd //c echo $unix_path`
32606    WINPATH_BASH="$windows_path"
32607  fi
32608
32609
32610      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32611      # script (executable by bash) that will setup the important variables.
32612      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32613      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32614      # This will end up something like:
32615      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32616      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32617      # These will end up something like:
32618      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32619      # The trailing space for everyone except PATH is no typo, but is needed due
32620      # to trailing \ in the Windows paths. These will be stripped later.
32621      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32622          >> $EXTRACT_VC_ENV_BAT_FILE
32623      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32624          >> $EXTRACT_VC_ENV_BAT_FILE
32625      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32626          >> $EXTRACT_VC_ENV_BAT_FILE
32627      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32628          >> $EXTRACT_VC_ENV_BAT_FILE
32629      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32630          >> $EXTRACT_VC_ENV_BAT_FILE
32631      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32632          >> $EXTRACT_VC_ENV_BAT_FILE
32633
32634      # Now execute the newly created bat file.
32635      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32636      # Change directory so we don't need to mess with Windows paths in redirects.
32637      cd $VS_ENV_TMP_DIR
32638      cmd /c extract-vs-env.bat | $CAT
32639      cd $CURDIR
32640
32641      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32642        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32643$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32644        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32645$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32646        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32647$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32648        as_fn_error $? "Cannot continue" "$LINENO" 5
32649      fi
32650
32651      # Now set all paths and other env variables. This will allow the rest of
32652      # the configure script to find and run the compiler in the proper way.
32653      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32654$as_echo "$as_me: Setting extracted environment variables" >&6;}
32655      . $VS_ENV_TMP_DIR/set-vs-env.sh
32656      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32657      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32658    else
32659      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32660      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32661$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32662    fi
32663  fi
32664
32665  # At this point, we should have correct variables in the environment, or we can't continue.
32666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32667$as_echo_n "checking for Visual Studio variables... " >&6; }
32668
32669  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32670      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32671    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32673$as_echo "present but broken" >&6; }
32674      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32675    else
32676      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32677$as_echo "ok" >&6; }
32678      # Remove any trailing "\" ";" and " " from the variables.
32679      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32680      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32681      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32682      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32683      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32684      # Remove any paths containing # (typically F#) as that messes up make. This
32685      # is needed if visual studio was installed with F# support.
32686      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32687
32688
32689
32690
32691
32692      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32693      OLDIFS="$IFS"
32694      IFS=";"
32695      for i in $VS_INCLUDE; do
32696        ipath=$i
32697        # Only process non-empty elements
32698        if test "x$ipath" != x; then
32699          IFS="$OLDIFS"
32700          # Check that directory exists before calling fixup_path
32701          testpath=$ipath
32702
32703  windows_path="$testpath"
32704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32705    unix_path=`$CYGPATH -u "$windows_path"`
32706    testpath="$unix_path"
32707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32709    testpath="$unix_path"
32710  fi
32711
32712          if test -d "$testpath"; then
32713
32714  # Only process if variable expands to non-empty
32715
32716  if test "x$ipath" != x; then
32717    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32718
32719  # Input might be given as Windows format, start by converting to
32720  # unix format.
32721  path="$ipath"
32722  new_path=`$CYGPATH -u "$path"`
32723
32724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32727  # "foo.exe" is OK but "foo" is an error.
32728  #
32729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32730  # It is also a way to make sure we got the proper file name for the real test later on.
32731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32732  if test "x$test_shortpath" = x; then
32733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32734$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32735    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32736  fi
32737
32738  # Call helper function which possibly converts this using DOS-style short mode.
32739  # If so, the updated path is stored in $new_path.
32740
32741  input_path="$new_path"
32742  # Check if we need to convert this using DOS-style short mode. If the path
32743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32744  # take no chances and rewrite it.
32745  # Note: m4 eats our [], so we need to use [ and ] instead.
32746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32747  if test "x$has_forbidden_chars" != x; then
32748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32752      # Going to short mode and back again did indeed matter. Since short mode is
32753      # case insensitive, let's make it lowercase to improve readability.
32754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32755      # Now convert it back to Unix-style (cygpath)
32756      input_path=`$CYGPATH -u "$shortmode_path"`
32757      new_path="$input_path"
32758    fi
32759  fi
32760
32761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32762  if test "x$test_cygdrive_prefix" = x; then
32763    # As a simple fix, exclude /usr/bin since it's not a real path.
32764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32766      # a path prefixed by /cygdrive for fixpath to work.
32767      new_path="$CYGWIN_ROOT_PATH$input_path"
32768    fi
32769  fi
32770
32771
32772  if test "x$path" != "x$new_path"; then
32773    ipath="$new_path"
32774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32775$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32776  fi
32777
32778    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32779
32780  path="$ipath"
32781  has_colon=`$ECHO $path | $GREP ^.:`
32782  new_path="$path"
32783  if test "x$has_colon" = x; then
32784    # Not in mixed or Windows style, start by that.
32785    new_path=`cmd //c echo $path`
32786  fi
32787
32788
32789  input_path="$new_path"
32790  # Check if we need to convert this using DOS-style short mode. If the path
32791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32792  # take no chances and rewrite it.
32793  # Note: m4 eats our [], so we need to use [ and ] instead.
32794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32795  if test "x$has_forbidden_chars" != x; then
32796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32798  fi
32799
32800
32801  windows_path="$new_path"
32802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32803    unix_path=`$CYGPATH -u "$windows_path"`
32804    new_path="$unix_path"
32805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32807    new_path="$unix_path"
32808  fi
32809
32810  if test "x$path" != "x$new_path"; then
32811    ipath="$new_path"
32812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32813$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32814  fi
32815
32816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32818
32819    else
32820      # We're on a unix platform. Hooray! :)
32821      path="$ipath"
32822      has_space=`$ECHO "$path" | $GREP " "`
32823      if test "x$has_space" != x; then
32824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32825$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32826        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32827      fi
32828
32829      # Use eval to expand a potential ~
32830      eval path="$path"
32831      if test ! -f "$path" && test ! -d "$path"; then
32832        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32833      fi
32834
32835      if test -d "$path"; then
32836        ipath="`cd "$path"; $THEPWDCMD -L`"
32837      else
32838        dir="`$DIRNAME "$path"`"
32839        base="`$BASENAME "$path"`"
32840        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32841      fi
32842    fi
32843  fi
32844
32845            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32846          fi
32847          IFS=";"
32848        fi
32849      done
32850      # Convert VS_LIB into SYSROOT_LDFLAGS
32851      for i in $VS_LIB; do
32852        libpath=$i
32853        # Only process non-empty elements
32854        if test "x$libpath" != x; then
32855          IFS="$OLDIFS"
32856          # Check that directory exists before calling fixup_path
32857          testpath=$libpath
32858
32859  windows_path="$testpath"
32860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32861    unix_path=`$CYGPATH -u "$windows_path"`
32862    testpath="$unix_path"
32863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32865    testpath="$unix_path"
32866  fi
32867
32868          if test -d "$testpath"; then
32869
32870  # Only process if variable expands to non-empty
32871
32872  if test "x$libpath" != x; then
32873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32874
32875  # Input might be given as Windows format, start by converting to
32876  # unix format.
32877  path="$libpath"
32878  new_path=`$CYGPATH -u "$path"`
32879
32880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32883  # "foo.exe" is OK but "foo" is an error.
32884  #
32885  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32886  # It is also a way to make sure we got the proper file name for the real test later on.
32887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32888  if test "x$test_shortpath" = x; then
32889    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32890$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32891    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32892  fi
32893
32894  # Call helper function which possibly converts this using DOS-style short mode.
32895  # If so, the updated path is stored in $new_path.
32896
32897  input_path="$new_path"
32898  # Check if we need to convert this using DOS-style short mode. If the path
32899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32900  # take no chances and rewrite it.
32901  # Note: m4 eats our [], so we need to use [ and ] instead.
32902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32903  if test "x$has_forbidden_chars" != x; then
32904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32908      # Going to short mode and back again did indeed matter. Since short mode is
32909      # case insensitive, let's make it lowercase to improve readability.
32910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32911      # Now convert it back to Unix-style (cygpath)
32912      input_path=`$CYGPATH -u "$shortmode_path"`
32913      new_path="$input_path"
32914    fi
32915  fi
32916
32917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32918  if test "x$test_cygdrive_prefix" = x; then
32919    # As a simple fix, exclude /usr/bin since it's not a real path.
32920    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32922      # a path prefixed by /cygdrive for fixpath to work.
32923      new_path="$CYGWIN_ROOT_PATH$input_path"
32924    fi
32925  fi
32926
32927
32928  if test "x$path" != "x$new_path"; then
32929    libpath="$new_path"
32930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32931$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32932  fi
32933
32934    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32935
32936  path="$libpath"
32937  has_colon=`$ECHO $path | $GREP ^.:`
32938  new_path="$path"
32939  if test "x$has_colon" = x; then
32940    # Not in mixed or Windows style, start by that.
32941    new_path=`cmd //c echo $path`
32942  fi
32943
32944
32945  input_path="$new_path"
32946  # Check if we need to convert this using DOS-style short mode. If the path
32947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32948  # take no chances and rewrite it.
32949  # Note: m4 eats our [], so we need to use [ and ] instead.
32950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32951  if test "x$has_forbidden_chars" != x; then
32952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32954  fi
32955
32956
32957  windows_path="$new_path"
32958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32959    unix_path=`$CYGPATH -u "$windows_path"`
32960    new_path="$unix_path"
32961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32963    new_path="$unix_path"
32964  fi
32965
32966  if test "x$path" != "x$new_path"; then
32967    libpath="$new_path"
32968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32969$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32970  fi
32971
32972  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32973  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32974
32975    else
32976      # We're on a unix platform. Hooray! :)
32977      path="$libpath"
32978      has_space=`$ECHO "$path" | $GREP " "`
32979      if test "x$has_space" != x; then
32980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32981$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32982        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32983      fi
32984
32985      # Use eval to expand a potential ~
32986      eval path="$path"
32987      if test ! -f "$path" && test ! -d "$path"; then
32988        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32989      fi
32990
32991      if test -d "$path"; then
32992        libpath="`cd "$path"; $THEPWDCMD -L`"
32993      else
32994        dir="`$DIRNAME "$path"`"
32995        base="`$BASENAME "$path"`"
32996        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32997      fi
32998    fi
32999  fi
33000
33001            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33002          fi
33003          IFS=";"
33004        fi
33005      done
33006      IFS="$OLDIFS"
33007    fi
33008  else
33009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33010$as_echo "not found" >&6; }
33011
33012    if test "x$VS_ENV_CMD" = x; then
33013      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33014$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33015      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33016$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33017    else
33018      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33019$as_echo "$as_me: Running the extraction script failed." >&6;}
33020    fi
33021    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33022$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33023    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33024$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33025    as_fn_error $? "Cannot continue" "$LINENO" 5
33026  fi
33027
33028    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33029    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33030    PATH="$VS_PATH"
33031    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33032    export INCLUDE="$VS_INCLUDE"
33033    export LIB="$VS_LIB"
33034  else
33035    if test "x$XCODE_VERSION_OUTPUT" != x; then
33036      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33037      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33038      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33039    else
33040      # Currently we do not define this for other toolchains. This might change as the need arise.
33041      TOOLCHAIN_VERSION=
33042    fi
33043  fi
33044
33045
33046  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33047  # override all other locations.
33048  if test "x$TOOLCHAIN_PATH" != x; then
33049    PATH=$TOOLCHAIN_PATH:$PATH
33050  fi
33051
33052
33053  #
33054  # Setup the compilers (CC and CXX)
33055  #
33056
33057  COMPILER_NAME=C
33058  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33059
33060  if test "x$CC" != x; then
33061    # User has supplied compiler name already, always let that override.
33062    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33063$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33064    if test "x`basename $CC`" = "x$CC"; then
33065      # A command without a complete path is provided, search $PATH.
33066
33067      for ac_prog in $CC
33068do
33069  # Extract the first word of "$ac_prog", so it can be a program name with args.
33070set dummy $ac_prog; ac_word=$2
33071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33072$as_echo_n "checking for $ac_word... " >&6; }
33073if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33074  $as_echo_n "(cached) " >&6
33075else
33076  case $POTENTIAL_CC in
33077  [\\/]* | ?:[\\/]*)
33078  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33079  ;;
33080  *)
33081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33082for as_dir in $PATH
33083do
33084  IFS=$as_save_IFS
33085  test -z "$as_dir" && as_dir=.
33086    for ac_exec_ext in '' $ac_executable_extensions; do
33087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33088    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33090    break 2
33091  fi
33092done
33093  done
33094IFS=$as_save_IFS
33095
33096  ;;
33097esac
33098fi
33099POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33100if test -n "$POTENTIAL_CC"; then
33101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33102$as_echo "$POTENTIAL_CC" >&6; }
33103else
33104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33105$as_echo "no" >&6; }
33106fi
33107
33108
33109  test -n "$POTENTIAL_CC" && break
33110done
33111
33112      if test "x$POTENTIAL_CC" != x; then
33113        CC=$POTENTIAL_CC
33114      else
33115        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33116      fi
33117    else
33118      # Otherwise it might already be a complete path
33119      if test ! -x "$CC"; then
33120        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33121      fi
33122    fi
33123  else
33124    # No user supplied value. Locate compiler ourselves.
33125
33126    # If we are cross compiling, assume cross compilation tools follows the
33127    # cross compilation standard where they are prefixed with the autoconf
33128    # standard name for the target. For example the binary
33129    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33130    # If we are not cross compiling, then the default compiler name will be
33131    # used.
33132
33133    CC=
33134    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33135    # before checking the rest of the PATH.
33136    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33137    # step, this should not be necessary.
33138    if test -n "$TOOLCHAIN_PATH"; then
33139      PATH_save="$PATH"
33140      PATH="$TOOLCHAIN_PATH"
33141      for ac_prog in $SEARCH_LIST
33142do
33143  # Extract the first word of "$ac_prog", so it can be a program name with args.
33144set dummy $ac_prog; ac_word=$2
33145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33146$as_echo_n "checking for $ac_word... " >&6; }
33147if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33148  $as_echo_n "(cached) " >&6
33149else
33150  case $TOOLCHAIN_PATH_CC in
33151  [\\/]* | ?:[\\/]*)
33152  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33153  ;;
33154  *)
33155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33156for as_dir in $PATH
33157do
33158  IFS=$as_save_IFS
33159  test -z "$as_dir" && as_dir=.
33160    for ac_exec_ext in '' $ac_executable_extensions; do
33161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33162    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33164    break 2
33165  fi
33166done
33167  done
33168IFS=$as_save_IFS
33169
33170  ;;
33171esac
33172fi
33173TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33174if test -n "$TOOLCHAIN_PATH_CC"; then
33175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33176$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33177else
33178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33179$as_echo "no" >&6; }
33180fi
33181
33182
33183  test -n "$TOOLCHAIN_PATH_CC" && break
33184done
33185
33186      CC=$TOOLCHAIN_PATH_CC
33187      PATH="$PATH_save"
33188    fi
33189
33190    # AC_PATH_PROGS can't be run multiple times with the same variable,
33191    # so create a new name for this run.
33192    if test "x$CC" = x; then
33193      for ac_prog in $SEARCH_LIST
33194do
33195  # Extract the first word of "$ac_prog", so it can be a program name with args.
33196set dummy $ac_prog; ac_word=$2
33197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33198$as_echo_n "checking for $ac_word... " >&6; }
33199if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33200  $as_echo_n "(cached) " >&6
33201else
33202  case $POTENTIAL_CC in
33203  [\\/]* | ?:[\\/]*)
33204  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33205  ;;
33206  *)
33207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33208for as_dir in $PATH
33209do
33210  IFS=$as_save_IFS
33211  test -z "$as_dir" && as_dir=.
33212    for ac_exec_ext in '' $ac_executable_extensions; do
33213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33214    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33216    break 2
33217  fi
33218done
33219  done
33220IFS=$as_save_IFS
33221
33222  ;;
33223esac
33224fi
33225POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33226if test -n "$POTENTIAL_CC"; then
33227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33228$as_echo "$POTENTIAL_CC" >&6; }
33229else
33230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33231$as_echo "no" >&6; }
33232fi
33233
33234
33235  test -n "$POTENTIAL_CC" && break
33236done
33237
33238      CC=$POTENTIAL_CC
33239    fi
33240
33241    if test "x$CC" = x; then
33242
33243  # Print a helpful message on how to acquire the necessary build dependency.
33244  # devkit is the help tag: freetype, cups, alsa etc
33245  MISSING_DEPENDENCY=devkit
33246
33247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33248    cygwin_help $MISSING_DEPENDENCY
33249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33250    msys_help $MISSING_DEPENDENCY
33251  else
33252    PKGHANDLER_COMMAND=
33253
33254    case $PKGHANDLER in
33255      apt-get)
33256        apt_help     $MISSING_DEPENDENCY ;;
33257      yum)
33258        yum_help     $MISSING_DEPENDENCY ;;
33259      brew)
33260        brew_help    $MISSING_DEPENDENCY ;;
33261      port)
33262        port_help    $MISSING_DEPENDENCY ;;
33263      pkgutil)
33264        pkgutil_help $MISSING_DEPENDENCY ;;
33265      pkgadd)
33266        pkgadd_help  $MISSING_DEPENDENCY ;;
33267    esac
33268
33269    if test "x$PKGHANDLER_COMMAND" != x; then
33270      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33271    fi
33272  fi
33273
33274      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33275    fi
33276  fi
33277
33278  # Now we have a compiler binary in CC. Make sure it's okay.
33279
33280  # Only process if variable expands to non-empty
33281
33282  if test "x$CC" != x; then
33283    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33284
33285  # First separate the path from the arguments. This will split at the first
33286  # space.
33287  complete="$CC"
33288  path="${complete%% *}"
33289  tmp="$complete EOL"
33290  arguments="${tmp#* }"
33291
33292  # Input might be given as Windows format, start by converting to
33293  # unix format.
33294  new_path=`$CYGPATH -u "$path"`
33295
33296  # Now try to locate executable using which
33297  new_path=`$WHICH "$new_path" 2> /dev/null`
33298  # bat and cmd files are not always considered executable in cygwin causing which
33299  # to not find them
33300  if test "x$new_path" = x \
33301      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33302      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33303    new_path=`$CYGPATH -u "$path"`
33304  fi
33305  if test "x$new_path" = x; then
33306    # Oops. Which didn't find the executable.
33307    # The splitting of arguments from the executable at a space might have been incorrect,
33308    # since paths with space are more likely in Windows. Give it another try with the whole
33309    # argument.
33310    path="$complete"
33311    arguments="EOL"
33312    new_path=`$CYGPATH -u "$path"`
33313    new_path=`$WHICH "$new_path" 2> /dev/null`
33314    # bat and cmd files are not always considered executable in cygwin causing which
33315    # to not find them
33316    if test "x$new_path" = x \
33317        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33318        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33319      new_path=`$CYGPATH -u "$path"`
33320    fi
33321    if test "x$new_path" = x; then
33322      # It's still not found. Now this is an unrecoverable error.
33323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33324$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33325      has_space=`$ECHO "$complete" | $GREP " "`
33326      if test "x$has_space" != x; then
33327        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33328$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33329      fi
33330      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33331    fi
33332  fi
33333
33334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33337  # "foo.exe" is OK but "foo" is an error.
33338  #
33339  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33340  # It is also a way to make sure we got the proper file name for the real test later on.
33341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33342  if test "x$test_shortpath" = x; then
33343    # Short path failed, file does not exist as specified.
33344    # Try adding .exe or .cmd
33345    if test -f "${new_path}.exe"; then
33346      input_to_shortpath="${new_path}.exe"
33347    elif test -f "${new_path}.cmd"; then
33348      input_to_shortpath="${new_path}.cmd"
33349    else
33350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33351$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33352      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33353$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33354      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33355    fi
33356  else
33357    input_to_shortpath="$new_path"
33358  fi
33359
33360  # Call helper function which possibly converts this using DOS-style short mode.
33361  # If so, the updated path is stored in $new_path.
33362  new_path="$input_to_shortpath"
33363
33364  input_path="$input_to_shortpath"
33365  # Check if we need to convert this using DOS-style short mode. If the path
33366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33367  # take no chances and rewrite it.
33368  # Note: m4 eats our [], so we need to use [ and ] instead.
33369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33370  if test "x$has_forbidden_chars" != x; then
33371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33375      # Going to short mode and back again did indeed matter. Since short mode is
33376      # case insensitive, let's make it lowercase to improve readability.
33377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33378      # Now convert it back to Unix-style (cygpath)
33379      input_path=`$CYGPATH -u "$shortmode_path"`
33380      new_path="$input_path"
33381    fi
33382  fi
33383
33384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33385  if test "x$test_cygdrive_prefix" = x; then
33386    # As a simple fix, exclude /usr/bin since it's not a real path.
33387    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33389      # a path prefixed by /cygdrive for fixpath to work.
33390      new_path="$CYGWIN_ROOT_PATH$input_path"
33391    fi
33392  fi
33393
33394  # remove trailing .exe if any
33395  new_path="${new_path/%.exe/}"
33396
33397    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33398
33399  # First separate the path from the arguments. This will split at the first
33400  # space.
33401  complete="$CC"
33402  path="${complete%% *}"
33403  tmp="$complete EOL"
33404  arguments="${tmp#* }"
33405
33406  # Input might be given as Windows format, start by converting to
33407  # unix format.
33408  new_path="$path"
33409
33410  windows_path="$new_path"
33411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33412    unix_path=`$CYGPATH -u "$windows_path"`
33413    new_path="$unix_path"
33414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33416    new_path="$unix_path"
33417  fi
33418
33419
33420  # Now try to locate executable using which
33421  new_path=`$WHICH "$new_path" 2> /dev/null`
33422
33423  if test "x$new_path" = x; then
33424    # Oops. Which didn't find the executable.
33425    # The splitting of arguments from the executable at a space might have been incorrect,
33426    # since paths with space are more likely in Windows. Give it another try with the whole
33427    # argument.
33428    path="$complete"
33429    arguments="EOL"
33430    new_path="$path"
33431
33432  windows_path="$new_path"
33433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33434    unix_path=`$CYGPATH -u "$windows_path"`
33435    new_path="$unix_path"
33436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33438    new_path="$unix_path"
33439  fi
33440
33441
33442    new_path=`$WHICH "$new_path" 2> /dev/null`
33443    # bat and cmd files are not always considered executable in MSYS causing which
33444    # to not find them
33445    if test "x$new_path" = x \
33446        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33447        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33448      new_path="$path"
33449
33450  windows_path="$new_path"
33451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33452    unix_path=`$CYGPATH -u "$windows_path"`
33453    new_path="$unix_path"
33454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33456    new_path="$unix_path"
33457  fi
33458
33459    fi
33460
33461    if test "x$new_path" = x; then
33462      # It's still not found. Now this is an unrecoverable error.
33463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33464$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33465      has_space=`$ECHO "$complete" | $GREP " "`
33466      if test "x$has_space" != x; then
33467        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33468$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33469      fi
33470      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33471    fi
33472  fi
33473
33474  # Now new_path has a complete unix path to the binary
33475  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33476    # Keep paths in /bin as-is, but remove trailing .exe if any
33477    new_path="${new_path/%.exe/}"
33478    # Do not save /bin paths to all_fixpath_prefixes!
33479  else
33480    # Not in mixed or Windows style, start by that.
33481    new_path=`cmd //c echo $new_path`
33482
33483  input_path="$new_path"
33484  # Check if we need to convert this using DOS-style short mode. If the path
33485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33486  # take no chances and rewrite it.
33487  # Note: m4 eats our [], so we need to use [ and ] instead.
33488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33489  if test "x$has_forbidden_chars" != x; then
33490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33491    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33492  fi
33493
33494    # Output is in $new_path
33495
33496  windows_path="$new_path"
33497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33498    unix_path=`$CYGPATH -u "$windows_path"`
33499    new_path="$unix_path"
33500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33502    new_path="$unix_path"
33503  fi
33504
33505    # remove trailing .exe if any
33506    new_path="${new_path/%.exe/}"
33507
33508    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33509    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33510  fi
33511
33512    else
33513      # We're on a unix platform. Hooray! :)
33514      # First separate the path from the arguments. This will split at the first
33515      # space.
33516      complete="$CC"
33517      path="${complete%% *}"
33518      tmp="$complete EOL"
33519      arguments="${tmp#* }"
33520
33521      # Cannot rely on the command "which" here since it doesn't always work.
33522      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33523      if test -z "$is_absolute_path"; then
33524        # Path to executable is not absolute. Find it.
33525        IFS_save="$IFS"
33526        IFS=:
33527        for p in $PATH; do
33528          if test -f "$p/$path" && test -x "$p/$path"; then
33529            new_path="$p/$path"
33530            break
33531          fi
33532        done
33533        IFS="$IFS_save"
33534      else
33535        # This is an absolute path, we can use it without further modifications.
33536        new_path="$path"
33537      fi
33538
33539      if test "x$new_path" = x; then
33540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33541$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33542        has_space=`$ECHO "$complete" | $GREP " "`
33543        if test "x$has_space" != x; then
33544          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33545$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33546        fi
33547        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33548      fi
33549    fi
33550
33551    # Now join together the path and the arguments once again
33552    if test "x$arguments" != xEOL; then
33553      new_complete="$new_path ${arguments% *}"
33554    else
33555      new_complete="$new_path"
33556    fi
33557
33558    if test "x$complete" != "x$new_complete"; then
33559      CC="$new_complete"
33560      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33561$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33562    fi
33563  fi
33564
33565  TEST_COMPILER="$CC"
33566
33567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33568$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33569  SYMLINK_ORIGINAL="$TEST_COMPILER"
33570
33571  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33572    # Follow a chain of symbolic links. Use readlink
33573    # where it exists, else fall back to horribly
33574    # complicated shell code.
33575    if test "x$READLINK_TESTED" != yes; then
33576      # On MacOSX there is a readlink tool with a different
33577      # purpose than the GNU readlink tool. Check the found readlink.
33578      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33579      if test "x$ISGNU" = x; then
33580        # A readlink that we do not know how to use.
33581        # Are there other non-GNU readlinks out there?
33582        READLINK_TESTED=yes
33583        READLINK=
33584      fi
33585    fi
33586
33587    if test "x$READLINK" != x; then
33588      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33589    else
33590      # Save the current directory for restoring afterwards
33591      STARTDIR=$PWD
33592      COUNTER=0
33593      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33594      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33595      cd $sym_link_dir
33596      # Use -P flag to resolve symlinks in directories.
33597      cd `$THEPWDCMD -P`
33598      sym_link_dir=`$THEPWDCMD -P`
33599      # Resolve file symlinks
33600      while test $COUNTER -lt 20; do
33601        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33602        if test "x$ISLINK" == x; then
33603          # This is not a symbolic link! We are done!
33604          break
33605        fi
33606        # Again resolve directory symlinks since the target of the just found
33607        # link could be in a different directory
33608        cd `$DIRNAME $ISLINK`
33609        sym_link_dir=`$THEPWDCMD -P`
33610        sym_link_file=`$BASENAME $ISLINK`
33611        let COUNTER=COUNTER+1
33612      done
33613      cd $STARTDIR
33614      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33615    fi
33616  fi
33617
33618  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33620$as_echo "no symlink" >&6; }
33621  else
33622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33623$as_echo "$SYMLINK_ORIGINAL" >&6; }
33624
33625    # We can't handle ccache by gcc wrappers, since we need to know if we're
33626    # using ccache. Instead ccache usage must be controlled by a configure option.
33627    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33628    if test "x$COMPILER_BASENAME" = "xccache"; then
33629      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33630$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33631      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33632    fi
33633  fi
33634
33635
33636  COMPILER=$CC
33637  COMPILER_NAME=$COMPILER_NAME
33638
33639  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33640    # cc -V output typically looks like
33641    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33642    # or
33643    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33644    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33645    # Check that this is likely to be the Solaris Studio cc.
33646    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33647    if test $? -ne 0; then
33648      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33649      { $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
33650$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33651      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33652$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33653      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33654$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33655      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33656    fi
33657    # Remove usage instructions (if present), and
33658    # collapse compiler output into a single line
33659    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33660        $SED -e 's/ *[Uu]sage:.*//'`
33661    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33662        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33663  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33664    # xlc -qversion output typically looks like
33665    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33666    #     Version: 11.01.0000.0015
33667    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33668    # Check that this is likely to be the IBM XL C compiler.
33669    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33670    if test $? -ne 0; then
33671      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33672      { $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
33673$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33674      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33675$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33676      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33677$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33678      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33679    fi
33680    # Collapse compiler output into a single line
33681    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33682    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33683        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33684  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33685    # There is no specific version flag, but all output starts with a version string.
33686    # First line typically looks something like:
33687    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33688    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33689    # Check that this is likely to be Microsoft CL.EXE.
33690    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33691    if test $? -ne 0; then
33692      { $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
33693$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33694      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33695$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33696      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33697    fi
33698    # Collapse compiler output into a single line
33699    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33700    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33701        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33702  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33703    # gcc --version output typically looks like
33704    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33705    #     Copyright (C) 2013 Free Software Foundation, Inc.
33706    #     This is free software; see the source for copying conditions.  There is NO
33707    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33708    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33709    # Check that this is likely to be GCC.
33710    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33711    if test $? -ne 0; then
33712      { $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
33713$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33714      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33715$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33716      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33717    fi
33718    # Remove Copyright and legalese from version string, and
33719    # collapse into a single line
33720    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33721        $SED -e 's/ *Copyright .*//'`
33722    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33723        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33724  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33725    # clang --version output typically looks like
33726    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33727    #    clang version 3.3 (tags/RELEASE_33/final)
33728    # or
33729    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33730    #    Target: x86_64-pc-linux-gnu
33731    #    Thread model: posix
33732    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33733    # Check that this is likely to be clang
33734    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33735    if test $? -ne 0; then
33736      { $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
33737$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33738      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33739$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33740      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33741    fi
33742    # Collapse compiler output into a single line
33743    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33744    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33745        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33746  else
33747      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33748  fi
33749  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33750  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33751  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33752  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33753
33754  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33755$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33756
33757
33758  # Now that we have resolved CC ourself, let autoconf have its go at it
33759  ac_ext=c
33760ac_cpp='$CPP $CPPFLAGS'
33761ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33762ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33763ac_compiler_gnu=$ac_cv_c_compiler_gnu
33764if test -n "$ac_tool_prefix"; then
33765  for ac_prog in $CC
33766  do
33767    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33768set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33770$as_echo_n "checking for $ac_word... " >&6; }
33771if ${ac_cv_prog_CC+:} false; then :
33772  $as_echo_n "(cached) " >&6
33773else
33774  if test -n "$CC"; then
33775  ac_cv_prog_CC="$CC" # Let the user override the test.
33776else
33777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33778for as_dir in $PATH
33779do
33780  IFS=$as_save_IFS
33781  test -z "$as_dir" && as_dir=.
33782    for ac_exec_ext in '' $ac_executable_extensions; do
33783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33784    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33786    break 2
33787  fi
33788done
33789  done
33790IFS=$as_save_IFS
33791
33792fi
33793fi
33794CC=$ac_cv_prog_CC
33795if test -n "$CC"; then
33796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33797$as_echo "$CC" >&6; }
33798else
33799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33800$as_echo "no" >&6; }
33801fi
33802
33803
33804    test -n "$CC" && break
33805  done
33806fi
33807if test -z "$CC"; then
33808  ac_ct_CC=$CC
33809  for ac_prog in $CC
33810do
33811  # Extract the first word of "$ac_prog", so it can be a program name with args.
33812set dummy $ac_prog; ac_word=$2
33813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33814$as_echo_n "checking for $ac_word... " >&6; }
33815if ${ac_cv_prog_ac_ct_CC+:} false; then :
33816  $as_echo_n "(cached) " >&6
33817else
33818  if test -n "$ac_ct_CC"; then
33819  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33820else
33821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33822for as_dir in $PATH
33823do
33824  IFS=$as_save_IFS
33825  test -z "$as_dir" && as_dir=.
33826    for ac_exec_ext in '' $ac_executable_extensions; do
33827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33828    ac_cv_prog_ac_ct_CC="$ac_prog"
33829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33830    break 2
33831  fi
33832done
33833  done
33834IFS=$as_save_IFS
33835
33836fi
33837fi
33838ac_ct_CC=$ac_cv_prog_ac_ct_CC
33839if test -n "$ac_ct_CC"; then
33840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33841$as_echo "$ac_ct_CC" >&6; }
33842else
33843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33844$as_echo "no" >&6; }
33845fi
33846
33847
33848  test -n "$ac_ct_CC" && break
33849done
33850
33851  if test "x$ac_ct_CC" = x; then
33852    CC=""
33853  else
33854    case $cross_compiling:$ac_tool_warned in
33855yes:)
33856{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33857$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33858ac_tool_warned=yes ;;
33859esac
33860    CC=$ac_ct_CC
33861  fi
33862fi
33863
33864
33865test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33867as_fn_error $? "no acceptable C compiler found in \$PATH
33868See \`config.log' for more details" "$LINENO" 5; }
33869
33870# Provide some information about the compiler.
33871$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33872set X $ac_compile
33873ac_compiler=$2
33874for ac_option in --version -v -V -qversion; do
33875  { { ac_try="$ac_compiler $ac_option >&5"
33876case "(($ac_try" in
33877  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33878  *) ac_try_echo=$ac_try;;
33879esac
33880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33881$as_echo "$ac_try_echo"; } >&5
33882  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33883  ac_status=$?
33884  if test -s conftest.err; then
33885    sed '10a\
33886... rest of stderr output deleted ...
33887         10q' conftest.err >conftest.er1
33888    cat conftest.er1 >&5
33889  fi
33890  rm -f conftest.er1 conftest.err
33891  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33892  test $ac_status = 0; }
33893done
33894
33895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33896/* end confdefs.h.  */
33897
33898int
33899main ()
33900{
33901
33902  ;
33903  return 0;
33904}
33905_ACEOF
33906ac_clean_files_save=$ac_clean_files
33907ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33908# Try to create an executable without -o first, disregard a.out.
33909# It will help us diagnose broken compilers, and finding out an intuition
33910# of exeext.
33911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33912$as_echo_n "checking whether the C compiler works... " >&6; }
33913ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33914
33915# The possible output files:
33916ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33917
33918ac_rmfiles=
33919for ac_file in $ac_files
33920do
33921  case $ac_file in
33922    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33923    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33924  esac
33925done
33926rm -f $ac_rmfiles
33927
33928if { { ac_try="$ac_link_default"
33929case "(($ac_try" in
33930  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33931  *) ac_try_echo=$ac_try;;
33932esac
33933eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33934$as_echo "$ac_try_echo"; } >&5
33935  (eval "$ac_link_default") 2>&5
33936  ac_status=$?
33937  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33938  test $ac_status = 0; }; then :
33939  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33940# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33941# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33942# so that the user can short-circuit this test for compilers unknown to
33943# Autoconf.
33944for ac_file in $ac_files ''
33945do
33946  test -f "$ac_file" || continue
33947  case $ac_file in
33948    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33949	;;
33950    [ab].out )
33951	# We found the default executable, but exeext='' is most
33952	# certainly right.
33953	break;;
33954    *.* )
33955	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33956	then :; else
33957	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33958	fi
33959	# We set ac_cv_exeext here because the later test for it is not
33960	# safe: cross compilers may not add the suffix if given an `-o'
33961	# argument, so we may need to know it at that point already.
33962	# Even if this section looks crufty: it has the advantage of
33963	# actually working.
33964	break;;
33965    * )
33966	break;;
33967  esac
33968done
33969test "$ac_cv_exeext" = no && ac_cv_exeext=
33970
33971else
33972  ac_file=''
33973fi
33974if test -z "$ac_file"; then :
33975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33976$as_echo "no" >&6; }
33977$as_echo "$as_me: failed program was:" >&5
33978sed 's/^/| /' conftest.$ac_ext >&5
33979
33980{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33981$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33982as_fn_error 77 "C compiler cannot create executables
33983See \`config.log' for more details" "$LINENO" 5; }
33984else
33985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33986$as_echo "yes" >&6; }
33987fi
33988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33989$as_echo_n "checking for C compiler default output file name... " >&6; }
33990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33991$as_echo "$ac_file" >&6; }
33992ac_exeext=$ac_cv_exeext
33993
33994rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33995ac_clean_files=$ac_clean_files_save
33996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33997$as_echo_n "checking for suffix of executables... " >&6; }
33998if { { ac_try="$ac_link"
33999case "(($ac_try" in
34000  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34001  *) ac_try_echo=$ac_try;;
34002esac
34003eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34004$as_echo "$ac_try_echo"; } >&5
34005  (eval "$ac_link") 2>&5
34006  ac_status=$?
34007  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34008  test $ac_status = 0; }; then :
34009  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34010# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34011# work properly (i.e., refer to `conftest.exe'), while it won't with
34012# `rm'.
34013for ac_file in conftest.exe conftest conftest.*; do
34014  test -f "$ac_file" || continue
34015  case $ac_file in
34016    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34017    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34018	  break;;
34019    * ) break;;
34020  esac
34021done
34022else
34023  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34025as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34026See \`config.log' for more details" "$LINENO" 5; }
34027fi
34028rm -f conftest conftest$ac_cv_exeext
34029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34030$as_echo "$ac_cv_exeext" >&6; }
34031
34032rm -f conftest.$ac_ext
34033EXEEXT=$ac_cv_exeext
34034ac_exeext=$EXEEXT
34035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34036/* end confdefs.h.  */
34037#include <stdio.h>
34038int
34039main ()
34040{
34041FILE *f = fopen ("conftest.out", "w");
34042 return ferror (f) || fclose (f) != 0;
34043
34044  ;
34045  return 0;
34046}
34047_ACEOF
34048ac_clean_files="$ac_clean_files conftest.out"
34049# Check that the compiler produces executables we can run.  If not, either
34050# the compiler is broken, or we cross compile.
34051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34052$as_echo_n "checking whether we are cross compiling... " >&6; }
34053if test "$cross_compiling" != yes; then
34054  { { ac_try="$ac_link"
34055case "(($ac_try" in
34056  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34057  *) ac_try_echo=$ac_try;;
34058esac
34059eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34060$as_echo "$ac_try_echo"; } >&5
34061  (eval "$ac_link") 2>&5
34062  ac_status=$?
34063  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34064  test $ac_status = 0; }
34065  if { ac_try='./conftest$ac_cv_exeext'
34066  { { case "(($ac_try" in
34067  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34068  *) ac_try_echo=$ac_try;;
34069esac
34070eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34071$as_echo "$ac_try_echo"; } >&5
34072  (eval "$ac_try") 2>&5
34073  ac_status=$?
34074  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34075  test $ac_status = 0; }; }; then
34076    cross_compiling=no
34077  else
34078    if test "$cross_compiling" = maybe; then
34079	cross_compiling=yes
34080    else
34081	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34082$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34083as_fn_error $? "cannot run C compiled programs.
34084If you meant to cross compile, use \`--host'.
34085See \`config.log' for more details" "$LINENO" 5; }
34086    fi
34087  fi
34088fi
34089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34090$as_echo "$cross_compiling" >&6; }
34091
34092rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34093ac_clean_files=$ac_clean_files_save
34094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34095$as_echo_n "checking for suffix of object files... " >&6; }
34096if ${ac_cv_objext+:} false; then :
34097  $as_echo_n "(cached) " >&6
34098else
34099  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34100/* end confdefs.h.  */
34101
34102int
34103main ()
34104{
34105
34106  ;
34107  return 0;
34108}
34109_ACEOF
34110rm -f conftest.o conftest.obj
34111if { { ac_try="$ac_compile"
34112case "(($ac_try" in
34113  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34114  *) ac_try_echo=$ac_try;;
34115esac
34116eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34117$as_echo "$ac_try_echo"; } >&5
34118  (eval "$ac_compile") 2>&5
34119  ac_status=$?
34120  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34121  test $ac_status = 0; }; then :
34122  for ac_file in conftest.o conftest.obj conftest.*; do
34123  test -f "$ac_file" || continue;
34124  case $ac_file in
34125    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34126    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34127       break;;
34128  esac
34129done
34130else
34131  $as_echo "$as_me: failed program was:" >&5
34132sed 's/^/| /' conftest.$ac_ext >&5
34133
34134{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34135$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34136as_fn_error $? "cannot compute suffix of object files: cannot compile
34137See \`config.log' for more details" "$LINENO" 5; }
34138fi
34139rm -f conftest.$ac_cv_objext conftest.$ac_ext
34140fi
34141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34142$as_echo "$ac_cv_objext" >&6; }
34143OBJEXT=$ac_cv_objext
34144ac_objext=$OBJEXT
34145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34146$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34147if ${ac_cv_c_compiler_gnu+:} false; then :
34148  $as_echo_n "(cached) " >&6
34149else
34150  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34151/* end confdefs.h.  */
34152
34153int
34154main ()
34155{
34156#ifndef __GNUC__
34157       choke me
34158#endif
34159
34160  ;
34161  return 0;
34162}
34163_ACEOF
34164if ac_fn_c_try_compile "$LINENO"; then :
34165  ac_compiler_gnu=yes
34166else
34167  ac_compiler_gnu=no
34168fi
34169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34170ac_cv_c_compiler_gnu=$ac_compiler_gnu
34171
34172fi
34173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34174$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34175if test $ac_compiler_gnu = yes; then
34176  GCC=yes
34177else
34178  GCC=
34179fi
34180ac_test_CFLAGS=${CFLAGS+set}
34181ac_save_CFLAGS=$CFLAGS
34182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34183$as_echo_n "checking whether $CC accepts -g... " >&6; }
34184if ${ac_cv_prog_cc_g+:} false; then :
34185  $as_echo_n "(cached) " >&6
34186else
34187  ac_save_c_werror_flag=$ac_c_werror_flag
34188   ac_c_werror_flag=yes
34189   ac_cv_prog_cc_g=no
34190   CFLAGS="-g"
34191   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34192/* end confdefs.h.  */
34193
34194int
34195main ()
34196{
34197
34198  ;
34199  return 0;
34200}
34201_ACEOF
34202if ac_fn_c_try_compile "$LINENO"; then :
34203  ac_cv_prog_cc_g=yes
34204else
34205  CFLAGS=""
34206      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34207/* end confdefs.h.  */
34208
34209int
34210main ()
34211{
34212
34213  ;
34214  return 0;
34215}
34216_ACEOF
34217if ac_fn_c_try_compile "$LINENO"; then :
34218
34219else
34220  ac_c_werror_flag=$ac_save_c_werror_flag
34221	 CFLAGS="-g"
34222	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34223/* end confdefs.h.  */
34224
34225int
34226main ()
34227{
34228
34229  ;
34230  return 0;
34231}
34232_ACEOF
34233if ac_fn_c_try_compile "$LINENO"; then :
34234  ac_cv_prog_cc_g=yes
34235fi
34236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34237fi
34238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34239fi
34240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34241   ac_c_werror_flag=$ac_save_c_werror_flag
34242fi
34243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34244$as_echo "$ac_cv_prog_cc_g" >&6; }
34245if test "$ac_test_CFLAGS" = set; then
34246  CFLAGS=$ac_save_CFLAGS
34247elif test $ac_cv_prog_cc_g = yes; then
34248  if test "$GCC" = yes; then
34249    CFLAGS="-g -O2"
34250  else
34251    CFLAGS="-g"
34252  fi
34253else
34254  if test "$GCC" = yes; then
34255    CFLAGS="-O2"
34256  else
34257    CFLAGS=
34258  fi
34259fi
34260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34261$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34262if ${ac_cv_prog_cc_c89+:} false; then :
34263  $as_echo_n "(cached) " >&6
34264else
34265  ac_cv_prog_cc_c89=no
34266ac_save_CC=$CC
34267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34268/* end confdefs.h.  */
34269#include <stdarg.h>
34270#include <stdio.h>
34271struct stat;
34272/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34273struct buf { int x; };
34274FILE * (*rcsopen) (struct buf *, struct stat *, int);
34275static char *e (p, i)
34276     char **p;
34277     int i;
34278{
34279  return p[i];
34280}
34281static char *f (char * (*g) (char **, int), char **p, ...)
34282{
34283  char *s;
34284  va_list v;
34285  va_start (v,p);
34286  s = g (p, va_arg (v,int));
34287  va_end (v);
34288  return s;
34289}
34290
34291/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34292   function prototypes and stuff, but not '\xHH' hex character constants.
34293   These don't provoke an error unfortunately, instead are silently treated
34294   as 'x'.  The following induces an error, until -std is added to get
34295   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34296   array size at least.  It's necessary to write '\x00'==0 to get something
34297   that's true only with -std.  */
34298int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34299
34300/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34301   inside strings and character constants.  */
34302#define FOO(x) 'x'
34303int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34304
34305int test (int i, double x);
34306struct s1 {int (*f) (int a);};
34307struct s2 {int (*f) (double a);};
34308int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34309int argc;
34310char **argv;
34311int
34312main ()
34313{
34314return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34315  ;
34316  return 0;
34317}
34318_ACEOF
34319for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34320	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34321do
34322  CC="$ac_save_CC $ac_arg"
34323  if ac_fn_c_try_compile "$LINENO"; then :
34324  ac_cv_prog_cc_c89=$ac_arg
34325fi
34326rm -f core conftest.err conftest.$ac_objext
34327  test "x$ac_cv_prog_cc_c89" != "xno" && break
34328done
34329rm -f conftest.$ac_ext
34330CC=$ac_save_CC
34331
34332fi
34333# AC_CACHE_VAL
34334case "x$ac_cv_prog_cc_c89" in
34335  x)
34336    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34337$as_echo "none needed" >&6; } ;;
34338  xno)
34339    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34340$as_echo "unsupported" >&6; } ;;
34341  *)
34342    CC="$CC $ac_cv_prog_cc_c89"
34343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34344$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34345esac
34346if test "x$ac_cv_prog_cc_c89" != xno; then :
34347
34348fi
34349
34350ac_ext=cpp
34351ac_cpp='$CXXCPP $CPPFLAGS'
34352ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34353ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34354ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34355
34356
34357
34358  COMPILER_NAME=C++
34359  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34360
34361  if test "x$CXX" != x; then
34362    # User has supplied compiler name already, always let that override.
34363    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34364$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34365    if test "x`basename $CXX`" = "x$CXX"; then
34366      # A command without a complete path is provided, search $PATH.
34367
34368      for ac_prog in $CXX
34369do
34370  # Extract the first word of "$ac_prog", so it can be a program name with args.
34371set dummy $ac_prog; ac_word=$2
34372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34373$as_echo_n "checking for $ac_word... " >&6; }
34374if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34375  $as_echo_n "(cached) " >&6
34376else
34377  case $POTENTIAL_CXX in
34378  [\\/]* | ?:[\\/]*)
34379  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34380  ;;
34381  *)
34382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34383for as_dir in $PATH
34384do
34385  IFS=$as_save_IFS
34386  test -z "$as_dir" && as_dir=.
34387    for ac_exec_ext in '' $ac_executable_extensions; do
34388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34389    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34391    break 2
34392  fi
34393done
34394  done
34395IFS=$as_save_IFS
34396
34397  ;;
34398esac
34399fi
34400POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34401if test -n "$POTENTIAL_CXX"; then
34402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34403$as_echo "$POTENTIAL_CXX" >&6; }
34404else
34405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34406$as_echo "no" >&6; }
34407fi
34408
34409
34410  test -n "$POTENTIAL_CXX" && break
34411done
34412
34413      if test "x$POTENTIAL_CXX" != x; then
34414        CXX=$POTENTIAL_CXX
34415      else
34416        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34417      fi
34418    else
34419      # Otherwise it might already be a complete path
34420      if test ! -x "$CXX"; then
34421        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34422      fi
34423    fi
34424  else
34425    # No user supplied value. Locate compiler ourselves.
34426
34427    # If we are cross compiling, assume cross compilation tools follows the
34428    # cross compilation standard where they are prefixed with the autoconf
34429    # standard name for the target. For example the binary
34430    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34431    # If we are not cross compiling, then the default compiler name will be
34432    # used.
34433
34434    CXX=
34435    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34436    # before checking the rest of the PATH.
34437    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34438    # step, this should not be necessary.
34439    if test -n "$TOOLCHAIN_PATH"; then
34440      PATH_save="$PATH"
34441      PATH="$TOOLCHAIN_PATH"
34442      for ac_prog in $SEARCH_LIST
34443do
34444  # Extract the first word of "$ac_prog", so it can be a program name with args.
34445set dummy $ac_prog; ac_word=$2
34446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34447$as_echo_n "checking for $ac_word... " >&6; }
34448if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34449  $as_echo_n "(cached) " >&6
34450else
34451  case $TOOLCHAIN_PATH_CXX in
34452  [\\/]* | ?:[\\/]*)
34453  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34454  ;;
34455  *)
34456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34457for as_dir in $PATH
34458do
34459  IFS=$as_save_IFS
34460  test -z "$as_dir" && as_dir=.
34461    for ac_exec_ext in '' $ac_executable_extensions; do
34462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34463    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34465    break 2
34466  fi
34467done
34468  done
34469IFS=$as_save_IFS
34470
34471  ;;
34472esac
34473fi
34474TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34475if test -n "$TOOLCHAIN_PATH_CXX"; then
34476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34477$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34478else
34479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34480$as_echo "no" >&6; }
34481fi
34482
34483
34484  test -n "$TOOLCHAIN_PATH_CXX" && break
34485done
34486
34487      CXX=$TOOLCHAIN_PATH_CXX
34488      PATH="$PATH_save"
34489    fi
34490
34491    # AC_PATH_PROGS can't be run multiple times with the same variable,
34492    # so create a new name for this run.
34493    if test "x$CXX" = x; then
34494      for ac_prog in $SEARCH_LIST
34495do
34496  # Extract the first word of "$ac_prog", so it can be a program name with args.
34497set dummy $ac_prog; ac_word=$2
34498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34499$as_echo_n "checking for $ac_word... " >&6; }
34500if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34501  $as_echo_n "(cached) " >&6
34502else
34503  case $POTENTIAL_CXX in
34504  [\\/]* | ?:[\\/]*)
34505  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34506  ;;
34507  *)
34508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34509for as_dir in $PATH
34510do
34511  IFS=$as_save_IFS
34512  test -z "$as_dir" && as_dir=.
34513    for ac_exec_ext in '' $ac_executable_extensions; do
34514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34515    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34517    break 2
34518  fi
34519done
34520  done
34521IFS=$as_save_IFS
34522
34523  ;;
34524esac
34525fi
34526POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34527if test -n "$POTENTIAL_CXX"; then
34528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34529$as_echo "$POTENTIAL_CXX" >&6; }
34530else
34531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34532$as_echo "no" >&6; }
34533fi
34534
34535
34536  test -n "$POTENTIAL_CXX" && break
34537done
34538
34539      CXX=$POTENTIAL_CXX
34540    fi
34541
34542    if test "x$CXX" = x; then
34543
34544  # Print a helpful message on how to acquire the necessary build dependency.
34545  # devkit is the help tag: freetype, cups, alsa etc
34546  MISSING_DEPENDENCY=devkit
34547
34548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34549    cygwin_help $MISSING_DEPENDENCY
34550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34551    msys_help $MISSING_DEPENDENCY
34552  else
34553    PKGHANDLER_COMMAND=
34554
34555    case $PKGHANDLER in
34556      apt-get)
34557        apt_help     $MISSING_DEPENDENCY ;;
34558      yum)
34559        yum_help     $MISSING_DEPENDENCY ;;
34560      brew)
34561        brew_help    $MISSING_DEPENDENCY ;;
34562      port)
34563        port_help    $MISSING_DEPENDENCY ;;
34564      pkgutil)
34565        pkgutil_help $MISSING_DEPENDENCY ;;
34566      pkgadd)
34567        pkgadd_help  $MISSING_DEPENDENCY ;;
34568    esac
34569
34570    if test "x$PKGHANDLER_COMMAND" != x; then
34571      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34572    fi
34573  fi
34574
34575      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34576    fi
34577  fi
34578
34579  # Now we have a compiler binary in CXX. Make sure it's okay.
34580
34581  # Only process if variable expands to non-empty
34582
34583  if test "x$CXX" != x; then
34584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34585
34586  # First separate the path from the arguments. This will split at the first
34587  # space.
34588  complete="$CXX"
34589  path="${complete%% *}"
34590  tmp="$complete EOL"
34591  arguments="${tmp#* }"
34592
34593  # Input might be given as Windows format, start by converting to
34594  # unix format.
34595  new_path=`$CYGPATH -u "$path"`
34596
34597  # Now try to locate executable using which
34598  new_path=`$WHICH "$new_path" 2> /dev/null`
34599  # bat and cmd files are not always considered executable in cygwin causing which
34600  # to not find them
34601  if test "x$new_path" = x \
34602      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34603      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34604    new_path=`$CYGPATH -u "$path"`
34605  fi
34606  if test "x$new_path" = x; then
34607    # Oops. Which didn't find the executable.
34608    # The splitting of arguments from the executable at a space might have been incorrect,
34609    # since paths with space are more likely in Windows. Give it another try with the whole
34610    # argument.
34611    path="$complete"
34612    arguments="EOL"
34613    new_path=`$CYGPATH -u "$path"`
34614    new_path=`$WHICH "$new_path" 2> /dev/null`
34615    # bat and cmd files are not always considered executable in cygwin causing which
34616    # to not find them
34617    if test "x$new_path" = x \
34618        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34619        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34620      new_path=`$CYGPATH -u "$path"`
34621    fi
34622    if test "x$new_path" = x; then
34623      # It's still not found. Now this is an unrecoverable error.
34624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34625$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34626      has_space=`$ECHO "$complete" | $GREP " "`
34627      if test "x$has_space" != x; then
34628        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34630      fi
34631      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34632    fi
34633  fi
34634
34635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34638  # "foo.exe" is OK but "foo" is an error.
34639  #
34640  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34641  # It is also a way to make sure we got the proper file name for the real test later on.
34642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34643  if test "x$test_shortpath" = x; then
34644    # Short path failed, file does not exist as specified.
34645    # Try adding .exe or .cmd
34646    if test -f "${new_path}.exe"; then
34647      input_to_shortpath="${new_path}.exe"
34648    elif test -f "${new_path}.cmd"; then
34649      input_to_shortpath="${new_path}.cmd"
34650    else
34651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34652$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34653      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34654$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34655      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34656    fi
34657  else
34658    input_to_shortpath="$new_path"
34659  fi
34660
34661  # Call helper function which possibly converts this using DOS-style short mode.
34662  # If so, the updated path is stored in $new_path.
34663  new_path="$input_to_shortpath"
34664
34665  input_path="$input_to_shortpath"
34666  # Check if we need to convert this using DOS-style short mode. If the path
34667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34668  # take no chances and rewrite it.
34669  # Note: m4 eats our [], so we need to use [ and ] instead.
34670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34671  if test "x$has_forbidden_chars" != x; then
34672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34676      # Going to short mode and back again did indeed matter. Since short mode is
34677      # case insensitive, let's make it lowercase to improve readability.
34678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34679      # Now convert it back to Unix-style (cygpath)
34680      input_path=`$CYGPATH -u "$shortmode_path"`
34681      new_path="$input_path"
34682    fi
34683  fi
34684
34685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34686  if test "x$test_cygdrive_prefix" = x; then
34687    # As a simple fix, exclude /usr/bin since it's not a real path.
34688    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34690      # a path prefixed by /cygdrive for fixpath to work.
34691      new_path="$CYGWIN_ROOT_PATH$input_path"
34692    fi
34693  fi
34694
34695  # remove trailing .exe if any
34696  new_path="${new_path/%.exe/}"
34697
34698    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34699
34700  # First separate the path from the arguments. This will split at the first
34701  # space.
34702  complete="$CXX"
34703  path="${complete%% *}"
34704  tmp="$complete EOL"
34705  arguments="${tmp#* }"
34706
34707  # Input might be given as Windows format, start by converting to
34708  # unix format.
34709  new_path="$path"
34710
34711  windows_path="$new_path"
34712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34713    unix_path=`$CYGPATH -u "$windows_path"`
34714    new_path="$unix_path"
34715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34717    new_path="$unix_path"
34718  fi
34719
34720
34721  # Now try to locate executable using which
34722  new_path=`$WHICH "$new_path" 2> /dev/null`
34723
34724  if test "x$new_path" = x; then
34725    # Oops. Which didn't find the executable.
34726    # The splitting of arguments from the executable at a space might have been incorrect,
34727    # since paths with space are more likely in Windows. Give it another try with the whole
34728    # argument.
34729    path="$complete"
34730    arguments="EOL"
34731    new_path="$path"
34732
34733  windows_path="$new_path"
34734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34735    unix_path=`$CYGPATH -u "$windows_path"`
34736    new_path="$unix_path"
34737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34739    new_path="$unix_path"
34740  fi
34741
34742
34743    new_path=`$WHICH "$new_path" 2> /dev/null`
34744    # bat and cmd files are not always considered executable in MSYS causing which
34745    # to not find them
34746    if test "x$new_path" = x \
34747        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34748        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34749      new_path="$path"
34750
34751  windows_path="$new_path"
34752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34753    unix_path=`$CYGPATH -u "$windows_path"`
34754    new_path="$unix_path"
34755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34757    new_path="$unix_path"
34758  fi
34759
34760    fi
34761
34762    if test "x$new_path" = x; then
34763      # It's still not found. Now this is an unrecoverable error.
34764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34765$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34766      has_space=`$ECHO "$complete" | $GREP " "`
34767      if test "x$has_space" != x; then
34768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34770      fi
34771      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34772    fi
34773  fi
34774
34775  # Now new_path has a complete unix path to the binary
34776  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34777    # Keep paths in /bin as-is, but remove trailing .exe if any
34778    new_path="${new_path/%.exe/}"
34779    # Do not save /bin paths to all_fixpath_prefixes!
34780  else
34781    # Not in mixed or Windows style, start by that.
34782    new_path=`cmd //c echo $new_path`
34783
34784  input_path="$new_path"
34785  # Check if we need to convert this using DOS-style short mode. If the path
34786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34787  # take no chances and rewrite it.
34788  # Note: m4 eats our [], so we need to use [ and ] instead.
34789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34790  if test "x$has_forbidden_chars" != x; then
34791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34793  fi
34794
34795    # Output is in $new_path
34796
34797  windows_path="$new_path"
34798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34799    unix_path=`$CYGPATH -u "$windows_path"`
34800    new_path="$unix_path"
34801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34803    new_path="$unix_path"
34804  fi
34805
34806    # remove trailing .exe if any
34807    new_path="${new_path/%.exe/}"
34808
34809    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34810    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34811  fi
34812
34813    else
34814      # We're on a unix platform. Hooray! :)
34815      # First separate the path from the arguments. This will split at the first
34816      # space.
34817      complete="$CXX"
34818      path="${complete%% *}"
34819      tmp="$complete EOL"
34820      arguments="${tmp#* }"
34821
34822      # Cannot rely on the command "which" here since it doesn't always work.
34823      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34824      if test -z "$is_absolute_path"; then
34825        # Path to executable is not absolute. Find it.
34826        IFS_save="$IFS"
34827        IFS=:
34828        for p in $PATH; do
34829          if test -f "$p/$path" && test -x "$p/$path"; then
34830            new_path="$p/$path"
34831            break
34832          fi
34833        done
34834        IFS="$IFS_save"
34835      else
34836        # This is an absolute path, we can use it without further modifications.
34837        new_path="$path"
34838      fi
34839
34840      if test "x$new_path" = x; then
34841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34842$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34843        has_space=`$ECHO "$complete" | $GREP " "`
34844        if test "x$has_space" != x; then
34845          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34846$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34847        fi
34848        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34849      fi
34850    fi
34851
34852    # Now join together the path and the arguments once again
34853    if test "x$arguments" != xEOL; then
34854      new_complete="$new_path ${arguments% *}"
34855    else
34856      new_complete="$new_path"
34857    fi
34858
34859    if test "x$complete" != "x$new_complete"; then
34860      CXX="$new_complete"
34861      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34862$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34863    fi
34864  fi
34865
34866  TEST_COMPILER="$CXX"
34867
34868  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34869$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34870  SYMLINK_ORIGINAL="$TEST_COMPILER"
34871
34872  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34873    # Follow a chain of symbolic links. Use readlink
34874    # where it exists, else fall back to horribly
34875    # complicated shell code.
34876    if test "x$READLINK_TESTED" != yes; then
34877      # On MacOSX there is a readlink tool with a different
34878      # purpose than the GNU readlink tool. Check the found readlink.
34879      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34880      if test "x$ISGNU" = x; then
34881        # A readlink that we do not know how to use.
34882        # Are there other non-GNU readlinks out there?
34883        READLINK_TESTED=yes
34884        READLINK=
34885      fi
34886    fi
34887
34888    if test "x$READLINK" != x; then
34889      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34890    else
34891      # Save the current directory for restoring afterwards
34892      STARTDIR=$PWD
34893      COUNTER=0
34894      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34895      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34896      cd $sym_link_dir
34897      # Use -P flag to resolve symlinks in directories.
34898      cd `$THEPWDCMD -P`
34899      sym_link_dir=`$THEPWDCMD -P`
34900      # Resolve file symlinks
34901      while test $COUNTER -lt 20; do
34902        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34903        if test "x$ISLINK" == x; then
34904          # This is not a symbolic link! We are done!
34905          break
34906        fi
34907        # Again resolve directory symlinks since the target of the just found
34908        # link could be in a different directory
34909        cd `$DIRNAME $ISLINK`
34910        sym_link_dir=`$THEPWDCMD -P`
34911        sym_link_file=`$BASENAME $ISLINK`
34912        let COUNTER=COUNTER+1
34913      done
34914      cd $STARTDIR
34915      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34916    fi
34917  fi
34918
34919  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34921$as_echo "no symlink" >&6; }
34922  else
34923    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34924$as_echo "$SYMLINK_ORIGINAL" >&6; }
34925
34926    # We can't handle ccache by gcc wrappers, since we need to know if we're
34927    # using ccache. Instead ccache usage must be controlled by a configure option.
34928    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34929    if test "x$COMPILER_BASENAME" = "xccache"; then
34930      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34931$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34932      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34933    fi
34934  fi
34935
34936
34937  COMPILER=$CXX
34938  COMPILER_NAME=$COMPILER_NAME
34939
34940  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34941    # cc -V output typically looks like
34942    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34943    # or
34944    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34945    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34946    # Check that this is likely to be the Solaris Studio cc.
34947    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34948    if test $? -ne 0; then
34949      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34950      { $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
34951$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34952      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34953$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34954      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34955$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34956      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34957    fi
34958    # Remove usage instructions (if present), and
34959    # collapse compiler output into a single line
34960    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34961        $SED -e 's/ *[Uu]sage:.*//'`
34962    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34963        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34964  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34965    # xlc -qversion output typically looks like
34966    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34967    #     Version: 11.01.0000.0015
34968    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34969    # Check that this is likely to be the IBM XL C compiler.
34970    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34971    if test $? -ne 0; then
34972      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34973      { $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
34974$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34975      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34976$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34977      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34978$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34979      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34980    fi
34981    # Collapse compiler output into a single line
34982    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34983    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34984        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34985  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34986    # There is no specific version flag, but all output starts with a version string.
34987    # First line typically looks something like:
34988    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34989    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34990    # Check that this is likely to be Microsoft CL.EXE.
34991    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34992    if test $? -ne 0; then
34993      { $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
34994$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34995      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34996$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34997      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34998    fi
34999    # Collapse compiler output into a single line
35000    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35001    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35002        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35003  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35004    # gcc --version output typically looks like
35005    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35006    #     Copyright (C) 2013 Free Software Foundation, Inc.
35007    #     This is free software; see the source for copying conditions.  There is NO
35008    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35009    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35010    # Check that this is likely to be GCC.
35011    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35012    if test $? -ne 0; then
35013      { $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
35014$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35015      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35016$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35017      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35018    fi
35019    # Remove Copyright and legalese from version string, and
35020    # collapse into a single line
35021    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35022        $SED -e 's/ *Copyright .*//'`
35023    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35024        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35025  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35026    # clang --version output typically looks like
35027    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35028    #    clang version 3.3 (tags/RELEASE_33/final)
35029    # or
35030    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35031    #    Target: x86_64-pc-linux-gnu
35032    #    Thread model: posix
35033    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35034    # Check that this is likely to be clang
35035    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35036    if test $? -ne 0; then
35037      { $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
35038$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35039      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35040$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35041      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35042    fi
35043    # Collapse compiler output into a single line
35044    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35045    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35046        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35047  else
35048      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35049  fi
35050  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35051  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35052  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35053  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35054
35055  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35056$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35057
35058
35059  # Now that we have resolved CXX ourself, let autoconf have its go at it
35060  ac_ext=cpp
35061ac_cpp='$CXXCPP $CPPFLAGS'
35062ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35063ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35064ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35065if test -z "$CXX"; then
35066  if test -n "$CCC"; then
35067    CXX=$CCC
35068  else
35069    if test -n "$ac_tool_prefix"; then
35070  for ac_prog in $CXX
35071  do
35072    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35073set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35075$as_echo_n "checking for $ac_word... " >&6; }
35076if ${ac_cv_prog_CXX+:} false; then :
35077  $as_echo_n "(cached) " >&6
35078else
35079  if test -n "$CXX"; then
35080  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35081else
35082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35083for as_dir in $PATH
35084do
35085  IFS=$as_save_IFS
35086  test -z "$as_dir" && as_dir=.
35087    for ac_exec_ext in '' $ac_executable_extensions; do
35088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35089    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35091    break 2
35092  fi
35093done
35094  done
35095IFS=$as_save_IFS
35096
35097fi
35098fi
35099CXX=$ac_cv_prog_CXX
35100if test -n "$CXX"; then
35101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35102$as_echo "$CXX" >&6; }
35103else
35104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35105$as_echo "no" >&6; }
35106fi
35107
35108
35109    test -n "$CXX" && break
35110  done
35111fi
35112if test -z "$CXX"; then
35113  ac_ct_CXX=$CXX
35114  for ac_prog in $CXX
35115do
35116  # Extract the first word of "$ac_prog", so it can be a program name with args.
35117set dummy $ac_prog; ac_word=$2
35118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35119$as_echo_n "checking for $ac_word... " >&6; }
35120if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35121  $as_echo_n "(cached) " >&6
35122else
35123  if test -n "$ac_ct_CXX"; then
35124  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35125else
35126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35127for as_dir in $PATH
35128do
35129  IFS=$as_save_IFS
35130  test -z "$as_dir" && as_dir=.
35131    for ac_exec_ext in '' $ac_executable_extensions; do
35132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35133    ac_cv_prog_ac_ct_CXX="$ac_prog"
35134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35135    break 2
35136  fi
35137done
35138  done
35139IFS=$as_save_IFS
35140
35141fi
35142fi
35143ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35144if test -n "$ac_ct_CXX"; then
35145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35146$as_echo "$ac_ct_CXX" >&6; }
35147else
35148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35149$as_echo "no" >&6; }
35150fi
35151
35152
35153  test -n "$ac_ct_CXX" && break
35154done
35155
35156  if test "x$ac_ct_CXX" = x; then
35157    CXX="g++"
35158  else
35159    case $cross_compiling:$ac_tool_warned in
35160yes:)
35161{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35162$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35163ac_tool_warned=yes ;;
35164esac
35165    CXX=$ac_ct_CXX
35166  fi
35167fi
35168
35169  fi
35170fi
35171# Provide some information about the compiler.
35172$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35173set X $ac_compile
35174ac_compiler=$2
35175for ac_option in --version -v -V -qversion; do
35176  { { ac_try="$ac_compiler $ac_option >&5"
35177case "(($ac_try" in
35178  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35179  *) ac_try_echo=$ac_try;;
35180esac
35181eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35182$as_echo "$ac_try_echo"; } >&5
35183  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35184  ac_status=$?
35185  if test -s conftest.err; then
35186    sed '10a\
35187... rest of stderr output deleted ...
35188         10q' conftest.err >conftest.er1
35189    cat conftest.er1 >&5
35190  fi
35191  rm -f conftest.er1 conftest.err
35192  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35193  test $ac_status = 0; }
35194done
35195
35196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35197$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35198if ${ac_cv_cxx_compiler_gnu+:} false; then :
35199  $as_echo_n "(cached) " >&6
35200else
35201  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35202/* end confdefs.h.  */
35203
35204int
35205main ()
35206{
35207#ifndef __GNUC__
35208       choke me
35209#endif
35210
35211  ;
35212  return 0;
35213}
35214_ACEOF
35215if ac_fn_cxx_try_compile "$LINENO"; then :
35216  ac_compiler_gnu=yes
35217else
35218  ac_compiler_gnu=no
35219fi
35220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35221ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35222
35223fi
35224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35225$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35226if test $ac_compiler_gnu = yes; then
35227  GXX=yes
35228else
35229  GXX=
35230fi
35231ac_test_CXXFLAGS=${CXXFLAGS+set}
35232ac_save_CXXFLAGS=$CXXFLAGS
35233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35234$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35235if ${ac_cv_prog_cxx_g+:} false; then :
35236  $as_echo_n "(cached) " >&6
35237else
35238  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35239   ac_cxx_werror_flag=yes
35240   ac_cv_prog_cxx_g=no
35241   CXXFLAGS="-g"
35242   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35243/* end confdefs.h.  */
35244
35245int
35246main ()
35247{
35248
35249  ;
35250  return 0;
35251}
35252_ACEOF
35253if ac_fn_cxx_try_compile "$LINENO"; then :
35254  ac_cv_prog_cxx_g=yes
35255else
35256  CXXFLAGS=""
35257      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35258/* end confdefs.h.  */
35259
35260int
35261main ()
35262{
35263
35264  ;
35265  return 0;
35266}
35267_ACEOF
35268if ac_fn_cxx_try_compile "$LINENO"; then :
35269
35270else
35271  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35272	 CXXFLAGS="-g"
35273	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35274/* end confdefs.h.  */
35275
35276int
35277main ()
35278{
35279
35280  ;
35281  return 0;
35282}
35283_ACEOF
35284if ac_fn_cxx_try_compile "$LINENO"; then :
35285  ac_cv_prog_cxx_g=yes
35286fi
35287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35288fi
35289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35290fi
35291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35292   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35293fi
35294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35295$as_echo "$ac_cv_prog_cxx_g" >&6; }
35296if test "$ac_test_CXXFLAGS" = set; then
35297  CXXFLAGS=$ac_save_CXXFLAGS
35298elif test $ac_cv_prog_cxx_g = yes; then
35299  if test "$GXX" = yes; then
35300    CXXFLAGS="-g -O2"
35301  else
35302    CXXFLAGS="-g"
35303  fi
35304else
35305  if test "$GXX" = yes; then
35306    CXXFLAGS="-O2"
35307  else
35308    CXXFLAGS=
35309  fi
35310fi
35311ac_ext=cpp
35312ac_cpp='$CXXCPP $CPPFLAGS'
35313ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35314ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35315ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35316
35317
35318  # This is the compiler version number on the form X.Y[.Z]
35319
35320
35321
35322
35323  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35324    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35325$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35326    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35327$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35328  fi
35329
35330  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35331  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35332    { $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
35333$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;}
35334  fi
35335
35336  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35337    { $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
35338$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35339  fi
35340
35341  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35342
35343
35344  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
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
35389
35390
35391
35392
35393
35394    # Execute function body
35395
35396  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35397  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35398
35399  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35400    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35401  fi
35402
35403  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35404    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35405  fi
35406
35407  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35408  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35409
35410  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35411    :
35412
35413  else
35414    :
35415
35416          { $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
35417$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35418
35419
35420  fi
35421
35422
35423
35424
35425
35426
35427
35428
35429
35430
35431
35432
35433
35434
35435  fi
35436
35437  #
35438  # Setup the preprocessor (CPP and CXXCPP)
35439  #
35440  ac_ext=c
35441ac_cpp='$CPP $CPPFLAGS'
35442ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35443ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35444ac_compiler_gnu=$ac_cv_c_compiler_gnu
35445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35446$as_echo_n "checking how to run the C preprocessor... " >&6; }
35447# On Suns, sometimes $CPP names a directory.
35448if test -n "$CPP" && test -d "$CPP"; then
35449  CPP=
35450fi
35451if test -z "$CPP"; then
35452  if ${ac_cv_prog_CPP+:} false; then :
35453  $as_echo_n "(cached) " >&6
35454else
35455      # Double quotes because CPP needs to be expanded
35456    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35457    do
35458      ac_preproc_ok=false
35459for ac_c_preproc_warn_flag in '' yes
35460do
35461  # Use a header file that comes with gcc, so configuring glibc
35462  # with a fresh cross-compiler works.
35463  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35464  # <limits.h> exists even on freestanding compilers.
35465  # On the NeXT, cc -E runs the code through the compiler's parser,
35466  # not just through cpp. "Syntax error" is here to catch this case.
35467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35468/* end confdefs.h.  */
35469#ifdef __STDC__
35470# include <limits.h>
35471#else
35472# include <assert.h>
35473#endif
35474		     Syntax error
35475_ACEOF
35476if ac_fn_c_try_cpp "$LINENO"; then :
35477
35478else
35479  # Broken: fails on valid input.
35480continue
35481fi
35482rm -f conftest.err conftest.i conftest.$ac_ext
35483
35484  # OK, works on sane cases.  Now check whether nonexistent headers
35485  # can be detected and how.
35486  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35487/* end confdefs.h.  */
35488#include <ac_nonexistent.h>
35489_ACEOF
35490if ac_fn_c_try_cpp "$LINENO"; then :
35491  # Broken: success on invalid input.
35492continue
35493else
35494  # Passes both tests.
35495ac_preproc_ok=:
35496break
35497fi
35498rm -f conftest.err conftest.i conftest.$ac_ext
35499
35500done
35501# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35502rm -f conftest.i conftest.err conftest.$ac_ext
35503if $ac_preproc_ok; then :
35504  break
35505fi
35506
35507    done
35508    ac_cv_prog_CPP=$CPP
35509
35510fi
35511  CPP=$ac_cv_prog_CPP
35512else
35513  ac_cv_prog_CPP=$CPP
35514fi
35515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35516$as_echo "$CPP" >&6; }
35517ac_preproc_ok=false
35518for ac_c_preproc_warn_flag in '' yes
35519do
35520  # Use a header file that comes with gcc, so configuring glibc
35521  # with a fresh cross-compiler works.
35522  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35523  # <limits.h> exists even on freestanding compilers.
35524  # On the NeXT, cc -E runs the code through the compiler's parser,
35525  # not just through cpp. "Syntax error" is here to catch this case.
35526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35527/* end confdefs.h.  */
35528#ifdef __STDC__
35529# include <limits.h>
35530#else
35531# include <assert.h>
35532#endif
35533		     Syntax error
35534_ACEOF
35535if ac_fn_c_try_cpp "$LINENO"; then :
35536
35537else
35538  # Broken: fails on valid input.
35539continue
35540fi
35541rm -f conftest.err conftest.i conftest.$ac_ext
35542
35543  # OK, works on sane cases.  Now check whether nonexistent headers
35544  # can be detected and how.
35545  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35546/* end confdefs.h.  */
35547#include <ac_nonexistent.h>
35548_ACEOF
35549if ac_fn_c_try_cpp "$LINENO"; then :
35550  # Broken: success on invalid input.
35551continue
35552else
35553  # Passes both tests.
35554ac_preproc_ok=:
35555break
35556fi
35557rm -f conftest.err conftest.i conftest.$ac_ext
35558
35559done
35560# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35561rm -f conftest.i conftest.err conftest.$ac_ext
35562if $ac_preproc_ok; then :
35563
35564else
35565  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35566$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35567as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35568See \`config.log' for more details" "$LINENO" 5; }
35569fi
35570
35571ac_ext=cpp
35572ac_cpp='$CXXCPP $CPPFLAGS'
35573ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35574ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35575ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35576
35577
35578  # Only process if variable expands to non-empty
35579
35580  if test "x$CPP" != x; then
35581    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35582
35583  # First separate the path from the arguments. This will split at the first
35584  # space.
35585  complete="$CPP"
35586  path="${complete%% *}"
35587  tmp="$complete EOL"
35588  arguments="${tmp#* }"
35589
35590  # Input might be given as Windows format, start by converting to
35591  # unix format.
35592  new_path=`$CYGPATH -u "$path"`
35593
35594  # Now try to locate executable using which
35595  new_path=`$WHICH "$new_path" 2> /dev/null`
35596  # bat and cmd files are not always considered executable in cygwin causing which
35597  # to not find them
35598  if test "x$new_path" = x \
35599      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35600      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35601    new_path=`$CYGPATH -u "$path"`
35602  fi
35603  if test "x$new_path" = x; then
35604    # Oops. Which didn't find the executable.
35605    # The splitting of arguments from the executable at a space might have been incorrect,
35606    # since paths with space are more likely in Windows. Give it another try with the whole
35607    # argument.
35608    path="$complete"
35609    arguments="EOL"
35610    new_path=`$CYGPATH -u "$path"`
35611    new_path=`$WHICH "$new_path" 2> /dev/null`
35612    # bat and cmd files are not always considered executable in cygwin causing which
35613    # to not find them
35614    if test "x$new_path" = x \
35615        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35616        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35617      new_path=`$CYGPATH -u "$path"`
35618    fi
35619    if test "x$new_path" = x; then
35620      # It's still not found. Now this is an unrecoverable error.
35621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35622$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35623      has_space=`$ECHO "$complete" | $GREP " "`
35624      if test "x$has_space" != x; then
35625        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35626$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35627      fi
35628      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35629    fi
35630  fi
35631
35632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35635  # "foo.exe" is OK but "foo" is an error.
35636  #
35637  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35638  # It is also a way to make sure we got the proper file name for the real test later on.
35639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35640  if test "x$test_shortpath" = x; then
35641    # Short path failed, file does not exist as specified.
35642    # Try adding .exe or .cmd
35643    if test -f "${new_path}.exe"; then
35644      input_to_shortpath="${new_path}.exe"
35645    elif test -f "${new_path}.cmd"; then
35646      input_to_shortpath="${new_path}.cmd"
35647    else
35648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35649$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35650      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35651$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35652      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35653    fi
35654  else
35655    input_to_shortpath="$new_path"
35656  fi
35657
35658  # Call helper function which possibly converts this using DOS-style short mode.
35659  # If so, the updated path is stored in $new_path.
35660  new_path="$input_to_shortpath"
35661
35662  input_path="$input_to_shortpath"
35663  # Check if we need to convert this using DOS-style short mode. If the path
35664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35665  # take no chances and rewrite it.
35666  # Note: m4 eats our [], so we need to use [ and ] instead.
35667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35668  if test "x$has_forbidden_chars" != x; then
35669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35673      # Going to short mode and back again did indeed matter. Since short mode is
35674      # case insensitive, let's make it lowercase to improve readability.
35675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35676      # Now convert it back to Unix-style (cygpath)
35677      input_path=`$CYGPATH -u "$shortmode_path"`
35678      new_path="$input_path"
35679    fi
35680  fi
35681
35682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35683  if test "x$test_cygdrive_prefix" = x; then
35684    # As a simple fix, exclude /usr/bin since it's not a real path.
35685    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35687      # a path prefixed by /cygdrive for fixpath to work.
35688      new_path="$CYGWIN_ROOT_PATH$input_path"
35689    fi
35690  fi
35691
35692  # remove trailing .exe if any
35693  new_path="${new_path/%.exe/}"
35694
35695    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35696
35697  # First separate the path from the arguments. This will split at the first
35698  # space.
35699  complete="$CPP"
35700  path="${complete%% *}"
35701  tmp="$complete EOL"
35702  arguments="${tmp#* }"
35703
35704  # Input might be given as Windows format, start by converting to
35705  # unix format.
35706  new_path="$path"
35707
35708  windows_path="$new_path"
35709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35710    unix_path=`$CYGPATH -u "$windows_path"`
35711    new_path="$unix_path"
35712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35714    new_path="$unix_path"
35715  fi
35716
35717
35718  # Now try to locate executable using which
35719  new_path=`$WHICH "$new_path" 2> /dev/null`
35720
35721  if test "x$new_path" = x; then
35722    # Oops. Which didn't find the executable.
35723    # The splitting of arguments from the executable at a space might have been incorrect,
35724    # since paths with space are more likely in Windows. Give it another try with the whole
35725    # argument.
35726    path="$complete"
35727    arguments="EOL"
35728    new_path="$path"
35729
35730  windows_path="$new_path"
35731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35732    unix_path=`$CYGPATH -u "$windows_path"`
35733    new_path="$unix_path"
35734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35736    new_path="$unix_path"
35737  fi
35738
35739
35740    new_path=`$WHICH "$new_path" 2> /dev/null`
35741    # bat and cmd files are not always considered executable in MSYS causing which
35742    # to not find them
35743    if test "x$new_path" = x \
35744        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35745        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35746      new_path="$path"
35747
35748  windows_path="$new_path"
35749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35750    unix_path=`$CYGPATH -u "$windows_path"`
35751    new_path="$unix_path"
35752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35754    new_path="$unix_path"
35755  fi
35756
35757    fi
35758
35759    if test "x$new_path" = x; then
35760      # It's still not found. Now this is an unrecoverable error.
35761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35762$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35763      has_space=`$ECHO "$complete" | $GREP " "`
35764      if test "x$has_space" != x; then
35765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35767      fi
35768      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35769    fi
35770  fi
35771
35772  # Now new_path has a complete unix path to the binary
35773  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35774    # Keep paths in /bin as-is, but remove trailing .exe if any
35775    new_path="${new_path/%.exe/}"
35776    # Do not save /bin paths to all_fixpath_prefixes!
35777  else
35778    # Not in mixed or Windows style, start by that.
35779    new_path=`cmd //c echo $new_path`
35780
35781  input_path="$new_path"
35782  # Check if we need to convert this using DOS-style short mode. If the path
35783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35784  # take no chances and rewrite it.
35785  # Note: m4 eats our [], so we need to use [ and ] instead.
35786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35787  if test "x$has_forbidden_chars" != x; then
35788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35790  fi
35791
35792    # Output is in $new_path
35793
35794  windows_path="$new_path"
35795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35796    unix_path=`$CYGPATH -u "$windows_path"`
35797    new_path="$unix_path"
35798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35800    new_path="$unix_path"
35801  fi
35802
35803    # remove trailing .exe if any
35804    new_path="${new_path/%.exe/}"
35805
35806    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35807    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35808  fi
35809
35810    else
35811      # We're on a unix platform. Hooray! :)
35812      # First separate the path from the arguments. This will split at the first
35813      # space.
35814      complete="$CPP"
35815      path="${complete%% *}"
35816      tmp="$complete EOL"
35817      arguments="${tmp#* }"
35818
35819      # Cannot rely on the command "which" here since it doesn't always work.
35820      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35821      if test -z "$is_absolute_path"; then
35822        # Path to executable is not absolute. Find it.
35823        IFS_save="$IFS"
35824        IFS=:
35825        for p in $PATH; do
35826          if test -f "$p/$path" && test -x "$p/$path"; then
35827            new_path="$p/$path"
35828            break
35829          fi
35830        done
35831        IFS="$IFS_save"
35832      else
35833        # This is an absolute path, we can use it without further modifications.
35834        new_path="$path"
35835      fi
35836
35837      if test "x$new_path" = x; then
35838        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35839$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35840        has_space=`$ECHO "$complete" | $GREP " "`
35841        if test "x$has_space" != x; then
35842          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35843$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35844        fi
35845        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35846      fi
35847    fi
35848
35849    # Now join together the path and the arguments once again
35850    if test "x$arguments" != xEOL; then
35851      new_complete="$new_path ${arguments% *}"
35852    else
35853      new_complete="$new_path"
35854    fi
35855
35856    if test "x$complete" != "x$new_complete"; then
35857      CPP="$new_complete"
35858      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35859$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35860    fi
35861  fi
35862
35863  ac_ext=cpp
35864ac_cpp='$CXXCPP $CPPFLAGS'
35865ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35866ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35867ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35869$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35870if test -z "$CXXCPP"; then
35871  if ${ac_cv_prog_CXXCPP+:} false; then :
35872  $as_echo_n "(cached) " >&6
35873else
35874      # Double quotes because CXXCPP needs to be expanded
35875    for CXXCPP in "$CXX -E" "/lib/cpp"
35876    do
35877      ac_preproc_ok=false
35878for ac_cxx_preproc_warn_flag in '' yes
35879do
35880  # Use a header file that comes with gcc, so configuring glibc
35881  # with a fresh cross-compiler works.
35882  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35883  # <limits.h> exists even on freestanding compilers.
35884  # On the NeXT, cc -E runs the code through the compiler's parser,
35885  # not just through cpp. "Syntax error" is here to catch this case.
35886  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35887/* end confdefs.h.  */
35888#ifdef __STDC__
35889# include <limits.h>
35890#else
35891# include <assert.h>
35892#endif
35893		     Syntax error
35894_ACEOF
35895if ac_fn_cxx_try_cpp "$LINENO"; then :
35896
35897else
35898  # Broken: fails on valid input.
35899continue
35900fi
35901rm -f conftest.err conftest.i conftest.$ac_ext
35902
35903  # OK, works on sane cases.  Now check whether nonexistent headers
35904  # can be detected and how.
35905  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35906/* end confdefs.h.  */
35907#include <ac_nonexistent.h>
35908_ACEOF
35909if ac_fn_cxx_try_cpp "$LINENO"; then :
35910  # Broken: success on invalid input.
35911continue
35912else
35913  # Passes both tests.
35914ac_preproc_ok=:
35915break
35916fi
35917rm -f conftest.err conftest.i conftest.$ac_ext
35918
35919done
35920# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35921rm -f conftest.i conftest.err conftest.$ac_ext
35922if $ac_preproc_ok; then :
35923  break
35924fi
35925
35926    done
35927    ac_cv_prog_CXXCPP=$CXXCPP
35928
35929fi
35930  CXXCPP=$ac_cv_prog_CXXCPP
35931else
35932  ac_cv_prog_CXXCPP=$CXXCPP
35933fi
35934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35935$as_echo "$CXXCPP" >&6; }
35936ac_preproc_ok=false
35937for ac_cxx_preproc_warn_flag in '' yes
35938do
35939  # Use a header file that comes with gcc, so configuring glibc
35940  # with a fresh cross-compiler works.
35941  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35942  # <limits.h> exists even on freestanding compilers.
35943  # On the NeXT, cc -E runs the code through the compiler's parser,
35944  # not just through cpp. "Syntax error" is here to catch this case.
35945  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35946/* end confdefs.h.  */
35947#ifdef __STDC__
35948# include <limits.h>
35949#else
35950# include <assert.h>
35951#endif
35952		     Syntax error
35953_ACEOF
35954if ac_fn_cxx_try_cpp "$LINENO"; then :
35955
35956else
35957  # Broken: fails on valid input.
35958continue
35959fi
35960rm -f conftest.err conftest.i conftest.$ac_ext
35961
35962  # OK, works on sane cases.  Now check whether nonexistent headers
35963  # can be detected and how.
35964  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35965/* end confdefs.h.  */
35966#include <ac_nonexistent.h>
35967_ACEOF
35968if ac_fn_cxx_try_cpp "$LINENO"; then :
35969  # Broken: success on invalid input.
35970continue
35971else
35972  # Passes both tests.
35973ac_preproc_ok=:
35974break
35975fi
35976rm -f conftest.err conftest.i conftest.$ac_ext
35977
35978done
35979# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35980rm -f conftest.i conftest.err conftest.$ac_ext
35981if $ac_preproc_ok; then :
35982
35983else
35984  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35986as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35987See \`config.log' for more details" "$LINENO" 5; }
35988fi
35989
35990ac_ext=cpp
35991ac_cpp='$CXXCPP $CPPFLAGS'
35992ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35993ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35994ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35995
35996
35997  # Only process if variable expands to non-empty
35998
35999  if test "x$CXXCPP" != x; then
36000    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36001
36002  # First separate the path from the arguments. This will split at the first
36003  # space.
36004  complete="$CXXCPP"
36005  path="${complete%% *}"
36006  tmp="$complete EOL"
36007  arguments="${tmp#* }"
36008
36009  # Input might be given as Windows format, start by converting to
36010  # unix format.
36011  new_path=`$CYGPATH -u "$path"`
36012
36013  # Now try to locate executable using which
36014  new_path=`$WHICH "$new_path" 2> /dev/null`
36015  # bat and cmd files are not always considered executable in cygwin causing which
36016  # to not find them
36017  if test "x$new_path" = x \
36018      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36019      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36020    new_path=`$CYGPATH -u "$path"`
36021  fi
36022  if test "x$new_path" = x; then
36023    # Oops. Which didn't find the executable.
36024    # The splitting of arguments from the executable at a space might have been incorrect,
36025    # since paths with space are more likely in Windows. Give it another try with the whole
36026    # argument.
36027    path="$complete"
36028    arguments="EOL"
36029    new_path=`$CYGPATH -u "$path"`
36030    new_path=`$WHICH "$new_path" 2> /dev/null`
36031    # bat and cmd files are not always considered executable in cygwin causing which
36032    # to not find them
36033    if test "x$new_path" = x \
36034        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36035        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36036      new_path=`$CYGPATH -u "$path"`
36037    fi
36038    if test "x$new_path" = x; then
36039      # It's still not found. Now this is an unrecoverable error.
36040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36041$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36042      has_space=`$ECHO "$complete" | $GREP " "`
36043      if test "x$has_space" != x; then
36044        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36045$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36046      fi
36047      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36048    fi
36049  fi
36050
36051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36054  # "foo.exe" is OK but "foo" is an error.
36055  #
36056  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36057  # It is also a way to make sure we got the proper file name for the real test later on.
36058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36059  if test "x$test_shortpath" = x; then
36060    # Short path failed, file does not exist as specified.
36061    # Try adding .exe or .cmd
36062    if test -f "${new_path}.exe"; then
36063      input_to_shortpath="${new_path}.exe"
36064    elif test -f "${new_path}.cmd"; then
36065      input_to_shortpath="${new_path}.cmd"
36066    else
36067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36068$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36069      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36070$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36071      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36072    fi
36073  else
36074    input_to_shortpath="$new_path"
36075  fi
36076
36077  # Call helper function which possibly converts this using DOS-style short mode.
36078  # If so, the updated path is stored in $new_path.
36079  new_path="$input_to_shortpath"
36080
36081  input_path="$input_to_shortpath"
36082  # Check if we need to convert this using DOS-style short mode. If the path
36083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36084  # take no chances and rewrite it.
36085  # Note: m4 eats our [], so we need to use [ and ] instead.
36086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36087  if test "x$has_forbidden_chars" != x; then
36088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36092      # Going to short mode and back again did indeed matter. Since short mode is
36093      # case insensitive, let's make it lowercase to improve readability.
36094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36095      # Now convert it back to Unix-style (cygpath)
36096      input_path=`$CYGPATH -u "$shortmode_path"`
36097      new_path="$input_path"
36098    fi
36099  fi
36100
36101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36102  if test "x$test_cygdrive_prefix" = x; then
36103    # As a simple fix, exclude /usr/bin since it's not a real path.
36104    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36106      # a path prefixed by /cygdrive for fixpath to work.
36107      new_path="$CYGWIN_ROOT_PATH$input_path"
36108    fi
36109  fi
36110
36111  # remove trailing .exe if any
36112  new_path="${new_path/%.exe/}"
36113
36114    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36115
36116  # First separate the path from the arguments. This will split at the first
36117  # space.
36118  complete="$CXXCPP"
36119  path="${complete%% *}"
36120  tmp="$complete EOL"
36121  arguments="${tmp#* }"
36122
36123  # Input might be given as Windows format, start by converting to
36124  # unix format.
36125  new_path="$path"
36126
36127  windows_path="$new_path"
36128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36129    unix_path=`$CYGPATH -u "$windows_path"`
36130    new_path="$unix_path"
36131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36133    new_path="$unix_path"
36134  fi
36135
36136
36137  # Now try to locate executable using which
36138  new_path=`$WHICH "$new_path" 2> /dev/null`
36139
36140  if test "x$new_path" = x; then
36141    # Oops. Which didn't find the executable.
36142    # The splitting of arguments from the executable at a space might have been incorrect,
36143    # since paths with space are more likely in Windows. Give it another try with the whole
36144    # argument.
36145    path="$complete"
36146    arguments="EOL"
36147    new_path="$path"
36148
36149  windows_path="$new_path"
36150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36151    unix_path=`$CYGPATH -u "$windows_path"`
36152    new_path="$unix_path"
36153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36155    new_path="$unix_path"
36156  fi
36157
36158
36159    new_path=`$WHICH "$new_path" 2> /dev/null`
36160    # bat and cmd files are not always considered executable in MSYS causing which
36161    # to not find them
36162    if test "x$new_path" = x \
36163        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36164        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36165      new_path="$path"
36166
36167  windows_path="$new_path"
36168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36169    unix_path=`$CYGPATH -u "$windows_path"`
36170    new_path="$unix_path"
36171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36173    new_path="$unix_path"
36174  fi
36175
36176    fi
36177
36178    if test "x$new_path" = x; then
36179      # It's still not found. Now this is an unrecoverable error.
36180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36181$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36182      has_space=`$ECHO "$complete" | $GREP " "`
36183      if test "x$has_space" != x; then
36184        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36185$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36186      fi
36187      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36188    fi
36189  fi
36190
36191  # Now new_path has a complete unix path to the binary
36192  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36193    # Keep paths in /bin as-is, but remove trailing .exe if any
36194    new_path="${new_path/%.exe/}"
36195    # Do not save /bin paths to all_fixpath_prefixes!
36196  else
36197    # Not in mixed or Windows style, start by that.
36198    new_path=`cmd //c echo $new_path`
36199
36200  input_path="$new_path"
36201  # Check if we need to convert this using DOS-style short mode. If the path
36202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36203  # take no chances and rewrite it.
36204  # Note: m4 eats our [], so we need to use [ and ] instead.
36205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36206  if test "x$has_forbidden_chars" != x; then
36207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36208    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36209  fi
36210
36211    # Output is in $new_path
36212
36213  windows_path="$new_path"
36214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36215    unix_path=`$CYGPATH -u "$windows_path"`
36216    new_path="$unix_path"
36217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36219    new_path="$unix_path"
36220  fi
36221
36222    # remove trailing .exe if any
36223    new_path="${new_path/%.exe/}"
36224
36225    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36226    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36227  fi
36228
36229    else
36230      # We're on a unix platform. Hooray! :)
36231      # First separate the path from the arguments. This will split at the first
36232      # space.
36233      complete="$CXXCPP"
36234      path="${complete%% *}"
36235      tmp="$complete EOL"
36236      arguments="${tmp#* }"
36237
36238      # Cannot rely on the command "which" here since it doesn't always work.
36239      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36240      if test -z "$is_absolute_path"; then
36241        # Path to executable is not absolute. Find it.
36242        IFS_save="$IFS"
36243        IFS=:
36244        for p in $PATH; do
36245          if test -f "$p/$path" && test -x "$p/$path"; then
36246            new_path="$p/$path"
36247            break
36248          fi
36249        done
36250        IFS="$IFS_save"
36251      else
36252        # This is an absolute path, we can use it without further modifications.
36253        new_path="$path"
36254      fi
36255
36256      if test "x$new_path" = x; then
36257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36258$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36259        has_space=`$ECHO "$complete" | $GREP " "`
36260        if test "x$has_space" != x; then
36261          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36262$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36263        fi
36264        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36265      fi
36266    fi
36267
36268    # Now join together the path and the arguments once again
36269    if test "x$arguments" != xEOL; then
36270      new_complete="$new_path ${arguments% *}"
36271    else
36272      new_complete="$new_path"
36273    fi
36274
36275    if test "x$complete" != "x$new_complete"; then
36276      CXXCPP="$new_complete"
36277      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36278$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36279    fi
36280  fi
36281
36282
36283  #
36284  # Setup the linker (LD)
36285  #
36286  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36287    # In the Microsoft toolchain we have a separate LD command "link".
36288    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36289    # a cygwin program for something completely different.
36290    # Extract the first word of "link", so it can be a program name with args.
36291set dummy link; ac_word=$2
36292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36293$as_echo_n "checking for $ac_word... " >&6; }
36294if ${ac_cv_prog_LD+:} false; then :
36295  $as_echo_n "(cached) " >&6
36296else
36297  if test -n "$LD"; then
36298  ac_cv_prog_LD="$LD" # Let the user override the test.
36299else
36300  ac_prog_rejected=no
36301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36302for as_dir in $PATH
36303do
36304  IFS=$as_save_IFS
36305  test -z "$as_dir" && as_dir=.
36306    for ac_exec_ext in '' $ac_executable_extensions; do
36307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36308    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36309       ac_prog_rejected=yes
36310       continue
36311     fi
36312    ac_cv_prog_LD="link"
36313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36314    break 2
36315  fi
36316done
36317  done
36318IFS=$as_save_IFS
36319
36320if test $ac_prog_rejected = yes; then
36321  # We found a bogon in the path, so make sure we never use it.
36322  set dummy $ac_cv_prog_LD
36323  shift
36324  if test $# != 0; then
36325    # We chose a different compiler from the bogus one.
36326    # However, it has the same basename, so the bogon will be chosen
36327    # first if we set LD to just the basename; use the full file name.
36328    shift
36329    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36330  fi
36331fi
36332fi
36333fi
36334LD=$ac_cv_prog_LD
36335if test -n "$LD"; then
36336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36337$as_echo "$LD" >&6; }
36338else
36339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36340$as_echo "no" >&6; }
36341fi
36342
36343
36344
36345  # Only process if variable expands to non-empty
36346
36347  if test "x$LD" != x; then
36348    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36349
36350  # First separate the path from the arguments. This will split at the first
36351  # space.
36352  complete="$LD"
36353  path="${complete%% *}"
36354  tmp="$complete EOL"
36355  arguments="${tmp#* }"
36356
36357  # Input might be given as Windows format, start by converting to
36358  # unix format.
36359  new_path=`$CYGPATH -u "$path"`
36360
36361  # Now try to locate executable using which
36362  new_path=`$WHICH "$new_path" 2> /dev/null`
36363  # bat and cmd files are not always considered executable in cygwin causing which
36364  # to not find them
36365  if test "x$new_path" = x \
36366      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36367      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36368    new_path=`$CYGPATH -u "$path"`
36369  fi
36370  if test "x$new_path" = x; then
36371    # Oops. Which didn't find the executable.
36372    # The splitting of arguments from the executable at a space might have been incorrect,
36373    # since paths with space are more likely in Windows. Give it another try with the whole
36374    # argument.
36375    path="$complete"
36376    arguments="EOL"
36377    new_path=`$CYGPATH -u "$path"`
36378    new_path=`$WHICH "$new_path" 2> /dev/null`
36379    # bat and cmd files are not always considered executable in cygwin causing which
36380    # to not find them
36381    if test "x$new_path" = x \
36382        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36383        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36384      new_path=`$CYGPATH -u "$path"`
36385    fi
36386    if test "x$new_path" = x; then
36387      # It's still not found. Now this is an unrecoverable error.
36388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36389$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36390      has_space=`$ECHO "$complete" | $GREP " "`
36391      if test "x$has_space" != x; then
36392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36394      fi
36395      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36396    fi
36397  fi
36398
36399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36402  # "foo.exe" is OK but "foo" is an error.
36403  #
36404  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36405  # It is also a way to make sure we got the proper file name for the real test later on.
36406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36407  if test "x$test_shortpath" = x; then
36408    # Short path failed, file does not exist as specified.
36409    # Try adding .exe or .cmd
36410    if test -f "${new_path}.exe"; then
36411      input_to_shortpath="${new_path}.exe"
36412    elif test -f "${new_path}.cmd"; then
36413      input_to_shortpath="${new_path}.cmd"
36414    else
36415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36416$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36417      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36418$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36419      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36420    fi
36421  else
36422    input_to_shortpath="$new_path"
36423  fi
36424
36425  # Call helper function which possibly converts this using DOS-style short mode.
36426  # If so, the updated path is stored in $new_path.
36427  new_path="$input_to_shortpath"
36428
36429  input_path="$input_to_shortpath"
36430  # Check if we need to convert this using DOS-style short mode. If the path
36431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36432  # take no chances and rewrite it.
36433  # Note: m4 eats our [], so we need to use [ and ] instead.
36434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36435  if test "x$has_forbidden_chars" != x; then
36436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36440      # Going to short mode and back again did indeed matter. Since short mode is
36441      # case insensitive, let's make it lowercase to improve readability.
36442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36443      # Now convert it back to Unix-style (cygpath)
36444      input_path=`$CYGPATH -u "$shortmode_path"`
36445      new_path="$input_path"
36446    fi
36447  fi
36448
36449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36450  if test "x$test_cygdrive_prefix" = x; then
36451    # As a simple fix, exclude /usr/bin since it's not a real path.
36452    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36454      # a path prefixed by /cygdrive for fixpath to work.
36455      new_path="$CYGWIN_ROOT_PATH$input_path"
36456    fi
36457  fi
36458
36459  # remove trailing .exe if any
36460  new_path="${new_path/%.exe/}"
36461
36462    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36463
36464  # First separate the path from the arguments. This will split at the first
36465  # space.
36466  complete="$LD"
36467  path="${complete%% *}"
36468  tmp="$complete EOL"
36469  arguments="${tmp#* }"
36470
36471  # Input might be given as Windows format, start by converting to
36472  # unix format.
36473  new_path="$path"
36474
36475  windows_path="$new_path"
36476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36477    unix_path=`$CYGPATH -u "$windows_path"`
36478    new_path="$unix_path"
36479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36481    new_path="$unix_path"
36482  fi
36483
36484
36485  # Now try to locate executable using which
36486  new_path=`$WHICH "$new_path" 2> /dev/null`
36487
36488  if test "x$new_path" = x; then
36489    # Oops. Which didn't find the executable.
36490    # The splitting of arguments from the executable at a space might have been incorrect,
36491    # since paths with space are more likely in Windows. Give it another try with the whole
36492    # argument.
36493    path="$complete"
36494    arguments="EOL"
36495    new_path="$path"
36496
36497  windows_path="$new_path"
36498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36499    unix_path=`$CYGPATH -u "$windows_path"`
36500    new_path="$unix_path"
36501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36503    new_path="$unix_path"
36504  fi
36505
36506
36507    new_path=`$WHICH "$new_path" 2> /dev/null`
36508    # bat and cmd files are not always considered executable in MSYS causing which
36509    # to not find them
36510    if test "x$new_path" = x \
36511        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36512        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36513      new_path="$path"
36514
36515  windows_path="$new_path"
36516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36517    unix_path=`$CYGPATH -u "$windows_path"`
36518    new_path="$unix_path"
36519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36521    new_path="$unix_path"
36522  fi
36523
36524    fi
36525
36526    if test "x$new_path" = x; then
36527      # It's still not found. Now this is an unrecoverable error.
36528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36529$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36530      has_space=`$ECHO "$complete" | $GREP " "`
36531      if test "x$has_space" != x; then
36532        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36533$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36534      fi
36535      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36536    fi
36537  fi
36538
36539  # Now new_path has a complete unix path to the binary
36540  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36541    # Keep paths in /bin as-is, but remove trailing .exe if any
36542    new_path="${new_path/%.exe/}"
36543    # Do not save /bin paths to all_fixpath_prefixes!
36544  else
36545    # Not in mixed or Windows style, start by that.
36546    new_path=`cmd //c echo $new_path`
36547
36548  input_path="$new_path"
36549  # Check if we need to convert this using DOS-style short mode. If the path
36550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36551  # take no chances and rewrite it.
36552  # Note: m4 eats our [], so we need to use [ and ] instead.
36553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36554  if test "x$has_forbidden_chars" != x; then
36555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36557  fi
36558
36559    # Output is in $new_path
36560
36561  windows_path="$new_path"
36562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36563    unix_path=`$CYGPATH -u "$windows_path"`
36564    new_path="$unix_path"
36565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36567    new_path="$unix_path"
36568  fi
36569
36570    # remove trailing .exe if any
36571    new_path="${new_path/%.exe/}"
36572
36573    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36574    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36575  fi
36576
36577    else
36578      # We're on a unix platform. Hooray! :)
36579      # First separate the path from the arguments. This will split at the first
36580      # space.
36581      complete="$LD"
36582      path="${complete%% *}"
36583      tmp="$complete EOL"
36584      arguments="${tmp#* }"
36585
36586      # Cannot rely on the command "which" here since it doesn't always work.
36587      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36588      if test -z "$is_absolute_path"; then
36589        # Path to executable is not absolute. Find it.
36590        IFS_save="$IFS"
36591        IFS=:
36592        for p in $PATH; do
36593          if test -f "$p/$path" && test -x "$p/$path"; then
36594            new_path="$p/$path"
36595            break
36596          fi
36597        done
36598        IFS="$IFS_save"
36599      else
36600        # This is an absolute path, we can use it without further modifications.
36601        new_path="$path"
36602      fi
36603
36604      if test "x$new_path" = x; then
36605        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36606$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36607        has_space=`$ECHO "$complete" | $GREP " "`
36608        if test "x$has_space" != x; then
36609          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36610$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36611        fi
36612        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36613      fi
36614    fi
36615
36616    # Now join together the path and the arguments once again
36617    if test "x$arguments" != xEOL; then
36618      new_complete="$new_path ${arguments% *}"
36619    else
36620      new_complete="$new_path"
36621    fi
36622
36623    if test "x$complete" != "x$new_complete"; then
36624      LD="$new_complete"
36625      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36626$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36627    fi
36628  fi
36629
36630    # Verify that we indeed succeeded with this trick.
36631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36632$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36633    "$LD" --version > /dev/null
36634    if test $? -eq 0 ; then
36635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36636$as_echo "no" >&6; }
36637      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36638    else
36639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36640$as_echo "yes" >&6; }
36641    fi
36642    LDCXX="$LD"
36643  else
36644    # All other toolchains use the compiler to link.
36645    LD="$CC"
36646    LDCXX="$CXX"
36647  fi
36648
36649  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36650
36651
36652  #
36653  # Setup the assembler (AS)
36654  #
36655  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36656
36657
36658  # Publish this variable in the help.
36659
36660
36661  if [ -z "${AS+x}" ]; then
36662    # The variable is not set by user, try to locate tool using the code snippet
36663    for ac_prog in as
36664do
36665  # Extract the first word of "$ac_prog", so it can be a program name with args.
36666set dummy $ac_prog; ac_word=$2
36667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36668$as_echo_n "checking for $ac_word... " >&6; }
36669if ${ac_cv_path_AS+:} false; then :
36670  $as_echo_n "(cached) " >&6
36671else
36672  case $AS in
36673  [\\/]* | ?:[\\/]*)
36674  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36675  ;;
36676  *)
36677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36678for as_dir in $PATH
36679do
36680  IFS=$as_save_IFS
36681  test -z "$as_dir" && as_dir=.
36682    for ac_exec_ext in '' $ac_executable_extensions; do
36683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36684    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36686    break 2
36687  fi
36688done
36689  done
36690IFS=$as_save_IFS
36691
36692  ;;
36693esac
36694fi
36695AS=$ac_cv_path_AS
36696if test -n "$AS"; then
36697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36698$as_echo "$AS" >&6; }
36699else
36700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36701$as_echo "no" >&6; }
36702fi
36703
36704
36705  test -n "$AS" && break
36706done
36707
36708  else
36709    # The variable is set, but is it from the command line or the environment?
36710
36711    # Try to remove the string !AS! from our list.
36712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36714      # If it failed, the variable was not from the command line. Ignore it,
36715      # but warn the user (except for BASH, which is always set by the calling BASH).
36716      if test "xAS" != xBASH; then
36717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36718$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36719      fi
36720      # Try to locate tool using the code snippet
36721      for ac_prog in as
36722do
36723  # Extract the first word of "$ac_prog", so it can be a program name with args.
36724set dummy $ac_prog; ac_word=$2
36725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36726$as_echo_n "checking for $ac_word... " >&6; }
36727if ${ac_cv_path_AS+:} false; then :
36728  $as_echo_n "(cached) " >&6
36729else
36730  case $AS in
36731  [\\/]* | ?:[\\/]*)
36732  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36733  ;;
36734  *)
36735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36736for as_dir in $PATH
36737do
36738  IFS=$as_save_IFS
36739  test -z "$as_dir" && as_dir=.
36740    for ac_exec_ext in '' $ac_executable_extensions; do
36741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36742    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36744    break 2
36745  fi
36746done
36747  done
36748IFS=$as_save_IFS
36749
36750  ;;
36751esac
36752fi
36753AS=$ac_cv_path_AS
36754if test -n "$AS"; then
36755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36756$as_echo "$AS" >&6; }
36757else
36758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36759$as_echo "no" >&6; }
36760fi
36761
36762
36763  test -n "$AS" && break
36764done
36765
36766    else
36767      # If it succeeded, then it was overridden by the user. We will use it
36768      # for the tool.
36769
36770      # First remove it from the list of overridden variables, so we can test
36771      # for unknown variables in the end.
36772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36773
36774      # Check if we try to supply an empty value
36775      if test "x$AS" = x; then
36776        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36777$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36779$as_echo_n "checking for AS... " >&6; }
36780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36781$as_echo "disabled" >&6; }
36782      else
36783        # Check if the provided tool contains a complete path.
36784        tool_specified="$AS"
36785        tool_basename="${tool_specified##*/}"
36786        if test "x$tool_basename" = "x$tool_specified"; then
36787          # A command without a complete path is provided, search $PATH.
36788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36789$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36790          # Extract the first word of "$tool_basename", so it can be a program name with args.
36791set dummy $tool_basename; ac_word=$2
36792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36793$as_echo_n "checking for $ac_word... " >&6; }
36794if ${ac_cv_path_AS+:} false; then :
36795  $as_echo_n "(cached) " >&6
36796else
36797  case $AS in
36798  [\\/]* | ?:[\\/]*)
36799  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36800  ;;
36801  *)
36802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36803for as_dir in $PATH
36804do
36805  IFS=$as_save_IFS
36806  test -z "$as_dir" && as_dir=.
36807    for ac_exec_ext in '' $ac_executable_extensions; do
36808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36809    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36811    break 2
36812  fi
36813done
36814  done
36815IFS=$as_save_IFS
36816
36817  ;;
36818esac
36819fi
36820AS=$ac_cv_path_AS
36821if test -n "$AS"; then
36822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36823$as_echo "$AS" >&6; }
36824else
36825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36826$as_echo "no" >&6; }
36827fi
36828
36829
36830          if test "x$AS" = x; then
36831            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36832          fi
36833        else
36834          # Otherwise we believe it is a complete path. Use it as it is.
36835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36836$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36837          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36838$as_echo_n "checking for AS... " >&6; }
36839          if test ! -x "$tool_specified"; then
36840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36841$as_echo "not found" >&6; }
36842            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36843          fi
36844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36845$as_echo "$tool_specified" >&6; }
36846        fi
36847      fi
36848    fi
36849
36850  fi
36851
36852
36853
36854  # Only process if variable expands to non-empty
36855
36856  if test "x$AS" != x; then
36857    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36858
36859  # First separate the path from the arguments. This will split at the first
36860  # space.
36861  complete="$AS"
36862  path="${complete%% *}"
36863  tmp="$complete EOL"
36864  arguments="${tmp#* }"
36865
36866  # Input might be given as Windows format, start by converting to
36867  # unix format.
36868  new_path=`$CYGPATH -u "$path"`
36869
36870  # Now try to locate executable using which
36871  new_path=`$WHICH "$new_path" 2> /dev/null`
36872  # bat and cmd files are not always considered executable in cygwin causing which
36873  # to not find them
36874  if test "x$new_path" = x \
36875      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36876      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36877    new_path=`$CYGPATH -u "$path"`
36878  fi
36879  if test "x$new_path" = x; then
36880    # Oops. Which didn't find the executable.
36881    # The splitting of arguments from the executable at a space might have been incorrect,
36882    # since paths with space are more likely in Windows. Give it another try with the whole
36883    # argument.
36884    path="$complete"
36885    arguments="EOL"
36886    new_path=`$CYGPATH -u "$path"`
36887    new_path=`$WHICH "$new_path" 2> /dev/null`
36888    # bat and cmd files are not always considered executable in cygwin causing which
36889    # to not find them
36890    if test "x$new_path" = x \
36891        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36892        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36893      new_path=`$CYGPATH -u "$path"`
36894    fi
36895    if test "x$new_path" = x; then
36896      # It's still not found. Now this is an unrecoverable error.
36897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36898$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36899      has_space=`$ECHO "$complete" | $GREP " "`
36900      if test "x$has_space" != x; then
36901        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36902$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36903      fi
36904      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36905    fi
36906  fi
36907
36908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36911  # "foo.exe" is OK but "foo" is an error.
36912  #
36913  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36914  # It is also a way to make sure we got the proper file name for the real test later on.
36915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36916  if test "x$test_shortpath" = x; then
36917    # Short path failed, file does not exist as specified.
36918    # Try adding .exe or .cmd
36919    if test -f "${new_path}.exe"; then
36920      input_to_shortpath="${new_path}.exe"
36921    elif test -f "${new_path}.cmd"; then
36922      input_to_shortpath="${new_path}.cmd"
36923    else
36924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36925$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36926      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36927$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36928      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36929    fi
36930  else
36931    input_to_shortpath="$new_path"
36932  fi
36933
36934  # Call helper function which possibly converts this using DOS-style short mode.
36935  # If so, the updated path is stored in $new_path.
36936  new_path="$input_to_shortpath"
36937
36938  input_path="$input_to_shortpath"
36939  # Check if we need to convert this using DOS-style short mode. If the path
36940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36941  # take no chances and rewrite it.
36942  # Note: m4 eats our [], so we need to use [ and ] instead.
36943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36944  if test "x$has_forbidden_chars" != x; then
36945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36949      # Going to short mode and back again did indeed matter. Since short mode is
36950      # case insensitive, let's make it lowercase to improve readability.
36951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36952      # Now convert it back to Unix-style (cygpath)
36953      input_path=`$CYGPATH -u "$shortmode_path"`
36954      new_path="$input_path"
36955    fi
36956  fi
36957
36958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36959  if test "x$test_cygdrive_prefix" = x; then
36960    # As a simple fix, exclude /usr/bin since it's not a real path.
36961    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36963      # a path prefixed by /cygdrive for fixpath to work.
36964      new_path="$CYGWIN_ROOT_PATH$input_path"
36965    fi
36966  fi
36967
36968  # remove trailing .exe if any
36969  new_path="${new_path/%.exe/}"
36970
36971    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36972
36973  # First separate the path from the arguments. This will split at the first
36974  # space.
36975  complete="$AS"
36976  path="${complete%% *}"
36977  tmp="$complete EOL"
36978  arguments="${tmp#* }"
36979
36980  # Input might be given as Windows format, start by converting to
36981  # unix format.
36982  new_path="$path"
36983
36984  windows_path="$new_path"
36985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36986    unix_path=`$CYGPATH -u "$windows_path"`
36987    new_path="$unix_path"
36988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36990    new_path="$unix_path"
36991  fi
36992
36993
36994  # Now try to locate executable using which
36995  new_path=`$WHICH "$new_path" 2> /dev/null`
36996
36997  if test "x$new_path" = x; then
36998    # Oops. Which didn't find the executable.
36999    # The splitting of arguments from the executable at a space might have been incorrect,
37000    # since paths with space are more likely in Windows. Give it another try with the whole
37001    # argument.
37002    path="$complete"
37003    arguments="EOL"
37004    new_path="$path"
37005
37006  windows_path="$new_path"
37007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37008    unix_path=`$CYGPATH -u "$windows_path"`
37009    new_path="$unix_path"
37010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37012    new_path="$unix_path"
37013  fi
37014
37015
37016    new_path=`$WHICH "$new_path" 2> /dev/null`
37017    # bat and cmd files are not always considered executable in MSYS causing which
37018    # to not find them
37019    if test "x$new_path" = x \
37020        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37021        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37022      new_path="$path"
37023
37024  windows_path="$new_path"
37025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37026    unix_path=`$CYGPATH -u "$windows_path"`
37027    new_path="$unix_path"
37028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37030    new_path="$unix_path"
37031  fi
37032
37033    fi
37034
37035    if test "x$new_path" = x; then
37036      # It's still not found. Now this is an unrecoverable error.
37037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37038$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37039      has_space=`$ECHO "$complete" | $GREP " "`
37040      if test "x$has_space" != x; then
37041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37043      fi
37044      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37045    fi
37046  fi
37047
37048  # Now new_path has a complete unix path to the binary
37049  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37050    # Keep paths in /bin as-is, but remove trailing .exe if any
37051    new_path="${new_path/%.exe/}"
37052    # Do not save /bin paths to all_fixpath_prefixes!
37053  else
37054    # Not in mixed or Windows style, start by that.
37055    new_path=`cmd //c echo $new_path`
37056
37057  input_path="$new_path"
37058  # Check if we need to convert this using DOS-style short mode. If the path
37059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37060  # take no chances and rewrite it.
37061  # Note: m4 eats our [], so we need to use [ and ] instead.
37062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37063  if test "x$has_forbidden_chars" != x; then
37064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37066  fi
37067
37068    # Output is in $new_path
37069
37070  windows_path="$new_path"
37071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37072    unix_path=`$CYGPATH -u "$windows_path"`
37073    new_path="$unix_path"
37074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37076    new_path="$unix_path"
37077  fi
37078
37079    # remove trailing .exe if any
37080    new_path="${new_path/%.exe/}"
37081
37082    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37083    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37084  fi
37085
37086    else
37087      # We're on a unix platform. Hooray! :)
37088      # First separate the path from the arguments. This will split at the first
37089      # space.
37090      complete="$AS"
37091      path="${complete%% *}"
37092      tmp="$complete EOL"
37093      arguments="${tmp#* }"
37094
37095      # Cannot rely on the command "which" here since it doesn't always work.
37096      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37097      if test -z "$is_absolute_path"; then
37098        # Path to executable is not absolute. Find it.
37099        IFS_save="$IFS"
37100        IFS=:
37101        for p in $PATH; do
37102          if test -f "$p/$path" && test -x "$p/$path"; then
37103            new_path="$p/$path"
37104            break
37105          fi
37106        done
37107        IFS="$IFS_save"
37108      else
37109        # This is an absolute path, we can use it without further modifications.
37110        new_path="$path"
37111      fi
37112
37113      if test "x$new_path" = x; then
37114        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37115$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37116        has_space=`$ECHO "$complete" | $GREP " "`
37117        if test "x$has_space" != x; then
37118          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37119$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37120        fi
37121        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37122      fi
37123    fi
37124
37125    # Now join together the path and the arguments once again
37126    if test "x$arguments" != xEOL; then
37127      new_complete="$new_path ${arguments% *}"
37128    else
37129      new_complete="$new_path"
37130    fi
37131
37132    if test "x$complete" != "x$new_complete"; then
37133      AS="$new_complete"
37134      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37135$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37136    fi
37137  fi
37138
37139    if test "x$AS" = x; then
37140      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37141    fi
37142  else
37143    # FIXME: is this correct for microsoft?
37144    AS="$CC -c"
37145  fi
37146
37147
37148  #
37149  # Setup the archiver (AR)
37150  #
37151  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37152    # The corresponding ar tool is lib.exe (used to create static libraries)
37153    # Extract the first word of "lib", so it can be a program name with args.
37154set dummy lib; ac_word=$2
37155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37156$as_echo_n "checking for $ac_word... " >&6; }
37157if ${ac_cv_prog_AR+:} false; then :
37158  $as_echo_n "(cached) " >&6
37159else
37160  if test -n "$AR"; then
37161  ac_cv_prog_AR="$AR" # Let the user override the test.
37162else
37163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37164for as_dir in $PATH
37165do
37166  IFS=$as_save_IFS
37167  test -z "$as_dir" && as_dir=.
37168    for ac_exec_ext in '' $ac_executable_extensions; do
37169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37170    ac_cv_prog_AR="lib"
37171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37172    break 2
37173  fi
37174done
37175  done
37176IFS=$as_save_IFS
37177
37178fi
37179fi
37180AR=$ac_cv_prog_AR
37181if test -n "$AR"; then
37182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37183$as_echo "$AR" >&6; }
37184else
37185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37186$as_echo "no" >&6; }
37187fi
37188
37189
37190  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37191
37192
37193  # Publish this variable in the help.
37194
37195
37196  if [ -z "${AR+x}" ]; then
37197    # The variable is not set by user, try to locate tool using the code snippet
37198    if test -n "$ac_tool_prefix"; then
37199  for ac_prog in ar gcc-ar
37200  do
37201    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37202set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37204$as_echo_n "checking for $ac_word... " >&6; }
37205if ${ac_cv_prog_AR+:} false; then :
37206  $as_echo_n "(cached) " >&6
37207else
37208  if test -n "$AR"; then
37209  ac_cv_prog_AR="$AR" # Let the user override the test.
37210else
37211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37212for as_dir in $PATH
37213do
37214  IFS=$as_save_IFS
37215  test -z "$as_dir" && as_dir=.
37216    for ac_exec_ext in '' $ac_executable_extensions; do
37217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37218    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37220    break 2
37221  fi
37222done
37223  done
37224IFS=$as_save_IFS
37225
37226fi
37227fi
37228AR=$ac_cv_prog_AR
37229if test -n "$AR"; then
37230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37231$as_echo "$AR" >&6; }
37232else
37233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37234$as_echo "no" >&6; }
37235fi
37236
37237
37238    test -n "$AR" && break
37239  done
37240fi
37241if test -z "$AR"; then
37242  ac_ct_AR=$AR
37243  for ac_prog in ar gcc-ar
37244do
37245  # Extract the first word of "$ac_prog", so it can be a program name with args.
37246set dummy $ac_prog; ac_word=$2
37247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37248$as_echo_n "checking for $ac_word... " >&6; }
37249if ${ac_cv_prog_ac_ct_AR+:} false; then :
37250  $as_echo_n "(cached) " >&6
37251else
37252  if test -n "$ac_ct_AR"; then
37253  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37254else
37255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37256for as_dir in $PATH
37257do
37258  IFS=$as_save_IFS
37259  test -z "$as_dir" && as_dir=.
37260    for ac_exec_ext in '' $ac_executable_extensions; do
37261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37262    ac_cv_prog_ac_ct_AR="$ac_prog"
37263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37264    break 2
37265  fi
37266done
37267  done
37268IFS=$as_save_IFS
37269
37270fi
37271fi
37272ac_ct_AR=$ac_cv_prog_ac_ct_AR
37273if test -n "$ac_ct_AR"; then
37274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37275$as_echo "$ac_ct_AR" >&6; }
37276else
37277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37278$as_echo "no" >&6; }
37279fi
37280
37281
37282  test -n "$ac_ct_AR" && break
37283done
37284
37285  if test "x$ac_ct_AR" = x; then
37286    AR=""
37287  else
37288    case $cross_compiling:$ac_tool_warned in
37289yes:)
37290{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37291$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37292ac_tool_warned=yes ;;
37293esac
37294    AR=$ac_ct_AR
37295  fi
37296fi
37297
37298  else
37299    # The variable is set, but is it from the command line or the environment?
37300
37301    # Try to remove the string !AR! from our list.
37302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37304      # If it failed, the variable was not from the command line. Ignore it,
37305      # but warn the user (except for BASH, which is always set by the calling BASH).
37306      if test "xAR" != xBASH; then
37307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37308$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37309      fi
37310      # Try to locate tool using the code snippet
37311      if test -n "$ac_tool_prefix"; then
37312  for ac_prog in ar gcc-ar
37313  do
37314    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37315set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37317$as_echo_n "checking for $ac_word... " >&6; }
37318if ${ac_cv_prog_AR+:} false; then :
37319  $as_echo_n "(cached) " >&6
37320else
37321  if test -n "$AR"; then
37322  ac_cv_prog_AR="$AR" # Let the user override the test.
37323else
37324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37325for as_dir in $PATH
37326do
37327  IFS=$as_save_IFS
37328  test -z "$as_dir" && as_dir=.
37329    for ac_exec_ext in '' $ac_executable_extensions; do
37330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37331    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37333    break 2
37334  fi
37335done
37336  done
37337IFS=$as_save_IFS
37338
37339fi
37340fi
37341AR=$ac_cv_prog_AR
37342if test -n "$AR"; then
37343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37344$as_echo "$AR" >&6; }
37345else
37346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37347$as_echo "no" >&6; }
37348fi
37349
37350
37351    test -n "$AR" && break
37352  done
37353fi
37354if test -z "$AR"; then
37355  ac_ct_AR=$AR
37356  for ac_prog in ar gcc-ar
37357do
37358  # Extract the first word of "$ac_prog", so it can be a program name with args.
37359set dummy $ac_prog; ac_word=$2
37360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37361$as_echo_n "checking for $ac_word... " >&6; }
37362if ${ac_cv_prog_ac_ct_AR+:} false; then :
37363  $as_echo_n "(cached) " >&6
37364else
37365  if test -n "$ac_ct_AR"; then
37366  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37367else
37368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37369for as_dir in $PATH
37370do
37371  IFS=$as_save_IFS
37372  test -z "$as_dir" && as_dir=.
37373    for ac_exec_ext in '' $ac_executable_extensions; do
37374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37375    ac_cv_prog_ac_ct_AR="$ac_prog"
37376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37377    break 2
37378  fi
37379done
37380  done
37381IFS=$as_save_IFS
37382
37383fi
37384fi
37385ac_ct_AR=$ac_cv_prog_ac_ct_AR
37386if test -n "$ac_ct_AR"; then
37387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37388$as_echo "$ac_ct_AR" >&6; }
37389else
37390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37391$as_echo "no" >&6; }
37392fi
37393
37394
37395  test -n "$ac_ct_AR" && break
37396done
37397
37398  if test "x$ac_ct_AR" = x; then
37399    AR=""
37400  else
37401    case $cross_compiling:$ac_tool_warned in
37402yes:)
37403{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37404$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37405ac_tool_warned=yes ;;
37406esac
37407    AR=$ac_ct_AR
37408  fi
37409fi
37410
37411    else
37412      # If it succeeded, then it was overridden by the user. We will use it
37413      # for the tool.
37414
37415      # First remove it from the list of overridden variables, so we can test
37416      # for unknown variables in the end.
37417      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37418
37419      # Check if we try to supply an empty value
37420      if test "x$AR" = x; then
37421        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37422$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37423        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37424$as_echo_n "checking for AR... " >&6; }
37425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37426$as_echo "disabled" >&6; }
37427      else
37428        # Check if the provided tool contains a complete path.
37429        tool_specified="$AR"
37430        tool_basename="${tool_specified##*/}"
37431        if test "x$tool_basename" = "x$tool_specified"; then
37432          # A command without a complete path is provided, search $PATH.
37433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37434$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37435          # Extract the first word of "$tool_basename", so it can be a program name with args.
37436set dummy $tool_basename; ac_word=$2
37437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37438$as_echo_n "checking for $ac_word... " >&6; }
37439if ${ac_cv_path_AR+:} false; then :
37440  $as_echo_n "(cached) " >&6
37441else
37442  case $AR in
37443  [\\/]* | ?:[\\/]*)
37444  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37445  ;;
37446  *)
37447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37448for as_dir in $PATH
37449do
37450  IFS=$as_save_IFS
37451  test -z "$as_dir" && as_dir=.
37452    for ac_exec_ext in '' $ac_executable_extensions; do
37453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37454    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37456    break 2
37457  fi
37458done
37459  done
37460IFS=$as_save_IFS
37461
37462  ;;
37463esac
37464fi
37465AR=$ac_cv_path_AR
37466if test -n "$AR"; then
37467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37468$as_echo "$AR" >&6; }
37469else
37470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37471$as_echo "no" >&6; }
37472fi
37473
37474
37475          if test "x$AR" = x; then
37476            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37477          fi
37478        else
37479          # Otherwise we believe it is a complete path. Use it as it is.
37480          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37481$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37482          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37483$as_echo_n "checking for AR... " >&6; }
37484          if test ! -x "$tool_specified"; then
37485            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37486$as_echo "not found" >&6; }
37487            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37488          fi
37489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37490$as_echo "$tool_specified" >&6; }
37491        fi
37492      fi
37493    fi
37494
37495  fi
37496
37497
37498  else
37499
37500
37501  # Publish this variable in the help.
37502
37503
37504  if [ -z "${AR+x}" ]; then
37505    # The variable is not set by user, try to locate tool using the code snippet
37506    if test -n "$ac_tool_prefix"; then
37507  for ac_prog in ar
37508  do
37509    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37510set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37512$as_echo_n "checking for $ac_word... " >&6; }
37513if ${ac_cv_prog_AR+:} false; then :
37514  $as_echo_n "(cached) " >&6
37515else
37516  if test -n "$AR"; then
37517  ac_cv_prog_AR="$AR" # Let the user override the test.
37518else
37519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37520for as_dir in $PATH
37521do
37522  IFS=$as_save_IFS
37523  test -z "$as_dir" && as_dir=.
37524    for ac_exec_ext in '' $ac_executable_extensions; do
37525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37526    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37528    break 2
37529  fi
37530done
37531  done
37532IFS=$as_save_IFS
37533
37534fi
37535fi
37536AR=$ac_cv_prog_AR
37537if test -n "$AR"; then
37538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37539$as_echo "$AR" >&6; }
37540else
37541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37542$as_echo "no" >&6; }
37543fi
37544
37545
37546    test -n "$AR" && break
37547  done
37548fi
37549if test -z "$AR"; then
37550  ac_ct_AR=$AR
37551  for ac_prog in ar
37552do
37553  # Extract the first word of "$ac_prog", so it can be a program name with args.
37554set dummy $ac_prog; ac_word=$2
37555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37556$as_echo_n "checking for $ac_word... " >&6; }
37557if ${ac_cv_prog_ac_ct_AR+:} false; then :
37558  $as_echo_n "(cached) " >&6
37559else
37560  if test -n "$ac_ct_AR"; then
37561  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37562else
37563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37564for as_dir in $PATH
37565do
37566  IFS=$as_save_IFS
37567  test -z "$as_dir" && as_dir=.
37568    for ac_exec_ext in '' $ac_executable_extensions; do
37569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37570    ac_cv_prog_ac_ct_AR="$ac_prog"
37571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37572    break 2
37573  fi
37574done
37575  done
37576IFS=$as_save_IFS
37577
37578fi
37579fi
37580ac_ct_AR=$ac_cv_prog_ac_ct_AR
37581if test -n "$ac_ct_AR"; then
37582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37583$as_echo "$ac_ct_AR" >&6; }
37584else
37585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37586$as_echo "no" >&6; }
37587fi
37588
37589
37590  test -n "$ac_ct_AR" && break
37591done
37592
37593  if test "x$ac_ct_AR" = x; then
37594    AR=""
37595  else
37596    case $cross_compiling:$ac_tool_warned in
37597yes:)
37598{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37599$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37600ac_tool_warned=yes ;;
37601esac
37602    AR=$ac_ct_AR
37603  fi
37604fi
37605
37606  else
37607    # The variable is set, but is it from the command line or the environment?
37608
37609    # Try to remove the string !AR! from our list.
37610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37612      # If it failed, the variable was not from the command line. Ignore it,
37613      # but warn the user (except for BASH, which is always set by the calling BASH).
37614      if test "xAR" != xBASH; then
37615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37616$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37617      fi
37618      # Try to locate tool using the code snippet
37619      if test -n "$ac_tool_prefix"; then
37620  for ac_prog in ar
37621  do
37622    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37623set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37625$as_echo_n "checking for $ac_word... " >&6; }
37626if ${ac_cv_prog_AR+:} false; then :
37627  $as_echo_n "(cached) " >&6
37628else
37629  if test -n "$AR"; then
37630  ac_cv_prog_AR="$AR" # Let the user override the test.
37631else
37632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37633for as_dir in $PATH
37634do
37635  IFS=$as_save_IFS
37636  test -z "$as_dir" && as_dir=.
37637    for ac_exec_ext in '' $ac_executable_extensions; do
37638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37639    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37641    break 2
37642  fi
37643done
37644  done
37645IFS=$as_save_IFS
37646
37647fi
37648fi
37649AR=$ac_cv_prog_AR
37650if test -n "$AR"; then
37651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37652$as_echo "$AR" >&6; }
37653else
37654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37655$as_echo "no" >&6; }
37656fi
37657
37658
37659    test -n "$AR" && break
37660  done
37661fi
37662if test -z "$AR"; then
37663  ac_ct_AR=$AR
37664  for ac_prog in ar
37665do
37666  # Extract the first word of "$ac_prog", so it can be a program name with args.
37667set dummy $ac_prog; ac_word=$2
37668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37669$as_echo_n "checking for $ac_word... " >&6; }
37670if ${ac_cv_prog_ac_ct_AR+:} false; then :
37671  $as_echo_n "(cached) " >&6
37672else
37673  if test -n "$ac_ct_AR"; then
37674  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37675else
37676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37677for as_dir in $PATH
37678do
37679  IFS=$as_save_IFS
37680  test -z "$as_dir" && as_dir=.
37681    for ac_exec_ext in '' $ac_executable_extensions; do
37682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37683    ac_cv_prog_ac_ct_AR="$ac_prog"
37684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37685    break 2
37686  fi
37687done
37688  done
37689IFS=$as_save_IFS
37690
37691fi
37692fi
37693ac_ct_AR=$ac_cv_prog_ac_ct_AR
37694if test -n "$ac_ct_AR"; then
37695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37696$as_echo "$ac_ct_AR" >&6; }
37697else
37698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37699$as_echo "no" >&6; }
37700fi
37701
37702
37703  test -n "$ac_ct_AR" && break
37704done
37705
37706  if test "x$ac_ct_AR" = x; then
37707    AR=""
37708  else
37709    case $cross_compiling:$ac_tool_warned in
37710yes:)
37711{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37712$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37713ac_tool_warned=yes ;;
37714esac
37715    AR=$ac_ct_AR
37716  fi
37717fi
37718
37719    else
37720      # If it succeeded, then it was overridden by the user. We will use it
37721      # for the tool.
37722
37723      # First remove it from the list of overridden variables, so we can test
37724      # for unknown variables in the end.
37725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37726
37727      # Check if we try to supply an empty value
37728      if test "x$AR" = x; then
37729        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37730$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37731        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37732$as_echo_n "checking for AR... " >&6; }
37733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37734$as_echo "disabled" >&6; }
37735      else
37736        # Check if the provided tool contains a complete path.
37737        tool_specified="$AR"
37738        tool_basename="${tool_specified##*/}"
37739        if test "x$tool_basename" = "x$tool_specified"; then
37740          # A command without a complete path is provided, search $PATH.
37741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37742$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37743          # Extract the first word of "$tool_basename", so it can be a program name with args.
37744set dummy $tool_basename; ac_word=$2
37745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37746$as_echo_n "checking for $ac_word... " >&6; }
37747if ${ac_cv_path_AR+:} false; then :
37748  $as_echo_n "(cached) " >&6
37749else
37750  case $AR in
37751  [\\/]* | ?:[\\/]*)
37752  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37753  ;;
37754  *)
37755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37756for as_dir in $PATH
37757do
37758  IFS=$as_save_IFS
37759  test -z "$as_dir" && as_dir=.
37760    for ac_exec_ext in '' $ac_executable_extensions; do
37761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37762    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37764    break 2
37765  fi
37766done
37767  done
37768IFS=$as_save_IFS
37769
37770  ;;
37771esac
37772fi
37773AR=$ac_cv_path_AR
37774if test -n "$AR"; then
37775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37776$as_echo "$AR" >&6; }
37777else
37778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37779$as_echo "no" >&6; }
37780fi
37781
37782
37783          if test "x$AR" = x; then
37784            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37785          fi
37786        else
37787          # Otherwise we believe it is a complete path. Use it as it is.
37788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37789$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37790          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37791$as_echo_n "checking for AR... " >&6; }
37792          if test ! -x "$tool_specified"; then
37793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37794$as_echo "not found" >&6; }
37795            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37796          fi
37797          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37798$as_echo "$tool_specified" >&6; }
37799        fi
37800      fi
37801    fi
37802
37803  fi
37804
37805
37806  fi
37807
37808  # Only process if variable expands to non-empty
37809
37810  if test "x$AR" != x; then
37811    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37812
37813  # First separate the path from the arguments. This will split at the first
37814  # space.
37815  complete="$AR"
37816  path="${complete%% *}"
37817  tmp="$complete EOL"
37818  arguments="${tmp#* }"
37819
37820  # Input might be given as Windows format, start by converting to
37821  # unix format.
37822  new_path=`$CYGPATH -u "$path"`
37823
37824  # Now try to locate executable using which
37825  new_path=`$WHICH "$new_path" 2> /dev/null`
37826  # bat and cmd files are not always considered executable in cygwin causing which
37827  # to not find them
37828  if test "x$new_path" = x \
37829      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37830      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37831    new_path=`$CYGPATH -u "$path"`
37832  fi
37833  if test "x$new_path" = x; then
37834    # Oops. Which didn't find the executable.
37835    # The splitting of arguments from the executable at a space might have been incorrect,
37836    # since paths with space are more likely in Windows. Give it another try with the whole
37837    # argument.
37838    path="$complete"
37839    arguments="EOL"
37840    new_path=`$CYGPATH -u "$path"`
37841    new_path=`$WHICH "$new_path" 2> /dev/null`
37842    # bat and cmd files are not always considered executable in cygwin causing which
37843    # to not find them
37844    if test "x$new_path" = x \
37845        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37846        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37847      new_path=`$CYGPATH -u "$path"`
37848    fi
37849    if test "x$new_path" = x; then
37850      # It's still not found. Now this is an unrecoverable error.
37851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37852$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37853      has_space=`$ECHO "$complete" | $GREP " "`
37854      if test "x$has_space" != x; then
37855        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37856$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37857      fi
37858      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37859    fi
37860  fi
37861
37862  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37863  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37864  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37865  # "foo.exe" is OK but "foo" is an error.
37866  #
37867  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37868  # It is also a way to make sure we got the proper file name for the real test later on.
37869  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37870  if test "x$test_shortpath" = x; then
37871    # Short path failed, file does not exist as specified.
37872    # Try adding .exe or .cmd
37873    if test -f "${new_path}.exe"; then
37874      input_to_shortpath="${new_path}.exe"
37875    elif test -f "${new_path}.cmd"; then
37876      input_to_shortpath="${new_path}.cmd"
37877    else
37878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37879$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37880      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37881$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37882      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37883    fi
37884  else
37885    input_to_shortpath="$new_path"
37886  fi
37887
37888  # Call helper function which possibly converts this using DOS-style short mode.
37889  # If so, the updated path is stored in $new_path.
37890  new_path="$input_to_shortpath"
37891
37892  input_path="$input_to_shortpath"
37893  # Check if we need to convert this using DOS-style short mode. If the path
37894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37895  # take no chances and rewrite it.
37896  # Note: m4 eats our [], so we need to use [ and ] instead.
37897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37898  if test "x$has_forbidden_chars" != x; then
37899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37900    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37901    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37902    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37903      # Going to short mode and back again did indeed matter. Since short mode is
37904      # case insensitive, let's make it lowercase to improve readability.
37905      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37906      # Now convert it back to Unix-style (cygpath)
37907      input_path=`$CYGPATH -u "$shortmode_path"`
37908      new_path="$input_path"
37909    fi
37910  fi
37911
37912  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37913  if test "x$test_cygdrive_prefix" = x; then
37914    # As a simple fix, exclude /usr/bin since it's not a real path.
37915    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37916      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37917      # a path prefixed by /cygdrive for fixpath to work.
37918      new_path="$CYGWIN_ROOT_PATH$input_path"
37919    fi
37920  fi
37921
37922  # remove trailing .exe if any
37923  new_path="${new_path/%.exe/}"
37924
37925    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37926
37927  # First separate the path from the arguments. This will split at the first
37928  # space.
37929  complete="$AR"
37930  path="${complete%% *}"
37931  tmp="$complete EOL"
37932  arguments="${tmp#* }"
37933
37934  # Input might be given as Windows format, start by converting to
37935  # unix format.
37936  new_path="$path"
37937
37938  windows_path="$new_path"
37939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37940    unix_path=`$CYGPATH -u "$windows_path"`
37941    new_path="$unix_path"
37942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37944    new_path="$unix_path"
37945  fi
37946
37947
37948  # Now try to locate executable using which
37949  new_path=`$WHICH "$new_path" 2> /dev/null`
37950
37951  if test "x$new_path" = x; then
37952    # Oops. Which didn't find the executable.
37953    # The splitting of arguments from the executable at a space might have been incorrect,
37954    # since paths with space are more likely in Windows. Give it another try with the whole
37955    # argument.
37956    path="$complete"
37957    arguments="EOL"
37958    new_path="$path"
37959
37960  windows_path="$new_path"
37961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37962    unix_path=`$CYGPATH -u "$windows_path"`
37963    new_path="$unix_path"
37964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37966    new_path="$unix_path"
37967  fi
37968
37969
37970    new_path=`$WHICH "$new_path" 2> /dev/null`
37971    # bat and cmd files are not always considered executable in MSYS causing which
37972    # to not find them
37973    if test "x$new_path" = x \
37974        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37975        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37976      new_path="$path"
37977
37978  windows_path="$new_path"
37979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37980    unix_path=`$CYGPATH -u "$windows_path"`
37981    new_path="$unix_path"
37982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37984    new_path="$unix_path"
37985  fi
37986
37987    fi
37988
37989    if test "x$new_path" = x; then
37990      # It's still not found. Now this is an unrecoverable error.
37991      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37992$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37993      has_space=`$ECHO "$complete" | $GREP " "`
37994      if test "x$has_space" != x; then
37995        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37996$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37997      fi
37998      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37999    fi
38000  fi
38001
38002  # Now new_path has a complete unix path to the binary
38003  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38004    # Keep paths in /bin as-is, but remove trailing .exe if any
38005    new_path="${new_path/%.exe/}"
38006    # Do not save /bin paths to all_fixpath_prefixes!
38007  else
38008    # Not in mixed or Windows style, start by that.
38009    new_path=`cmd //c echo $new_path`
38010
38011  input_path="$new_path"
38012  # Check if we need to convert this using DOS-style short mode. If the path
38013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38014  # take no chances and rewrite it.
38015  # Note: m4 eats our [], so we need to use [ and ] instead.
38016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38017  if test "x$has_forbidden_chars" != x; then
38018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38020  fi
38021
38022    # Output is in $new_path
38023
38024  windows_path="$new_path"
38025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38026    unix_path=`$CYGPATH -u "$windows_path"`
38027    new_path="$unix_path"
38028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38029    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38030    new_path="$unix_path"
38031  fi
38032
38033    # remove trailing .exe if any
38034    new_path="${new_path/%.exe/}"
38035
38036    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38037    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38038  fi
38039
38040    else
38041      # We're on a unix platform. Hooray! :)
38042      # First separate the path from the arguments. This will split at the first
38043      # space.
38044      complete="$AR"
38045      path="${complete%% *}"
38046      tmp="$complete EOL"
38047      arguments="${tmp#* }"
38048
38049      # Cannot rely on the command "which" here since it doesn't always work.
38050      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38051      if test -z "$is_absolute_path"; then
38052        # Path to executable is not absolute. Find it.
38053        IFS_save="$IFS"
38054        IFS=:
38055        for p in $PATH; do
38056          if test -f "$p/$path" && test -x "$p/$path"; then
38057            new_path="$p/$path"
38058            break
38059          fi
38060        done
38061        IFS="$IFS_save"
38062      else
38063        # This is an absolute path, we can use it without further modifications.
38064        new_path="$path"
38065      fi
38066
38067      if test "x$new_path" = x; then
38068        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38069$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38070        has_space=`$ECHO "$complete" | $GREP " "`
38071        if test "x$has_space" != x; then
38072          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38073$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38074        fi
38075        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38076      fi
38077    fi
38078
38079    # Now join together the path and the arguments once again
38080    if test "x$arguments" != xEOL; then
38081      new_complete="$new_path ${arguments% *}"
38082    else
38083      new_complete="$new_path"
38084    fi
38085
38086    if test "x$complete" != "x$new_complete"; then
38087      AR="$new_complete"
38088      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38089$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38090    fi
38091  fi
38092
38093
38094
38095  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38096
38097
38098  # Publish this variable in the help.
38099
38100
38101  if [ -z "${LIPO+x}" ]; then
38102    # The variable is not set by user, try to locate tool using the code snippet
38103    for ac_prog in lipo
38104do
38105  # Extract the first word of "$ac_prog", so it can be a program name with args.
38106set dummy $ac_prog; ac_word=$2
38107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38108$as_echo_n "checking for $ac_word... " >&6; }
38109if ${ac_cv_path_LIPO+:} false; then :
38110  $as_echo_n "(cached) " >&6
38111else
38112  case $LIPO in
38113  [\\/]* | ?:[\\/]*)
38114  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38115  ;;
38116  *)
38117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38118for as_dir in $PATH
38119do
38120  IFS=$as_save_IFS
38121  test -z "$as_dir" && as_dir=.
38122    for ac_exec_ext in '' $ac_executable_extensions; do
38123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38124    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38126    break 2
38127  fi
38128done
38129  done
38130IFS=$as_save_IFS
38131
38132  ;;
38133esac
38134fi
38135LIPO=$ac_cv_path_LIPO
38136if test -n "$LIPO"; then
38137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38138$as_echo "$LIPO" >&6; }
38139else
38140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38141$as_echo "no" >&6; }
38142fi
38143
38144
38145  test -n "$LIPO" && break
38146done
38147
38148  else
38149    # The variable is set, but is it from the command line or the environment?
38150
38151    # Try to remove the string !LIPO! from our list.
38152    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38153    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38154      # If it failed, the variable was not from the command line. Ignore it,
38155      # but warn the user (except for BASH, which is always set by the calling BASH).
38156      if test "xLIPO" != xBASH; then
38157        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38158$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38159      fi
38160      # Try to locate tool using the code snippet
38161      for ac_prog in lipo
38162do
38163  # Extract the first word of "$ac_prog", so it can be a program name with args.
38164set dummy $ac_prog; ac_word=$2
38165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38166$as_echo_n "checking for $ac_word... " >&6; }
38167if ${ac_cv_path_LIPO+:} false; then :
38168  $as_echo_n "(cached) " >&6
38169else
38170  case $LIPO in
38171  [\\/]* | ?:[\\/]*)
38172  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38173  ;;
38174  *)
38175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38176for as_dir in $PATH
38177do
38178  IFS=$as_save_IFS
38179  test -z "$as_dir" && as_dir=.
38180    for ac_exec_ext in '' $ac_executable_extensions; do
38181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38182    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38184    break 2
38185  fi
38186done
38187  done
38188IFS=$as_save_IFS
38189
38190  ;;
38191esac
38192fi
38193LIPO=$ac_cv_path_LIPO
38194if test -n "$LIPO"; then
38195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38196$as_echo "$LIPO" >&6; }
38197else
38198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38199$as_echo "no" >&6; }
38200fi
38201
38202
38203  test -n "$LIPO" && break
38204done
38205
38206    else
38207      # If it succeeded, then it was overridden by the user. We will use it
38208      # for the tool.
38209
38210      # First remove it from the list of overridden variables, so we can test
38211      # for unknown variables in the end.
38212      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38213
38214      # Check if we try to supply an empty value
38215      if test "x$LIPO" = x; then
38216        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38217$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38219$as_echo_n "checking for LIPO... " >&6; }
38220        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38221$as_echo "disabled" >&6; }
38222      else
38223        # Check if the provided tool contains a complete path.
38224        tool_specified="$LIPO"
38225        tool_basename="${tool_specified##*/}"
38226        if test "x$tool_basename" = "x$tool_specified"; then
38227          # A command without a complete path is provided, search $PATH.
38228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38229$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38230          # Extract the first word of "$tool_basename", so it can be a program name with args.
38231set dummy $tool_basename; ac_word=$2
38232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38233$as_echo_n "checking for $ac_word... " >&6; }
38234if ${ac_cv_path_LIPO+:} false; then :
38235  $as_echo_n "(cached) " >&6
38236else
38237  case $LIPO in
38238  [\\/]* | ?:[\\/]*)
38239  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38240  ;;
38241  *)
38242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38243for as_dir in $PATH
38244do
38245  IFS=$as_save_IFS
38246  test -z "$as_dir" && as_dir=.
38247    for ac_exec_ext in '' $ac_executable_extensions; do
38248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38249    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38251    break 2
38252  fi
38253done
38254  done
38255IFS=$as_save_IFS
38256
38257  ;;
38258esac
38259fi
38260LIPO=$ac_cv_path_LIPO
38261if test -n "$LIPO"; then
38262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38263$as_echo "$LIPO" >&6; }
38264else
38265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38266$as_echo "no" >&6; }
38267fi
38268
38269
38270          if test "x$LIPO" = x; then
38271            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38272          fi
38273        else
38274          # Otherwise we believe it is a complete path. Use it as it is.
38275          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38276$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38277          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38278$as_echo_n "checking for LIPO... " >&6; }
38279          if test ! -x "$tool_specified"; then
38280            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38281$as_echo "not found" >&6; }
38282            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38283          fi
38284          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38285$as_echo "$tool_specified" >&6; }
38286        fi
38287      fi
38288    fi
38289
38290  fi
38291
38292
38293
38294  # Only process if variable expands to non-empty
38295
38296  if test "x$LIPO" != x; then
38297    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38298
38299  # First separate the path from the arguments. This will split at the first
38300  # space.
38301  complete="$LIPO"
38302  path="${complete%% *}"
38303  tmp="$complete EOL"
38304  arguments="${tmp#* }"
38305
38306  # Input might be given as Windows format, start by converting to
38307  # unix format.
38308  new_path=`$CYGPATH -u "$path"`
38309
38310  # Now try to locate executable using which
38311  new_path=`$WHICH "$new_path" 2> /dev/null`
38312  # bat and cmd files are not always considered executable in cygwin causing which
38313  # to not find them
38314  if test "x$new_path" = x \
38315      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38316      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38317    new_path=`$CYGPATH -u "$path"`
38318  fi
38319  if test "x$new_path" = x; then
38320    # Oops. Which didn't find the executable.
38321    # The splitting of arguments from the executable at a space might have been incorrect,
38322    # since paths with space are more likely in Windows. Give it another try with the whole
38323    # argument.
38324    path="$complete"
38325    arguments="EOL"
38326    new_path=`$CYGPATH -u "$path"`
38327    new_path=`$WHICH "$new_path" 2> /dev/null`
38328    # bat and cmd files are not always considered executable in cygwin causing which
38329    # to not find them
38330    if test "x$new_path" = x \
38331        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38332        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38333      new_path=`$CYGPATH -u "$path"`
38334    fi
38335    if test "x$new_path" = x; then
38336      # It's still not found. Now this is an unrecoverable error.
38337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38338$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38339      has_space=`$ECHO "$complete" | $GREP " "`
38340      if test "x$has_space" != x; then
38341        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38342$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38343      fi
38344      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38345    fi
38346  fi
38347
38348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38351  # "foo.exe" is OK but "foo" is an error.
38352  #
38353  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38354  # It is also a way to make sure we got the proper file name for the real test later on.
38355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38356  if test "x$test_shortpath" = x; then
38357    # Short path failed, file does not exist as specified.
38358    # Try adding .exe or .cmd
38359    if test -f "${new_path}.exe"; then
38360      input_to_shortpath="${new_path}.exe"
38361    elif test -f "${new_path}.cmd"; then
38362      input_to_shortpath="${new_path}.cmd"
38363    else
38364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38365$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38366      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38367$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38368      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38369    fi
38370  else
38371    input_to_shortpath="$new_path"
38372  fi
38373
38374  # Call helper function which possibly converts this using DOS-style short mode.
38375  # If so, the updated path is stored in $new_path.
38376  new_path="$input_to_shortpath"
38377
38378  input_path="$input_to_shortpath"
38379  # Check if we need to convert this using DOS-style short mode. If the path
38380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38381  # take no chances and rewrite it.
38382  # Note: m4 eats our [], so we need to use [ and ] instead.
38383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38384  if test "x$has_forbidden_chars" != x; then
38385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38389      # Going to short mode and back again did indeed matter. Since short mode is
38390      # case insensitive, let's make it lowercase to improve readability.
38391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38392      # Now convert it back to Unix-style (cygpath)
38393      input_path=`$CYGPATH -u "$shortmode_path"`
38394      new_path="$input_path"
38395    fi
38396  fi
38397
38398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38399  if test "x$test_cygdrive_prefix" = x; then
38400    # As a simple fix, exclude /usr/bin since it's not a real path.
38401    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38403      # a path prefixed by /cygdrive for fixpath to work.
38404      new_path="$CYGWIN_ROOT_PATH$input_path"
38405    fi
38406  fi
38407
38408  # remove trailing .exe if any
38409  new_path="${new_path/%.exe/}"
38410
38411    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38412
38413  # First separate the path from the arguments. This will split at the first
38414  # space.
38415  complete="$LIPO"
38416  path="${complete%% *}"
38417  tmp="$complete EOL"
38418  arguments="${tmp#* }"
38419
38420  # Input might be given as Windows format, start by converting to
38421  # unix format.
38422  new_path="$path"
38423
38424  windows_path="$new_path"
38425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38426    unix_path=`$CYGPATH -u "$windows_path"`
38427    new_path="$unix_path"
38428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38430    new_path="$unix_path"
38431  fi
38432
38433
38434  # Now try to locate executable using which
38435  new_path=`$WHICH "$new_path" 2> /dev/null`
38436
38437  if test "x$new_path" = x; then
38438    # Oops. Which didn't find the executable.
38439    # The splitting of arguments from the executable at a space might have been incorrect,
38440    # since paths with space are more likely in Windows. Give it another try with the whole
38441    # argument.
38442    path="$complete"
38443    arguments="EOL"
38444    new_path="$path"
38445
38446  windows_path="$new_path"
38447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38448    unix_path=`$CYGPATH -u "$windows_path"`
38449    new_path="$unix_path"
38450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38452    new_path="$unix_path"
38453  fi
38454
38455
38456    new_path=`$WHICH "$new_path" 2> /dev/null`
38457    # bat and cmd files are not always considered executable in MSYS causing which
38458    # to not find them
38459    if test "x$new_path" = x \
38460        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38461        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38462      new_path="$path"
38463
38464  windows_path="$new_path"
38465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38466    unix_path=`$CYGPATH -u "$windows_path"`
38467    new_path="$unix_path"
38468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38470    new_path="$unix_path"
38471  fi
38472
38473    fi
38474
38475    if test "x$new_path" = x; then
38476      # It's still not found. Now this is an unrecoverable error.
38477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38478$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38479      has_space=`$ECHO "$complete" | $GREP " "`
38480      if test "x$has_space" != x; then
38481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38483      fi
38484      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38485    fi
38486  fi
38487
38488  # Now new_path has a complete unix path to the binary
38489  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38490    # Keep paths in /bin as-is, but remove trailing .exe if any
38491    new_path="${new_path/%.exe/}"
38492    # Do not save /bin paths to all_fixpath_prefixes!
38493  else
38494    # Not in mixed or Windows style, start by that.
38495    new_path=`cmd //c echo $new_path`
38496
38497  input_path="$new_path"
38498  # Check if we need to convert this using DOS-style short mode. If the path
38499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38500  # take no chances and rewrite it.
38501  # Note: m4 eats our [], so we need to use [ and ] instead.
38502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38503  if test "x$has_forbidden_chars" != x; then
38504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38506  fi
38507
38508    # Output is in $new_path
38509
38510  windows_path="$new_path"
38511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38512    unix_path=`$CYGPATH -u "$windows_path"`
38513    new_path="$unix_path"
38514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38516    new_path="$unix_path"
38517  fi
38518
38519    # remove trailing .exe if any
38520    new_path="${new_path/%.exe/}"
38521
38522    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38523    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38524  fi
38525
38526    else
38527      # We're on a unix platform. Hooray! :)
38528      # First separate the path from the arguments. This will split at the first
38529      # space.
38530      complete="$LIPO"
38531      path="${complete%% *}"
38532      tmp="$complete EOL"
38533      arguments="${tmp#* }"
38534
38535      # Cannot rely on the command "which" here since it doesn't always work.
38536      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38537      if test -z "$is_absolute_path"; then
38538        # Path to executable is not absolute. Find it.
38539        IFS_save="$IFS"
38540        IFS=:
38541        for p in $PATH; do
38542          if test -f "$p/$path" && test -x "$p/$path"; then
38543            new_path="$p/$path"
38544            break
38545          fi
38546        done
38547        IFS="$IFS_save"
38548      else
38549        # This is an absolute path, we can use it without further modifications.
38550        new_path="$path"
38551      fi
38552
38553      if test "x$new_path" = x; then
38554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38555$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38556        has_space=`$ECHO "$complete" | $GREP " "`
38557        if test "x$has_space" != x; then
38558          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38559$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38560        fi
38561        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38562      fi
38563    fi
38564
38565    # Now join together the path and the arguments once again
38566    if test "x$arguments" != xEOL; then
38567      new_complete="$new_path ${arguments% *}"
38568    else
38569      new_complete="$new_path"
38570    fi
38571
38572    if test "x$complete" != "x$new_complete"; then
38573      LIPO="$new_complete"
38574      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38575$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38576    fi
38577  fi
38578
38579  fi
38580
38581  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38582    # Extract the first word of "mt", so it can be a program name with args.
38583set dummy mt; ac_word=$2
38584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38585$as_echo_n "checking for $ac_word... " >&6; }
38586if ${ac_cv_prog_MT+:} false; then :
38587  $as_echo_n "(cached) " >&6
38588else
38589  if test -n "$MT"; then
38590  ac_cv_prog_MT="$MT" # Let the user override the test.
38591else
38592  ac_prog_rejected=no
38593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38594for as_dir in $PATH
38595do
38596  IFS=$as_save_IFS
38597  test -z "$as_dir" && as_dir=.
38598    for ac_exec_ext in '' $ac_executable_extensions; do
38599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38600    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38601       ac_prog_rejected=yes
38602       continue
38603     fi
38604    ac_cv_prog_MT="mt"
38605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38606    break 2
38607  fi
38608done
38609  done
38610IFS=$as_save_IFS
38611
38612if test $ac_prog_rejected = yes; then
38613  # We found a bogon in the path, so make sure we never use it.
38614  set dummy $ac_cv_prog_MT
38615  shift
38616  if test $# != 0; then
38617    # We chose a different compiler from the bogus one.
38618    # However, it has the same basename, so the bogon will be chosen
38619    # first if we set MT to just the basename; use the full file name.
38620    shift
38621    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38622  fi
38623fi
38624fi
38625fi
38626MT=$ac_cv_prog_MT
38627if test -n "$MT"; then
38628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38629$as_echo "$MT" >&6; }
38630else
38631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38632$as_echo "no" >&6; }
38633fi
38634
38635
38636
38637  # Only process if variable expands to non-empty
38638
38639  if test "x$MT" != x; then
38640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38641
38642  # First separate the path from the arguments. This will split at the first
38643  # space.
38644  complete="$MT"
38645  path="${complete%% *}"
38646  tmp="$complete EOL"
38647  arguments="${tmp#* }"
38648
38649  # Input might be given as Windows format, start by converting to
38650  # unix format.
38651  new_path=`$CYGPATH -u "$path"`
38652
38653  # Now try to locate executable using which
38654  new_path=`$WHICH "$new_path" 2> /dev/null`
38655  # bat and cmd files are not always considered executable in cygwin causing which
38656  # to not find them
38657  if test "x$new_path" = x \
38658      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38659      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38660    new_path=`$CYGPATH -u "$path"`
38661  fi
38662  if test "x$new_path" = x; then
38663    # Oops. Which didn't find the executable.
38664    # The splitting of arguments from the executable at a space might have been incorrect,
38665    # since paths with space are more likely in Windows. Give it another try with the whole
38666    # argument.
38667    path="$complete"
38668    arguments="EOL"
38669    new_path=`$CYGPATH -u "$path"`
38670    new_path=`$WHICH "$new_path" 2> /dev/null`
38671    # bat and cmd files are not always considered executable in cygwin causing which
38672    # to not find them
38673    if test "x$new_path" = x \
38674        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38675        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38676      new_path=`$CYGPATH -u "$path"`
38677    fi
38678    if test "x$new_path" = x; then
38679      # It's still not found. Now this is an unrecoverable error.
38680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38681$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38682      has_space=`$ECHO "$complete" | $GREP " "`
38683      if test "x$has_space" != x; then
38684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38686      fi
38687      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38688    fi
38689  fi
38690
38691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38694  # "foo.exe" is OK but "foo" is an error.
38695  #
38696  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38697  # It is also a way to make sure we got the proper file name for the real test later on.
38698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38699  if test "x$test_shortpath" = x; then
38700    # Short path failed, file does not exist as specified.
38701    # Try adding .exe or .cmd
38702    if test -f "${new_path}.exe"; then
38703      input_to_shortpath="${new_path}.exe"
38704    elif test -f "${new_path}.cmd"; then
38705      input_to_shortpath="${new_path}.cmd"
38706    else
38707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38708$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38709      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38710$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38711      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38712    fi
38713  else
38714    input_to_shortpath="$new_path"
38715  fi
38716
38717  # Call helper function which possibly converts this using DOS-style short mode.
38718  # If so, the updated path is stored in $new_path.
38719  new_path="$input_to_shortpath"
38720
38721  input_path="$input_to_shortpath"
38722  # Check if we need to convert this using DOS-style short mode. If the path
38723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38724  # take no chances and rewrite it.
38725  # Note: m4 eats our [], so we need to use [ and ] instead.
38726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38727  if test "x$has_forbidden_chars" != x; then
38728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38732      # Going to short mode and back again did indeed matter. Since short mode is
38733      # case insensitive, let's make it lowercase to improve readability.
38734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38735      # Now convert it back to Unix-style (cygpath)
38736      input_path=`$CYGPATH -u "$shortmode_path"`
38737      new_path="$input_path"
38738    fi
38739  fi
38740
38741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38742  if test "x$test_cygdrive_prefix" = x; then
38743    # As a simple fix, exclude /usr/bin since it's not a real path.
38744    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38746      # a path prefixed by /cygdrive for fixpath to work.
38747      new_path="$CYGWIN_ROOT_PATH$input_path"
38748    fi
38749  fi
38750
38751  # remove trailing .exe if any
38752  new_path="${new_path/%.exe/}"
38753
38754    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38755
38756  # First separate the path from the arguments. This will split at the first
38757  # space.
38758  complete="$MT"
38759  path="${complete%% *}"
38760  tmp="$complete EOL"
38761  arguments="${tmp#* }"
38762
38763  # Input might be given as Windows format, start by converting to
38764  # unix format.
38765  new_path="$path"
38766
38767  windows_path="$new_path"
38768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38769    unix_path=`$CYGPATH -u "$windows_path"`
38770    new_path="$unix_path"
38771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38773    new_path="$unix_path"
38774  fi
38775
38776
38777  # Now try to locate executable using which
38778  new_path=`$WHICH "$new_path" 2> /dev/null`
38779
38780  if test "x$new_path" = x; then
38781    # Oops. Which didn't find the executable.
38782    # The splitting of arguments from the executable at a space might have been incorrect,
38783    # since paths with space are more likely in Windows. Give it another try with the whole
38784    # argument.
38785    path="$complete"
38786    arguments="EOL"
38787    new_path="$path"
38788
38789  windows_path="$new_path"
38790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38791    unix_path=`$CYGPATH -u "$windows_path"`
38792    new_path="$unix_path"
38793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38795    new_path="$unix_path"
38796  fi
38797
38798
38799    new_path=`$WHICH "$new_path" 2> /dev/null`
38800    # bat and cmd files are not always considered executable in MSYS causing which
38801    # to not find them
38802    if test "x$new_path" = x \
38803        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38804        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38805      new_path="$path"
38806
38807  windows_path="$new_path"
38808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38809    unix_path=`$CYGPATH -u "$windows_path"`
38810    new_path="$unix_path"
38811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38813    new_path="$unix_path"
38814  fi
38815
38816    fi
38817
38818    if test "x$new_path" = x; then
38819      # It's still not found. Now this is an unrecoverable error.
38820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38821$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38822      has_space=`$ECHO "$complete" | $GREP " "`
38823      if test "x$has_space" != x; then
38824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38826      fi
38827      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38828    fi
38829  fi
38830
38831  # Now new_path has a complete unix path to the binary
38832  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38833    # Keep paths in /bin as-is, but remove trailing .exe if any
38834    new_path="${new_path/%.exe/}"
38835    # Do not save /bin paths to all_fixpath_prefixes!
38836  else
38837    # Not in mixed or Windows style, start by that.
38838    new_path=`cmd //c echo $new_path`
38839
38840  input_path="$new_path"
38841  # Check if we need to convert this using DOS-style short mode. If the path
38842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38843  # take no chances and rewrite it.
38844  # Note: m4 eats our [], so we need to use [ and ] instead.
38845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38846  if test "x$has_forbidden_chars" != x; then
38847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38848    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38849  fi
38850
38851    # Output is in $new_path
38852
38853  windows_path="$new_path"
38854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38855    unix_path=`$CYGPATH -u "$windows_path"`
38856    new_path="$unix_path"
38857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38859    new_path="$unix_path"
38860  fi
38861
38862    # remove trailing .exe if any
38863    new_path="${new_path/%.exe/}"
38864
38865    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38866    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38867  fi
38868
38869    else
38870      # We're on a unix platform. Hooray! :)
38871      # First separate the path from the arguments. This will split at the first
38872      # space.
38873      complete="$MT"
38874      path="${complete%% *}"
38875      tmp="$complete EOL"
38876      arguments="${tmp#* }"
38877
38878      # Cannot rely on the command "which" here since it doesn't always work.
38879      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38880      if test -z "$is_absolute_path"; then
38881        # Path to executable is not absolute. Find it.
38882        IFS_save="$IFS"
38883        IFS=:
38884        for p in $PATH; do
38885          if test -f "$p/$path" && test -x "$p/$path"; then
38886            new_path="$p/$path"
38887            break
38888          fi
38889        done
38890        IFS="$IFS_save"
38891      else
38892        # This is an absolute path, we can use it without further modifications.
38893        new_path="$path"
38894      fi
38895
38896      if test "x$new_path" = x; then
38897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38898$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38899        has_space=`$ECHO "$complete" | $GREP " "`
38900        if test "x$has_space" != x; then
38901          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38902$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38903        fi
38904        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38905      fi
38906    fi
38907
38908    # Now join together the path and the arguments once again
38909    if test "x$arguments" != xEOL; then
38910      new_complete="$new_path ${arguments% *}"
38911    else
38912      new_complete="$new_path"
38913    fi
38914
38915    if test "x$complete" != "x$new_complete"; then
38916      MT="$new_complete"
38917      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38918$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38919    fi
38920  fi
38921
38922    # Setup the resource compiler (RC)
38923    # Extract the first word of "rc", so it can be a program name with args.
38924set dummy rc; ac_word=$2
38925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38926$as_echo_n "checking for $ac_word... " >&6; }
38927if ${ac_cv_prog_RC+:} false; then :
38928  $as_echo_n "(cached) " >&6
38929else
38930  if test -n "$RC"; then
38931  ac_cv_prog_RC="$RC" # Let the user override the test.
38932else
38933  ac_prog_rejected=no
38934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38935for as_dir in $PATH
38936do
38937  IFS=$as_save_IFS
38938  test -z "$as_dir" && as_dir=.
38939    for ac_exec_ext in '' $ac_executable_extensions; do
38940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38941    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38942       ac_prog_rejected=yes
38943       continue
38944     fi
38945    ac_cv_prog_RC="rc"
38946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38947    break 2
38948  fi
38949done
38950  done
38951IFS=$as_save_IFS
38952
38953if test $ac_prog_rejected = yes; then
38954  # We found a bogon in the path, so make sure we never use it.
38955  set dummy $ac_cv_prog_RC
38956  shift
38957  if test $# != 0; then
38958    # We chose a different compiler from the bogus one.
38959    # However, it has the same basename, so the bogon will be chosen
38960    # first if we set RC to just the basename; use the full file name.
38961    shift
38962    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38963  fi
38964fi
38965fi
38966fi
38967RC=$ac_cv_prog_RC
38968if test -n "$RC"; then
38969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38970$as_echo "$RC" >&6; }
38971else
38972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38973$as_echo "no" >&6; }
38974fi
38975
38976
38977
38978  # Only process if variable expands to non-empty
38979
38980  if test "x$RC" != x; then
38981    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38982
38983  # First separate the path from the arguments. This will split at the first
38984  # space.
38985  complete="$RC"
38986  path="${complete%% *}"
38987  tmp="$complete EOL"
38988  arguments="${tmp#* }"
38989
38990  # Input might be given as Windows format, start by converting to
38991  # unix format.
38992  new_path=`$CYGPATH -u "$path"`
38993
38994  # Now try to locate executable using which
38995  new_path=`$WHICH "$new_path" 2> /dev/null`
38996  # bat and cmd files are not always considered executable in cygwin causing which
38997  # to not find them
38998  if test "x$new_path" = x \
38999      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39000      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39001    new_path=`$CYGPATH -u "$path"`
39002  fi
39003  if test "x$new_path" = x; then
39004    # Oops. Which didn't find the executable.
39005    # The splitting of arguments from the executable at a space might have been incorrect,
39006    # since paths with space are more likely in Windows. Give it another try with the whole
39007    # argument.
39008    path="$complete"
39009    arguments="EOL"
39010    new_path=`$CYGPATH -u "$path"`
39011    new_path=`$WHICH "$new_path" 2> /dev/null`
39012    # bat and cmd files are not always considered executable in cygwin causing which
39013    # to not find them
39014    if test "x$new_path" = x \
39015        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39016        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39017      new_path=`$CYGPATH -u "$path"`
39018    fi
39019    if test "x$new_path" = x; then
39020      # It's still not found. Now this is an unrecoverable error.
39021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39022$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39023      has_space=`$ECHO "$complete" | $GREP " "`
39024      if test "x$has_space" != x; then
39025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39027      fi
39028      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39029    fi
39030  fi
39031
39032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39035  # "foo.exe" is OK but "foo" is an error.
39036  #
39037  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39038  # It is also a way to make sure we got the proper file name for the real test later on.
39039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39040  if test "x$test_shortpath" = x; then
39041    # Short path failed, file does not exist as specified.
39042    # Try adding .exe or .cmd
39043    if test -f "${new_path}.exe"; then
39044      input_to_shortpath="${new_path}.exe"
39045    elif test -f "${new_path}.cmd"; then
39046      input_to_shortpath="${new_path}.cmd"
39047    else
39048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39049$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39050      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39051$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39052      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39053    fi
39054  else
39055    input_to_shortpath="$new_path"
39056  fi
39057
39058  # Call helper function which possibly converts this using DOS-style short mode.
39059  # If so, the updated path is stored in $new_path.
39060  new_path="$input_to_shortpath"
39061
39062  input_path="$input_to_shortpath"
39063  # Check if we need to convert this using DOS-style short mode. If the path
39064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39065  # take no chances and rewrite it.
39066  # Note: m4 eats our [], so we need to use [ and ] instead.
39067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39068  if test "x$has_forbidden_chars" != x; then
39069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39073      # Going to short mode and back again did indeed matter. Since short mode is
39074      # case insensitive, let's make it lowercase to improve readability.
39075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39076      # Now convert it back to Unix-style (cygpath)
39077      input_path=`$CYGPATH -u "$shortmode_path"`
39078      new_path="$input_path"
39079    fi
39080  fi
39081
39082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39083  if test "x$test_cygdrive_prefix" = x; then
39084    # As a simple fix, exclude /usr/bin since it's not a real path.
39085    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39087      # a path prefixed by /cygdrive for fixpath to work.
39088      new_path="$CYGWIN_ROOT_PATH$input_path"
39089    fi
39090  fi
39091
39092  # remove trailing .exe if any
39093  new_path="${new_path/%.exe/}"
39094
39095    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39096
39097  # First separate the path from the arguments. This will split at the first
39098  # space.
39099  complete="$RC"
39100  path="${complete%% *}"
39101  tmp="$complete EOL"
39102  arguments="${tmp#* }"
39103
39104  # Input might be given as Windows format, start by converting to
39105  # unix format.
39106  new_path="$path"
39107
39108  windows_path="$new_path"
39109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39110    unix_path=`$CYGPATH -u "$windows_path"`
39111    new_path="$unix_path"
39112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39114    new_path="$unix_path"
39115  fi
39116
39117
39118  # Now try to locate executable using which
39119  new_path=`$WHICH "$new_path" 2> /dev/null`
39120
39121  if test "x$new_path" = x; then
39122    # Oops. Which didn't find the executable.
39123    # The splitting of arguments from the executable at a space might have been incorrect,
39124    # since paths with space are more likely in Windows. Give it another try with the whole
39125    # argument.
39126    path="$complete"
39127    arguments="EOL"
39128    new_path="$path"
39129
39130  windows_path="$new_path"
39131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39132    unix_path=`$CYGPATH -u "$windows_path"`
39133    new_path="$unix_path"
39134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39136    new_path="$unix_path"
39137  fi
39138
39139
39140    new_path=`$WHICH "$new_path" 2> /dev/null`
39141    # bat and cmd files are not always considered executable in MSYS causing which
39142    # to not find them
39143    if test "x$new_path" = x \
39144        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39145        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39146      new_path="$path"
39147
39148  windows_path="$new_path"
39149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39150    unix_path=`$CYGPATH -u "$windows_path"`
39151    new_path="$unix_path"
39152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39154    new_path="$unix_path"
39155  fi
39156
39157    fi
39158
39159    if test "x$new_path" = x; then
39160      # It's still not found. Now this is an unrecoverable error.
39161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39162$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39163      has_space=`$ECHO "$complete" | $GREP " "`
39164      if test "x$has_space" != x; then
39165        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39166$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39167      fi
39168      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39169    fi
39170  fi
39171
39172  # Now new_path has a complete unix path to the binary
39173  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39174    # Keep paths in /bin as-is, but remove trailing .exe if any
39175    new_path="${new_path/%.exe/}"
39176    # Do not save /bin paths to all_fixpath_prefixes!
39177  else
39178    # Not in mixed or Windows style, start by that.
39179    new_path=`cmd //c echo $new_path`
39180
39181  input_path="$new_path"
39182  # Check if we need to convert this using DOS-style short mode. If the path
39183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39184  # take no chances and rewrite it.
39185  # Note: m4 eats our [], so we need to use [ and ] instead.
39186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39187  if test "x$has_forbidden_chars" != x; then
39188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39190  fi
39191
39192    # Output is in $new_path
39193
39194  windows_path="$new_path"
39195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39196    unix_path=`$CYGPATH -u "$windows_path"`
39197    new_path="$unix_path"
39198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39200    new_path="$unix_path"
39201  fi
39202
39203    # remove trailing .exe if any
39204    new_path="${new_path/%.exe/}"
39205
39206    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39207    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39208  fi
39209
39210    else
39211      # We're on a unix platform. Hooray! :)
39212      # First separate the path from the arguments. This will split at the first
39213      # space.
39214      complete="$RC"
39215      path="${complete%% *}"
39216      tmp="$complete EOL"
39217      arguments="${tmp#* }"
39218
39219      # Cannot rely on the command "which" here since it doesn't always work.
39220      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39221      if test -z "$is_absolute_path"; then
39222        # Path to executable is not absolute. Find it.
39223        IFS_save="$IFS"
39224        IFS=:
39225        for p in $PATH; do
39226          if test -f "$p/$path" && test -x "$p/$path"; then
39227            new_path="$p/$path"
39228            break
39229          fi
39230        done
39231        IFS="$IFS_save"
39232      else
39233        # This is an absolute path, we can use it without further modifications.
39234        new_path="$path"
39235      fi
39236
39237      if test "x$new_path" = x; then
39238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39239$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39240        has_space=`$ECHO "$complete" | $GREP " "`
39241        if test "x$has_space" != x; then
39242          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39243$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39244        fi
39245        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39246      fi
39247    fi
39248
39249    # Now join together the path and the arguments once again
39250    if test "x$arguments" != xEOL; then
39251      new_complete="$new_path ${arguments% *}"
39252    else
39253      new_complete="$new_path"
39254    fi
39255
39256    if test "x$complete" != "x$new_complete"; then
39257      RC="$new_complete"
39258      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39259$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39260    fi
39261  fi
39262
39263    # Extract the first word of "dumpbin", so it can be a program name with args.
39264set dummy dumpbin; ac_word=$2
39265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39266$as_echo_n "checking for $ac_word... " >&6; }
39267if ${ac_cv_prog_DUMPBIN+:} false; then :
39268  $as_echo_n "(cached) " >&6
39269else
39270  if test -n "$DUMPBIN"; then
39271  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39272else
39273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39274for as_dir in $PATH
39275do
39276  IFS=$as_save_IFS
39277  test -z "$as_dir" && as_dir=.
39278    for ac_exec_ext in '' $ac_executable_extensions; do
39279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39280    ac_cv_prog_DUMPBIN="dumpbin"
39281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39282    break 2
39283  fi
39284done
39285  done
39286IFS=$as_save_IFS
39287
39288fi
39289fi
39290DUMPBIN=$ac_cv_prog_DUMPBIN
39291if test -n "$DUMPBIN"; then
39292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39293$as_echo "$DUMPBIN" >&6; }
39294else
39295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39296$as_echo "no" >&6; }
39297fi
39298
39299
39300
39301  # Only process if variable expands to non-empty
39302
39303  if test "x$DUMPBIN" != x; then
39304    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39305
39306  # First separate the path from the arguments. This will split at the first
39307  # space.
39308  complete="$DUMPBIN"
39309  path="${complete%% *}"
39310  tmp="$complete EOL"
39311  arguments="${tmp#* }"
39312
39313  # Input might be given as Windows format, start by converting to
39314  # unix format.
39315  new_path=`$CYGPATH -u "$path"`
39316
39317  # Now try to locate executable using which
39318  new_path=`$WHICH "$new_path" 2> /dev/null`
39319  # bat and cmd files are not always considered executable in cygwin causing which
39320  # to not find them
39321  if test "x$new_path" = x \
39322      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39323      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39324    new_path=`$CYGPATH -u "$path"`
39325  fi
39326  if test "x$new_path" = x; then
39327    # Oops. Which didn't find the executable.
39328    # The splitting of arguments from the executable at a space might have been incorrect,
39329    # since paths with space are more likely in Windows. Give it another try with the whole
39330    # argument.
39331    path="$complete"
39332    arguments="EOL"
39333    new_path=`$CYGPATH -u "$path"`
39334    new_path=`$WHICH "$new_path" 2> /dev/null`
39335    # bat and cmd files are not always considered executable in cygwin causing which
39336    # to not find them
39337    if test "x$new_path" = x \
39338        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39339        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39340      new_path=`$CYGPATH -u "$path"`
39341    fi
39342    if test "x$new_path" = x; then
39343      # It's still not found. Now this is an unrecoverable error.
39344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39345$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39346      has_space=`$ECHO "$complete" | $GREP " "`
39347      if test "x$has_space" != x; then
39348        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39349$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39350      fi
39351      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39352    fi
39353  fi
39354
39355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39358  # "foo.exe" is OK but "foo" is an error.
39359  #
39360  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39361  # It is also a way to make sure we got the proper file name for the real test later on.
39362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39363  if test "x$test_shortpath" = x; then
39364    # Short path failed, file does not exist as specified.
39365    # Try adding .exe or .cmd
39366    if test -f "${new_path}.exe"; then
39367      input_to_shortpath="${new_path}.exe"
39368    elif test -f "${new_path}.cmd"; then
39369      input_to_shortpath="${new_path}.cmd"
39370    else
39371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39372$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39373      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39374$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39375      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39376    fi
39377  else
39378    input_to_shortpath="$new_path"
39379  fi
39380
39381  # Call helper function which possibly converts this using DOS-style short mode.
39382  # If so, the updated path is stored in $new_path.
39383  new_path="$input_to_shortpath"
39384
39385  input_path="$input_to_shortpath"
39386  # Check if we need to convert this using DOS-style short mode. If the path
39387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39388  # take no chances and rewrite it.
39389  # Note: m4 eats our [], so we need to use [ and ] instead.
39390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39391  if test "x$has_forbidden_chars" != x; then
39392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39396      # Going to short mode and back again did indeed matter. Since short mode is
39397      # case insensitive, let's make it lowercase to improve readability.
39398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39399      # Now convert it back to Unix-style (cygpath)
39400      input_path=`$CYGPATH -u "$shortmode_path"`
39401      new_path="$input_path"
39402    fi
39403  fi
39404
39405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39406  if test "x$test_cygdrive_prefix" = x; then
39407    # As a simple fix, exclude /usr/bin since it's not a real path.
39408    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39410      # a path prefixed by /cygdrive for fixpath to work.
39411      new_path="$CYGWIN_ROOT_PATH$input_path"
39412    fi
39413  fi
39414
39415  # remove trailing .exe if any
39416  new_path="${new_path/%.exe/}"
39417
39418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39419
39420  # First separate the path from the arguments. This will split at the first
39421  # space.
39422  complete="$DUMPBIN"
39423  path="${complete%% *}"
39424  tmp="$complete EOL"
39425  arguments="${tmp#* }"
39426
39427  # Input might be given as Windows format, start by converting to
39428  # unix format.
39429  new_path="$path"
39430
39431  windows_path="$new_path"
39432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39433    unix_path=`$CYGPATH -u "$windows_path"`
39434    new_path="$unix_path"
39435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39437    new_path="$unix_path"
39438  fi
39439
39440
39441  # Now try to locate executable using which
39442  new_path=`$WHICH "$new_path" 2> /dev/null`
39443
39444  if test "x$new_path" = x; then
39445    # Oops. Which didn't find the executable.
39446    # The splitting of arguments from the executable at a space might have been incorrect,
39447    # since paths with space are more likely in Windows. Give it another try with the whole
39448    # argument.
39449    path="$complete"
39450    arguments="EOL"
39451    new_path="$path"
39452
39453  windows_path="$new_path"
39454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39455    unix_path=`$CYGPATH -u "$windows_path"`
39456    new_path="$unix_path"
39457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39459    new_path="$unix_path"
39460  fi
39461
39462
39463    new_path=`$WHICH "$new_path" 2> /dev/null`
39464    # bat and cmd files are not always considered executable in MSYS causing which
39465    # to not find them
39466    if test "x$new_path" = x \
39467        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39468        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39469      new_path="$path"
39470
39471  windows_path="$new_path"
39472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39473    unix_path=`$CYGPATH -u "$windows_path"`
39474    new_path="$unix_path"
39475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39477    new_path="$unix_path"
39478  fi
39479
39480    fi
39481
39482    if test "x$new_path" = x; then
39483      # It's still not found. Now this is an unrecoverable error.
39484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39485$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39486      has_space=`$ECHO "$complete" | $GREP " "`
39487      if test "x$has_space" != x; then
39488        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39489$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39490      fi
39491      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39492    fi
39493  fi
39494
39495  # Now new_path has a complete unix path to the binary
39496  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39497    # Keep paths in /bin as-is, but remove trailing .exe if any
39498    new_path="${new_path/%.exe/}"
39499    # Do not save /bin paths to all_fixpath_prefixes!
39500  else
39501    # Not in mixed or Windows style, start by that.
39502    new_path=`cmd //c echo $new_path`
39503
39504  input_path="$new_path"
39505  # Check if we need to convert this using DOS-style short mode. If the path
39506  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39507  # take no chances and rewrite it.
39508  # Note: m4 eats our [], so we need to use [ and ] instead.
39509  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39510  if test "x$has_forbidden_chars" != x; then
39511    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39512    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39513  fi
39514
39515    # Output is in $new_path
39516
39517  windows_path="$new_path"
39518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39519    unix_path=`$CYGPATH -u "$windows_path"`
39520    new_path="$unix_path"
39521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39523    new_path="$unix_path"
39524  fi
39525
39526    # remove trailing .exe if any
39527    new_path="${new_path/%.exe/}"
39528
39529    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39530    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39531  fi
39532
39533    else
39534      # We're on a unix platform. Hooray! :)
39535      # First separate the path from the arguments. This will split at the first
39536      # space.
39537      complete="$DUMPBIN"
39538      path="${complete%% *}"
39539      tmp="$complete EOL"
39540      arguments="${tmp#* }"
39541
39542      # Cannot rely on the command "which" here since it doesn't always work.
39543      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39544      if test -z "$is_absolute_path"; then
39545        # Path to executable is not absolute. Find it.
39546        IFS_save="$IFS"
39547        IFS=:
39548        for p in $PATH; do
39549          if test -f "$p/$path" && test -x "$p/$path"; then
39550            new_path="$p/$path"
39551            break
39552          fi
39553        done
39554        IFS="$IFS_save"
39555      else
39556        # This is an absolute path, we can use it without further modifications.
39557        new_path="$path"
39558      fi
39559
39560      if test "x$new_path" = x; then
39561        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39562$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39563        has_space=`$ECHO "$complete" | $GREP " "`
39564        if test "x$has_space" != x; then
39565          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39566$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39567        fi
39568        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39569      fi
39570    fi
39571
39572    # Now join together the path and the arguments once again
39573    if test "x$arguments" != xEOL; then
39574      new_complete="$new_path ${arguments% *}"
39575    else
39576      new_complete="$new_path"
39577    fi
39578
39579    if test "x$complete" != "x$new_complete"; then
39580      DUMPBIN="$new_complete"
39581      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39582$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39583    fi
39584  fi
39585
39586    # We need to check for 'msbuild.exe' because at the place where we expect to
39587    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39588    # won't find the 'msbuild.exe' executable in that case (and the
39589    # 'ac_executable_extensions' is unusable due to performance reasons).
39590    # Notice that we intentionally don't fix up the path to MSBUILD because we
39591    # will call it in a DOS shell during freetype detection on Windows (see
39592    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39593    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39594set dummy msbuild.exe; ac_word=$2
39595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39596$as_echo_n "checking for $ac_word... " >&6; }
39597if ${ac_cv_prog_MSBUILD+:} false; then :
39598  $as_echo_n "(cached) " >&6
39599else
39600  if test -n "$MSBUILD"; then
39601  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39602else
39603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39604for as_dir in $PATH
39605do
39606  IFS=$as_save_IFS
39607  test -z "$as_dir" && as_dir=.
39608    for ac_exec_ext in '' $ac_executable_extensions; do
39609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39610    ac_cv_prog_MSBUILD="msbuild.exe"
39611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39612    break 2
39613  fi
39614done
39615  done
39616IFS=$as_save_IFS
39617
39618fi
39619fi
39620MSBUILD=$ac_cv_prog_MSBUILD
39621if test -n "$MSBUILD"; then
39622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39623$as_echo "$MSBUILD" >&6; }
39624else
39625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39626$as_echo "no" >&6; }
39627fi
39628
39629
39630  fi
39631
39632  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39633
39634
39635  # Publish this variable in the help.
39636
39637
39638  if [ -z "${STRIP+x}" ]; then
39639    # The variable is not set by user, try to locate tool using the code snippet
39640    for ac_prog in strip
39641do
39642  # Extract the first word of "$ac_prog", so it can be a program name with args.
39643set dummy $ac_prog; ac_word=$2
39644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39645$as_echo_n "checking for $ac_word... " >&6; }
39646if ${ac_cv_path_STRIP+:} false; then :
39647  $as_echo_n "(cached) " >&6
39648else
39649  case $STRIP in
39650  [\\/]* | ?:[\\/]*)
39651  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39652  ;;
39653  *)
39654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39655for as_dir in $PATH
39656do
39657  IFS=$as_save_IFS
39658  test -z "$as_dir" && as_dir=.
39659    for ac_exec_ext in '' $ac_executable_extensions; do
39660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39661    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39663    break 2
39664  fi
39665done
39666  done
39667IFS=$as_save_IFS
39668
39669  ;;
39670esac
39671fi
39672STRIP=$ac_cv_path_STRIP
39673if test -n "$STRIP"; then
39674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39675$as_echo "$STRIP" >&6; }
39676else
39677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39678$as_echo "no" >&6; }
39679fi
39680
39681
39682  test -n "$STRIP" && break
39683done
39684
39685  else
39686    # The variable is set, but is it from the command line or the environment?
39687
39688    # Try to remove the string !STRIP! from our list.
39689    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39690    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39691      # If it failed, the variable was not from the command line. Ignore it,
39692      # but warn the user (except for BASH, which is always set by the calling BASH).
39693      if test "xSTRIP" != xBASH; then
39694        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39695$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39696      fi
39697      # Try to locate tool using the code snippet
39698      for ac_prog in strip
39699do
39700  # Extract the first word of "$ac_prog", so it can be a program name with args.
39701set dummy $ac_prog; ac_word=$2
39702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39703$as_echo_n "checking for $ac_word... " >&6; }
39704if ${ac_cv_path_STRIP+:} false; then :
39705  $as_echo_n "(cached) " >&6
39706else
39707  case $STRIP in
39708  [\\/]* | ?:[\\/]*)
39709  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39710  ;;
39711  *)
39712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39713for as_dir in $PATH
39714do
39715  IFS=$as_save_IFS
39716  test -z "$as_dir" && as_dir=.
39717    for ac_exec_ext in '' $ac_executable_extensions; do
39718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39719    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39721    break 2
39722  fi
39723done
39724  done
39725IFS=$as_save_IFS
39726
39727  ;;
39728esac
39729fi
39730STRIP=$ac_cv_path_STRIP
39731if test -n "$STRIP"; then
39732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39733$as_echo "$STRIP" >&6; }
39734else
39735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39736$as_echo "no" >&6; }
39737fi
39738
39739
39740  test -n "$STRIP" && break
39741done
39742
39743    else
39744      # If it succeeded, then it was overridden by the user. We will use it
39745      # for the tool.
39746
39747      # First remove it from the list of overridden variables, so we can test
39748      # for unknown variables in the end.
39749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39750
39751      # Check if we try to supply an empty value
39752      if test "x$STRIP" = x; then
39753        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39754$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39755        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39756$as_echo_n "checking for STRIP... " >&6; }
39757        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39758$as_echo "disabled" >&6; }
39759      else
39760        # Check if the provided tool contains a complete path.
39761        tool_specified="$STRIP"
39762        tool_basename="${tool_specified##*/}"
39763        if test "x$tool_basename" = "x$tool_specified"; then
39764          # A command without a complete path is provided, search $PATH.
39765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39766$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39767          # Extract the first word of "$tool_basename", so it can be a program name with args.
39768set dummy $tool_basename; ac_word=$2
39769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39770$as_echo_n "checking for $ac_word... " >&6; }
39771if ${ac_cv_path_STRIP+:} false; then :
39772  $as_echo_n "(cached) " >&6
39773else
39774  case $STRIP in
39775  [\\/]* | ?:[\\/]*)
39776  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39777  ;;
39778  *)
39779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39780for as_dir in $PATH
39781do
39782  IFS=$as_save_IFS
39783  test -z "$as_dir" && as_dir=.
39784    for ac_exec_ext in '' $ac_executable_extensions; do
39785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39786    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39788    break 2
39789  fi
39790done
39791  done
39792IFS=$as_save_IFS
39793
39794  ;;
39795esac
39796fi
39797STRIP=$ac_cv_path_STRIP
39798if test -n "$STRIP"; then
39799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39800$as_echo "$STRIP" >&6; }
39801else
39802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39803$as_echo "no" >&6; }
39804fi
39805
39806
39807          if test "x$STRIP" = x; then
39808            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39809          fi
39810        else
39811          # Otherwise we believe it is a complete path. Use it as it is.
39812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39813$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39814          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39815$as_echo_n "checking for STRIP... " >&6; }
39816          if test ! -x "$tool_specified"; then
39817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39818$as_echo "not found" >&6; }
39819            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39820          fi
39821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39822$as_echo "$tool_specified" >&6; }
39823        fi
39824      fi
39825    fi
39826
39827  fi
39828
39829
39830
39831  # Only process if variable expands to non-empty
39832
39833  if test "x$STRIP" != x; then
39834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39835
39836  # First separate the path from the arguments. This will split at the first
39837  # space.
39838  complete="$STRIP"
39839  path="${complete%% *}"
39840  tmp="$complete EOL"
39841  arguments="${tmp#* }"
39842
39843  # Input might be given as Windows format, start by converting to
39844  # unix format.
39845  new_path=`$CYGPATH -u "$path"`
39846
39847  # Now try to locate executable using which
39848  new_path=`$WHICH "$new_path" 2> /dev/null`
39849  # bat and cmd files are not always considered executable in cygwin causing which
39850  # to not find them
39851  if test "x$new_path" = x \
39852      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39853      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39854    new_path=`$CYGPATH -u "$path"`
39855  fi
39856  if test "x$new_path" = x; then
39857    # Oops. Which didn't find the executable.
39858    # The splitting of arguments from the executable at a space might have been incorrect,
39859    # since paths with space are more likely in Windows. Give it another try with the whole
39860    # argument.
39861    path="$complete"
39862    arguments="EOL"
39863    new_path=`$CYGPATH -u "$path"`
39864    new_path=`$WHICH "$new_path" 2> /dev/null`
39865    # bat and cmd files are not always considered executable in cygwin causing which
39866    # to not find them
39867    if test "x$new_path" = x \
39868        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39869        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39870      new_path=`$CYGPATH -u "$path"`
39871    fi
39872    if test "x$new_path" = x; then
39873      # It's still not found. Now this is an unrecoverable error.
39874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39875$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39876      has_space=`$ECHO "$complete" | $GREP " "`
39877      if test "x$has_space" != x; then
39878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39880      fi
39881      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39882    fi
39883  fi
39884
39885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39888  # "foo.exe" is OK but "foo" is an error.
39889  #
39890  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39891  # It is also a way to make sure we got the proper file name for the real test later on.
39892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39893  if test "x$test_shortpath" = x; then
39894    # Short path failed, file does not exist as specified.
39895    # Try adding .exe or .cmd
39896    if test -f "${new_path}.exe"; then
39897      input_to_shortpath="${new_path}.exe"
39898    elif test -f "${new_path}.cmd"; then
39899      input_to_shortpath="${new_path}.cmd"
39900    else
39901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39902$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39903      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39904$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39905      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39906    fi
39907  else
39908    input_to_shortpath="$new_path"
39909  fi
39910
39911  # Call helper function which possibly converts this using DOS-style short mode.
39912  # If so, the updated path is stored in $new_path.
39913  new_path="$input_to_shortpath"
39914
39915  input_path="$input_to_shortpath"
39916  # Check if we need to convert this using DOS-style short mode. If the path
39917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39918  # take no chances and rewrite it.
39919  # Note: m4 eats our [], so we need to use [ and ] instead.
39920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39921  if test "x$has_forbidden_chars" != x; then
39922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39926      # Going to short mode and back again did indeed matter. Since short mode is
39927      # case insensitive, let's make it lowercase to improve readability.
39928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39929      # Now convert it back to Unix-style (cygpath)
39930      input_path=`$CYGPATH -u "$shortmode_path"`
39931      new_path="$input_path"
39932    fi
39933  fi
39934
39935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39936  if test "x$test_cygdrive_prefix" = x; then
39937    # As a simple fix, exclude /usr/bin since it's not a real path.
39938    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39940      # a path prefixed by /cygdrive for fixpath to work.
39941      new_path="$CYGWIN_ROOT_PATH$input_path"
39942    fi
39943  fi
39944
39945  # remove trailing .exe if any
39946  new_path="${new_path/%.exe/}"
39947
39948    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39949
39950  # First separate the path from the arguments. This will split at the first
39951  # space.
39952  complete="$STRIP"
39953  path="${complete%% *}"
39954  tmp="$complete EOL"
39955  arguments="${tmp#* }"
39956
39957  # Input might be given as Windows format, start by converting to
39958  # unix format.
39959  new_path="$path"
39960
39961  windows_path="$new_path"
39962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39963    unix_path=`$CYGPATH -u "$windows_path"`
39964    new_path="$unix_path"
39965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39967    new_path="$unix_path"
39968  fi
39969
39970
39971  # Now try to locate executable using which
39972  new_path=`$WHICH "$new_path" 2> /dev/null`
39973
39974  if test "x$new_path" = x; then
39975    # Oops. Which didn't find the executable.
39976    # The splitting of arguments from the executable at a space might have been incorrect,
39977    # since paths with space are more likely in Windows. Give it another try with the whole
39978    # argument.
39979    path="$complete"
39980    arguments="EOL"
39981    new_path="$path"
39982
39983  windows_path="$new_path"
39984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39985    unix_path=`$CYGPATH -u "$windows_path"`
39986    new_path="$unix_path"
39987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39989    new_path="$unix_path"
39990  fi
39991
39992
39993    new_path=`$WHICH "$new_path" 2> /dev/null`
39994    # bat and cmd files are not always considered executable in MSYS causing which
39995    # to not find them
39996    if test "x$new_path" = x \
39997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39999      new_path="$path"
40000
40001  windows_path="$new_path"
40002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40003    unix_path=`$CYGPATH -u "$windows_path"`
40004    new_path="$unix_path"
40005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40007    new_path="$unix_path"
40008  fi
40009
40010    fi
40011
40012    if test "x$new_path" = x; then
40013      # It's still not found. Now this is an unrecoverable error.
40014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40015$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40016      has_space=`$ECHO "$complete" | $GREP " "`
40017      if test "x$has_space" != x; then
40018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40020      fi
40021      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40022    fi
40023  fi
40024
40025  # Now new_path has a complete unix path to the binary
40026  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40027    # Keep paths in /bin as-is, but remove trailing .exe if any
40028    new_path="${new_path/%.exe/}"
40029    # Do not save /bin paths to all_fixpath_prefixes!
40030  else
40031    # Not in mixed or Windows style, start by that.
40032    new_path=`cmd //c echo $new_path`
40033
40034  input_path="$new_path"
40035  # Check if we need to convert this using DOS-style short mode. If the path
40036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40037  # take no chances and rewrite it.
40038  # Note: m4 eats our [], so we need to use [ and ] instead.
40039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40040  if test "x$has_forbidden_chars" != x; then
40041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40043  fi
40044
40045    # Output is in $new_path
40046
40047  windows_path="$new_path"
40048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40049    unix_path=`$CYGPATH -u "$windows_path"`
40050    new_path="$unix_path"
40051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40053    new_path="$unix_path"
40054  fi
40055
40056    # remove trailing .exe if any
40057    new_path="${new_path/%.exe/}"
40058
40059    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40060    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40061  fi
40062
40063    else
40064      # We're on a unix platform. Hooray! :)
40065      # First separate the path from the arguments. This will split at the first
40066      # space.
40067      complete="$STRIP"
40068      path="${complete%% *}"
40069      tmp="$complete EOL"
40070      arguments="${tmp#* }"
40071
40072      # Cannot rely on the command "which" here since it doesn't always work.
40073      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40074      if test -z "$is_absolute_path"; then
40075        # Path to executable is not absolute. Find it.
40076        IFS_save="$IFS"
40077        IFS=:
40078        for p in $PATH; do
40079          if test -f "$p/$path" && test -x "$p/$path"; then
40080            new_path="$p/$path"
40081            break
40082          fi
40083        done
40084        IFS="$IFS_save"
40085      else
40086        # This is an absolute path, we can use it without further modifications.
40087        new_path="$path"
40088      fi
40089
40090      if test "x$new_path" = x; then
40091        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40092$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40093        has_space=`$ECHO "$complete" | $GREP " "`
40094        if test "x$has_space" != x; then
40095          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40096$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40097        fi
40098        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40099      fi
40100    fi
40101
40102    # Now join together the path and the arguments once again
40103    if test "x$arguments" != xEOL; then
40104      new_complete="$new_path ${arguments% *}"
40105    else
40106      new_complete="$new_path"
40107    fi
40108
40109    if test "x$complete" != "x$new_complete"; then
40110      STRIP="$new_complete"
40111      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40112$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40113    fi
40114  fi
40115
40116
40117
40118  # Publish this variable in the help.
40119
40120
40121  if [ -z "${NM+x}" ]; then
40122    # The variable is not set by user, try to locate tool using the code snippet
40123    for ac_prog in nm
40124do
40125  # Extract the first word of "$ac_prog", so it can be a program name with args.
40126set dummy $ac_prog; ac_word=$2
40127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40128$as_echo_n "checking for $ac_word... " >&6; }
40129if ${ac_cv_path_NM+:} false; then :
40130  $as_echo_n "(cached) " >&6
40131else
40132  case $NM in
40133  [\\/]* | ?:[\\/]*)
40134  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40135  ;;
40136  *)
40137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40138for as_dir in $PATH
40139do
40140  IFS=$as_save_IFS
40141  test -z "$as_dir" && as_dir=.
40142    for ac_exec_ext in '' $ac_executable_extensions; do
40143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40144    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40146    break 2
40147  fi
40148done
40149  done
40150IFS=$as_save_IFS
40151
40152  ;;
40153esac
40154fi
40155NM=$ac_cv_path_NM
40156if test -n "$NM"; then
40157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40158$as_echo "$NM" >&6; }
40159else
40160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40161$as_echo "no" >&6; }
40162fi
40163
40164
40165  test -n "$NM" && break
40166done
40167
40168  else
40169    # The variable is set, but is it from the command line or the environment?
40170
40171    # Try to remove the string !NM! from our list.
40172    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40173    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40174      # If it failed, the variable was not from the command line. Ignore it,
40175      # but warn the user (except for BASH, which is always set by the calling BASH).
40176      if test "xNM" != xBASH; then
40177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40178$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40179      fi
40180      # Try to locate tool using the code snippet
40181      for ac_prog in nm
40182do
40183  # Extract the first word of "$ac_prog", so it can be a program name with args.
40184set dummy $ac_prog; ac_word=$2
40185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40186$as_echo_n "checking for $ac_word... " >&6; }
40187if ${ac_cv_path_NM+:} false; then :
40188  $as_echo_n "(cached) " >&6
40189else
40190  case $NM in
40191  [\\/]* | ?:[\\/]*)
40192  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40193  ;;
40194  *)
40195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40196for as_dir in $PATH
40197do
40198  IFS=$as_save_IFS
40199  test -z "$as_dir" && as_dir=.
40200    for ac_exec_ext in '' $ac_executable_extensions; do
40201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40202    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40204    break 2
40205  fi
40206done
40207  done
40208IFS=$as_save_IFS
40209
40210  ;;
40211esac
40212fi
40213NM=$ac_cv_path_NM
40214if test -n "$NM"; then
40215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40216$as_echo "$NM" >&6; }
40217else
40218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40219$as_echo "no" >&6; }
40220fi
40221
40222
40223  test -n "$NM" && break
40224done
40225
40226    else
40227      # If it succeeded, then it was overridden by the user. We will use it
40228      # for the tool.
40229
40230      # First remove it from the list of overridden variables, so we can test
40231      # for unknown variables in the end.
40232      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40233
40234      # Check if we try to supply an empty value
40235      if test "x$NM" = x; then
40236        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40237$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40238        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40239$as_echo_n "checking for NM... " >&6; }
40240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40241$as_echo "disabled" >&6; }
40242      else
40243        # Check if the provided tool contains a complete path.
40244        tool_specified="$NM"
40245        tool_basename="${tool_specified##*/}"
40246        if test "x$tool_basename" = "x$tool_specified"; then
40247          # A command without a complete path is provided, search $PATH.
40248          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40249$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40250          # Extract the first word of "$tool_basename", so it can be a program name with args.
40251set dummy $tool_basename; ac_word=$2
40252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40253$as_echo_n "checking for $ac_word... " >&6; }
40254if ${ac_cv_path_NM+:} false; then :
40255  $as_echo_n "(cached) " >&6
40256else
40257  case $NM in
40258  [\\/]* | ?:[\\/]*)
40259  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40260  ;;
40261  *)
40262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40263for as_dir in $PATH
40264do
40265  IFS=$as_save_IFS
40266  test -z "$as_dir" && as_dir=.
40267    for ac_exec_ext in '' $ac_executable_extensions; do
40268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40269    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40271    break 2
40272  fi
40273done
40274  done
40275IFS=$as_save_IFS
40276
40277  ;;
40278esac
40279fi
40280NM=$ac_cv_path_NM
40281if test -n "$NM"; then
40282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40283$as_echo "$NM" >&6; }
40284else
40285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40286$as_echo "no" >&6; }
40287fi
40288
40289
40290          if test "x$NM" = x; then
40291            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40292          fi
40293        else
40294          # Otherwise we believe it is a complete path. Use it as it is.
40295          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40296$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40297          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40298$as_echo_n "checking for NM... " >&6; }
40299          if test ! -x "$tool_specified"; then
40300            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40301$as_echo "not found" >&6; }
40302            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40303          fi
40304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40305$as_echo "$tool_specified" >&6; }
40306        fi
40307      fi
40308    fi
40309
40310  fi
40311
40312
40313
40314  # Only process if variable expands to non-empty
40315
40316  if test "x$NM" != x; then
40317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40318
40319  # First separate the path from the arguments. This will split at the first
40320  # space.
40321  complete="$NM"
40322  path="${complete%% *}"
40323  tmp="$complete EOL"
40324  arguments="${tmp#* }"
40325
40326  # Input might be given as Windows format, start by converting to
40327  # unix format.
40328  new_path=`$CYGPATH -u "$path"`
40329
40330  # Now try to locate executable using which
40331  new_path=`$WHICH "$new_path" 2> /dev/null`
40332  # bat and cmd files are not always considered executable in cygwin causing which
40333  # to not find them
40334  if test "x$new_path" = x \
40335      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40336      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40337    new_path=`$CYGPATH -u "$path"`
40338  fi
40339  if test "x$new_path" = x; then
40340    # Oops. Which didn't find the executable.
40341    # The splitting of arguments from the executable at a space might have been incorrect,
40342    # since paths with space are more likely in Windows. Give it another try with the whole
40343    # argument.
40344    path="$complete"
40345    arguments="EOL"
40346    new_path=`$CYGPATH -u "$path"`
40347    new_path=`$WHICH "$new_path" 2> /dev/null`
40348    # bat and cmd files are not always considered executable in cygwin causing which
40349    # to not find them
40350    if test "x$new_path" = x \
40351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40353      new_path=`$CYGPATH -u "$path"`
40354    fi
40355    if test "x$new_path" = x; then
40356      # It's still not found. Now this is an unrecoverable error.
40357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40358$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40359      has_space=`$ECHO "$complete" | $GREP " "`
40360      if test "x$has_space" != x; then
40361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40363      fi
40364      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40365    fi
40366  fi
40367
40368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40371  # "foo.exe" is OK but "foo" is an error.
40372  #
40373  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40374  # It is also a way to make sure we got the proper file name for the real test later on.
40375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40376  if test "x$test_shortpath" = x; then
40377    # Short path failed, file does not exist as specified.
40378    # Try adding .exe or .cmd
40379    if test -f "${new_path}.exe"; then
40380      input_to_shortpath="${new_path}.exe"
40381    elif test -f "${new_path}.cmd"; then
40382      input_to_shortpath="${new_path}.cmd"
40383    else
40384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40385$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40388      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40389    fi
40390  else
40391    input_to_shortpath="$new_path"
40392  fi
40393
40394  # Call helper function which possibly converts this using DOS-style short mode.
40395  # If so, the updated path is stored in $new_path.
40396  new_path="$input_to_shortpath"
40397
40398  input_path="$input_to_shortpath"
40399  # Check if we need to convert this using DOS-style short mode. If the path
40400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40401  # take no chances and rewrite it.
40402  # Note: m4 eats our [], so we need to use [ and ] instead.
40403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40404  if test "x$has_forbidden_chars" != x; then
40405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40409      # Going to short mode and back again did indeed matter. Since short mode is
40410      # case insensitive, let's make it lowercase to improve readability.
40411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40412      # Now convert it back to Unix-style (cygpath)
40413      input_path=`$CYGPATH -u "$shortmode_path"`
40414      new_path="$input_path"
40415    fi
40416  fi
40417
40418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40419  if test "x$test_cygdrive_prefix" = x; then
40420    # As a simple fix, exclude /usr/bin since it's not a real path.
40421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40423      # a path prefixed by /cygdrive for fixpath to work.
40424      new_path="$CYGWIN_ROOT_PATH$input_path"
40425    fi
40426  fi
40427
40428  # remove trailing .exe if any
40429  new_path="${new_path/%.exe/}"
40430
40431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40432
40433  # First separate the path from the arguments. This will split at the first
40434  # space.
40435  complete="$NM"
40436  path="${complete%% *}"
40437  tmp="$complete EOL"
40438  arguments="${tmp#* }"
40439
40440  # Input might be given as Windows format, start by converting to
40441  # unix format.
40442  new_path="$path"
40443
40444  windows_path="$new_path"
40445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40446    unix_path=`$CYGPATH -u "$windows_path"`
40447    new_path="$unix_path"
40448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40450    new_path="$unix_path"
40451  fi
40452
40453
40454  # Now try to locate executable using which
40455  new_path=`$WHICH "$new_path" 2> /dev/null`
40456
40457  if test "x$new_path" = x; then
40458    # Oops. Which didn't find the executable.
40459    # The splitting of arguments from the executable at a space might have been incorrect,
40460    # since paths with space are more likely in Windows. Give it another try with the whole
40461    # argument.
40462    path="$complete"
40463    arguments="EOL"
40464    new_path="$path"
40465
40466  windows_path="$new_path"
40467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40468    unix_path=`$CYGPATH -u "$windows_path"`
40469    new_path="$unix_path"
40470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40472    new_path="$unix_path"
40473  fi
40474
40475
40476    new_path=`$WHICH "$new_path" 2> /dev/null`
40477    # bat and cmd files are not always considered executable in MSYS causing which
40478    # to not find them
40479    if test "x$new_path" = x \
40480        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40481        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40482      new_path="$path"
40483
40484  windows_path="$new_path"
40485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40486    unix_path=`$CYGPATH -u "$windows_path"`
40487    new_path="$unix_path"
40488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40490    new_path="$unix_path"
40491  fi
40492
40493    fi
40494
40495    if test "x$new_path" = x; then
40496      # It's still not found. Now this is an unrecoverable error.
40497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40498$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40499      has_space=`$ECHO "$complete" | $GREP " "`
40500      if test "x$has_space" != x; then
40501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40503      fi
40504      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40505    fi
40506  fi
40507
40508  # Now new_path has a complete unix path to the binary
40509  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40510    # Keep paths in /bin as-is, but remove trailing .exe if any
40511    new_path="${new_path/%.exe/}"
40512    # Do not save /bin paths to all_fixpath_prefixes!
40513  else
40514    # Not in mixed or Windows style, start by that.
40515    new_path=`cmd //c echo $new_path`
40516
40517  input_path="$new_path"
40518  # Check if we need to convert this using DOS-style short mode. If the path
40519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40520  # take no chances and rewrite it.
40521  # Note: m4 eats our [], so we need to use [ and ] instead.
40522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40523  if test "x$has_forbidden_chars" != x; then
40524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40526  fi
40527
40528    # Output is in $new_path
40529
40530  windows_path="$new_path"
40531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40532    unix_path=`$CYGPATH -u "$windows_path"`
40533    new_path="$unix_path"
40534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40536    new_path="$unix_path"
40537  fi
40538
40539    # remove trailing .exe if any
40540    new_path="${new_path/%.exe/}"
40541
40542    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40543    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40544  fi
40545
40546    else
40547      # We're on a unix platform. Hooray! :)
40548      # First separate the path from the arguments. This will split at the first
40549      # space.
40550      complete="$NM"
40551      path="${complete%% *}"
40552      tmp="$complete EOL"
40553      arguments="${tmp#* }"
40554
40555      # Cannot rely on the command "which" here since it doesn't always work.
40556      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40557      if test -z "$is_absolute_path"; then
40558        # Path to executable is not absolute. Find it.
40559        IFS_save="$IFS"
40560        IFS=:
40561        for p in $PATH; do
40562          if test -f "$p/$path" && test -x "$p/$path"; then
40563            new_path="$p/$path"
40564            break
40565          fi
40566        done
40567        IFS="$IFS_save"
40568      else
40569        # This is an absolute path, we can use it without further modifications.
40570        new_path="$path"
40571      fi
40572
40573      if test "x$new_path" = x; then
40574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40575$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40576        has_space=`$ECHO "$complete" | $GREP " "`
40577        if test "x$has_space" != x; then
40578          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40579$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40580        fi
40581        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40582      fi
40583    fi
40584
40585    # Now join together the path and the arguments once again
40586    if test "x$arguments" != xEOL; then
40587      new_complete="$new_path ${arguments% *}"
40588    else
40589      new_complete="$new_path"
40590    fi
40591
40592    if test "x$complete" != "x$new_complete"; then
40593      NM="$new_complete"
40594      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40595$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40596    fi
40597  fi
40598
40599
40600
40601  # Publish this variable in the help.
40602
40603
40604  if [ -z "${GNM+x}" ]; then
40605    # The variable is not set by user, try to locate tool using the code snippet
40606    for ac_prog in gnm
40607do
40608  # Extract the first word of "$ac_prog", so it can be a program name with args.
40609set dummy $ac_prog; ac_word=$2
40610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40611$as_echo_n "checking for $ac_word... " >&6; }
40612if ${ac_cv_path_GNM+:} false; then :
40613  $as_echo_n "(cached) " >&6
40614else
40615  case $GNM in
40616  [\\/]* | ?:[\\/]*)
40617  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40618  ;;
40619  *)
40620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40621for as_dir in $PATH
40622do
40623  IFS=$as_save_IFS
40624  test -z "$as_dir" && as_dir=.
40625    for ac_exec_ext in '' $ac_executable_extensions; do
40626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40627    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40629    break 2
40630  fi
40631done
40632  done
40633IFS=$as_save_IFS
40634
40635  ;;
40636esac
40637fi
40638GNM=$ac_cv_path_GNM
40639if test -n "$GNM"; then
40640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40641$as_echo "$GNM" >&6; }
40642else
40643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40644$as_echo "no" >&6; }
40645fi
40646
40647
40648  test -n "$GNM" && break
40649done
40650
40651  else
40652    # The variable is set, but is it from the command line or the environment?
40653
40654    # Try to remove the string !GNM! from our list.
40655    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40656    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40657      # If it failed, the variable was not from the command line. Ignore it,
40658      # but warn the user (except for BASH, which is always set by the calling BASH).
40659      if test "xGNM" != xBASH; then
40660        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40661$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40662      fi
40663      # Try to locate tool using the code snippet
40664      for ac_prog in gnm
40665do
40666  # Extract the first word of "$ac_prog", so it can be a program name with args.
40667set dummy $ac_prog; ac_word=$2
40668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40669$as_echo_n "checking for $ac_word... " >&6; }
40670if ${ac_cv_path_GNM+:} false; then :
40671  $as_echo_n "(cached) " >&6
40672else
40673  case $GNM in
40674  [\\/]* | ?:[\\/]*)
40675  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40676  ;;
40677  *)
40678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40679for as_dir in $PATH
40680do
40681  IFS=$as_save_IFS
40682  test -z "$as_dir" && as_dir=.
40683    for ac_exec_ext in '' $ac_executable_extensions; do
40684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40685    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40687    break 2
40688  fi
40689done
40690  done
40691IFS=$as_save_IFS
40692
40693  ;;
40694esac
40695fi
40696GNM=$ac_cv_path_GNM
40697if test -n "$GNM"; then
40698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40699$as_echo "$GNM" >&6; }
40700else
40701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40702$as_echo "no" >&6; }
40703fi
40704
40705
40706  test -n "$GNM" && break
40707done
40708
40709    else
40710      # If it succeeded, then it was overridden by the user. We will use it
40711      # for the tool.
40712
40713      # First remove it from the list of overridden variables, so we can test
40714      # for unknown variables in the end.
40715      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40716
40717      # Check if we try to supply an empty value
40718      if test "x$GNM" = x; then
40719        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40720$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40721        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40722$as_echo_n "checking for GNM... " >&6; }
40723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40724$as_echo "disabled" >&6; }
40725      else
40726        # Check if the provided tool contains a complete path.
40727        tool_specified="$GNM"
40728        tool_basename="${tool_specified##*/}"
40729        if test "x$tool_basename" = "x$tool_specified"; then
40730          # A command without a complete path is provided, search $PATH.
40731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40732$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40733          # Extract the first word of "$tool_basename", so it can be a program name with args.
40734set dummy $tool_basename; ac_word=$2
40735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40736$as_echo_n "checking for $ac_word... " >&6; }
40737if ${ac_cv_path_GNM+:} false; then :
40738  $as_echo_n "(cached) " >&6
40739else
40740  case $GNM in
40741  [\\/]* | ?:[\\/]*)
40742  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40743  ;;
40744  *)
40745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40746for as_dir in $PATH
40747do
40748  IFS=$as_save_IFS
40749  test -z "$as_dir" && as_dir=.
40750    for ac_exec_ext in '' $ac_executable_extensions; do
40751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40752    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40754    break 2
40755  fi
40756done
40757  done
40758IFS=$as_save_IFS
40759
40760  ;;
40761esac
40762fi
40763GNM=$ac_cv_path_GNM
40764if test -n "$GNM"; then
40765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40766$as_echo "$GNM" >&6; }
40767else
40768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40769$as_echo "no" >&6; }
40770fi
40771
40772
40773          if test "x$GNM" = x; then
40774            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40775          fi
40776        else
40777          # Otherwise we believe it is a complete path. Use it as it is.
40778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40779$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40780          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40781$as_echo_n "checking for GNM... " >&6; }
40782          if test ! -x "$tool_specified"; then
40783            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40784$as_echo "not found" >&6; }
40785            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40786          fi
40787          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40788$as_echo "$tool_specified" >&6; }
40789        fi
40790      fi
40791    fi
40792
40793  fi
40794
40795
40796
40797  # Only process if variable expands to non-empty
40798
40799  if test "x$GNM" != x; then
40800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40801
40802  # First separate the path from the arguments. This will split at the first
40803  # space.
40804  complete="$GNM"
40805  path="${complete%% *}"
40806  tmp="$complete EOL"
40807  arguments="${tmp#* }"
40808
40809  # Input might be given as Windows format, start by converting to
40810  # unix format.
40811  new_path=`$CYGPATH -u "$path"`
40812
40813  # Now try to locate executable using which
40814  new_path=`$WHICH "$new_path" 2> /dev/null`
40815  # bat and cmd files are not always considered executable in cygwin causing which
40816  # to not find them
40817  if test "x$new_path" = x \
40818      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40819      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40820    new_path=`$CYGPATH -u "$path"`
40821  fi
40822  if test "x$new_path" = x; then
40823    # Oops. Which didn't find the executable.
40824    # The splitting of arguments from the executable at a space might have been incorrect,
40825    # since paths with space are more likely in Windows. Give it another try with the whole
40826    # argument.
40827    path="$complete"
40828    arguments="EOL"
40829    new_path=`$CYGPATH -u "$path"`
40830    new_path=`$WHICH "$new_path" 2> /dev/null`
40831    # bat and cmd files are not always considered executable in cygwin causing which
40832    # to not find them
40833    if test "x$new_path" = x \
40834        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40835        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40836      new_path=`$CYGPATH -u "$path"`
40837    fi
40838    if test "x$new_path" = x; then
40839      # It's still not found. Now this is an unrecoverable error.
40840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40841$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40842      has_space=`$ECHO "$complete" | $GREP " "`
40843      if test "x$has_space" != x; then
40844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40846      fi
40847      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40848    fi
40849  fi
40850
40851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40854  # "foo.exe" is OK but "foo" is an error.
40855  #
40856  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40857  # It is also a way to make sure we got the proper file name for the real test later on.
40858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40859  if test "x$test_shortpath" = x; then
40860    # Short path failed, file does not exist as specified.
40861    # Try adding .exe or .cmd
40862    if test -f "${new_path}.exe"; then
40863      input_to_shortpath="${new_path}.exe"
40864    elif test -f "${new_path}.cmd"; then
40865      input_to_shortpath="${new_path}.cmd"
40866    else
40867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40868$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40869      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40870$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40871      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40872    fi
40873  else
40874    input_to_shortpath="$new_path"
40875  fi
40876
40877  # Call helper function which possibly converts this using DOS-style short mode.
40878  # If so, the updated path is stored in $new_path.
40879  new_path="$input_to_shortpath"
40880
40881  input_path="$input_to_shortpath"
40882  # Check if we need to convert this using DOS-style short mode. If the path
40883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40884  # take no chances and rewrite it.
40885  # Note: m4 eats our [], so we need to use [ and ] instead.
40886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40887  if test "x$has_forbidden_chars" != x; then
40888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40892      # Going to short mode and back again did indeed matter. Since short mode is
40893      # case insensitive, let's make it lowercase to improve readability.
40894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40895      # Now convert it back to Unix-style (cygpath)
40896      input_path=`$CYGPATH -u "$shortmode_path"`
40897      new_path="$input_path"
40898    fi
40899  fi
40900
40901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40902  if test "x$test_cygdrive_prefix" = x; then
40903    # As a simple fix, exclude /usr/bin since it's not a real path.
40904    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40906      # a path prefixed by /cygdrive for fixpath to work.
40907      new_path="$CYGWIN_ROOT_PATH$input_path"
40908    fi
40909  fi
40910
40911  # remove trailing .exe if any
40912  new_path="${new_path/%.exe/}"
40913
40914    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40915
40916  # First separate the path from the arguments. This will split at the first
40917  # space.
40918  complete="$GNM"
40919  path="${complete%% *}"
40920  tmp="$complete EOL"
40921  arguments="${tmp#* }"
40922
40923  # Input might be given as Windows format, start by converting to
40924  # unix format.
40925  new_path="$path"
40926
40927  windows_path="$new_path"
40928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40929    unix_path=`$CYGPATH -u "$windows_path"`
40930    new_path="$unix_path"
40931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40933    new_path="$unix_path"
40934  fi
40935
40936
40937  # Now try to locate executable using which
40938  new_path=`$WHICH "$new_path" 2> /dev/null`
40939
40940  if test "x$new_path" = x; then
40941    # Oops. Which didn't find the executable.
40942    # The splitting of arguments from the executable at a space might have been incorrect,
40943    # since paths with space are more likely in Windows. Give it another try with the whole
40944    # argument.
40945    path="$complete"
40946    arguments="EOL"
40947    new_path="$path"
40948
40949  windows_path="$new_path"
40950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40951    unix_path=`$CYGPATH -u "$windows_path"`
40952    new_path="$unix_path"
40953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40955    new_path="$unix_path"
40956  fi
40957
40958
40959    new_path=`$WHICH "$new_path" 2> /dev/null`
40960    # bat and cmd files are not always considered executable in MSYS causing which
40961    # to not find them
40962    if test "x$new_path" = x \
40963        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40964        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40965      new_path="$path"
40966
40967  windows_path="$new_path"
40968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40969    unix_path=`$CYGPATH -u "$windows_path"`
40970    new_path="$unix_path"
40971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40973    new_path="$unix_path"
40974  fi
40975
40976    fi
40977
40978    if test "x$new_path" = x; then
40979      # It's still not found. Now this is an unrecoverable error.
40980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40981$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40982      has_space=`$ECHO "$complete" | $GREP " "`
40983      if test "x$has_space" != x; then
40984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40986      fi
40987      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40988    fi
40989  fi
40990
40991  # Now new_path has a complete unix path to the binary
40992  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40993    # Keep paths in /bin as-is, but remove trailing .exe if any
40994    new_path="${new_path/%.exe/}"
40995    # Do not save /bin paths to all_fixpath_prefixes!
40996  else
40997    # Not in mixed or Windows style, start by that.
40998    new_path=`cmd //c echo $new_path`
40999
41000  input_path="$new_path"
41001  # Check if we need to convert this using DOS-style short mode. If the path
41002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41003  # take no chances and rewrite it.
41004  # Note: m4 eats our [], so we need to use [ and ] instead.
41005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41006  if test "x$has_forbidden_chars" != x; then
41007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41009  fi
41010
41011    # Output is in $new_path
41012
41013  windows_path="$new_path"
41014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41015    unix_path=`$CYGPATH -u "$windows_path"`
41016    new_path="$unix_path"
41017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41019    new_path="$unix_path"
41020  fi
41021
41022    # remove trailing .exe if any
41023    new_path="${new_path/%.exe/}"
41024
41025    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41026    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41027  fi
41028
41029    else
41030      # We're on a unix platform. Hooray! :)
41031      # First separate the path from the arguments. This will split at the first
41032      # space.
41033      complete="$GNM"
41034      path="${complete%% *}"
41035      tmp="$complete EOL"
41036      arguments="${tmp#* }"
41037
41038      # Cannot rely on the command "which" here since it doesn't always work.
41039      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41040      if test -z "$is_absolute_path"; then
41041        # Path to executable is not absolute. Find it.
41042        IFS_save="$IFS"
41043        IFS=:
41044        for p in $PATH; do
41045          if test -f "$p/$path" && test -x "$p/$path"; then
41046            new_path="$p/$path"
41047            break
41048          fi
41049        done
41050        IFS="$IFS_save"
41051      else
41052        # This is an absolute path, we can use it without further modifications.
41053        new_path="$path"
41054      fi
41055
41056      if test "x$new_path" = x; then
41057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41058$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41059        has_space=`$ECHO "$complete" | $GREP " "`
41060        if test "x$has_space" != x; then
41061          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41062$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41063        fi
41064        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41065      fi
41066    fi
41067
41068    # Now join together the path and the arguments once again
41069    if test "x$arguments" != xEOL; then
41070      new_complete="$new_path ${arguments% *}"
41071    else
41072      new_complete="$new_path"
41073    fi
41074
41075    if test "x$complete" != "x$new_complete"; then
41076      GNM="$new_complete"
41077      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41078$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41079    fi
41080  fi
41081
41082  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41083    # FIXME: we should unify this with the solaris case above.
41084
41085
41086  # Publish this variable in the help.
41087
41088
41089  if [ -z "${STRIP+x}" ]; then
41090    # The variable is not set by user, try to locate tool using the code snippet
41091    if test -n "$ac_tool_prefix"; then
41092  for ac_prog in strip
41093  do
41094    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41095set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41097$as_echo_n "checking for $ac_word... " >&6; }
41098if ${ac_cv_prog_STRIP+:} false; then :
41099  $as_echo_n "(cached) " >&6
41100else
41101  if test -n "$STRIP"; then
41102  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41103else
41104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41105for as_dir in $PATH
41106do
41107  IFS=$as_save_IFS
41108  test -z "$as_dir" && as_dir=.
41109    for ac_exec_ext in '' $ac_executable_extensions; do
41110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41111    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41113    break 2
41114  fi
41115done
41116  done
41117IFS=$as_save_IFS
41118
41119fi
41120fi
41121STRIP=$ac_cv_prog_STRIP
41122if test -n "$STRIP"; then
41123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41124$as_echo "$STRIP" >&6; }
41125else
41126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41127$as_echo "no" >&6; }
41128fi
41129
41130
41131    test -n "$STRIP" && break
41132  done
41133fi
41134if test -z "$STRIP"; then
41135  ac_ct_STRIP=$STRIP
41136  for ac_prog in strip
41137do
41138  # Extract the first word of "$ac_prog", so it can be a program name with args.
41139set dummy $ac_prog; ac_word=$2
41140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41141$as_echo_n "checking for $ac_word... " >&6; }
41142if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41143  $as_echo_n "(cached) " >&6
41144else
41145  if test -n "$ac_ct_STRIP"; then
41146  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41147else
41148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41149for as_dir in $PATH
41150do
41151  IFS=$as_save_IFS
41152  test -z "$as_dir" && as_dir=.
41153    for ac_exec_ext in '' $ac_executable_extensions; do
41154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41155    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41157    break 2
41158  fi
41159done
41160  done
41161IFS=$as_save_IFS
41162
41163fi
41164fi
41165ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41166if test -n "$ac_ct_STRIP"; then
41167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41168$as_echo "$ac_ct_STRIP" >&6; }
41169else
41170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41171$as_echo "no" >&6; }
41172fi
41173
41174
41175  test -n "$ac_ct_STRIP" && break
41176done
41177
41178  if test "x$ac_ct_STRIP" = x; then
41179    STRIP=""
41180  else
41181    case $cross_compiling:$ac_tool_warned in
41182yes:)
41183{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41184$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41185ac_tool_warned=yes ;;
41186esac
41187    STRIP=$ac_ct_STRIP
41188  fi
41189fi
41190
41191  else
41192    # The variable is set, but is it from the command line or the environment?
41193
41194    # Try to remove the string !STRIP! from our list.
41195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41197      # If it failed, the variable was not from the command line. Ignore it,
41198      # but warn the user (except for BASH, which is always set by the calling BASH).
41199      if test "xSTRIP" != xBASH; then
41200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41201$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41202      fi
41203      # Try to locate tool using the code snippet
41204      if test -n "$ac_tool_prefix"; then
41205  for ac_prog in strip
41206  do
41207    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41208set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41210$as_echo_n "checking for $ac_word... " >&6; }
41211if ${ac_cv_prog_STRIP+:} false; then :
41212  $as_echo_n "(cached) " >&6
41213else
41214  if test -n "$STRIP"; then
41215  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41216else
41217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41218for as_dir in $PATH
41219do
41220  IFS=$as_save_IFS
41221  test -z "$as_dir" && as_dir=.
41222    for ac_exec_ext in '' $ac_executable_extensions; do
41223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41224    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41226    break 2
41227  fi
41228done
41229  done
41230IFS=$as_save_IFS
41231
41232fi
41233fi
41234STRIP=$ac_cv_prog_STRIP
41235if test -n "$STRIP"; then
41236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41237$as_echo "$STRIP" >&6; }
41238else
41239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41240$as_echo "no" >&6; }
41241fi
41242
41243
41244    test -n "$STRIP" && break
41245  done
41246fi
41247if test -z "$STRIP"; then
41248  ac_ct_STRIP=$STRIP
41249  for ac_prog in strip
41250do
41251  # Extract the first word of "$ac_prog", so it can be a program name with args.
41252set dummy $ac_prog; ac_word=$2
41253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41254$as_echo_n "checking for $ac_word... " >&6; }
41255if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41256  $as_echo_n "(cached) " >&6
41257else
41258  if test -n "$ac_ct_STRIP"; then
41259  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41260else
41261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41262for as_dir in $PATH
41263do
41264  IFS=$as_save_IFS
41265  test -z "$as_dir" && as_dir=.
41266    for ac_exec_ext in '' $ac_executable_extensions; do
41267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41268    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41270    break 2
41271  fi
41272done
41273  done
41274IFS=$as_save_IFS
41275
41276fi
41277fi
41278ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41279if test -n "$ac_ct_STRIP"; then
41280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41281$as_echo "$ac_ct_STRIP" >&6; }
41282else
41283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41284$as_echo "no" >&6; }
41285fi
41286
41287
41288  test -n "$ac_ct_STRIP" && break
41289done
41290
41291  if test "x$ac_ct_STRIP" = x; then
41292    STRIP=""
41293  else
41294    case $cross_compiling:$ac_tool_warned in
41295yes:)
41296{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41297$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41298ac_tool_warned=yes ;;
41299esac
41300    STRIP=$ac_ct_STRIP
41301  fi
41302fi
41303
41304    else
41305      # If it succeeded, then it was overridden by the user. We will use it
41306      # for the tool.
41307
41308      # First remove it from the list of overridden variables, so we can test
41309      # for unknown variables in the end.
41310      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41311
41312      # Check if we try to supply an empty value
41313      if test "x$STRIP" = x; then
41314        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41315$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41316        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41317$as_echo_n "checking for STRIP... " >&6; }
41318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41319$as_echo "disabled" >&6; }
41320      else
41321        # Check if the provided tool contains a complete path.
41322        tool_specified="$STRIP"
41323        tool_basename="${tool_specified##*/}"
41324        if test "x$tool_basename" = "x$tool_specified"; then
41325          # A command without a complete path is provided, search $PATH.
41326          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41327$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41328          # Extract the first word of "$tool_basename", so it can be a program name with args.
41329set dummy $tool_basename; ac_word=$2
41330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41331$as_echo_n "checking for $ac_word... " >&6; }
41332if ${ac_cv_path_STRIP+:} false; then :
41333  $as_echo_n "(cached) " >&6
41334else
41335  case $STRIP in
41336  [\\/]* | ?:[\\/]*)
41337  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41338  ;;
41339  *)
41340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41341for as_dir in $PATH
41342do
41343  IFS=$as_save_IFS
41344  test -z "$as_dir" && as_dir=.
41345    for ac_exec_ext in '' $ac_executable_extensions; do
41346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41347    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41349    break 2
41350  fi
41351done
41352  done
41353IFS=$as_save_IFS
41354
41355  ;;
41356esac
41357fi
41358STRIP=$ac_cv_path_STRIP
41359if test -n "$STRIP"; then
41360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41361$as_echo "$STRIP" >&6; }
41362else
41363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41364$as_echo "no" >&6; }
41365fi
41366
41367
41368          if test "x$STRIP" = x; then
41369            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41370          fi
41371        else
41372          # Otherwise we believe it is a complete path. Use it as it is.
41373          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41374$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41375          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41376$as_echo_n "checking for STRIP... " >&6; }
41377          if test ! -x "$tool_specified"; then
41378            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41379$as_echo "not found" >&6; }
41380            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41381          fi
41382          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41383$as_echo "$tool_specified" >&6; }
41384        fi
41385      fi
41386    fi
41387
41388  fi
41389
41390
41391
41392  # Only process if variable expands to non-empty
41393
41394  if test "x$STRIP" != x; then
41395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41396
41397  # First separate the path from the arguments. This will split at the first
41398  # space.
41399  complete="$STRIP"
41400  path="${complete%% *}"
41401  tmp="$complete EOL"
41402  arguments="${tmp#* }"
41403
41404  # Input might be given as Windows format, start by converting to
41405  # unix format.
41406  new_path=`$CYGPATH -u "$path"`
41407
41408  # Now try to locate executable using which
41409  new_path=`$WHICH "$new_path" 2> /dev/null`
41410  # bat and cmd files are not always considered executable in cygwin causing which
41411  # to not find them
41412  if test "x$new_path" = x \
41413      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41414      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41415    new_path=`$CYGPATH -u "$path"`
41416  fi
41417  if test "x$new_path" = x; then
41418    # Oops. Which didn't find the executable.
41419    # The splitting of arguments from the executable at a space might have been incorrect,
41420    # since paths with space are more likely in Windows. Give it another try with the whole
41421    # argument.
41422    path="$complete"
41423    arguments="EOL"
41424    new_path=`$CYGPATH -u "$path"`
41425    new_path=`$WHICH "$new_path" 2> /dev/null`
41426    # bat and cmd files are not always considered executable in cygwin causing which
41427    # to not find them
41428    if test "x$new_path" = x \
41429        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41430        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41431      new_path=`$CYGPATH -u "$path"`
41432    fi
41433    if test "x$new_path" = x; then
41434      # It's still not found. Now this is an unrecoverable error.
41435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41436$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41437      has_space=`$ECHO "$complete" | $GREP " "`
41438      if test "x$has_space" != x; then
41439        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41440$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41441      fi
41442      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41443    fi
41444  fi
41445
41446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41449  # "foo.exe" is OK but "foo" is an error.
41450  #
41451  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41452  # It is also a way to make sure we got the proper file name for the real test later on.
41453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41454  if test "x$test_shortpath" = x; then
41455    # Short path failed, file does not exist as specified.
41456    # Try adding .exe or .cmd
41457    if test -f "${new_path}.exe"; then
41458      input_to_shortpath="${new_path}.exe"
41459    elif test -f "${new_path}.cmd"; then
41460      input_to_shortpath="${new_path}.cmd"
41461    else
41462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41463$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41464      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41465$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41466      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41467    fi
41468  else
41469    input_to_shortpath="$new_path"
41470  fi
41471
41472  # Call helper function which possibly converts this using DOS-style short mode.
41473  # If so, the updated path is stored in $new_path.
41474  new_path="$input_to_shortpath"
41475
41476  input_path="$input_to_shortpath"
41477  # Check if we need to convert this using DOS-style short mode. If the path
41478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41479  # take no chances and rewrite it.
41480  # Note: m4 eats our [], so we need to use [ and ] instead.
41481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41482  if test "x$has_forbidden_chars" != x; then
41483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41484    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41485    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41486    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41487      # Going to short mode and back again did indeed matter. Since short mode is
41488      # case insensitive, let's make it lowercase to improve readability.
41489      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41490      # Now convert it back to Unix-style (cygpath)
41491      input_path=`$CYGPATH -u "$shortmode_path"`
41492      new_path="$input_path"
41493    fi
41494  fi
41495
41496  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41497  if test "x$test_cygdrive_prefix" = x; then
41498    # As a simple fix, exclude /usr/bin since it's not a real path.
41499    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41500      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41501      # a path prefixed by /cygdrive for fixpath to work.
41502      new_path="$CYGWIN_ROOT_PATH$input_path"
41503    fi
41504  fi
41505
41506  # remove trailing .exe if any
41507  new_path="${new_path/%.exe/}"
41508
41509    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41510
41511  # First separate the path from the arguments. This will split at the first
41512  # space.
41513  complete="$STRIP"
41514  path="${complete%% *}"
41515  tmp="$complete EOL"
41516  arguments="${tmp#* }"
41517
41518  # Input might be given as Windows format, start by converting to
41519  # unix format.
41520  new_path="$path"
41521
41522  windows_path="$new_path"
41523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41524    unix_path=`$CYGPATH -u "$windows_path"`
41525    new_path="$unix_path"
41526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41528    new_path="$unix_path"
41529  fi
41530
41531
41532  # Now try to locate executable using which
41533  new_path=`$WHICH "$new_path" 2> /dev/null`
41534
41535  if test "x$new_path" = x; then
41536    # Oops. Which didn't find the executable.
41537    # The splitting of arguments from the executable at a space might have been incorrect,
41538    # since paths with space are more likely in Windows. Give it another try with the whole
41539    # argument.
41540    path="$complete"
41541    arguments="EOL"
41542    new_path="$path"
41543
41544  windows_path="$new_path"
41545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41546    unix_path=`$CYGPATH -u "$windows_path"`
41547    new_path="$unix_path"
41548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41550    new_path="$unix_path"
41551  fi
41552
41553
41554    new_path=`$WHICH "$new_path" 2> /dev/null`
41555    # bat and cmd files are not always considered executable in MSYS causing which
41556    # to not find them
41557    if test "x$new_path" = x \
41558        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41559        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41560      new_path="$path"
41561
41562  windows_path="$new_path"
41563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41564    unix_path=`$CYGPATH -u "$windows_path"`
41565    new_path="$unix_path"
41566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41568    new_path="$unix_path"
41569  fi
41570
41571    fi
41572
41573    if test "x$new_path" = x; then
41574      # It's still not found. Now this is an unrecoverable error.
41575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41576$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41577      has_space=`$ECHO "$complete" | $GREP " "`
41578      if test "x$has_space" != x; then
41579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41581      fi
41582      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41583    fi
41584  fi
41585
41586  # Now new_path has a complete unix path to the binary
41587  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41588    # Keep paths in /bin as-is, but remove trailing .exe if any
41589    new_path="${new_path/%.exe/}"
41590    # Do not save /bin paths to all_fixpath_prefixes!
41591  else
41592    # Not in mixed or Windows style, start by that.
41593    new_path=`cmd //c echo $new_path`
41594
41595  input_path="$new_path"
41596  # Check if we need to convert this using DOS-style short mode. If the path
41597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41598  # take no chances and rewrite it.
41599  # Note: m4 eats our [], so we need to use [ and ] instead.
41600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41601  if test "x$has_forbidden_chars" != x; then
41602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41604  fi
41605
41606    # Output is in $new_path
41607
41608  windows_path="$new_path"
41609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41610    unix_path=`$CYGPATH -u "$windows_path"`
41611    new_path="$unix_path"
41612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41614    new_path="$unix_path"
41615  fi
41616
41617    # remove trailing .exe if any
41618    new_path="${new_path/%.exe/}"
41619
41620    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41621    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41622  fi
41623
41624    else
41625      # We're on a unix platform. Hooray! :)
41626      # First separate the path from the arguments. This will split at the first
41627      # space.
41628      complete="$STRIP"
41629      path="${complete%% *}"
41630      tmp="$complete EOL"
41631      arguments="${tmp#* }"
41632
41633      # Cannot rely on the command "which" here since it doesn't always work.
41634      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41635      if test -z "$is_absolute_path"; then
41636        # Path to executable is not absolute. Find it.
41637        IFS_save="$IFS"
41638        IFS=:
41639        for p in $PATH; do
41640          if test -f "$p/$path" && test -x "$p/$path"; then
41641            new_path="$p/$path"
41642            break
41643          fi
41644        done
41645        IFS="$IFS_save"
41646      else
41647        # This is an absolute path, we can use it without further modifications.
41648        new_path="$path"
41649      fi
41650
41651      if test "x$new_path" = x; then
41652        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41653$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41654        has_space=`$ECHO "$complete" | $GREP " "`
41655        if test "x$has_space" != x; then
41656          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41657$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41658        fi
41659        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41660      fi
41661    fi
41662
41663    # Now join together the path and the arguments once again
41664    if test "x$arguments" != xEOL; then
41665      new_complete="$new_path ${arguments% *}"
41666    else
41667      new_complete="$new_path"
41668    fi
41669
41670    if test "x$complete" != "x$new_complete"; then
41671      STRIP="$new_complete"
41672      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41673$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41674    fi
41675  fi
41676
41677    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41678
41679
41680  # Publish this variable in the help.
41681
41682
41683  if [ -z "${NM+x}" ]; then
41684    # The variable is not set by user, try to locate tool using the code snippet
41685    if test -n "$ac_tool_prefix"; then
41686  for ac_prog in nm gcc-nm
41687  do
41688    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41689set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41691$as_echo_n "checking for $ac_word... " >&6; }
41692if ${ac_cv_prog_NM+:} false; then :
41693  $as_echo_n "(cached) " >&6
41694else
41695  if test -n "$NM"; then
41696  ac_cv_prog_NM="$NM" # Let the user override the test.
41697else
41698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41699for as_dir in $PATH
41700do
41701  IFS=$as_save_IFS
41702  test -z "$as_dir" && as_dir=.
41703    for ac_exec_ext in '' $ac_executable_extensions; do
41704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41705    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41707    break 2
41708  fi
41709done
41710  done
41711IFS=$as_save_IFS
41712
41713fi
41714fi
41715NM=$ac_cv_prog_NM
41716if test -n "$NM"; then
41717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41718$as_echo "$NM" >&6; }
41719else
41720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41721$as_echo "no" >&6; }
41722fi
41723
41724
41725    test -n "$NM" && break
41726  done
41727fi
41728if test -z "$NM"; then
41729  ac_ct_NM=$NM
41730  for ac_prog in nm gcc-nm
41731do
41732  # Extract the first word of "$ac_prog", so it can be a program name with args.
41733set dummy $ac_prog; ac_word=$2
41734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41735$as_echo_n "checking for $ac_word... " >&6; }
41736if ${ac_cv_prog_ac_ct_NM+:} false; then :
41737  $as_echo_n "(cached) " >&6
41738else
41739  if test -n "$ac_ct_NM"; then
41740  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41741else
41742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41743for as_dir in $PATH
41744do
41745  IFS=$as_save_IFS
41746  test -z "$as_dir" && as_dir=.
41747    for ac_exec_ext in '' $ac_executable_extensions; do
41748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41749    ac_cv_prog_ac_ct_NM="$ac_prog"
41750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41751    break 2
41752  fi
41753done
41754  done
41755IFS=$as_save_IFS
41756
41757fi
41758fi
41759ac_ct_NM=$ac_cv_prog_ac_ct_NM
41760if test -n "$ac_ct_NM"; then
41761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41762$as_echo "$ac_ct_NM" >&6; }
41763else
41764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41765$as_echo "no" >&6; }
41766fi
41767
41768
41769  test -n "$ac_ct_NM" && break
41770done
41771
41772  if test "x$ac_ct_NM" = x; then
41773    NM=""
41774  else
41775    case $cross_compiling:$ac_tool_warned in
41776yes:)
41777{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41778$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41779ac_tool_warned=yes ;;
41780esac
41781    NM=$ac_ct_NM
41782  fi
41783fi
41784
41785  else
41786    # The variable is set, but is it from the command line or the environment?
41787
41788    # Try to remove the string !NM! from our list.
41789    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41790    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41791      # If it failed, the variable was not from the command line. Ignore it,
41792      # but warn the user (except for BASH, which is always set by the calling BASH).
41793      if test "xNM" != xBASH; then
41794        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41795$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41796      fi
41797      # Try to locate tool using the code snippet
41798      if test -n "$ac_tool_prefix"; then
41799  for ac_prog in nm gcc-nm
41800  do
41801    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41802set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41804$as_echo_n "checking for $ac_word... " >&6; }
41805if ${ac_cv_prog_NM+:} false; then :
41806  $as_echo_n "(cached) " >&6
41807else
41808  if test -n "$NM"; then
41809  ac_cv_prog_NM="$NM" # Let the user override the test.
41810else
41811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41812for as_dir in $PATH
41813do
41814  IFS=$as_save_IFS
41815  test -z "$as_dir" && as_dir=.
41816    for ac_exec_ext in '' $ac_executable_extensions; do
41817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41818    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41820    break 2
41821  fi
41822done
41823  done
41824IFS=$as_save_IFS
41825
41826fi
41827fi
41828NM=$ac_cv_prog_NM
41829if test -n "$NM"; then
41830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41831$as_echo "$NM" >&6; }
41832else
41833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41834$as_echo "no" >&6; }
41835fi
41836
41837
41838    test -n "$NM" && break
41839  done
41840fi
41841if test -z "$NM"; then
41842  ac_ct_NM=$NM
41843  for ac_prog in nm gcc-nm
41844do
41845  # Extract the first word of "$ac_prog", so it can be a program name with args.
41846set dummy $ac_prog; ac_word=$2
41847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41848$as_echo_n "checking for $ac_word... " >&6; }
41849if ${ac_cv_prog_ac_ct_NM+:} false; then :
41850  $as_echo_n "(cached) " >&6
41851else
41852  if test -n "$ac_ct_NM"; then
41853  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41854else
41855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41856for as_dir in $PATH
41857do
41858  IFS=$as_save_IFS
41859  test -z "$as_dir" && as_dir=.
41860    for ac_exec_ext in '' $ac_executable_extensions; do
41861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41862    ac_cv_prog_ac_ct_NM="$ac_prog"
41863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41864    break 2
41865  fi
41866done
41867  done
41868IFS=$as_save_IFS
41869
41870fi
41871fi
41872ac_ct_NM=$ac_cv_prog_ac_ct_NM
41873if test -n "$ac_ct_NM"; then
41874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41875$as_echo "$ac_ct_NM" >&6; }
41876else
41877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41878$as_echo "no" >&6; }
41879fi
41880
41881
41882  test -n "$ac_ct_NM" && break
41883done
41884
41885  if test "x$ac_ct_NM" = x; then
41886    NM=""
41887  else
41888    case $cross_compiling:$ac_tool_warned in
41889yes:)
41890{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41891$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41892ac_tool_warned=yes ;;
41893esac
41894    NM=$ac_ct_NM
41895  fi
41896fi
41897
41898    else
41899      # If it succeeded, then it was overridden by the user. We will use it
41900      # for the tool.
41901
41902      # First remove it from the list of overridden variables, so we can test
41903      # for unknown variables in the end.
41904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41905
41906      # Check if we try to supply an empty value
41907      if test "x$NM" = x; then
41908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41909$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41911$as_echo_n "checking for NM... " >&6; }
41912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41913$as_echo "disabled" >&6; }
41914      else
41915        # Check if the provided tool contains a complete path.
41916        tool_specified="$NM"
41917        tool_basename="${tool_specified##*/}"
41918        if test "x$tool_basename" = "x$tool_specified"; then
41919          # A command without a complete path is provided, search $PATH.
41920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41921$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41922          # Extract the first word of "$tool_basename", so it can be a program name with args.
41923set dummy $tool_basename; ac_word=$2
41924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41925$as_echo_n "checking for $ac_word... " >&6; }
41926if ${ac_cv_path_NM+:} false; then :
41927  $as_echo_n "(cached) " >&6
41928else
41929  case $NM in
41930  [\\/]* | ?:[\\/]*)
41931  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41932  ;;
41933  *)
41934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41935for as_dir in $PATH
41936do
41937  IFS=$as_save_IFS
41938  test -z "$as_dir" && as_dir=.
41939    for ac_exec_ext in '' $ac_executable_extensions; do
41940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41941    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41943    break 2
41944  fi
41945done
41946  done
41947IFS=$as_save_IFS
41948
41949  ;;
41950esac
41951fi
41952NM=$ac_cv_path_NM
41953if test -n "$NM"; then
41954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41955$as_echo "$NM" >&6; }
41956else
41957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41958$as_echo "no" >&6; }
41959fi
41960
41961
41962          if test "x$NM" = x; then
41963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41964          fi
41965        else
41966          # Otherwise we believe it is a complete path. Use it as it is.
41967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41968$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41970$as_echo_n "checking for NM... " >&6; }
41971          if test ! -x "$tool_specified"; then
41972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41973$as_echo "not found" >&6; }
41974            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41975          fi
41976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41977$as_echo "$tool_specified" >&6; }
41978        fi
41979      fi
41980    fi
41981
41982  fi
41983
41984
41985    else
41986
41987
41988  # Publish this variable in the help.
41989
41990
41991  if [ -z "${NM+x}" ]; then
41992    # The variable is not set by user, try to locate tool using the code snippet
41993    if test -n "$ac_tool_prefix"; then
41994  for ac_prog in nm
41995  do
41996    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41997set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41999$as_echo_n "checking for $ac_word... " >&6; }
42000if ${ac_cv_prog_NM+:} false; then :
42001  $as_echo_n "(cached) " >&6
42002else
42003  if test -n "$NM"; then
42004  ac_cv_prog_NM="$NM" # Let the user override the test.
42005else
42006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42007for as_dir in $PATH
42008do
42009  IFS=$as_save_IFS
42010  test -z "$as_dir" && as_dir=.
42011    for ac_exec_ext in '' $ac_executable_extensions; do
42012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42013    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42015    break 2
42016  fi
42017done
42018  done
42019IFS=$as_save_IFS
42020
42021fi
42022fi
42023NM=$ac_cv_prog_NM
42024if test -n "$NM"; then
42025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42026$as_echo "$NM" >&6; }
42027else
42028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42029$as_echo "no" >&6; }
42030fi
42031
42032
42033    test -n "$NM" && break
42034  done
42035fi
42036if test -z "$NM"; then
42037  ac_ct_NM=$NM
42038  for ac_prog in nm
42039do
42040  # Extract the first word of "$ac_prog", so it can be a program name with args.
42041set dummy $ac_prog; ac_word=$2
42042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42043$as_echo_n "checking for $ac_word... " >&6; }
42044if ${ac_cv_prog_ac_ct_NM+:} false; then :
42045  $as_echo_n "(cached) " >&6
42046else
42047  if test -n "$ac_ct_NM"; then
42048  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42049else
42050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42051for as_dir in $PATH
42052do
42053  IFS=$as_save_IFS
42054  test -z "$as_dir" && as_dir=.
42055    for ac_exec_ext in '' $ac_executable_extensions; do
42056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42057    ac_cv_prog_ac_ct_NM="$ac_prog"
42058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42059    break 2
42060  fi
42061done
42062  done
42063IFS=$as_save_IFS
42064
42065fi
42066fi
42067ac_ct_NM=$ac_cv_prog_ac_ct_NM
42068if test -n "$ac_ct_NM"; then
42069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42070$as_echo "$ac_ct_NM" >&6; }
42071else
42072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42073$as_echo "no" >&6; }
42074fi
42075
42076
42077  test -n "$ac_ct_NM" && break
42078done
42079
42080  if test "x$ac_ct_NM" = x; then
42081    NM=""
42082  else
42083    case $cross_compiling:$ac_tool_warned in
42084yes:)
42085{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42086$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42087ac_tool_warned=yes ;;
42088esac
42089    NM=$ac_ct_NM
42090  fi
42091fi
42092
42093  else
42094    # The variable is set, but is it from the command line or the environment?
42095
42096    # Try to remove the string !NM! from our list.
42097    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42098    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42099      # If it failed, the variable was not from the command line. Ignore it,
42100      # but warn the user (except for BASH, which is always set by the calling BASH).
42101      if test "xNM" != xBASH; then
42102        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42103$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42104      fi
42105      # Try to locate tool using the code snippet
42106      if test -n "$ac_tool_prefix"; then
42107  for ac_prog in nm
42108  do
42109    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42110set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42112$as_echo_n "checking for $ac_word... " >&6; }
42113if ${ac_cv_prog_NM+:} false; then :
42114  $as_echo_n "(cached) " >&6
42115else
42116  if test -n "$NM"; then
42117  ac_cv_prog_NM="$NM" # Let the user override the test.
42118else
42119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42120for as_dir in $PATH
42121do
42122  IFS=$as_save_IFS
42123  test -z "$as_dir" && as_dir=.
42124    for ac_exec_ext in '' $ac_executable_extensions; do
42125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42126    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42128    break 2
42129  fi
42130done
42131  done
42132IFS=$as_save_IFS
42133
42134fi
42135fi
42136NM=$ac_cv_prog_NM
42137if test -n "$NM"; then
42138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42139$as_echo "$NM" >&6; }
42140else
42141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42142$as_echo "no" >&6; }
42143fi
42144
42145
42146    test -n "$NM" && break
42147  done
42148fi
42149if test -z "$NM"; then
42150  ac_ct_NM=$NM
42151  for ac_prog in nm
42152do
42153  # Extract the first word of "$ac_prog", so it can be a program name with args.
42154set dummy $ac_prog; ac_word=$2
42155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42156$as_echo_n "checking for $ac_word... " >&6; }
42157if ${ac_cv_prog_ac_ct_NM+:} false; then :
42158  $as_echo_n "(cached) " >&6
42159else
42160  if test -n "$ac_ct_NM"; then
42161  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42162else
42163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42164for as_dir in $PATH
42165do
42166  IFS=$as_save_IFS
42167  test -z "$as_dir" && as_dir=.
42168    for ac_exec_ext in '' $ac_executable_extensions; do
42169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42170    ac_cv_prog_ac_ct_NM="$ac_prog"
42171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42172    break 2
42173  fi
42174done
42175  done
42176IFS=$as_save_IFS
42177
42178fi
42179fi
42180ac_ct_NM=$ac_cv_prog_ac_ct_NM
42181if test -n "$ac_ct_NM"; then
42182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42183$as_echo "$ac_ct_NM" >&6; }
42184else
42185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42186$as_echo "no" >&6; }
42187fi
42188
42189
42190  test -n "$ac_ct_NM" && break
42191done
42192
42193  if test "x$ac_ct_NM" = x; then
42194    NM=""
42195  else
42196    case $cross_compiling:$ac_tool_warned in
42197yes:)
42198{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42199$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42200ac_tool_warned=yes ;;
42201esac
42202    NM=$ac_ct_NM
42203  fi
42204fi
42205
42206    else
42207      # If it succeeded, then it was overridden by the user. We will use it
42208      # for the tool.
42209
42210      # First remove it from the list of overridden variables, so we can test
42211      # for unknown variables in the end.
42212      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42213
42214      # Check if we try to supply an empty value
42215      if test "x$NM" = x; then
42216        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42217$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42219$as_echo_n "checking for NM... " >&6; }
42220        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42221$as_echo "disabled" >&6; }
42222      else
42223        # Check if the provided tool contains a complete path.
42224        tool_specified="$NM"
42225        tool_basename="${tool_specified##*/}"
42226        if test "x$tool_basename" = "x$tool_specified"; then
42227          # A command without a complete path is provided, search $PATH.
42228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42229$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42230          # Extract the first word of "$tool_basename", so it can be a program name with args.
42231set dummy $tool_basename; ac_word=$2
42232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42233$as_echo_n "checking for $ac_word... " >&6; }
42234if ${ac_cv_path_NM+:} false; then :
42235  $as_echo_n "(cached) " >&6
42236else
42237  case $NM in
42238  [\\/]* | ?:[\\/]*)
42239  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42240  ;;
42241  *)
42242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42243for as_dir in $PATH
42244do
42245  IFS=$as_save_IFS
42246  test -z "$as_dir" && as_dir=.
42247    for ac_exec_ext in '' $ac_executable_extensions; do
42248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42249    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42251    break 2
42252  fi
42253done
42254  done
42255IFS=$as_save_IFS
42256
42257  ;;
42258esac
42259fi
42260NM=$ac_cv_path_NM
42261if test -n "$NM"; then
42262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42263$as_echo "$NM" >&6; }
42264else
42265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42266$as_echo "no" >&6; }
42267fi
42268
42269
42270          if test "x$NM" = x; then
42271            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42272          fi
42273        else
42274          # Otherwise we believe it is a complete path. Use it as it is.
42275          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42276$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42277          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42278$as_echo_n "checking for NM... " >&6; }
42279          if test ! -x "$tool_specified"; then
42280            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42281$as_echo "not found" >&6; }
42282            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42283          fi
42284          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42285$as_echo "$tool_specified" >&6; }
42286        fi
42287      fi
42288    fi
42289
42290  fi
42291
42292
42293    fi
42294
42295  # Only process if variable expands to non-empty
42296
42297  if test "x$NM" != x; then
42298    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42299
42300  # First separate the path from the arguments. This will split at the first
42301  # space.
42302  complete="$NM"
42303  path="${complete%% *}"
42304  tmp="$complete EOL"
42305  arguments="${tmp#* }"
42306
42307  # Input might be given as Windows format, start by converting to
42308  # unix format.
42309  new_path=`$CYGPATH -u "$path"`
42310
42311  # Now try to locate executable using which
42312  new_path=`$WHICH "$new_path" 2> /dev/null`
42313  # bat and cmd files are not always considered executable in cygwin causing which
42314  # to not find them
42315  if test "x$new_path" = x \
42316      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42317      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42318    new_path=`$CYGPATH -u "$path"`
42319  fi
42320  if test "x$new_path" = x; then
42321    # Oops. Which didn't find the executable.
42322    # The splitting of arguments from the executable at a space might have been incorrect,
42323    # since paths with space are more likely in Windows. Give it another try with the whole
42324    # argument.
42325    path="$complete"
42326    arguments="EOL"
42327    new_path=`$CYGPATH -u "$path"`
42328    new_path=`$WHICH "$new_path" 2> /dev/null`
42329    # bat and cmd files are not always considered executable in cygwin causing which
42330    # to not find them
42331    if test "x$new_path" = x \
42332        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42333        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42334      new_path=`$CYGPATH -u "$path"`
42335    fi
42336    if test "x$new_path" = x; then
42337      # It's still not found. Now this is an unrecoverable error.
42338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42339$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42340      has_space=`$ECHO "$complete" | $GREP " "`
42341      if test "x$has_space" != x; then
42342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42344      fi
42345      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42346    fi
42347  fi
42348
42349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42352  # "foo.exe" is OK but "foo" is an error.
42353  #
42354  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42355  # It is also a way to make sure we got the proper file name for the real test later on.
42356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42357  if test "x$test_shortpath" = x; then
42358    # Short path failed, file does not exist as specified.
42359    # Try adding .exe or .cmd
42360    if test -f "${new_path}.exe"; then
42361      input_to_shortpath="${new_path}.exe"
42362    elif test -f "${new_path}.cmd"; then
42363      input_to_shortpath="${new_path}.cmd"
42364    else
42365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42366$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42367      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42368$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42369      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42370    fi
42371  else
42372    input_to_shortpath="$new_path"
42373  fi
42374
42375  # Call helper function which possibly converts this using DOS-style short mode.
42376  # If so, the updated path is stored in $new_path.
42377  new_path="$input_to_shortpath"
42378
42379  input_path="$input_to_shortpath"
42380  # Check if we need to convert this using DOS-style short mode. If the path
42381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42382  # take no chances and rewrite it.
42383  # Note: m4 eats our [], so we need to use [ and ] instead.
42384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42385  if test "x$has_forbidden_chars" != x; then
42386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42390      # Going to short mode and back again did indeed matter. Since short mode is
42391      # case insensitive, let's make it lowercase to improve readability.
42392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42393      # Now convert it back to Unix-style (cygpath)
42394      input_path=`$CYGPATH -u "$shortmode_path"`
42395      new_path="$input_path"
42396    fi
42397  fi
42398
42399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42400  if test "x$test_cygdrive_prefix" = x; then
42401    # As a simple fix, exclude /usr/bin since it's not a real path.
42402    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42404      # a path prefixed by /cygdrive for fixpath to work.
42405      new_path="$CYGWIN_ROOT_PATH$input_path"
42406    fi
42407  fi
42408
42409  # remove trailing .exe if any
42410  new_path="${new_path/%.exe/}"
42411
42412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42413
42414  # First separate the path from the arguments. This will split at the first
42415  # space.
42416  complete="$NM"
42417  path="${complete%% *}"
42418  tmp="$complete EOL"
42419  arguments="${tmp#* }"
42420
42421  # Input might be given as Windows format, start by converting to
42422  # unix format.
42423  new_path="$path"
42424
42425  windows_path="$new_path"
42426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42427    unix_path=`$CYGPATH -u "$windows_path"`
42428    new_path="$unix_path"
42429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42431    new_path="$unix_path"
42432  fi
42433
42434
42435  # Now try to locate executable using which
42436  new_path=`$WHICH "$new_path" 2> /dev/null`
42437
42438  if test "x$new_path" = x; then
42439    # Oops. Which didn't find the executable.
42440    # The splitting of arguments from the executable at a space might have been incorrect,
42441    # since paths with space are more likely in Windows. Give it another try with the whole
42442    # argument.
42443    path="$complete"
42444    arguments="EOL"
42445    new_path="$path"
42446
42447  windows_path="$new_path"
42448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42449    unix_path=`$CYGPATH -u "$windows_path"`
42450    new_path="$unix_path"
42451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42453    new_path="$unix_path"
42454  fi
42455
42456
42457    new_path=`$WHICH "$new_path" 2> /dev/null`
42458    # bat and cmd files are not always considered executable in MSYS causing which
42459    # to not find them
42460    if test "x$new_path" = x \
42461        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42462        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42463      new_path="$path"
42464
42465  windows_path="$new_path"
42466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42467    unix_path=`$CYGPATH -u "$windows_path"`
42468    new_path="$unix_path"
42469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42471    new_path="$unix_path"
42472  fi
42473
42474    fi
42475
42476    if test "x$new_path" = x; then
42477      # It's still not found. Now this is an unrecoverable error.
42478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42479$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42480      has_space=`$ECHO "$complete" | $GREP " "`
42481      if test "x$has_space" != x; then
42482        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42483$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42484      fi
42485      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42486    fi
42487  fi
42488
42489  # Now new_path has a complete unix path to the binary
42490  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42491    # Keep paths in /bin as-is, but remove trailing .exe if any
42492    new_path="${new_path/%.exe/}"
42493    # Do not save /bin paths to all_fixpath_prefixes!
42494  else
42495    # Not in mixed or Windows style, start by that.
42496    new_path=`cmd //c echo $new_path`
42497
42498  input_path="$new_path"
42499  # Check if we need to convert this using DOS-style short mode. If the path
42500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42501  # take no chances and rewrite it.
42502  # Note: m4 eats our [], so we need to use [ and ] instead.
42503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42504  if test "x$has_forbidden_chars" != x; then
42505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42507  fi
42508
42509    # Output is in $new_path
42510
42511  windows_path="$new_path"
42512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42513    unix_path=`$CYGPATH -u "$windows_path"`
42514    new_path="$unix_path"
42515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42517    new_path="$unix_path"
42518  fi
42519
42520    # remove trailing .exe if any
42521    new_path="${new_path/%.exe/}"
42522
42523    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42524    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42525  fi
42526
42527    else
42528      # We're on a unix platform. Hooray! :)
42529      # First separate the path from the arguments. This will split at the first
42530      # space.
42531      complete="$NM"
42532      path="${complete%% *}"
42533      tmp="$complete EOL"
42534      arguments="${tmp#* }"
42535
42536      # Cannot rely on the command "which" here since it doesn't always work.
42537      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42538      if test -z "$is_absolute_path"; then
42539        # Path to executable is not absolute. Find it.
42540        IFS_save="$IFS"
42541        IFS=:
42542        for p in $PATH; do
42543          if test -f "$p/$path" && test -x "$p/$path"; then
42544            new_path="$p/$path"
42545            break
42546          fi
42547        done
42548        IFS="$IFS_save"
42549      else
42550        # This is an absolute path, we can use it without further modifications.
42551        new_path="$path"
42552      fi
42553
42554      if test "x$new_path" = x; then
42555        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42556$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42557        has_space=`$ECHO "$complete" | $GREP " "`
42558        if test "x$has_space" != x; then
42559          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42560$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42561        fi
42562        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42563      fi
42564    fi
42565
42566    # Now join together the path and the arguments once again
42567    if test "x$arguments" != xEOL; then
42568      new_complete="$new_path ${arguments% *}"
42569    else
42570      new_complete="$new_path"
42571    fi
42572
42573    if test "x$complete" != "x$new_complete"; then
42574      NM="$new_complete"
42575      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42576$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42577    fi
42578  fi
42579
42580    GNM="$NM"
42581
42582  fi
42583
42584  # objcopy is used for moving debug symbols to separate files when
42585  # full debug symbols are enabled.
42586  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42587
42588
42589  # Publish this variable in the help.
42590
42591
42592  if [ -z "${OBJCOPY+x}" ]; then
42593    # The variable is not set by user, try to locate tool using the code snippet
42594    if test -n "$ac_tool_prefix"; then
42595  for ac_prog in gobjcopy objcopy
42596  do
42597    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42598set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42600$as_echo_n "checking for $ac_word... " >&6; }
42601if ${ac_cv_prog_OBJCOPY+:} false; then :
42602  $as_echo_n "(cached) " >&6
42603else
42604  if test -n "$OBJCOPY"; then
42605  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42606else
42607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42608for as_dir in $PATH
42609do
42610  IFS=$as_save_IFS
42611  test -z "$as_dir" && as_dir=.
42612    for ac_exec_ext in '' $ac_executable_extensions; do
42613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42614    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42616    break 2
42617  fi
42618done
42619  done
42620IFS=$as_save_IFS
42621
42622fi
42623fi
42624OBJCOPY=$ac_cv_prog_OBJCOPY
42625if test -n "$OBJCOPY"; then
42626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42627$as_echo "$OBJCOPY" >&6; }
42628else
42629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42630$as_echo "no" >&6; }
42631fi
42632
42633
42634    test -n "$OBJCOPY" && break
42635  done
42636fi
42637if test -z "$OBJCOPY"; then
42638  ac_ct_OBJCOPY=$OBJCOPY
42639  for ac_prog in gobjcopy objcopy
42640do
42641  # Extract the first word of "$ac_prog", so it can be a program name with args.
42642set dummy $ac_prog; ac_word=$2
42643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42644$as_echo_n "checking for $ac_word... " >&6; }
42645if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42646  $as_echo_n "(cached) " >&6
42647else
42648  if test -n "$ac_ct_OBJCOPY"; then
42649  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42650else
42651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42652for as_dir in $PATH
42653do
42654  IFS=$as_save_IFS
42655  test -z "$as_dir" && as_dir=.
42656    for ac_exec_ext in '' $ac_executable_extensions; do
42657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42658    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42660    break 2
42661  fi
42662done
42663  done
42664IFS=$as_save_IFS
42665
42666fi
42667fi
42668ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42669if test -n "$ac_ct_OBJCOPY"; then
42670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42671$as_echo "$ac_ct_OBJCOPY" >&6; }
42672else
42673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42674$as_echo "no" >&6; }
42675fi
42676
42677
42678  test -n "$ac_ct_OBJCOPY" && break
42679done
42680
42681  if test "x$ac_ct_OBJCOPY" = x; then
42682    OBJCOPY=""
42683  else
42684    case $cross_compiling:$ac_tool_warned in
42685yes:)
42686{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42687$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42688ac_tool_warned=yes ;;
42689esac
42690    OBJCOPY=$ac_ct_OBJCOPY
42691  fi
42692fi
42693
42694  else
42695    # The variable is set, but is it from the command line or the environment?
42696
42697    # Try to remove the string !OBJCOPY! from our list.
42698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42700      # If it failed, the variable was not from the command line. Ignore it,
42701      # but warn the user (except for BASH, which is always set by the calling BASH).
42702      if test "xOBJCOPY" != xBASH; then
42703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42704$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42705      fi
42706      # Try to locate tool using the code snippet
42707      if test -n "$ac_tool_prefix"; then
42708  for ac_prog in gobjcopy objcopy
42709  do
42710    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42711set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42713$as_echo_n "checking for $ac_word... " >&6; }
42714if ${ac_cv_prog_OBJCOPY+:} false; then :
42715  $as_echo_n "(cached) " >&6
42716else
42717  if test -n "$OBJCOPY"; then
42718  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42719else
42720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42721for as_dir in $PATH
42722do
42723  IFS=$as_save_IFS
42724  test -z "$as_dir" && as_dir=.
42725    for ac_exec_ext in '' $ac_executable_extensions; do
42726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42727    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42729    break 2
42730  fi
42731done
42732  done
42733IFS=$as_save_IFS
42734
42735fi
42736fi
42737OBJCOPY=$ac_cv_prog_OBJCOPY
42738if test -n "$OBJCOPY"; then
42739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42740$as_echo "$OBJCOPY" >&6; }
42741else
42742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42743$as_echo "no" >&6; }
42744fi
42745
42746
42747    test -n "$OBJCOPY" && break
42748  done
42749fi
42750if test -z "$OBJCOPY"; then
42751  ac_ct_OBJCOPY=$OBJCOPY
42752  for ac_prog in gobjcopy objcopy
42753do
42754  # Extract the first word of "$ac_prog", so it can be a program name with args.
42755set dummy $ac_prog; ac_word=$2
42756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42757$as_echo_n "checking for $ac_word... " >&6; }
42758if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42759  $as_echo_n "(cached) " >&6
42760else
42761  if test -n "$ac_ct_OBJCOPY"; then
42762  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42763else
42764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42765for as_dir in $PATH
42766do
42767  IFS=$as_save_IFS
42768  test -z "$as_dir" && as_dir=.
42769    for ac_exec_ext in '' $ac_executable_extensions; do
42770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42771    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42773    break 2
42774  fi
42775done
42776  done
42777IFS=$as_save_IFS
42778
42779fi
42780fi
42781ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42782if test -n "$ac_ct_OBJCOPY"; then
42783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42784$as_echo "$ac_ct_OBJCOPY" >&6; }
42785else
42786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42787$as_echo "no" >&6; }
42788fi
42789
42790
42791  test -n "$ac_ct_OBJCOPY" && break
42792done
42793
42794  if test "x$ac_ct_OBJCOPY" = x; then
42795    OBJCOPY=""
42796  else
42797    case $cross_compiling:$ac_tool_warned in
42798yes:)
42799{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42800$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42801ac_tool_warned=yes ;;
42802esac
42803    OBJCOPY=$ac_ct_OBJCOPY
42804  fi
42805fi
42806
42807    else
42808      # If it succeeded, then it was overridden by the user. We will use it
42809      # for the tool.
42810
42811      # First remove it from the list of overridden variables, so we can test
42812      # for unknown variables in the end.
42813      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42814
42815      # Check if we try to supply an empty value
42816      if test "x$OBJCOPY" = x; then
42817        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42818$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42819        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42820$as_echo_n "checking for OBJCOPY... " >&6; }
42821        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42822$as_echo "disabled" >&6; }
42823      else
42824        # Check if the provided tool contains a complete path.
42825        tool_specified="$OBJCOPY"
42826        tool_basename="${tool_specified##*/}"
42827        if test "x$tool_basename" = "x$tool_specified"; then
42828          # A command without a complete path is provided, search $PATH.
42829          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42830$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42831          # Extract the first word of "$tool_basename", so it can be a program name with args.
42832set dummy $tool_basename; ac_word=$2
42833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42834$as_echo_n "checking for $ac_word... " >&6; }
42835if ${ac_cv_path_OBJCOPY+:} false; then :
42836  $as_echo_n "(cached) " >&6
42837else
42838  case $OBJCOPY in
42839  [\\/]* | ?:[\\/]*)
42840  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42841  ;;
42842  *)
42843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42844for as_dir in $PATH
42845do
42846  IFS=$as_save_IFS
42847  test -z "$as_dir" && as_dir=.
42848    for ac_exec_ext in '' $ac_executable_extensions; do
42849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42850    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42852    break 2
42853  fi
42854done
42855  done
42856IFS=$as_save_IFS
42857
42858  ;;
42859esac
42860fi
42861OBJCOPY=$ac_cv_path_OBJCOPY
42862if test -n "$OBJCOPY"; then
42863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42864$as_echo "$OBJCOPY" >&6; }
42865else
42866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42867$as_echo "no" >&6; }
42868fi
42869
42870
42871          if test "x$OBJCOPY" = x; then
42872            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42873          fi
42874        else
42875          # Otherwise we believe it is a complete path. Use it as it is.
42876          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42877$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42878          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42879$as_echo_n "checking for OBJCOPY... " >&6; }
42880          if test ! -x "$tool_specified"; then
42881            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42882$as_echo "not found" >&6; }
42883            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42884          fi
42885          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42886$as_echo "$tool_specified" >&6; }
42887        fi
42888      fi
42889    fi
42890
42891  fi
42892
42893
42894    # Only call fixup if objcopy was found.
42895    if test -n "$OBJCOPY"; then
42896
42897  # Only process if variable expands to non-empty
42898
42899  if test "x$OBJCOPY" != x; then
42900    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42901
42902  # First separate the path from the arguments. This will split at the first
42903  # space.
42904  complete="$OBJCOPY"
42905  path="${complete%% *}"
42906  tmp="$complete EOL"
42907  arguments="${tmp#* }"
42908
42909  # Input might be given as Windows format, start by converting to
42910  # unix format.
42911  new_path=`$CYGPATH -u "$path"`
42912
42913  # Now try to locate executable using which
42914  new_path=`$WHICH "$new_path" 2> /dev/null`
42915  # bat and cmd files are not always considered executable in cygwin causing which
42916  # to not find them
42917  if test "x$new_path" = x \
42918      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42919      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42920    new_path=`$CYGPATH -u "$path"`
42921  fi
42922  if test "x$new_path" = x; then
42923    # Oops. Which didn't find the executable.
42924    # The splitting of arguments from the executable at a space might have been incorrect,
42925    # since paths with space are more likely in Windows. Give it another try with the whole
42926    # argument.
42927    path="$complete"
42928    arguments="EOL"
42929    new_path=`$CYGPATH -u "$path"`
42930    new_path=`$WHICH "$new_path" 2> /dev/null`
42931    # bat and cmd files are not always considered executable in cygwin causing which
42932    # to not find them
42933    if test "x$new_path" = x \
42934        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42935        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42936      new_path=`$CYGPATH -u "$path"`
42937    fi
42938    if test "x$new_path" = x; then
42939      # It's still not found. Now this is an unrecoverable error.
42940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42941$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42942      has_space=`$ECHO "$complete" | $GREP " "`
42943      if test "x$has_space" != x; then
42944        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42945$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42946      fi
42947      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42948    fi
42949  fi
42950
42951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42954  # "foo.exe" is OK but "foo" is an error.
42955  #
42956  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42957  # It is also a way to make sure we got the proper file name for the real test later on.
42958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42959  if test "x$test_shortpath" = x; then
42960    # Short path failed, file does not exist as specified.
42961    # Try adding .exe or .cmd
42962    if test -f "${new_path}.exe"; then
42963      input_to_shortpath="${new_path}.exe"
42964    elif test -f "${new_path}.cmd"; then
42965      input_to_shortpath="${new_path}.cmd"
42966    else
42967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42968$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42969      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42970$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42971      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42972    fi
42973  else
42974    input_to_shortpath="$new_path"
42975  fi
42976
42977  # Call helper function which possibly converts this using DOS-style short mode.
42978  # If so, the updated path is stored in $new_path.
42979  new_path="$input_to_shortpath"
42980
42981  input_path="$input_to_shortpath"
42982  # Check if we need to convert this using DOS-style short mode. If the path
42983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42984  # take no chances and rewrite it.
42985  # Note: m4 eats our [], so we need to use [ and ] instead.
42986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42987  if test "x$has_forbidden_chars" != x; then
42988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42992      # Going to short mode and back again did indeed matter. Since short mode is
42993      # case insensitive, let's make it lowercase to improve readability.
42994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42995      # Now convert it back to Unix-style (cygpath)
42996      input_path=`$CYGPATH -u "$shortmode_path"`
42997      new_path="$input_path"
42998    fi
42999  fi
43000
43001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43002  if test "x$test_cygdrive_prefix" = x; then
43003    # As a simple fix, exclude /usr/bin since it's not a real path.
43004    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43006      # a path prefixed by /cygdrive for fixpath to work.
43007      new_path="$CYGWIN_ROOT_PATH$input_path"
43008    fi
43009  fi
43010
43011  # remove trailing .exe if any
43012  new_path="${new_path/%.exe/}"
43013
43014    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43015
43016  # First separate the path from the arguments. This will split at the first
43017  # space.
43018  complete="$OBJCOPY"
43019  path="${complete%% *}"
43020  tmp="$complete EOL"
43021  arguments="${tmp#* }"
43022
43023  # Input might be given as Windows format, start by converting to
43024  # unix format.
43025  new_path="$path"
43026
43027  windows_path="$new_path"
43028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43029    unix_path=`$CYGPATH -u "$windows_path"`
43030    new_path="$unix_path"
43031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43033    new_path="$unix_path"
43034  fi
43035
43036
43037  # Now try to locate executable using which
43038  new_path=`$WHICH "$new_path" 2> /dev/null`
43039
43040  if test "x$new_path" = x; then
43041    # Oops. Which didn't find the executable.
43042    # The splitting of arguments from the executable at a space might have been incorrect,
43043    # since paths with space are more likely in Windows. Give it another try with the whole
43044    # argument.
43045    path="$complete"
43046    arguments="EOL"
43047    new_path="$path"
43048
43049  windows_path="$new_path"
43050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43051    unix_path=`$CYGPATH -u "$windows_path"`
43052    new_path="$unix_path"
43053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43055    new_path="$unix_path"
43056  fi
43057
43058
43059    new_path=`$WHICH "$new_path" 2> /dev/null`
43060    # bat and cmd files are not always considered executable in MSYS causing which
43061    # to not find them
43062    if test "x$new_path" = x \
43063        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43064        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43065      new_path="$path"
43066
43067  windows_path="$new_path"
43068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43069    unix_path=`$CYGPATH -u "$windows_path"`
43070    new_path="$unix_path"
43071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43073    new_path="$unix_path"
43074  fi
43075
43076    fi
43077
43078    if test "x$new_path" = x; then
43079      # It's still not found. Now this is an unrecoverable error.
43080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43081$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43082      has_space=`$ECHO "$complete" | $GREP " "`
43083      if test "x$has_space" != x; then
43084        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43085$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43086      fi
43087      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43088    fi
43089  fi
43090
43091  # Now new_path has a complete unix path to the binary
43092  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43093    # Keep paths in /bin as-is, but remove trailing .exe if any
43094    new_path="${new_path/%.exe/}"
43095    # Do not save /bin paths to all_fixpath_prefixes!
43096  else
43097    # Not in mixed or Windows style, start by that.
43098    new_path=`cmd //c echo $new_path`
43099
43100  input_path="$new_path"
43101  # Check if we need to convert this using DOS-style short mode. If the path
43102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43103  # take no chances and rewrite it.
43104  # Note: m4 eats our [], so we need to use [ and ] instead.
43105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43106  if test "x$has_forbidden_chars" != x; then
43107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43109  fi
43110
43111    # Output is in $new_path
43112
43113  windows_path="$new_path"
43114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43115    unix_path=`$CYGPATH -u "$windows_path"`
43116    new_path="$unix_path"
43117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43119    new_path="$unix_path"
43120  fi
43121
43122    # remove trailing .exe if any
43123    new_path="${new_path/%.exe/}"
43124
43125    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43126    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43127  fi
43128
43129    else
43130      # We're on a unix platform. Hooray! :)
43131      # First separate the path from the arguments. This will split at the first
43132      # space.
43133      complete="$OBJCOPY"
43134      path="${complete%% *}"
43135      tmp="$complete EOL"
43136      arguments="${tmp#* }"
43137
43138      # Cannot rely on the command "which" here since it doesn't always work.
43139      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43140      if test -z "$is_absolute_path"; then
43141        # Path to executable is not absolute. Find it.
43142        IFS_save="$IFS"
43143        IFS=:
43144        for p in $PATH; do
43145          if test -f "$p/$path" && test -x "$p/$path"; then
43146            new_path="$p/$path"
43147            break
43148          fi
43149        done
43150        IFS="$IFS_save"
43151      else
43152        # This is an absolute path, we can use it without further modifications.
43153        new_path="$path"
43154      fi
43155
43156      if test "x$new_path" = x; then
43157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43158$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43159        has_space=`$ECHO "$complete" | $GREP " "`
43160        if test "x$has_space" != x; then
43161          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43162$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43163        fi
43164        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43165      fi
43166    fi
43167
43168    # Now join together the path and the arguments once again
43169    if test "x$arguments" != xEOL; then
43170      new_complete="$new_path ${arguments% *}"
43171    else
43172      new_complete="$new_path"
43173    fi
43174
43175    if test "x$complete" != "x$new_complete"; then
43176      OBJCOPY="$new_complete"
43177      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43178$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43179    fi
43180  fi
43181
43182      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43183        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43184        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43185        # - version number is last blank separate word on first line
43186        # - version number formats that have been seen:
43187        #   - <major>.<minor>
43188        #   - <major>.<minor>.<micro>
43189        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43190        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43191         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43192              -e 's/.* //' \
43193              -e '/^[01]\./b bad' \
43194              -e '/^2\./{' \
43195              -e '  s/^2\.//' \
43196              -e '  /^[0-9]$/b bad' \
43197              -e '  /^[0-9]\./b bad' \
43198              -e '  /^1[0-9]$/b bad' \
43199              -e '  /^1[0-9]\./b bad' \
43200              -e '  /^20\./b bad' \
43201              -e '  /^21\.0$/b bad' \
43202              -e '  /^21\.0\./b bad' \
43203              -e '}' \
43204              -e ':good' \
43205              -e 's/.*/VALID_VERSION/p' \
43206              -e 'q' \
43207              -e ':bad' \
43208              -e 's/.*/BAD_VERSION/p' \
43209              -e 'q'`
43210        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43211          OBJCOPY=
43212          { $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
43213$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43214          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43215$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43216          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43217$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43218          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43219$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43220          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43221$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43222        fi
43223      fi
43224    fi
43225  fi
43226
43227
43228
43229  # Publish this variable in the help.
43230
43231
43232  if [ -z "${OBJDUMP+x}" ]; then
43233    # The variable is not set by user, try to locate tool using the code snippet
43234    if test -n "$ac_tool_prefix"; then
43235  for ac_prog in gobjdump objdump
43236  do
43237    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43238set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43240$as_echo_n "checking for $ac_word... " >&6; }
43241if ${ac_cv_prog_OBJDUMP+:} false; then :
43242  $as_echo_n "(cached) " >&6
43243else
43244  if test -n "$OBJDUMP"; then
43245  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43246else
43247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43248for as_dir in $PATH
43249do
43250  IFS=$as_save_IFS
43251  test -z "$as_dir" && as_dir=.
43252    for ac_exec_ext in '' $ac_executable_extensions; do
43253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43254    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43256    break 2
43257  fi
43258done
43259  done
43260IFS=$as_save_IFS
43261
43262fi
43263fi
43264OBJDUMP=$ac_cv_prog_OBJDUMP
43265if test -n "$OBJDUMP"; then
43266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43267$as_echo "$OBJDUMP" >&6; }
43268else
43269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43270$as_echo "no" >&6; }
43271fi
43272
43273
43274    test -n "$OBJDUMP" && break
43275  done
43276fi
43277if test -z "$OBJDUMP"; then
43278  ac_ct_OBJDUMP=$OBJDUMP
43279  for ac_prog in gobjdump objdump
43280do
43281  # Extract the first word of "$ac_prog", so it can be a program name with args.
43282set dummy $ac_prog; ac_word=$2
43283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43284$as_echo_n "checking for $ac_word... " >&6; }
43285if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43286  $as_echo_n "(cached) " >&6
43287else
43288  if test -n "$ac_ct_OBJDUMP"; then
43289  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43290else
43291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43292for as_dir in $PATH
43293do
43294  IFS=$as_save_IFS
43295  test -z "$as_dir" && as_dir=.
43296    for ac_exec_ext in '' $ac_executable_extensions; do
43297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43298    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43300    break 2
43301  fi
43302done
43303  done
43304IFS=$as_save_IFS
43305
43306fi
43307fi
43308ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43309if test -n "$ac_ct_OBJDUMP"; then
43310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43311$as_echo "$ac_ct_OBJDUMP" >&6; }
43312else
43313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43314$as_echo "no" >&6; }
43315fi
43316
43317
43318  test -n "$ac_ct_OBJDUMP" && break
43319done
43320
43321  if test "x$ac_ct_OBJDUMP" = x; then
43322    OBJDUMP=""
43323  else
43324    case $cross_compiling:$ac_tool_warned in
43325yes:)
43326{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43327$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43328ac_tool_warned=yes ;;
43329esac
43330    OBJDUMP=$ac_ct_OBJDUMP
43331  fi
43332fi
43333
43334  else
43335    # The variable is set, but is it from the command line or the environment?
43336
43337    # Try to remove the string !OBJDUMP! from our list.
43338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43340      # If it failed, the variable was not from the command line. Ignore it,
43341      # but warn the user (except for BASH, which is always set by the calling BASH).
43342      if test "xOBJDUMP" != xBASH; then
43343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43344$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43345      fi
43346      # Try to locate tool using the code snippet
43347      if test -n "$ac_tool_prefix"; then
43348  for ac_prog in gobjdump objdump
43349  do
43350    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43351set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43353$as_echo_n "checking for $ac_word... " >&6; }
43354if ${ac_cv_prog_OBJDUMP+:} false; then :
43355  $as_echo_n "(cached) " >&6
43356else
43357  if test -n "$OBJDUMP"; then
43358  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43359else
43360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43361for as_dir in $PATH
43362do
43363  IFS=$as_save_IFS
43364  test -z "$as_dir" && as_dir=.
43365    for ac_exec_ext in '' $ac_executable_extensions; do
43366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43367    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43369    break 2
43370  fi
43371done
43372  done
43373IFS=$as_save_IFS
43374
43375fi
43376fi
43377OBJDUMP=$ac_cv_prog_OBJDUMP
43378if test -n "$OBJDUMP"; then
43379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43380$as_echo "$OBJDUMP" >&6; }
43381else
43382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43383$as_echo "no" >&6; }
43384fi
43385
43386
43387    test -n "$OBJDUMP" && break
43388  done
43389fi
43390if test -z "$OBJDUMP"; then
43391  ac_ct_OBJDUMP=$OBJDUMP
43392  for ac_prog in gobjdump objdump
43393do
43394  # Extract the first word of "$ac_prog", so it can be a program name with args.
43395set dummy $ac_prog; ac_word=$2
43396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43397$as_echo_n "checking for $ac_word... " >&6; }
43398if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43399  $as_echo_n "(cached) " >&6
43400else
43401  if test -n "$ac_ct_OBJDUMP"; then
43402  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43403else
43404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43405for as_dir in $PATH
43406do
43407  IFS=$as_save_IFS
43408  test -z "$as_dir" && as_dir=.
43409    for ac_exec_ext in '' $ac_executable_extensions; do
43410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43411    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43413    break 2
43414  fi
43415done
43416  done
43417IFS=$as_save_IFS
43418
43419fi
43420fi
43421ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43422if test -n "$ac_ct_OBJDUMP"; then
43423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43424$as_echo "$ac_ct_OBJDUMP" >&6; }
43425else
43426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43427$as_echo "no" >&6; }
43428fi
43429
43430
43431  test -n "$ac_ct_OBJDUMP" && break
43432done
43433
43434  if test "x$ac_ct_OBJDUMP" = x; then
43435    OBJDUMP=""
43436  else
43437    case $cross_compiling:$ac_tool_warned in
43438yes:)
43439{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43440$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43441ac_tool_warned=yes ;;
43442esac
43443    OBJDUMP=$ac_ct_OBJDUMP
43444  fi
43445fi
43446
43447    else
43448      # If it succeeded, then it was overridden by the user. We will use it
43449      # for the tool.
43450
43451      # First remove it from the list of overridden variables, so we can test
43452      # for unknown variables in the end.
43453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43454
43455      # Check if we try to supply an empty value
43456      if test "x$OBJDUMP" = x; then
43457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43458$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43460$as_echo_n "checking for OBJDUMP... " >&6; }
43461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43462$as_echo "disabled" >&6; }
43463      else
43464        # Check if the provided tool contains a complete path.
43465        tool_specified="$OBJDUMP"
43466        tool_basename="${tool_specified##*/}"
43467        if test "x$tool_basename" = "x$tool_specified"; then
43468          # A command without a complete path is provided, search $PATH.
43469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43470$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43471          # Extract the first word of "$tool_basename", so it can be a program name with args.
43472set dummy $tool_basename; ac_word=$2
43473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43474$as_echo_n "checking for $ac_word... " >&6; }
43475if ${ac_cv_path_OBJDUMP+:} false; then :
43476  $as_echo_n "(cached) " >&6
43477else
43478  case $OBJDUMP in
43479  [\\/]* | ?:[\\/]*)
43480  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43481  ;;
43482  *)
43483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43484for as_dir in $PATH
43485do
43486  IFS=$as_save_IFS
43487  test -z "$as_dir" && as_dir=.
43488    for ac_exec_ext in '' $ac_executable_extensions; do
43489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43490    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43492    break 2
43493  fi
43494done
43495  done
43496IFS=$as_save_IFS
43497
43498  ;;
43499esac
43500fi
43501OBJDUMP=$ac_cv_path_OBJDUMP
43502if test -n "$OBJDUMP"; then
43503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43504$as_echo "$OBJDUMP" >&6; }
43505else
43506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43507$as_echo "no" >&6; }
43508fi
43509
43510
43511          if test "x$OBJDUMP" = x; then
43512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43513          fi
43514        else
43515          # Otherwise we believe it is a complete path. Use it as it is.
43516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43517$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43519$as_echo_n "checking for OBJDUMP... " >&6; }
43520          if test ! -x "$tool_specified"; then
43521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43522$as_echo "not found" >&6; }
43523            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43524          fi
43525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43526$as_echo "$tool_specified" >&6; }
43527        fi
43528      fi
43529    fi
43530
43531  fi
43532
43533
43534  if test "x$OBJDUMP" != x; then
43535    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43536    # bails if argument is missing.
43537
43538  # Only process if variable expands to non-empty
43539
43540  if test "x$OBJDUMP" != x; then
43541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43542
43543  # First separate the path from the arguments. This will split at the first
43544  # space.
43545  complete="$OBJDUMP"
43546  path="${complete%% *}"
43547  tmp="$complete EOL"
43548  arguments="${tmp#* }"
43549
43550  # Input might be given as Windows format, start by converting to
43551  # unix format.
43552  new_path=`$CYGPATH -u "$path"`
43553
43554  # Now try to locate executable using which
43555  new_path=`$WHICH "$new_path" 2> /dev/null`
43556  # bat and cmd files are not always considered executable in cygwin causing which
43557  # to not find them
43558  if test "x$new_path" = x \
43559      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43560      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43561    new_path=`$CYGPATH -u "$path"`
43562  fi
43563  if test "x$new_path" = x; then
43564    # Oops. Which didn't find the executable.
43565    # The splitting of arguments from the executable at a space might have been incorrect,
43566    # since paths with space are more likely in Windows. Give it another try with the whole
43567    # argument.
43568    path="$complete"
43569    arguments="EOL"
43570    new_path=`$CYGPATH -u "$path"`
43571    new_path=`$WHICH "$new_path" 2> /dev/null`
43572    # bat and cmd files are not always considered executable in cygwin causing which
43573    # to not find them
43574    if test "x$new_path" = x \
43575        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43576        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43577      new_path=`$CYGPATH -u "$path"`
43578    fi
43579    if test "x$new_path" = x; then
43580      # It's still not found. Now this is an unrecoverable error.
43581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43582$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43583      has_space=`$ECHO "$complete" | $GREP " "`
43584      if test "x$has_space" != x; then
43585        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43586$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43587      fi
43588      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43589    fi
43590  fi
43591
43592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43595  # "foo.exe" is OK but "foo" is an error.
43596  #
43597  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43598  # It is also a way to make sure we got the proper file name for the real test later on.
43599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43600  if test "x$test_shortpath" = x; then
43601    # Short path failed, file does not exist as specified.
43602    # Try adding .exe or .cmd
43603    if test -f "${new_path}.exe"; then
43604      input_to_shortpath="${new_path}.exe"
43605    elif test -f "${new_path}.cmd"; then
43606      input_to_shortpath="${new_path}.cmd"
43607    else
43608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43609$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43610      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43611$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43612      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43613    fi
43614  else
43615    input_to_shortpath="$new_path"
43616  fi
43617
43618  # Call helper function which possibly converts this using DOS-style short mode.
43619  # If so, the updated path is stored in $new_path.
43620  new_path="$input_to_shortpath"
43621
43622  input_path="$input_to_shortpath"
43623  # Check if we need to convert this using DOS-style short mode. If the path
43624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43625  # take no chances and rewrite it.
43626  # Note: m4 eats our [], so we need to use [ and ] instead.
43627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43628  if test "x$has_forbidden_chars" != x; then
43629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43633      # Going to short mode and back again did indeed matter. Since short mode is
43634      # case insensitive, let's make it lowercase to improve readability.
43635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43636      # Now convert it back to Unix-style (cygpath)
43637      input_path=`$CYGPATH -u "$shortmode_path"`
43638      new_path="$input_path"
43639    fi
43640  fi
43641
43642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43643  if test "x$test_cygdrive_prefix" = x; then
43644    # As a simple fix, exclude /usr/bin since it's not a real path.
43645    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43647      # a path prefixed by /cygdrive for fixpath to work.
43648      new_path="$CYGWIN_ROOT_PATH$input_path"
43649    fi
43650  fi
43651
43652  # remove trailing .exe if any
43653  new_path="${new_path/%.exe/}"
43654
43655    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43656
43657  # First separate the path from the arguments. This will split at the first
43658  # space.
43659  complete="$OBJDUMP"
43660  path="${complete%% *}"
43661  tmp="$complete EOL"
43662  arguments="${tmp#* }"
43663
43664  # Input might be given as Windows format, start by converting to
43665  # unix format.
43666  new_path="$path"
43667
43668  windows_path="$new_path"
43669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43670    unix_path=`$CYGPATH -u "$windows_path"`
43671    new_path="$unix_path"
43672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43674    new_path="$unix_path"
43675  fi
43676
43677
43678  # Now try to locate executable using which
43679  new_path=`$WHICH "$new_path" 2> /dev/null`
43680
43681  if test "x$new_path" = x; then
43682    # Oops. Which didn't find the executable.
43683    # The splitting of arguments from the executable at a space might have been incorrect,
43684    # since paths with space are more likely in Windows. Give it another try with the whole
43685    # argument.
43686    path="$complete"
43687    arguments="EOL"
43688    new_path="$path"
43689
43690  windows_path="$new_path"
43691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43692    unix_path=`$CYGPATH -u "$windows_path"`
43693    new_path="$unix_path"
43694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43696    new_path="$unix_path"
43697  fi
43698
43699
43700    new_path=`$WHICH "$new_path" 2> /dev/null`
43701    # bat and cmd files are not always considered executable in MSYS causing which
43702    # to not find them
43703    if test "x$new_path" = x \
43704        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43705        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43706      new_path="$path"
43707
43708  windows_path="$new_path"
43709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43710    unix_path=`$CYGPATH -u "$windows_path"`
43711    new_path="$unix_path"
43712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43714    new_path="$unix_path"
43715  fi
43716
43717    fi
43718
43719    if test "x$new_path" = x; then
43720      # It's still not found. Now this is an unrecoverable error.
43721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43722$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43723      has_space=`$ECHO "$complete" | $GREP " "`
43724      if test "x$has_space" != x; then
43725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43727      fi
43728      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43729    fi
43730  fi
43731
43732  # Now new_path has a complete unix path to the binary
43733  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43734    # Keep paths in /bin as-is, but remove trailing .exe if any
43735    new_path="${new_path/%.exe/}"
43736    # Do not save /bin paths to all_fixpath_prefixes!
43737  else
43738    # Not in mixed or Windows style, start by that.
43739    new_path=`cmd //c echo $new_path`
43740
43741  input_path="$new_path"
43742  # Check if we need to convert this using DOS-style short mode. If the path
43743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43744  # take no chances and rewrite it.
43745  # Note: m4 eats our [], so we need to use [ and ] instead.
43746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43747  if test "x$has_forbidden_chars" != x; then
43748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43750  fi
43751
43752    # Output is in $new_path
43753
43754  windows_path="$new_path"
43755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43756    unix_path=`$CYGPATH -u "$windows_path"`
43757    new_path="$unix_path"
43758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43760    new_path="$unix_path"
43761  fi
43762
43763    # remove trailing .exe if any
43764    new_path="${new_path/%.exe/}"
43765
43766    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43767    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43768  fi
43769
43770    else
43771      # We're on a unix platform. Hooray! :)
43772      # First separate the path from the arguments. This will split at the first
43773      # space.
43774      complete="$OBJDUMP"
43775      path="${complete%% *}"
43776      tmp="$complete EOL"
43777      arguments="${tmp#* }"
43778
43779      # Cannot rely on the command "which" here since it doesn't always work.
43780      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43781      if test -z "$is_absolute_path"; then
43782        # Path to executable is not absolute. Find it.
43783        IFS_save="$IFS"
43784        IFS=:
43785        for p in $PATH; do
43786          if test -f "$p/$path" && test -x "$p/$path"; then
43787            new_path="$p/$path"
43788            break
43789          fi
43790        done
43791        IFS="$IFS_save"
43792      else
43793        # This is an absolute path, we can use it without further modifications.
43794        new_path="$path"
43795      fi
43796
43797      if test "x$new_path" = x; then
43798        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43799$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43800        has_space=`$ECHO "$complete" | $GREP " "`
43801        if test "x$has_space" != x; then
43802          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43803$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43804        fi
43805        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43806      fi
43807    fi
43808
43809    # Now join together the path and the arguments once again
43810    if test "x$arguments" != xEOL; then
43811      new_complete="$new_path ${arguments% *}"
43812    else
43813      new_complete="$new_path"
43814    fi
43815
43816    if test "x$complete" != "x$new_complete"; then
43817      OBJDUMP="$new_complete"
43818      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43819$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43820    fi
43821  fi
43822
43823  fi
43824
43825
43826  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43827  # to remain in place. Otherwise the compiler will not work in some siutations
43828  # in later configure checks.
43829  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43830    PATH="$OLD_PATH"
43831  fi
43832
43833  # Restore the flags to the user specified values.
43834  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43835  CFLAGS="$ORG_CFLAGS"
43836  CXXFLAGS="$ORG_CXXFLAGS"
43837
43838
43839# Finally do some processing after the detection phase
43840
43841  if test "x$COMPILE_TYPE" = "xcross"; then
43842    # Now we need to find a C/C++ compiler that can build executables for the
43843    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43844    # used once. Also, we need to do this without adding a tools dir to the
43845    # path, otherwise we might pick up cross-compilers which don't use standard
43846    # naming.
43847
43848    OLDPATH="$PATH"
43849
43850
43851# Check whether --with-build-devkit was given.
43852if test "${with_build_devkit+set}" = set; then :
43853  withval=$with_build_devkit;
43854fi
43855
43856    if test "x$with_build_devkit" = "xyes"; then
43857      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43858    elif test -n "$with_build_devkit"; then
43859      if test ! -d "$with_build_devkit"; then
43860        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43861      else
43862
43863  # Only process if variable expands to non-empty
43864
43865  if test "x$with_build_devkit" != x; then
43866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43867
43868  # Input might be given as Windows format, start by converting to
43869  # unix format.
43870  path="$with_build_devkit"
43871  new_path=`$CYGPATH -u "$path"`
43872
43873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43876  # "foo.exe" is OK but "foo" is an error.
43877  #
43878  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43879  # It is also a way to make sure we got the proper file name for the real test later on.
43880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43881  if test "x$test_shortpath" = x; then
43882    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43883$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43884    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43885  fi
43886
43887  # Call helper function which possibly converts this using DOS-style short mode.
43888  # If so, the updated path is stored in $new_path.
43889
43890  input_path="$new_path"
43891  # Check if we need to convert this using DOS-style short mode. If the path
43892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43893  # take no chances and rewrite it.
43894  # Note: m4 eats our [], so we need to use [ and ] instead.
43895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43896  if test "x$has_forbidden_chars" != x; then
43897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43901      # Going to short mode and back again did indeed matter. Since short mode is
43902      # case insensitive, let's make it lowercase to improve readability.
43903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43904      # Now convert it back to Unix-style (cygpath)
43905      input_path=`$CYGPATH -u "$shortmode_path"`
43906      new_path="$input_path"
43907    fi
43908  fi
43909
43910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43911  if test "x$test_cygdrive_prefix" = x; then
43912    # As a simple fix, exclude /usr/bin since it's not a real path.
43913    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43915      # a path prefixed by /cygdrive for fixpath to work.
43916      new_path="$CYGWIN_ROOT_PATH$input_path"
43917    fi
43918  fi
43919
43920
43921  if test "x$path" != "x$new_path"; then
43922    with_build_devkit="$new_path"
43923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43924$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43925  fi
43926
43927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43928
43929  path="$with_build_devkit"
43930  has_colon=`$ECHO $path | $GREP ^.:`
43931  new_path="$path"
43932  if test "x$has_colon" = x; then
43933    # Not in mixed or Windows style, start by that.
43934    new_path=`cmd //c echo $path`
43935  fi
43936
43937
43938  input_path="$new_path"
43939  # Check if we need to convert this using DOS-style short mode. If the path
43940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43941  # take no chances and rewrite it.
43942  # Note: m4 eats our [], so we need to use [ and ] instead.
43943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43944  if test "x$has_forbidden_chars" != x; then
43945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43947  fi
43948
43949
43950  windows_path="$new_path"
43951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43952    unix_path=`$CYGPATH -u "$windows_path"`
43953    new_path="$unix_path"
43954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43956    new_path="$unix_path"
43957  fi
43958
43959  if test "x$path" != "x$new_path"; then
43960    with_build_devkit="$new_path"
43961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43962$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43963  fi
43964
43965  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43966  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43967
43968    else
43969      # We're on a unix platform. Hooray! :)
43970      path="$with_build_devkit"
43971      has_space=`$ECHO "$path" | $GREP " "`
43972      if test "x$has_space" != x; then
43973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43974$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43975        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43976      fi
43977
43978      # Use eval to expand a potential ~
43979      eval path="$path"
43980      if test ! -f "$path" && test ! -d "$path"; then
43981        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43982      fi
43983
43984      if test -d "$path"; then
43985        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43986      else
43987        dir="`$DIRNAME "$path"`"
43988        base="`$BASENAME "$path"`"
43989        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43990      fi
43991    fi
43992  fi
43993
43994        BUILD_DEVKIT_ROOT="$with_build_devkit"
43995        # Check for a meta data info file in the root of the devkit
43996        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43997          # Process devkit.info so that existing devkit variables are not
43998          # modified by this
43999          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44000              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44001              -e "s/\$host/\$build/g" \
44002              $BUILD_DEVKIT_ROOT/devkit.info \
44003              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44004          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44005          # This potentially sets the following:
44006          # A descriptive name of the devkit
44007
44008  if test "x$BUILD_DEVKIT_NAME" = x; then
44009    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44010  fi
44011
44012          # Corresponds to --with-extra-path
44013
44014  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44015    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44016  fi
44017
44018          # Corresponds to --with-toolchain-path
44019
44020  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44021    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44022  fi
44023
44024          # Corresponds to --with-sysroot
44025
44026  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44027    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44028  fi
44029
44030          # Skip the Window specific parts
44031        fi
44032
44033        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44034$as_echo_n "checking for build platform devkit... " >&6; }
44035        if test "x$BUILD_DEVKIT_NAME" != x; then
44036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44037$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44038        else
44039          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44040$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44041        fi
44042
44043        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44044
44045  if test "x$BUILD_SYSROOT" != "x"; then
44046    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44047      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44048        # Solaris Studio does not have a concept of sysroot. Instead we must
44049        # make sure the default include and lib dirs are appended to each
44050        # compile and link command line. Must also add -I-xbuiltin to enable
44051        # inlining of system functions and intrinsics.
44052        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44053        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44054            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44055      fi
44056    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44057      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44058      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44059    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44060      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44061      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44062    fi
44063    # The global CFLAGS and LDFLAGS variables need these for configure to function
44064    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44065    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44066    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44067    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44068  fi
44069
44070  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44071    # We also need -iframework<path>/System/Library/Frameworks
44072    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44073    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44074    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44075    # set this here so it doesn't have to be peppered throughout the forest
44076    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44077    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44078  fi
44079
44080
44081
44082
44083
44084         # Fallback default of just /bin if DEVKIT_PATH is not defined
44085        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44086          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44087        fi
44088        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44089      fi
44090    fi
44091
44092    # FIXME: we should list the discovered compilers as an exclude pattern!
44093    # If we do that, we can do this detection before POST_DETECTION, and still
44094    # find the build compilers in the tools dir, if needed.
44095
44096
44097
44098  # Publish this variable in the help.
44099
44100
44101  if [ -z "${BUILD_CC+x}" ]; then
44102    # The variable is not set by user, try to locate tool using the code snippet
44103    for ac_prog in cl cc gcc
44104do
44105  # Extract the first word of "$ac_prog", so it can be a program name with args.
44106set dummy $ac_prog; ac_word=$2
44107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44108$as_echo_n "checking for $ac_word... " >&6; }
44109if ${ac_cv_path_BUILD_CC+:} false; then :
44110  $as_echo_n "(cached) " >&6
44111else
44112  case $BUILD_CC in
44113  [\\/]* | ?:[\\/]*)
44114  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44115  ;;
44116  *)
44117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44118for as_dir in $PATH
44119do
44120  IFS=$as_save_IFS
44121  test -z "$as_dir" && as_dir=.
44122    for ac_exec_ext in '' $ac_executable_extensions; do
44123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44124    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44126    break 2
44127  fi
44128done
44129  done
44130IFS=$as_save_IFS
44131
44132  ;;
44133esac
44134fi
44135BUILD_CC=$ac_cv_path_BUILD_CC
44136if test -n "$BUILD_CC"; then
44137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44138$as_echo "$BUILD_CC" >&6; }
44139else
44140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44141$as_echo "no" >&6; }
44142fi
44143
44144
44145  test -n "$BUILD_CC" && break
44146done
44147
44148  else
44149    # The variable is set, but is it from the command line or the environment?
44150
44151    # Try to remove the string !BUILD_CC! from our list.
44152    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44153    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44154      # If it failed, the variable was not from the command line. Ignore it,
44155      # but warn the user (except for BASH, which is always set by the calling BASH).
44156      if test "xBUILD_CC" != xBASH; then
44157        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44158$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44159      fi
44160      # Try to locate tool using the code snippet
44161      for ac_prog in cl cc gcc
44162do
44163  # Extract the first word of "$ac_prog", so it can be a program name with args.
44164set dummy $ac_prog; ac_word=$2
44165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44166$as_echo_n "checking for $ac_word... " >&6; }
44167if ${ac_cv_path_BUILD_CC+:} false; then :
44168  $as_echo_n "(cached) " >&6
44169else
44170  case $BUILD_CC in
44171  [\\/]* | ?:[\\/]*)
44172  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44173  ;;
44174  *)
44175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44176for as_dir in $PATH
44177do
44178  IFS=$as_save_IFS
44179  test -z "$as_dir" && as_dir=.
44180    for ac_exec_ext in '' $ac_executable_extensions; do
44181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44182    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44184    break 2
44185  fi
44186done
44187  done
44188IFS=$as_save_IFS
44189
44190  ;;
44191esac
44192fi
44193BUILD_CC=$ac_cv_path_BUILD_CC
44194if test -n "$BUILD_CC"; then
44195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44196$as_echo "$BUILD_CC" >&6; }
44197else
44198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44199$as_echo "no" >&6; }
44200fi
44201
44202
44203  test -n "$BUILD_CC" && break
44204done
44205
44206    else
44207      # If it succeeded, then it was overridden by the user. We will use it
44208      # for the tool.
44209
44210      # First remove it from the list of overridden variables, so we can test
44211      # for unknown variables in the end.
44212      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44213
44214      # Check if we try to supply an empty value
44215      if test "x$BUILD_CC" = x; then
44216        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44217$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44219$as_echo_n "checking for BUILD_CC... " >&6; }
44220        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44221$as_echo "disabled" >&6; }
44222      else
44223        # Check if the provided tool contains a complete path.
44224        tool_specified="$BUILD_CC"
44225        tool_basename="${tool_specified##*/}"
44226        if test "x$tool_basename" = "x$tool_specified"; then
44227          # A command without a complete path is provided, search $PATH.
44228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44229$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44230          # Extract the first word of "$tool_basename", so it can be a program name with args.
44231set dummy $tool_basename; ac_word=$2
44232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44233$as_echo_n "checking for $ac_word... " >&6; }
44234if ${ac_cv_path_BUILD_CC+:} false; then :
44235  $as_echo_n "(cached) " >&6
44236else
44237  case $BUILD_CC in
44238  [\\/]* | ?:[\\/]*)
44239  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44240  ;;
44241  *)
44242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44243for as_dir in $PATH
44244do
44245  IFS=$as_save_IFS
44246  test -z "$as_dir" && as_dir=.
44247    for ac_exec_ext in '' $ac_executable_extensions; do
44248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44249    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44251    break 2
44252  fi
44253done
44254  done
44255IFS=$as_save_IFS
44256
44257  ;;
44258esac
44259fi
44260BUILD_CC=$ac_cv_path_BUILD_CC
44261if test -n "$BUILD_CC"; then
44262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44263$as_echo "$BUILD_CC" >&6; }
44264else
44265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44266$as_echo "no" >&6; }
44267fi
44268
44269
44270          if test "x$BUILD_CC" = x; then
44271            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44272          fi
44273        else
44274          # Otherwise we believe it is a complete path. Use it as it is.
44275          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44276$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44277          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44278$as_echo_n "checking for BUILD_CC... " >&6; }
44279          if test ! -x "$tool_specified"; then
44280            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44281$as_echo "not found" >&6; }
44282            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44283          fi
44284          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44285$as_echo "$tool_specified" >&6; }
44286        fi
44287      fi
44288    fi
44289
44290  fi
44291
44292
44293
44294  if test "x$BUILD_CC" = x; then
44295    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44296  fi
44297
44298
44299
44300  # Only process if variable expands to non-empty
44301
44302  if test "x$BUILD_CC" != x; then
44303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44304
44305  # First separate the path from the arguments. This will split at the first
44306  # space.
44307  complete="$BUILD_CC"
44308  path="${complete%% *}"
44309  tmp="$complete EOL"
44310  arguments="${tmp#* }"
44311
44312  # Input might be given as Windows format, start by converting to
44313  # unix format.
44314  new_path=`$CYGPATH -u "$path"`
44315
44316  # Now try to locate executable using which
44317  new_path=`$WHICH "$new_path" 2> /dev/null`
44318  # bat and cmd files are not always considered executable in cygwin causing which
44319  # to not find them
44320  if test "x$new_path" = x \
44321      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44322      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44323    new_path=`$CYGPATH -u "$path"`
44324  fi
44325  if test "x$new_path" = x; then
44326    # Oops. Which didn't find the executable.
44327    # The splitting of arguments from the executable at a space might have been incorrect,
44328    # since paths with space are more likely in Windows. Give it another try with the whole
44329    # argument.
44330    path="$complete"
44331    arguments="EOL"
44332    new_path=`$CYGPATH -u "$path"`
44333    new_path=`$WHICH "$new_path" 2> /dev/null`
44334    # bat and cmd files are not always considered executable in cygwin causing which
44335    # to not find them
44336    if test "x$new_path" = x \
44337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44339      new_path=`$CYGPATH -u "$path"`
44340    fi
44341    if test "x$new_path" = x; then
44342      # It's still not found. Now this is an unrecoverable error.
44343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44344$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44345      has_space=`$ECHO "$complete" | $GREP " "`
44346      if test "x$has_space" != x; then
44347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44349      fi
44350      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44351    fi
44352  fi
44353
44354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44357  # "foo.exe" is OK but "foo" is an error.
44358  #
44359  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44360  # It is also a way to make sure we got the proper file name for the real test later on.
44361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44362  if test "x$test_shortpath" = x; then
44363    # Short path failed, file does not exist as specified.
44364    # Try adding .exe or .cmd
44365    if test -f "${new_path}.exe"; then
44366      input_to_shortpath="${new_path}.exe"
44367    elif test -f "${new_path}.cmd"; then
44368      input_to_shortpath="${new_path}.cmd"
44369    else
44370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44371$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44372      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44373$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44374      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44375    fi
44376  else
44377    input_to_shortpath="$new_path"
44378  fi
44379
44380  # Call helper function which possibly converts this using DOS-style short mode.
44381  # If so, the updated path is stored in $new_path.
44382  new_path="$input_to_shortpath"
44383
44384  input_path="$input_to_shortpath"
44385  # Check if we need to convert this using DOS-style short mode. If the path
44386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44387  # take no chances and rewrite it.
44388  # Note: m4 eats our [], so we need to use [ and ] instead.
44389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44390  if test "x$has_forbidden_chars" != x; then
44391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44395      # Going to short mode and back again did indeed matter. Since short mode is
44396      # case insensitive, let's make it lowercase to improve readability.
44397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44398      # Now convert it back to Unix-style (cygpath)
44399      input_path=`$CYGPATH -u "$shortmode_path"`
44400      new_path="$input_path"
44401    fi
44402  fi
44403
44404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44405  if test "x$test_cygdrive_prefix" = x; then
44406    # As a simple fix, exclude /usr/bin since it's not a real path.
44407    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44409      # a path prefixed by /cygdrive for fixpath to work.
44410      new_path="$CYGWIN_ROOT_PATH$input_path"
44411    fi
44412  fi
44413
44414  # remove trailing .exe if any
44415  new_path="${new_path/%.exe/}"
44416
44417    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44418
44419  # First separate the path from the arguments. This will split at the first
44420  # space.
44421  complete="$BUILD_CC"
44422  path="${complete%% *}"
44423  tmp="$complete EOL"
44424  arguments="${tmp#* }"
44425
44426  # Input might be given as Windows format, start by converting to
44427  # unix format.
44428  new_path="$path"
44429
44430  windows_path="$new_path"
44431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44432    unix_path=`$CYGPATH -u "$windows_path"`
44433    new_path="$unix_path"
44434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44436    new_path="$unix_path"
44437  fi
44438
44439
44440  # Now try to locate executable using which
44441  new_path=`$WHICH "$new_path" 2> /dev/null`
44442
44443  if test "x$new_path" = x; then
44444    # Oops. Which didn't find the executable.
44445    # The splitting of arguments from the executable at a space might have been incorrect,
44446    # since paths with space are more likely in Windows. Give it another try with the whole
44447    # argument.
44448    path="$complete"
44449    arguments="EOL"
44450    new_path="$path"
44451
44452  windows_path="$new_path"
44453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44454    unix_path=`$CYGPATH -u "$windows_path"`
44455    new_path="$unix_path"
44456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44458    new_path="$unix_path"
44459  fi
44460
44461
44462    new_path=`$WHICH "$new_path" 2> /dev/null`
44463    # bat and cmd files are not always considered executable in MSYS causing which
44464    # to not find them
44465    if test "x$new_path" = x \
44466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44468      new_path="$path"
44469
44470  windows_path="$new_path"
44471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44472    unix_path=`$CYGPATH -u "$windows_path"`
44473    new_path="$unix_path"
44474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44476    new_path="$unix_path"
44477  fi
44478
44479    fi
44480
44481    if test "x$new_path" = x; then
44482      # It's still not found. Now this is an unrecoverable error.
44483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44484$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44485      has_space=`$ECHO "$complete" | $GREP " "`
44486      if test "x$has_space" != x; then
44487        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44488$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44489      fi
44490      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44491    fi
44492  fi
44493
44494  # Now new_path has a complete unix path to the binary
44495  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44496    # Keep paths in /bin as-is, but remove trailing .exe if any
44497    new_path="${new_path/%.exe/}"
44498    # Do not save /bin paths to all_fixpath_prefixes!
44499  else
44500    # Not in mixed or Windows style, start by that.
44501    new_path=`cmd //c echo $new_path`
44502
44503  input_path="$new_path"
44504  # Check if we need to convert this using DOS-style short mode. If the path
44505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44506  # take no chances and rewrite it.
44507  # Note: m4 eats our [], so we need to use [ and ] instead.
44508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44509  if test "x$has_forbidden_chars" != x; then
44510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44512  fi
44513
44514    # Output is in $new_path
44515
44516  windows_path="$new_path"
44517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44518    unix_path=`$CYGPATH -u "$windows_path"`
44519    new_path="$unix_path"
44520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44522    new_path="$unix_path"
44523  fi
44524
44525    # remove trailing .exe if any
44526    new_path="${new_path/%.exe/}"
44527
44528    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44529    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44530  fi
44531
44532    else
44533      # We're on a unix platform. Hooray! :)
44534      # First separate the path from the arguments. This will split at the first
44535      # space.
44536      complete="$BUILD_CC"
44537      path="${complete%% *}"
44538      tmp="$complete EOL"
44539      arguments="${tmp#* }"
44540
44541      # Cannot rely on the command "which" here since it doesn't always work.
44542      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44543      if test -z "$is_absolute_path"; then
44544        # Path to executable is not absolute. Find it.
44545        IFS_save="$IFS"
44546        IFS=:
44547        for p in $PATH; do
44548          if test -f "$p/$path" && test -x "$p/$path"; then
44549            new_path="$p/$path"
44550            break
44551          fi
44552        done
44553        IFS="$IFS_save"
44554      else
44555        # This is an absolute path, we can use it without further modifications.
44556        new_path="$path"
44557      fi
44558
44559      if test "x$new_path" = x; then
44560        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44561$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44562        has_space=`$ECHO "$complete" | $GREP " "`
44563        if test "x$has_space" != x; then
44564          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44565$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44566        fi
44567        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44568      fi
44569    fi
44570
44571    # Now join together the path and the arguments once again
44572    if test "x$arguments" != xEOL; then
44573      new_complete="$new_path ${arguments% *}"
44574    else
44575      new_complete="$new_path"
44576    fi
44577
44578    if test "x$complete" != "x$new_complete"; then
44579      BUILD_CC="$new_complete"
44580      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44581$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44582    fi
44583  fi
44584
44585
44586
44587
44588  # Publish this variable in the help.
44589
44590
44591  if [ -z "${BUILD_CXX+x}" ]; then
44592    # The variable is not set by user, try to locate tool using the code snippet
44593    for ac_prog in cl CC g++
44594do
44595  # Extract the first word of "$ac_prog", so it can be a program name with args.
44596set dummy $ac_prog; ac_word=$2
44597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44598$as_echo_n "checking for $ac_word... " >&6; }
44599if ${ac_cv_path_BUILD_CXX+:} false; then :
44600  $as_echo_n "(cached) " >&6
44601else
44602  case $BUILD_CXX in
44603  [\\/]* | ?:[\\/]*)
44604  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44605  ;;
44606  *)
44607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44608for as_dir in $PATH
44609do
44610  IFS=$as_save_IFS
44611  test -z "$as_dir" && as_dir=.
44612    for ac_exec_ext in '' $ac_executable_extensions; do
44613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44614    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44616    break 2
44617  fi
44618done
44619  done
44620IFS=$as_save_IFS
44621
44622  ;;
44623esac
44624fi
44625BUILD_CXX=$ac_cv_path_BUILD_CXX
44626if test -n "$BUILD_CXX"; then
44627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44628$as_echo "$BUILD_CXX" >&6; }
44629else
44630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44631$as_echo "no" >&6; }
44632fi
44633
44634
44635  test -n "$BUILD_CXX" && break
44636done
44637
44638  else
44639    # The variable is set, but is it from the command line or the environment?
44640
44641    # Try to remove the string !BUILD_CXX! from our list.
44642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44644      # If it failed, the variable was not from the command line. Ignore it,
44645      # but warn the user (except for BASH, which is always set by the calling BASH).
44646      if test "xBUILD_CXX" != xBASH; then
44647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44648$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44649      fi
44650      # Try to locate tool using the code snippet
44651      for ac_prog in cl CC g++
44652do
44653  # Extract the first word of "$ac_prog", so it can be a program name with args.
44654set dummy $ac_prog; ac_word=$2
44655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44656$as_echo_n "checking for $ac_word... " >&6; }
44657if ${ac_cv_path_BUILD_CXX+:} false; then :
44658  $as_echo_n "(cached) " >&6
44659else
44660  case $BUILD_CXX in
44661  [\\/]* | ?:[\\/]*)
44662  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44663  ;;
44664  *)
44665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44666for as_dir in $PATH
44667do
44668  IFS=$as_save_IFS
44669  test -z "$as_dir" && as_dir=.
44670    for ac_exec_ext in '' $ac_executable_extensions; do
44671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44672    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44674    break 2
44675  fi
44676done
44677  done
44678IFS=$as_save_IFS
44679
44680  ;;
44681esac
44682fi
44683BUILD_CXX=$ac_cv_path_BUILD_CXX
44684if test -n "$BUILD_CXX"; then
44685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44686$as_echo "$BUILD_CXX" >&6; }
44687else
44688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44689$as_echo "no" >&6; }
44690fi
44691
44692
44693  test -n "$BUILD_CXX" && break
44694done
44695
44696    else
44697      # If it succeeded, then it was overridden by the user. We will use it
44698      # for the tool.
44699
44700      # First remove it from the list of overridden variables, so we can test
44701      # for unknown variables in the end.
44702      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44703
44704      # Check if we try to supply an empty value
44705      if test "x$BUILD_CXX" = x; then
44706        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44707$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44709$as_echo_n "checking for BUILD_CXX... " >&6; }
44710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44711$as_echo "disabled" >&6; }
44712      else
44713        # Check if the provided tool contains a complete path.
44714        tool_specified="$BUILD_CXX"
44715        tool_basename="${tool_specified##*/}"
44716        if test "x$tool_basename" = "x$tool_specified"; then
44717          # A command without a complete path is provided, search $PATH.
44718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44719$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44720          # Extract the first word of "$tool_basename", so it can be a program name with args.
44721set dummy $tool_basename; ac_word=$2
44722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44723$as_echo_n "checking for $ac_word... " >&6; }
44724if ${ac_cv_path_BUILD_CXX+:} false; then :
44725  $as_echo_n "(cached) " >&6
44726else
44727  case $BUILD_CXX in
44728  [\\/]* | ?:[\\/]*)
44729  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44730  ;;
44731  *)
44732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44733for as_dir in $PATH
44734do
44735  IFS=$as_save_IFS
44736  test -z "$as_dir" && as_dir=.
44737    for ac_exec_ext in '' $ac_executable_extensions; do
44738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44739    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44741    break 2
44742  fi
44743done
44744  done
44745IFS=$as_save_IFS
44746
44747  ;;
44748esac
44749fi
44750BUILD_CXX=$ac_cv_path_BUILD_CXX
44751if test -n "$BUILD_CXX"; then
44752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44753$as_echo "$BUILD_CXX" >&6; }
44754else
44755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44756$as_echo "no" >&6; }
44757fi
44758
44759
44760          if test "x$BUILD_CXX" = x; then
44761            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44762          fi
44763        else
44764          # Otherwise we believe it is a complete path. Use it as it is.
44765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44766$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44767          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44768$as_echo_n "checking for BUILD_CXX... " >&6; }
44769          if test ! -x "$tool_specified"; then
44770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44771$as_echo "not found" >&6; }
44772            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44773          fi
44774          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44775$as_echo "$tool_specified" >&6; }
44776        fi
44777      fi
44778    fi
44779
44780  fi
44781
44782
44783
44784  if test "x$BUILD_CXX" = x; then
44785    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44786  fi
44787
44788
44789
44790  # Only process if variable expands to non-empty
44791
44792  if test "x$BUILD_CXX" != x; then
44793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44794
44795  # First separate the path from the arguments. This will split at the first
44796  # space.
44797  complete="$BUILD_CXX"
44798  path="${complete%% *}"
44799  tmp="$complete EOL"
44800  arguments="${tmp#* }"
44801
44802  # Input might be given as Windows format, start by converting to
44803  # unix format.
44804  new_path=`$CYGPATH -u "$path"`
44805
44806  # Now try to locate executable using which
44807  new_path=`$WHICH "$new_path" 2> /dev/null`
44808  # bat and cmd files are not always considered executable in cygwin causing which
44809  # to not find them
44810  if test "x$new_path" = x \
44811      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44812      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44813    new_path=`$CYGPATH -u "$path"`
44814  fi
44815  if test "x$new_path" = x; then
44816    # Oops. Which didn't find the executable.
44817    # The splitting of arguments from the executable at a space might have been incorrect,
44818    # since paths with space are more likely in Windows. Give it another try with the whole
44819    # argument.
44820    path="$complete"
44821    arguments="EOL"
44822    new_path=`$CYGPATH -u "$path"`
44823    new_path=`$WHICH "$new_path" 2> /dev/null`
44824    # bat and cmd files are not always considered executable in cygwin causing which
44825    # to not find them
44826    if test "x$new_path" = x \
44827        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44828        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44829      new_path=`$CYGPATH -u "$path"`
44830    fi
44831    if test "x$new_path" = x; then
44832      # It's still not found. Now this is an unrecoverable error.
44833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44834$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44835      has_space=`$ECHO "$complete" | $GREP " "`
44836      if test "x$has_space" != x; then
44837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44839      fi
44840      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44841    fi
44842  fi
44843
44844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44847  # "foo.exe" is OK but "foo" is an error.
44848  #
44849  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44850  # It is also a way to make sure we got the proper file name for the real test later on.
44851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44852  if test "x$test_shortpath" = x; then
44853    # Short path failed, file does not exist as specified.
44854    # Try adding .exe or .cmd
44855    if test -f "${new_path}.exe"; then
44856      input_to_shortpath="${new_path}.exe"
44857    elif test -f "${new_path}.cmd"; then
44858      input_to_shortpath="${new_path}.cmd"
44859    else
44860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44861$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44862      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44863$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44864      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44865    fi
44866  else
44867    input_to_shortpath="$new_path"
44868  fi
44869
44870  # Call helper function which possibly converts this using DOS-style short mode.
44871  # If so, the updated path is stored in $new_path.
44872  new_path="$input_to_shortpath"
44873
44874  input_path="$input_to_shortpath"
44875  # Check if we need to convert this using DOS-style short mode. If the path
44876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44877  # take no chances and rewrite it.
44878  # Note: m4 eats our [], so we need to use [ and ] instead.
44879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44880  if test "x$has_forbidden_chars" != x; then
44881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44885      # Going to short mode and back again did indeed matter. Since short mode is
44886      # case insensitive, let's make it lowercase to improve readability.
44887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44888      # Now convert it back to Unix-style (cygpath)
44889      input_path=`$CYGPATH -u "$shortmode_path"`
44890      new_path="$input_path"
44891    fi
44892  fi
44893
44894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44895  if test "x$test_cygdrive_prefix" = x; then
44896    # As a simple fix, exclude /usr/bin since it's not a real path.
44897    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44899      # a path prefixed by /cygdrive for fixpath to work.
44900      new_path="$CYGWIN_ROOT_PATH$input_path"
44901    fi
44902  fi
44903
44904  # remove trailing .exe if any
44905  new_path="${new_path/%.exe/}"
44906
44907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44908
44909  # First separate the path from the arguments. This will split at the first
44910  # space.
44911  complete="$BUILD_CXX"
44912  path="${complete%% *}"
44913  tmp="$complete EOL"
44914  arguments="${tmp#* }"
44915
44916  # Input might be given as Windows format, start by converting to
44917  # unix format.
44918  new_path="$path"
44919
44920  windows_path="$new_path"
44921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44922    unix_path=`$CYGPATH -u "$windows_path"`
44923    new_path="$unix_path"
44924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44926    new_path="$unix_path"
44927  fi
44928
44929
44930  # Now try to locate executable using which
44931  new_path=`$WHICH "$new_path" 2> /dev/null`
44932
44933  if test "x$new_path" = x; then
44934    # Oops. Which didn't find the executable.
44935    # The splitting of arguments from the executable at a space might have been incorrect,
44936    # since paths with space are more likely in Windows. Give it another try with the whole
44937    # argument.
44938    path="$complete"
44939    arguments="EOL"
44940    new_path="$path"
44941
44942  windows_path="$new_path"
44943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44944    unix_path=`$CYGPATH -u "$windows_path"`
44945    new_path="$unix_path"
44946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44948    new_path="$unix_path"
44949  fi
44950
44951
44952    new_path=`$WHICH "$new_path" 2> /dev/null`
44953    # bat and cmd files are not always considered executable in MSYS causing which
44954    # to not find them
44955    if test "x$new_path" = x \
44956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44958      new_path="$path"
44959
44960  windows_path="$new_path"
44961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44962    unix_path=`$CYGPATH -u "$windows_path"`
44963    new_path="$unix_path"
44964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44966    new_path="$unix_path"
44967  fi
44968
44969    fi
44970
44971    if test "x$new_path" = x; then
44972      # It's still not found. Now this is an unrecoverable error.
44973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44974$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44975      has_space=`$ECHO "$complete" | $GREP " "`
44976      if test "x$has_space" != x; then
44977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44979      fi
44980      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44981    fi
44982  fi
44983
44984  # Now new_path has a complete unix path to the binary
44985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44986    # Keep paths in /bin as-is, but remove trailing .exe if any
44987    new_path="${new_path/%.exe/}"
44988    # Do not save /bin paths to all_fixpath_prefixes!
44989  else
44990    # Not in mixed or Windows style, start by that.
44991    new_path=`cmd //c echo $new_path`
44992
44993  input_path="$new_path"
44994  # Check if we need to convert this using DOS-style short mode. If the path
44995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44996  # take no chances and rewrite it.
44997  # Note: m4 eats our [], so we need to use [ and ] instead.
44998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44999  if test "x$has_forbidden_chars" != x; then
45000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45002  fi
45003
45004    # Output is in $new_path
45005
45006  windows_path="$new_path"
45007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45008    unix_path=`$CYGPATH -u "$windows_path"`
45009    new_path="$unix_path"
45010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45012    new_path="$unix_path"
45013  fi
45014
45015    # remove trailing .exe if any
45016    new_path="${new_path/%.exe/}"
45017
45018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45020  fi
45021
45022    else
45023      # We're on a unix platform. Hooray! :)
45024      # First separate the path from the arguments. This will split at the first
45025      # space.
45026      complete="$BUILD_CXX"
45027      path="${complete%% *}"
45028      tmp="$complete EOL"
45029      arguments="${tmp#* }"
45030
45031      # Cannot rely on the command "which" here since it doesn't always work.
45032      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45033      if test -z "$is_absolute_path"; then
45034        # Path to executable is not absolute. Find it.
45035        IFS_save="$IFS"
45036        IFS=:
45037        for p in $PATH; do
45038          if test -f "$p/$path" && test -x "$p/$path"; then
45039            new_path="$p/$path"
45040            break
45041          fi
45042        done
45043        IFS="$IFS_save"
45044      else
45045        # This is an absolute path, we can use it without further modifications.
45046        new_path="$path"
45047      fi
45048
45049      if test "x$new_path" = x; then
45050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45051$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45052        has_space=`$ECHO "$complete" | $GREP " "`
45053        if test "x$has_space" != x; then
45054          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45056        fi
45057        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45058      fi
45059    fi
45060
45061    # Now join together the path and the arguments once again
45062    if test "x$arguments" != xEOL; then
45063      new_complete="$new_path ${arguments% *}"
45064    else
45065      new_complete="$new_path"
45066    fi
45067
45068    if test "x$complete" != "x$new_complete"; then
45069      BUILD_CXX="$new_complete"
45070      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45071$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45072    fi
45073  fi
45074
45075
45076
45077  # Publish this variable in the help.
45078
45079
45080  if [ -z "${BUILD_NM+x}" ]; then
45081    # The variable is not set by user, try to locate tool using the code snippet
45082    for ac_prog in nm gcc-nm
45083do
45084  # Extract the first word of "$ac_prog", so it can be a program name with args.
45085set dummy $ac_prog; ac_word=$2
45086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45087$as_echo_n "checking for $ac_word... " >&6; }
45088if ${ac_cv_path_BUILD_NM+:} false; then :
45089  $as_echo_n "(cached) " >&6
45090else
45091  case $BUILD_NM in
45092  [\\/]* | ?:[\\/]*)
45093  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45094  ;;
45095  *)
45096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45097for as_dir in $PATH
45098do
45099  IFS=$as_save_IFS
45100  test -z "$as_dir" && as_dir=.
45101    for ac_exec_ext in '' $ac_executable_extensions; do
45102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45103    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45105    break 2
45106  fi
45107done
45108  done
45109IFS=$as_save_IFS
45110
45111  ;;
45112esac
45113fi
45114BUILD_NM=$ac_cv_path_BUILD_NM
45115if test -n "$BUILD_NM"; then
45116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45117$as_echo "$BUILD_NM" >&6; }
45118else
45119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45120$as_echo "no" >&6; }
45121fi
45122
45123
45124  test -n "$BUILD_NM" && break
45125done
45126
45127  else
45128    # The variable is set, but is it from the command line or the environment?
45129
45130    # Try to remove the string !BUILD_NM! from our list.
45131    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45132    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45133      # If it failed, the variable was not from the command line. Ignore it,
45134      # but warn the user (except for BASH, which is always set by the calling BASH).
45135      if test "xBUILD_NM" != xBASH; then
45136        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45137$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45138      fi
45139      # Try to locate tool using the code snippet
45140      for ac_prog in nm gcc-nm
45141do
45142  # Extract the first word of "$ac_prog", so it can be a program name with args.
45143set dummy $ac_prog; ac_word=$2
45144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45145$as_echo_n "checking for $ac_word... " >&6; }
45146if ${ac_cv_path_BUILD_NM+:} false; then :
45147  $as_echo_n "(cached) " >&6
45148else
45149  case $BUILD_NM in
45150  [\\/]* | ?:[\\/]*)
45151  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45152  ;;
45153  *)
45154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45155for as_dir in $PATH
45156do
45157  IFS=$as_save_IFS
45158  test -z "$as_dir" && as_dir=.
45159    for ac_exec_ext in '' $ac_executable_extensions; do
45160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45161    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45163    break 2
45164  fi
45165done
45166  done
45167IFS=$as_save_IFS
45168
45169  ;;
45170esac
45171fi
45172BUILD_NM=$ac_cv_path_BUILD_NM
45173if test -n "$BUILD_NM"; then
45174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45175$as_echo "$BUILD_NM" >&6; }
45176else
45177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45178$as_echo "no" >&6; }
45179fi
45180
45181
45182  test -n "$BUILD_NM" && break
45183done
45184
45185    else
45186      # If it succeeded, then it was overridden by the user. We will use it
45187      # for the tool.
45188
45189      # First remove it from the list of overridden variables, so we can test
45190      # for unknown variables in the end.
45191      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45192
45193      # Check if we try to supply an empty value
45194      if test "x$BUILD_NM" = x; then
45195        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45196$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45197        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45198$as_echo_n "checking for BUILD_NM... " >&6; }
45199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45200$as_echo "disabled" >&6; }
45201      else
45202        # Check if the provided tool contains a complete path.
45203        tool_specified="$BUILD_NM"
45204        tool_basename="${tool_specified##*/}"
45205        if test "x$tool_basename" = "x$tool_specified"; then
45206          # A command without a complete path is provided, search $PATH.
45207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45208$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45209          # Extract the first word of "$tool_basename", so it can be a program name with args.
45210set dummy $tool_basename; ac_word=$2
45211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45212$as_echo_n "checking for $ac_word... " >&6; }
45213if ${ac_cv_path_BUILD_NM+:} false; then :
45214  $as_echo_n "(cached) " >&6
45215else
45216  case $BUILD_NM in
45217  [\\/]* | ?:[\\/]*)
45218  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45219  ;;
45220  *)
45221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45222for as_dir in $PATH
45223do
45224  IFS=$as_save_IFS
45225  test -z "$as_dir" && as_dir=.
45226    for ac_exec_ext in '' $ac_executable_extensions; do
45227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45228    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45230    break 2
45231  fi
45232done
45233  done
45234IFS=$as_save_IFS
45235
45236  ;;
45237esac
45238fi
45239BUILD_NM=$ac_cv_path_BUILD_NM
45240if test -n "$BUILD_NM"; then
45241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45242$as_echo "$BUILD_NM" >&6; }
45243else
45244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45245$as_echo "no" >&6; }
45246fi
45247
45248
45249          if test "x$BUILD_NM" = x; then
45250            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45251          fi
45252        else
45253          # Otherwise we believe it is a complete path. Use it as it is.
45254          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45255$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45256          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45257$as_echo_n "checking for BUILD_NM... " >&6; }
45258          if test ! -x "$tool_specified"; then
45259            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45260$as_echo "not found" >&6; }
45261            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45262          fi
45263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45264$as_echo "$tool_specified" >&6; }
45265        fi
45266      fi
45267    fi
45268
45269  fi
45270
45271
45272
45273  # Only process if variable expands to non-empty
45274
45275  if test "x$BUILD_NM" != x; then
45276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45277
45278  # First separate the path from the arguments. This will split at the first
45279  # space.
45280  complete="$BUILD_NM"
45281  path="${complete%% *}"
45282  tmp="$complete EOL"
45283  arguments="${tmp#* }"
45284
45285  # Input might be given as Windows format, start by converting to
45286  # unix format.
45287  new_path=`$CYGPATH -u "$path"`
45288
45289  # Now try to locate executable using which
45290  new_path=`$WHICH "$new_path" 2> /dev/null`
45291  # bat and cmd files are not always considered executable in cygwin causing which
45292  # to not find them
45293  if test "x$new_path" = x \
45294      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45295      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45296    new_path=`$CYGPATH -u "$path"`
45297  fi
45298  if test "x$new_path" = x; then
45299    # Oops. Which didn't find the executable.
45300    # The splitting of arguments from the executable at a space might have been incorrect,
45301    # since paths with space are more likely in Windows. Give it another try with the whole
45302    # argument.
45303    path="$complete"
45304    arguments="EOL"
45305    new_path=`$CYGPATH -u "$path"`
45306    new_path=`$WHICH "$new_path" 2> /dev/null`
45307    # bat and cmd files are not always considered executable in cygwin causing which
45308    # to not find them
45309    if test "x$new_path" = x \
45310        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45311        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45312      new_path=`$CYGPATH -u "$path"`
45313    fi
45314    if test "x$new_path" = x; then
45315      # It's still not found. Now this is an unrecoverable error.
45316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45317$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45318      has_space=`$ECHO "$complete" | $GREP " "`
45319      if test "x$has_space" != x; then
45320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45322      fi
45323      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45324    fi
45325  fi
45326
45327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45330  # "foo.exe" is OK but "foo" is an error.
45331  #
45332  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45333  # It is also a way to make sure we got the proper file name for the real test later on.
45334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45335  if test "x$test_shortpath" = x; then
45336    # Short path failed, file does not exist as specified.
45337    # Try adding .exe or .cmd
45338    if test -f "${new_path}.exe"; then
45339      input_to_shortpath="${new_path}.exe"
45340    elif test -f "${new_path}.cmd"; then
45341      input_to_shortpath="${new_path}.cmd"
45342    else
45343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45344$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45345      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45346$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45347      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45348    fi
45349  else
45350    input_to_shortpath="$new_path"
45351  fi
45352
45353  # Call helper function which possibly converts this using DOS-style short mode.
45354  # If so, the updated path is stored in $new_path.
45355  new_path="$input_to_shortpath"
45356
45357  input_path="$input_to_shortpath"
45358  # Check if we need to convert this using DOS-style short mode. If the path
45359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45360  # take no chances and rewrite it.
45361  # Note: m4 eats our [], so we need to use [ and ] instead.
45362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45363  if test "x$has_forbidden_chars" != x; then
45364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45368      # Going to short mode and back again did indeed matter. Since short mode is
45369      # case insensitive, let's make it lowercase to improve readability.
45370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45371      # Now convert it back to Unix-style (cygpath)
45372      input_path=`$CYGPATH -u "$shortmode_path"`
45373      new_path="$input_path"
45374    fi
45375  fi
45376
45377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45378  if test "x$test_cygdrive_prefix" = x; then
45379    # As a simple fix, exclude /usr/bin since it's not a real path.
45380    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45382      # a path prefixed by /cygdrive for fixpath to work.
45383      new_path="$CYGWIN_ROOT_PATH$input_path"
45384    fi
45385  fi
45386
45387  # remove trailing .exe if any
45388  new_path="${new_path/%.exe/}"
45389
45390    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45391
45392  # First separate the path from the arguments. This will split at the first
45393  # space.
45394  complete="$BUILD_NM"
45395  path="${complete%% *}"
45396  tmp="$complete EOL"
45397  arguments="${tmp#* }"
45398
45399  # Input might be given as Windows format, start by converting to
45400  # unix format.
45401  new_path="$path"
45402
45403  windows_path="$new_path"
45404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45405    unix_path=`$CYGPATH -u "$windows_path"`
45406    new_path="$unix_path"
45407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45409    new_path="$unix_path"
45410  fi
45411
45412
45413  # Now try to locate executable using which
45414  new_path=`$WHICH "$new_path" 2> /dev/null`
45415
45416  if test "x$new_path" = x; then
45417    # Oops. Which didn't find the executable.
45418    # The splitting of arguments from the executable at a space might have been incorrect,
45419    # since paths with space are more likely in Windows. Give it another try with the whole
45420    # argument.
45421    path="$complete"
45422    arguments="EOL"
45423    new_path="$path"
45424
45425  windows_path="$new_path"
45426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45427    unix_path=`$CYGPATH -u "$windows_path"`
45428    new_path="$unix_path"
45429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45431    new_path="$unix_path"
45432  fi
45433
45434
45435    new_path=`$WHICH "$new_path" 2> /dev/null`
45436    # bat and cmd files are not always considered executable in MSYS causing which
45437    # to not find them
45438    if test "x$new_path" = x \
45439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45441      new_path="$path"
45442
45443  windows_path="$new_path"
45444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45445    unix_path=`$CYGPATH -u "$windows_path"`
45446    new_path="$unix_path"
45447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45449    new_path="$unix_path"
45450  fi
45451
45452    fi
45453
45454    if test "x$new_path" = x; then
45455      # It's still not found. Now this is an unrecoverable error.
45456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45457$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45458      has_space=`$ECHO "$complete" | $GREP " "`
45459      if test "x$has_space" != x; then
45460        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45461$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45462      fi
45463      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45464    fi
45465  fi
45466
45467  # Now new_path has a complete unix path to the binary
45468  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45469    # Keep paths in /bin as-is, but remove trailing .exe if any
45470    new_path="${new_path/%.exe/}"
45471    # Do not save /bin paths to all_fixpath_prefixes!
45472  else
45473    # Not in mixed or Windows style, start by that.
45474    new_path=`cmd //c echo $new_path`
45475
45476  input_path="$new_path"
45477  # Check if we need to convert this using DOS-style short mode. If the path
45478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45479  # take no chances and rewrite it.
45480  # Note: m4 eats our [], so we need to use [ and ] instead.
45481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45482  if test "x$has_forbidden_chars" != x; then
45483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45485  fi
45486
45487    # Output is in $new_path
45488
45489  windows_path="$new_path"
45490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45491    unix_path=`$CYGPATH -u "$windows_path"`
45492    new_path="$unix_path"
45493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45495    new_path="$unix_path"
45496  fi
45497
45498    # remove trailing .exe if any
45499    new_path="${new_path/%.exe/}"
45500
45501    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45502    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45503  fi
45504
45505    else
45506      # We're on a unix platform. Hooray! :)
45507      # First separate the path from the arguments. This will split at the first
45508      # space.
45509      complete="$BUILD_NM"
45510      path="${complete%% *}"
45511      tmp="$complete EOL"
45512      arguments="${tmp#* }"
45513
45514      # Cannot rely on the command "which" here since it doesn't always work.
45515      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45516      if test -z "$is_absolute_path"; then
45517        # Path to executable is not absolute. Find it.
45518        IFS_save="$IFS"
45519        IFS=:
45520        for p in $PATH; do
45521          if test -f "$p/$path" && test -x "$p/$path"; then
45522            new_path="$p/$path"
45523            break
45524          fi
45525        done
45526        IFS="$IFS_save"
45527      else
45528        # This is an absolute path, we can use it without further modifications.
45529        new_path="$path"
45530      fi
45531
45532      if test "x$new_path" = x; then
45533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45534$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45535        has_space=`$ECHO "$complete" | $GREP " "`
45536        if test "x$has_space" != x; then
45537          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45538$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45539        fi
45540        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45541      fi
45542    fi
45543
45544    # Now join together the path and the arguments once again
45545    if test "x$arguments" != xEOL; then
45546      new_complete="$new_path ${arguments% *}"
45547    else
45548      new_complete="$new_path"
45549    fi
45550
45551    if test "x$complete" != "x$new_complete"; then
45552      BUILD_NM="$new_complete"
45553      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45554$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45555    fi
45556  fi
45557
45558
45559
45560  # Publish this variable in the help.
45561
45562
45563  if [ -z "${BUILD_AR+x}" ]; then
45564    # The variable is not set by user, try to locate tool using the code snippet
45565    for ac_prog in ar gcc-ar
45566do
45567  # Extract the first word of "$ac_prog", so it can be a program name with args.
45568set dummy $ac_prog; ac_word=$2
45569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45570$as_echo_n "checking for $ac_word... " >&6; }
45571if ${ac_cv_path_BUILD_AR+:} false; then :
45572  $as_echo_n "(cached) " >&6
45573else
45574  case $BUILD_AR in
45575  [\\/]* | ?:[\\/]*)
45576  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45577  ;;
45578  *)
45579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45580for as_dir in $PATH
45581do
45582  IFS=$as_save_IFS
45583  test -z "$as_dir" && as_dir=.
45584    for ac_exec_ext in '' $ac_executable_extensions; do
45585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45586    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45588    break 2
45589  fi
45590done
45591  done
45592IFS=$as_save_IFS
45593
45594  ;;
45595esac
45596fi
45597BUILD_AR=$ac_cv_path_BUILD_AR
45598if test -n "$BUILD_AR"; then
45599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45600$as_echo "$BUILD_AR" >&6; }
45601else
45602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45603$as_echo "no" >&6; }
45604fi
45605
45606
45607  test -n "$BUILD_AR" && break
45608done
45609
45610  else
45611    # The variable is set, but is it from the command line or the environment?
45612
45613    # Try to remove the string !BUILD_AR! from our list.
45614    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45615    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45616      # If it failed, the variable was not from the command line. Ignore it,
45617      # but warn the user (except for BASH, which is always set by the calling BASH).
45618      if test "xBUILD_AR" != xBASH; then
45619        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45620$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45621      fi
45622      # Try to locate tool using the code snippet
45623      for ac_prog in ar gcc-ar
45624do
45625  # Extract the first word of "$ac_prog", so it can be a program name with args.
45626set dummy $ac_prog; ac_word=$2
45627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45628$as_echo_n "checking for $ac_word... " >&6; }
45629if ${ac_cv_path_BUILD_AR+:} false; then :
45630  $as_echo_n "(cached) " >&6
45631else
45632  case $BUILD_AR in
45633  [\\/]* | ?:[\\/]*)
45634  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45635  ;;
45636  *)
45637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45638for as_dir in $PATH
45639do
45640  IFS=$as_save_IFS
45641  test -z "$as_dir" && as_dir=.
45642    for ac_exec_ext in '' $ac_executable_extensions; do
45643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45644    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45646    break 2
45647  fi
45648done
45649  done
45650IFS=$as_save_IFS
45651
45652  ;;
45653esac
45654fi
45655BUILD_AR=$ac_cv_path_BUILD_AR
45656if test -n "$BUILD_AR"; then
45657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45658$as_echo "$BUILD_AR" >&6; }
45659else
45660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45661$as_echo "no" >&6; }
45662fi
45663
45664
45665  test -n "$BUILD_AR" && break
45666done
45667
45668    else
45669      # If it succeeded, then it was overridden by the user. We will use it
45670      # for the tool.
45671
45672      # First remove it from the list of overridden variables, so we can test
45673      # for unknown variables in the end.
45674      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45675
45676      # Check if we try to supply an empty value
45677      if test "x$BUILD_AR" = x; then
45678        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45679$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45680        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45681$as_echo_n "checking for BUILD_AR... " >&6; }
45682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45683$as_echo "disabled" >&6; }
45684      else
45685        # Check if the provided tool contains a complete path.
45686        tool_specified="$BUILD_AR"
45687        tool_basename="${tool_specified##*/}"
45688        if test "x$tool_basename" = "x$tool_specified"; then
45689          # A command without a complete path is provided, search $PATH.
45690          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45691$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45692          # Extract the first word of "$tool_basename", so it can be a program name with args.
45693set dummy $tool_basename; ac_word=$2
45694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45695$as_echo_n "checking for $ac_word... " >&6; }
45696if ${ac_cv_path_BUILD_AR+:} false; then :
45697  $as_echo_n "(cached) " >&6
45698else
45699  case $BUILD_AR in
45700  [\\/]* | ?:[\\/]*)
45701  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45702  ;;
45703  *)
45704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45705for as_dir in $PATH
45706do
45707  IFS=$as_save_IFS
45708  test -z "$as_dir" && as_dir=.
45709    for ac_exec_ext in '' $ac_executable_extensions; do
45710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45711    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45713    break 2
45714  fi
45715done
45716  done
45717IFS=$as_save_IFS
45718
45719  ;;
45720esac
45721fi
45722BUILD_AR=$ac_cv_path_BUILD_AR
45723if test -n "$BUILD_AR"; then
45724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45725$as_echo "$BUILD_AR" >&6; }
45726else
45727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45728$as_echo "no" >&6; }
45729fi
45730
45731
45732          if test "x$BUILD_AR" = x; then
45733            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45734          fi
45735        else
45736          # Otherwise we believe it is a complete path. Use it as it is.
45737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45738$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45739          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45740$as_echo_n "checking for BUILD_AR... " >&6; }
45741          if test ! -x "$tool_specified"; then
45742            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45743$as_echo "not found" >&6; }
45744            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45745          fi
45746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45747$as_echo "$tool_specified" >&6; }
45748        fi
45749      fi
45750    fi
45751
45752  fi
45753
45754
45755
45756  # Only process if variable expands to non-empty
45757
45758  if test "x$BUILD_AR" != x; then
45759    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45760
45761  # First separate the path from the arguments. This will split at the first
45762  # space.
45763  complete="$BUILD_AR"
45764  path="${complete%% *}"
45765  tmp="$complete EOL"
45766  arguments="${tmp#* }"
45767
45768  # Input might be given as Windows format, start by converting to
45769  # unix format.
45770  new_path=`$CYGPATH -u "$path"`
45771
45772  # Now try to locate executable using which
45773  new_path=`$WHICH "$new_path" 2> /dev/null`
45774  # bat and cmd files are not always considered executable in cygwin causing which
45775  # to not find them
45776  if test "x$new_path" = x \
45777      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45778      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45779    new_path=`$CYGPATH -u "$path"`
45780  fi
45781  if test "x$new_path" = x; then
45782    # Oops. Which didn't find the executable.
45783    # The splitting of arguments from the executable at a space might have been incorrect,
45784    # since paths with space are more likely in Windows. Give it another try with the whole
45785    # argument.
45786    path="$complete"
45787    arguments="EOL"
45788    new_path=`$CYGPATH -u "$path"`
45789    new_path=`$WHICH "$new_path" 2> /dev/null`
45790    # bat and cmd files are not always considered executable in cygwin causing which
45791    # to not find them
45792    if test "x$new_path" = x \
45793        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45794        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45795      new_path=`$CYGPATH -u "$path"`
45796    fi
45797    if test "x$new_path" = x; then
45798      # It's still not found. Now this is an unrecoverable error.
45799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45800$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45801      has_space=`$ECHO "$complete" | $GREP " "`
45802      if test "x$has_space" != x; then
45803        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45804$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45805      fi
45806      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45807    fi
45808  fi
45809
45810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45813  # "foo.exe" is OK but "foo" is an error.
45814  #
45815  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45816  # It is also a way to make sure we got the proper file name for the real test later on.
45817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45818  if test "x$test_shortpath" = x; then
45819    # Short path failed, file does not exist as specified.
45820    # Try adding .exe or .cmd
45821    if test -f "${new_path}.exe"; then
45822      input_to_shortpath="${new_path}.exe"
45823    elif test -f "${new_path}.cmd"; then
45824      input_to_shortpath="${new_path}.cmd"
45825    else
45826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45827$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45828      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45829$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45830      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45831    fi
45832  else
45833    input_to_shortpath="$new_path"
45834  fi
45835
45836  # Call helper function which possibly converts this using DOS-style short mode.
45837  # If so, the updated path is stored in $new_path.
45838  new_path="$input_to_shortpath"
45839
45840  input_path="$input_to_shortpath"
45841  # Check if we need to convert this using DOS-style short mode. If the path
45842  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45843  # take no chances and rewrite it.
45844  # Note: m4 eats our [], so we need to use [ and ] instead.
45845  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45846  if test "x$has_forbidden_chars" != x; then
45847    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45848    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45849    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45850    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45851      # Going to short mode and back again did indeed matter. Since short mode is
45852      # case insensitive, let's make it lowercase to improve readability.
45853      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45854      # Now convert it back to Unix-style (cygpath)
45855      input_path=`$CYGPATH -u "$shortmode_path"`
45856      new_path="$input_path"
45857    fi
45858  fi
45859
45860  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45861  if test "x$test_cygdrive_prefix" = x; then
45862    # As a simple fix, exclude /usr/bin since it's not a real path.
45863    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45864      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45865      # a path prefixed by /cygdrive for fixpath to work.
45866      new_path="$CYGWIN_ROOT_PATH$input_path"
45867    fi
45868  fi
45869
45870  # remove trailing .exe if any
45871  new_path="${new_path/%.exe/}"
45872
45873    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45874
45875  # First separate the path from the arguments. This will split at the first
45876  # space.
45877  complete="$BUILD_AR"
45878  path="${complete%% *}"
45879  tmp="$complete EOL"
45880  arguments="${tmp#* }"
45881
45882  # Input might be given as Windows format, start by converting to
45883  # unix format.
45884  new_path="$path"
45885
45886  windows_path="$new_path"
45887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45888    unix_path=`$CYGPATH -u "$windows_path"`
45889    new_path="$unix_path"
45890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45892    new_path="$unix_path"
45893  fi
45894
45895
45896  # Now try to locate executable using which
45897  new_path=`$WHICH "$new_path" 2> /dev/null`
45898
45899  if test "x$new_path" = x; then
45900    # Oops. Which didn't find the executable.
45901    # The splitting of arguments from the executable at a space might have been incorrect,
45902    # since paths with space are more likely in Windows. Give it another try with the whole
45903    # argument.
45904    path="$complete"
45905    arguments="EOL"
45906    new_path="$path"
45907
45908  windows_path="$new_path"
45909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45910    unix_path=`$CYGPATH -u "$windows_path"`
45911    new_path="$unix_path"
45912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45914    new_path="$unix_path"
45915  fi
45916
45917
45918    new_path=`$WHICH "$new_path" 2> /dev/null`
45919    # bat and cmd files are not always considered executable in MSYS causing which
45920    # to not find them
45921    if test "x$new_path" = x \
45922        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45923        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45924      new_path="$path"
45925
45926  windows_path="$new_path"
45927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45928    unix_path=`$CYGPATH -u "$windows_path"`
45929    new_path="$unix_path"
45930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45932    new_path="$unix_path"
45933  fi
45934
45935    fi
45936
45937    if test "x$new_path" = x; then
45938      # It's still not found. Now this is an unrecoverable error.
45939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45940$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45941      has_space=`$ECHO "$complete" | $GREP " "`
45942      if test "x$has_space" != x; then
45943        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45944$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45945      fi
45946      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45947    fi
45948  fi
45949
45950  # Now new_path has a complete unix path to the binary
45951  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45952    # Keep paths in /bin as-is, but remove trailing .exe if any
45953    new_path="${new_path/%.exe/}"
45954    # Do not save /bin paths to all_fixpath_prefixes!
45955  else
45956    # Not in mixed or Windows style, start by that.
45957    new_path=`cmd //c echo $new_path`
45958
45959  input_path="$new_path"
45960  # Check if we need to convert this using DOS-style short mode. If the path
45961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45962  # take no chances and rewrite it.
45963  # Note: m4 eats our [], so we need to use [ and ] instead.
45964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45965  if test "x$has_forbidden_chars" != x; then
45966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45967    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45968  fi
45969
45970    # Output is in $new_path
45971
45972  windows_path="$new_path"
45973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45974    unix_path=`$CYGPATH -u "$windows_path"`
45975    new_path="$unix_path"
45976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45978    new_path="$unix_path"
45979  fi
45980
45981    # remove trailing .exe if any
45982    new_path="${new_path/%.exe/}"
45983
45984    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45985    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45986  fi
45987
45988    else
45989      # We're on a unix platform. Hooray! :)
45990      # First separate the path from the arguments. This will split at the first
45991      # space.
45992      complete="$BUILD_AR"
45993      path="${complete%% *}"
45994      tmp="$complete EOL"
45995      arguments="${tmp#* }"
45996
45997      # Cannot rely on the command "which" here since it doesn't always work.
45998      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45999      if test -z "$is_absolute_path"; then
46000        # Path to executable is not absolute. Find it.
46001        IFS_save="$IFS"
46002        IFS=:
46003        for p in $PATH; do
46004          if test -f "$p/$path" && test -x "$p/$path"; then
46005            new_path="$p/$path"
46006            break
46007          fi
46008        done
46009        IFS="$IFS_save"
46010      else
46011        # This is an absolute path, we can use it without further modifications.
46012        new_path="$path"
46013      fi
46014
46015      if test "x$new_path" = x; then
46016        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46017$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46018        has_space=`$ECHO "$complete" | $GREP " "`
46019        if test "x$has_space" != x; then
46020          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46021$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46022        fi
46023        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46024      fi
46025    fi
46026
46027    # Now join together the path and the arguments once again
46028    if test "x$arguments" != xEOL; then
46029      new_complete="$new_path ${arguments% *}"
46030    else
46031      new_complete="$new_path"
46032    fi
46033
46034    if test "x$complete" != "x$new_complete"; then
46035      BUILD_AR="$new_complete"
46036      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46037$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46038    fi
46039  fi
46040
46041
46042
46043  # Publish this variable in the help.
46044
46045
46046  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46047    # The variable is not set by user, try to locate tool using the code snippet
46048    for ac_prog in objcopy
46049do
46050  # Extract the first word of "$ac_prog", so it can be a program name with args.
46051set dummy $ac_prog; ac_word=$2
46052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46053$as_echo_n "checking for $ac_word... " >&6; }
46054if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46055  $as_echo_n "(cached) " >&6
46056else
46057  case $BUILD_OBJCOPY in
46058  [\\/]* | ?:[\\/]*)
46059  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46060  ;;
46061  *)
46062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46063for as_dir in $PATH
46064do
46065  IFS=$as_save_IFS
46066  test -z "$as_dir" && as_dir=.
46067    for ac_exec_ext in '' $ac_executable_extensions; do
46068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46069    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46071    break 2
46072  fi
46073done
46074  done
46075IFS=$as_save_IFS
46076
46077  ;;
46078esac
46079fi
46080BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46081if test -n "$BUILD_OBJCOPY"; then
46082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46083$as_echo "$BUILD_OBJCOPY" >&6; }
46084else
46085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46086$as_echo "no" >&6; }
46087fi
46088
46089
46090  test -n "$BUILD_OBJCOPY" && break
46091done
46092
46093  else
46094    # The variable is set, but is it from the command line or the environment?
46095
46096    # Try to remove the string !BUILD_OBJCOPY! from our list.
46097    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46098    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46099      # If it failed, the variable was not from the command line. Ignore it,
46100      # but warn the user (except for BASH, which is always set by the calling BASH).
46101      if test "xBUILD_OBJCOPY" != xBASH; then
46102        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46103$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46104      fi
46105      # Try to locate tool using the code snippet
46106      for ac_prog in objcopy
46107do
46108  # Extract the first word of "$ac_prog", so it can be a program name with args.
46109set dummy $ac_prog; ac_word=$2
46110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46111$as_echo_n "checking for $ac_word... " >&6; }
46112if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46113  $as_echo_n "(cached) " >&6
46114else
46115  case $BUILD_OBJCOPY in
46116  [\\/]* | ?:[\\/]*)
46117  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46118  ;;
46119  *)
46120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46121for as_dir in $PATH
46122do
46123  IFS=$as_save_IFS
46124  test -z "$as_dir" && as_dir=.
46125    for ac_exec_ext in '' $ac_executable_extensions; do
46126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46127    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46129    break 2
46130  fi
46131done
46132  done
46133IFS=$as_save_IFS
46134
46135  ;;
46136esac
46137fi
46138BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46139if test -n "$BUILD_OBJCOPY"; then
46140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46141$as_echo "$BUILD_OBJCOPY" >&6; }
46142else
46143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46144$as_echo "no" >&6; }
46145fi
46146
46147
46148  test -n "$BUILD_OBJCOPY" && break
46149done
46150
46151    else
46152      # If it succeeded, then it was overridden by the user. We will use it
46153      # for the tool.
46154
46155      # First remove it from the list of overridden variables, so we can test
46156      # for unknown variables in the end.
46157      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46158
46159      # Check if we try to supply an empty value
46160      if test "x$BUILD_OBJCOPY" = x; then
46161        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46162$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46163        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46164$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46165        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46166$as_echo "disabled" >&6; }
46167      else
46168        # Check if the provided tool contains a complete path.
46169        tool_specified="$BUILD_OBJCOPY"
46170        tool_basename="${tool_specified##*/}"
46171        if test "x$tool_basename" = "x$tool_specified"; then
46172          # A command without a complete path is provided, search $PATH.
46173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46174$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46175          # Extract the first word of "$tool_basename", so it can be a program name with args.
46176set dummy $tool_basename; ac_word=$2
46177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46178$as_echo_n "checking for $ac_word... " >&6; }
46179if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46180  $as_echo_n "(cached) " >&6
46181else
46182  case $BUILD_OBJCOPY in
46183  [\\/]* | ?:[\\/]*)
46184  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46185  ;;
46186  *)
46187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46188for as_dir in $PATH
46189do
46190  IFS=$as_save_IFS
46191  test -z "$as_dir" && as_dir=.
46192    for ac_exec_ext in '' $ac_executable_extensions; do
46193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46194    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46196    break 2
46197  fi
46198done
46199  done
46200IFS=$as_save_IFS
46201
46202  ;;
46203esac
46204fi
46205BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46206if test -n "$BUILD_OBJCOPY"; then
46207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46208$as_echo "$BUILD_OBJCOPY" >&6; }
46209else
46210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46211$as_echo "no" >&6; }
46212fi
46213
46214
46215          if test "x$BUILD_OBJCOPY" = x; then
46216            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46217          fi
46218        else
46219          # Otherwise we believe it is a complete path. Use it as it is.
46220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46221$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46222          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46223$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46224          if test ! -x "$tool_specified"; then
46225            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46226$as_echo "not found" >&6; }
46227            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46228          fi
46229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46230$as_echo "$tool_specified" >&6; }
46231        fi
46232      fi
46233    fi
46234
46235  fi
46236
46237
46238
46239  # Only process if variable expands to non-empty
46240
46241  if test "x$BUILD_OBJCOPY" != x; then
46242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46243
46244  # First separate the path from the arguments. This will split at the first
46245  # space.
46246  complete="$BUILD_OBJCOPY"
46247  path="${complete%% *}"
46248  tmp="$complete EOL"
46249  arguments="${tmp#* }"
46250
46251  # Input might be given as Windows format, start by converting to
46252  # unix format.
46253  new_path=`$CYGPATH -u "$path"`
46254
46255  # Now try to locate executable using which
46256  new_path=`$WHICH "$new_path" 2> /dev/null`
46257  # bat and cmd files are not always considered executable in cygwin causing which
46258  # to not find them
46259  if test "x$new_path" = x \
46260      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46261      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46262    new_path=`$CYGPATH -u "$path"`
46263  fi
46264  if test "x$new_path" = x; then
46265    # Oops. Which didn't find the executable.
46266    # The splitting of arguments from the executable at a space might have been incorrect,
46267    # since paths with space are more likely in Windows. Give it another try with the whole
46268    # argument.
46269    path="$complete"
46270    arguments="EOL"
46271    new_path=`$CYGPATH -u "$path"`
46272    new_path=`$WHICH "$new_path" 2> /dev/null`
46273    # bat and cmd files are not always considered executable in cygwin causing which
46274    # to not find them
46275    if test "x$new_path" = x \
46276        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46277        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46278      new_path=`$CYGPATH -u "$path"`
46279    fi
46280    if test "x$new_path" = x; then
46281      # It's still not found. Now this is an unrecoverable error.
46282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46283$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46284      has_space=`$ECHO "$complete" | $GREP " "`
46285      if test "x$has_space" != x; then
46286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46288      fi
46289      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46290    fi
46291  fi
46292
46293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46296  # "foo.exe" is OK but "foo" is an error.
46297  #
46298  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46299  # It is also a way to make sure we got the proper file name for the real test later on.
46300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46301  if test "x$test_shortpath" = x; then
46302    # Short path failed, file does not exist as specified.
46303    # Try adding .exe or .cmd
46304    if test -f "${new_path}.exe"; then
46305      input_to_shortpath="${new_path}.exe"
46306    elif test -f "${new_path}.cmd"; then
46307      input_to_shortpath="${new_path}.cmd"
46308    else
46309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46310$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46311      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46312$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46313      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46314    fi
46315  else
46316    input_to_shortpath="$new_path"
46317  fi
46318
46319  # Call helper function which possibly converts this using DOS-style short mode.
46320  # If so, the updated path is stored in $new_path.
46321  new_path="$input_to_shortpath"
46322
46323  input_path="$input_to_shortpath"
46324  # Check if we need to convert this using DOS-style short mode. If the path
46325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46326  # take no chances and rewrite it.
46327  # Note: m4 eats our [], so we need to use [ and ] instead.
46328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46329  if test "x$has_forbidden_chars" != x; then
46330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46334      # Going to short mode and back again did indeed matter. Since short mode is
46335      # case insensitive, let's make it lowercase to improve readability.
46336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46337      # Now convert it back to Unix-style (cygpath)
46338      input_path=`$CYGPATH -u "$shortmode_path"`
46339      new_path="$input_path"
46340    fi
46341  fi
46342
46343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46344  if test "x$test_cygdrive_prefix" = x; then
46345    # As a simple fix, exclude /usr/bin since it's not a real path.
46346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46348      # a path prefixed by /cygdrive for fixpath to work.
46349      new_path="$CYGWIN_ROOT_PATH$input_path"
46350    fi
46351  fi
46352
46353  # remove trailing .exe if any
46354  new_path="${new_path/%.exe/}"
46355
46356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46357
46358  # First separate the path from the arguments. This will split at the first
46359  # space.
46360  complete="$BUILD_OBJCOPY"
46361  path="${complete%% *}"
46362  tmp="$complete EOL"
46363  arguments="${tmp#* }"
46364
46365  # Input might be given as Windows format, start by converting to
46366  # unix format.
46367  new_path="$path"
46368
46369  windows_path="$new_path"
46370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46371    unix_path=`$CYGPATH -u "$windows_path"`
46372    new_path="$unix_path"
46373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46375    new_path="$unix_path"
46376  fi
46377
46378
46379  # Now try to locate executable using which
46380  new_path=`$WHICH "$new_path" 2> /dev/null`
46381
46382  if test "x$new_path" = x; then
46383    # Oops. Which didn't find the executable.
46384    # The splitting of arguments from the executable at a space might have been incorrect,
46385    # since paths with space are more likely in Windows. Give it another try with the whole
46386    # argument.
46387    path="$complete"
46388    arguments="EOL"
46389    new_path="$path"
46390
46391  windows_path="$new_path"
46392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46393    unix_path=`$CYGPATH -u "$windows_path"`
46394    new_path="$unix_path"
46395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46397    new_path="$unix_path"
46398  fi
46399
46400
46401    new_path=`$WHICH "$new_path" 2> /dev/null`
46402    # bat and cmd files are not always considered executable in MSYS causing which
46403    # to not find them
46404    if test "x$new_path" = x \
46405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46407      new_path="$path"
46408
46409  windows_path="$new_path"
46410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46411    unix_path=`$CYGPATH -u "$windows_path"`
46412    new_path="$unix_path"
46413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46415    new_path="$unix_path"
46416  fi
46417
46418    fi
46419
46420    if test "x$new_path" = x; then
46421      # It's still not found. Now this is an unrecoverable error.
46422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46423$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46424      has_space=`$ECHO "$complete" | $GREP " "`
46425      if test "x$has_space" != x; then
46426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46428      fi
46429      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46430    fi
46431  fi
46432
46433  # Now new_path has a complete unix path to the binary
46434  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46435    # Keep paths in /bin as-is, but remove trailing .exe if any
46436    new_path="${new_path/%.exe/}"
46437    # Do not save /bin paths to all_fixpath_prefixes!
46438  else
46439    # Not in mixed or Windows style, start by that.
46440    new_path=`cmd //c echo $new_path`
46441
46442  input_path="$new_path"
46443  # Check if we need to convert this using DOS-style short mode. If the path
46444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46445  # take no chances and rewrite it.
46446  # Note: m4 eats our [], so we need to use [ and ] instead.
46447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46448  if test "x$has_forbidden_chars" != x; then
46449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46451  fi
46452
46453    # Output is in $new_path
46454
46455  windows_path="$new_path"
46456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46457    unix_path=`$CYGPATH -u "$windows_path"`
46458    new_path="$unix_path"
46459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46461    new_path="$unix_path"
46462  fi
46463
46464    # remove trailing .exe if any
46465    new_path="${new_path/%.exe/}"
46466
46467    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46468    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46469  fi
46470
46471    else
46472      # We're on a unix platform. Hooray! :)
46473      # First separate the path from the arguments. This will split at the first
46474      # space.
46475      complete="$BUILD_OBJCOPY"
46476      path="${complete%% *}"
46477      tmp="$complete EOL"
46478      arguments="${tmp#* }"
46479
46480      # Cannot rely on the command "which" here since it doesn't always work.
46481      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46482      if test -z "$is_absolute_path"; then
46483        # Path to executable is not absolute. Find it.
46484        IFS_save="$IFS"
46485        IFS=:
46486        for p in $PATH; do
46487          if test -f "$p/$path" && test -x "$p/$path"; then
46488            new_path="$p/$path"
46489            break
46490          fi
46491        done
46492        IFS="$IFS_save"
46493      else
46494        # This is an absolute path, we can use it without further modifications.
46495        new_path="$path"
46496      fi
46497
46498      if test "x$new_path" = x; then
46499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46500$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46501        has_space=`$ECHO "$complete" | $GREP " "`
46502        if test "x$has_space" != x; then
46503          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46504$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46505        fi
46506        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46507      fi
46508    fi
46509
46510    # Now join together the path and the arguments once again
46511    if test "x$arguments" != xEOL; then
46512      new_complete="$new_path ${arguments% *}"
46513    else
46514      new_complete="$new_path"
46515    fi
46516
46517    if test "x$complete" != "x$new_complete"; then
46518      BUILD_OBJCOPY="$new_complete"
46519      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46520$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46521    fi
46522  fi
46523
46524
46525
46526  # Publish this variable in the help.
46527
46528
46529  if [ -z "${BUILD_STRIP+x}" ]; then
46530    # The variable is not set by user, try to locate tool using the code snippet
46531    for ac_prog in strip
46532do
46533  # Extract the first word of "$ac_prog", so it can be a program name with args.
46534set dummy $ac_prog; ac_word=$2
46535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46536$as_echo_n "checking for $ac_word... " >&6; }
46537if ${ac_cv_path_BUILD_STRIP+:} false; then :
46538  $as_echo_n "(cached) " >&6
46539else
46540  case $BUILD_STRIP in
46541  [\\/]* | ?:[\\/]*)
46542  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46543  ;;
46544  *)
46545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46546for as_dir in $PATH
46547do
46548  IFS=$as_save_IFS
46549  test -z "$as_dir" && as_dir=.
46550    for ac_exec_ext in '' $ac_executable_extensions; do
46551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46552    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46554    break 2
46555  fi
46556done
46557  done
46558IFS=$as_save_IFS
46559
46560  ;;
46561esac
46562fi
46563BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46564if test -n "$BUILD_STRIP"; then
46565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46566$as_echo "$BUILD_STRIP" >&6; }
46567else
46568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46569$as_echo "no" >&6; }
46570fi
46571
46572
46573  test -n "$BUILD_STRIP" && break
46574done
46575
46576  else
46577    # The variable is set, but is it from the command line or the environment?
46578
46579    # Try to remove the string !BUILD_STRIP! from our list.
46580    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46581    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46582      # If it failed, the variable was not from the command line. Ignore it,
46583      # but warn the user (except for BASH, which is always set by the calling BASH).
46584      if test "xBUILD_STRIP" != xBASH; then
46585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46586$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46587      fi
46588      # Try to locate tool using the code snippet
46589      for ac_prog in strip
46590do
46591  # Extract the first word of "$ac_prog", so it can be a program name with args.
46592set dummy $ac_prog; ac_word=$2
46593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46594$as_echo_n "checking for $ac_word... " >&6; }
46595if ${ac_cv_path_BUILD_STRIP+:} false; then :
46596  $as_echo_n "(cached) " >&6
46597else
46598  case $BUILD_STRIP in
46599  [\\/]* | ?:[\\/]*)
46600  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46601  ;;
46602  *)
46603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46604for as_dir in $PATH
46605do
46606  IFS=$as_save_IFS
46607  test -z "$as_dir" && as_dir=.
46608    for ac_exec_ext in '' $ac_executable_extensions; do
46609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46610    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46612    break 2
46613  fi
46614done
46615  done
46616IFS=$as_save_IFS
46617
46618  ;;
46619esac
46620fi
46621BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46622if test -n "$BUILD_STRIP"; then
46623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46624$as_echo "$BUILD_STRIP" >&6; }
46625else
46626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46627$as_echo "no" >&6; }
46628fi
46629
46630
46631  test -n "$BUILD_STRIP" && break
46632done
46633
46634    else
46635      # If it succeeded, then it was overridden by the user. We will use it
46636      # for the tool.
46637
46638      # First remove it from the list of overridden variables, so we can test
46639      # for unknown variables in the end.
46640      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46641
46642      # Check if we try to supply an empty value
46643      if test "x$BUILD_STRIP" = x; then
46644        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46645$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46647$as_echo_n "checking for BUILD_STRIP... " >&6; }
46648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46649$as_echo "disabled" >&6; }
46650      else
46651        # Check if the provided tool contains a complete path.
46652        tool_specified="$BUILD_STRIP"
46653        tool_basename="${tool_specified##*/}"
46654        if test "x$tool_basename" = "x$tool_specified"; then
46655          # A command without a complete path is provided, search $PATH.
46656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46657$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46658          # Extract the first word of "$tool_basename", so it can be a program name with args.
46659set dummy $tool_basename; ac_word=$2
46660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46661$as_echo_n "checking for $ac_word... " >&6; }
46662if ${ac_cv_path_BUILD_STRIP+:} false; then :
46663  $as_echo_n "(cached) " >&6
46664else
46665  case $BUILD_STRIP in
46666  [\\/]* | ?:[\\/]*)
46667  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46668  ;;
46669  *)
46670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46671for as_dir in $PATH
46672do
46673  IFS=$as_save_IFS
46674  test -z "$as_dir" && as_dir=.
46675    for ac_exec_ext in '' $ac_executable_extensions; do
46676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46677    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46679    break 2
46680  fi
46681done
46682  done
46683IFS=$as_save_IFS
46684
46685  ;;
46686esac
46687fi
46688BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46689if test -n "$BUILD_STRIP"; then
46690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46691$as_echo "$BUILD_STRIP" >&6; }
46692else
46693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46694$as_echo "no" >&6; }
46695fi
46696
46697
46698          if test "x$BUILD_STRIP" = x; then
46699            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46700          fi
46701        else
46702          # Otherwise we believe it is a complete path. Use it as it is.
46703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46704$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46705          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46706$as_echo_n "checking for BUILD_STRIP... " >&6; }
46707          if test ! -x "$tool_specified"; then
46708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46709$as_echo "not found" >&6; }
46710            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46711          fi
46712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46713$as_echo "$tool_specified" >&6; }
46714        fi
46715      fi
46716    fi
46717
46718  fi
46719
46720
46721
46722  # Only process if variable expands to non-empty
46723
46724  if test "x$BUILD_STRIP" != x; then
46725    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46726
46727  # First separate the path from the arguments. This will split at the first
46728  # space.
46729  complete="$BUILD_STRIP"
46730  path="${complete%% *}"
46731  tmp="$complete EOL"
46732  arguments="${tmp#* }"
46733
46734  # Input might be given as Windows format, start by converting to
46735  # unix format.
46736  new_path=`$CYGPATH -u "$path"`
46737
46738  # Now try to locate executable using which
46739  new_path=`$WHICH "$new_path" 2> /dev/null`
46740  # bat and cmd files are not always considered executable in cygwin causing which
46741  # to not find them
46742  if test "x$new_path" = x \
46743      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46744      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46745    new_path=`$CYGPATH -u "$path"`
46746  fi
46747  if test "x$new_path" = x; then
46748    # Oops. Which didn't find the executable.
46749    # The splitting of arguments from the executable at a space might have been incorrect,
46750    # since paths with space are more likely in Windows. Give it another try with the whole
46751    # argument.
46752    path="$complete"
46753    arguments="EOL"
46754    new_path=`$CYGPATH -u "$path"`
46755    new_path=`$WHICH "$new_path" 2> /dev/null`
46756    # bat and cmd files are not always considered executable in cygwin causing which
46757    # to not find them
46758    if test "x$new_path" = x \
46759        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46760        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46761      new_path=`$CYGPATH -u "$path"`
46762    fi
46763    if test "x$new_path" = x; then
46764      # It's still not found. Now this is an unrecoverable error.
46765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46766$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46767      has_space=`$ECHO "$complete" | $GREP " "`
46768      if test "x$has_space" != x; then
46769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46771      fi
46772      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46773    fi
46774  fi
46775
46776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46779  # "foo.exe" is OK but "foo" is an error.
46780  #
46781  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46782  # It is also a way to make sure we got the proper file name for the real test later on.
46783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46784  if test "x$test_shortpath" = x; then
46785    # Short path failed, file does not exist as specified.
46786    # Try adding .exe or .cmd
46787    if test -f "${new_path}.exe"; then
46788      input_to_shortpath="${new_path}.exe"
46789    elif test -f "${new_path}.cmd"; then
46790      input_to_shortpath="${new_path}.cmd"
46791    else
46792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46793$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46794      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46795$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46796      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46797    fi
46798  else
46799    input_to_shortpath="$new_path"
46800  fi
46801
46802  # Call helper function which possibly converts this using DOS-style short mode.
46803  # If so, the updated path is stored in $new_path.
46804  new_path="$input_to_shortpath"
46805
46806  input_path="$input_to_shortpath"
46807  # Check if we need to convert this using DOS-style short mode. If the path
46808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46809  # take no chances and rewrite it.
46810  # Note: m4 eats our [], so we need to use [ and ] instead.
46811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46812  if test "x$has_forbidden_chars" != x; then
46813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46817      # Going to short mode and back again did indeed matter. Since short mode is
46818      # case insensitive, let's make it lowercase to improve readability.
46819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46820      # Now convert it back to Unix-style (cygpath)
46821      input_path=`$CYGPATH -u "$shortmode_path"`
46822      new_path="$input_path"
46823    fi
46824  fi
46825
46826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46827  if test "x$test_cygdrive_prefix" = x; then
46828    # As a simple fix, exclude /usr/bin since it's not a real path.
46829    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46831      # a path prefixed by /cygdrive for fixpath to work.
46832      new_path="$CYGWIN_ROOT_PATH$input_path"
46833    fi
46834  fi
46835
46836  # remove trailing .exe if any
46837  new_path="${new_path/%.exe/}"
46838
46839    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46840
46841  # First separate the path from the arguments. This will split at the first
46842  # space.
46843  complete="$BUILD_STRIP"
46844  path="${complete%% *}"
46845  tmp="$complete EOL"
46846  arguments="${tmp#* }"
46847
46848  # Input might be given as Windows format, start by converting to
46849  # unix format.
46850  new_path="$path"
46851
46852  windows_path="$new_path"
46853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46854    unix_path=`$CYGPATH -u "$windows_path"`
46855    new_path="$unix_path"
46856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46858    new_path="$unix_path"
46859  fi
46860
46861
46862  # Now try to locate executable using which
46863  new_path=`$WHICH "$new_path" 2> /dev/null`
46864
46865  if test "x$new_path" = x; then
46866    # Oops. Which didn't find the executable.
46867    # The splitting of arguments from the executable at a space might have been incorrect,
46868    # since paths with space are more likely in Windows. Give it another try with the whole
46869    # argument.
46870    path="$complete"
46871    arguments="EOL"
46872    new_path="$path"
46873
46874  windows_path="$new_path"
46875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46876    unix_path=`$CYGPATH -u "$windows_path"`
46877    new_path="$unix_path"
46878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46880    new_path="$unix_path"
46881  fi
46882
46883
46884    new_path=`$WHICH "$new_path" 2> /dev/null`
46885    # bat and cmd files are not always considered executable in MSYS causing which
46886    # to not find them
46887    if test "x$new_path" = x \
46888        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46889        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46890      new_path="$path"
46891
46892  windows_path="$new_path"
46893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46894    unix_path=`$CYGPATH -u "$windows_path"`
46895    new_path="$unix_path"
46896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46898    new_path="$unix_path"
46899  fi
46900
46901    fi
46902
46903    if test "x$new_path" = x; then
46904      # It's still not found. Now this is an unrecoverable error.
46905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46906$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46907      has_space=`$ECHO "$complete" | $GREP " "`
46908      if test "x$has_space" != x; then
46909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46911      fi
46912      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46913    fi
46914  fi
46915
46916  # Now new_path has a complete unix path to the binary
46917  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46918    # Keep paths in /bin as-is, but remove trailing .exe if any
46919    new_path="${new_path/%.exe/}"
46920    # Do not save /bin paths to all_fixpath_prefixes!
46921  else
46922    # Not in mixed or Windows style, start by that.
46923    new_path=`cmd //c echo $new_path`
46924
46925  input_path="$new_path"
46926  # Check if we need to convert this using DOS-style short mode. If the path
46927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46928  # take no chances and rewrite it.
46929  # Note: m4 eats our [], so we need to use [ and ] instead.
46930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46931  if test "x$has_forbidden_chars" != x; then
46932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46934  fi
46935
46936    # Output is in $new_path
46937
46938  windows_path="$new_path"
46939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46940    unix_path=`$CYGPATH -u "$windows_path"`
46941    new_path="$unix_path"
46942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46944    new_path="$unix_path"
46945  fi
46946
46947    # remove trailing .exe if any
46948    new_path="${new_path/%.exe/}"
46949
46950    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46951    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46952  fi
46953
46954    else
46955      # We're on a unix platform. Hooray! :)
46956      # First separate the path from the arguments. This will split at the first
46957      # space.
46958      complete="$BUILD_STRIP"
46959      path="${complete%% *}"
46960      tmp="$complete EOL"
46961      arguments="${tmp#* }"
46962
46963      # Cannot rely on the command "which" here since it doesn't always work.
46964      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46965      if test -z "$is_absolute_path"; then
46966        # Path to executable is not absolute. Find it.
46967        IFS_save="$IFS"
46968        IFS=:
46969        for p in $PATH; do
46970          if test -f "$p/$path" && test -x "$p/$path"; then
46971            new_path="$p/$path"
46972            break
46973          fi
46974        done
46975        IFS="$IFS_save"
46976      else
46977        # This is an absolute path, we can use it without further modifications.
46978        new_path="$path"
46979      fi
46980
46981      if test "x$new_path" = x; then
46982        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46983$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46984        has_space=`$ECHO "$complete" | $GREP " "`
46985        if test "x$has_space" != x; then
46986          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46987$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46988        fi
46989        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46990      fi
46991    fi
46992
46993    # Now join together the path and the arguments once again
46994    if test "x$arguments" != xEOL; then
46995      new_complete="$new_path ${arguments% *}"
46996    else
46997      new_complete="$new_path"
46998    fi
46999
47000    if test "x$complete" != "x$new_complete"; then
47001      BUILD_STRIP="$new_complete"
47002      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47003$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47004    fi
47005  fi
47006
47007    # Assume the C compiler is the assembler
47008    BUILD_AS="$BUILD_CC -c"
47009    # Just like for the target compiler, use the compiler as linker
47010    BUILD_LD="$BUILD_CC"
47011    BUILD_LDCXX="$BUILD_CXX"
47012
47013    PATH="$OLDPATH"
47014
47015
47016  COMPILER=$BUILD_CC
47017  COMPILER_NAME=BuildC
47018
47019  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47020    # cc -V output typically looks like
47021    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47022    # or
47023    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47024    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47025    # Check that this is likely to be the Solaris Studio cc.
47026    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47027    if test $? -ne 0; then
47028      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47029      { $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
47030$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47031      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47032$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47033      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47034$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47035      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47036    fi
47037    # Remove usage instructions (if present), and
47038    # collapse compiler output into a single line
47039    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47040        $SED -e 's/ *[Uu]sage:.*//'`
47041    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47042        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47043  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47044    # xlc -qversion output typically looks like
47045    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47046    #     Version: 11.01.0000.0015
47047    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47048    # Check that this is likely to be the IBM XL C compiler.
47049    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47050    if test $? -ne 0; then
47051      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47052      { $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
47053$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47054      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47055$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47056      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47057$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47058      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47059    fi
47060    # Collapse compiler output into a single line
47061    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47062    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47063        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47064  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47065    # There is no specific version flag, but all output starts with a version string.
47066    # First line typically looks something like:
47067    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47068    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47069    # Check that this is likely to be Microsoft CL.EXE.
47070    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47071    if test $? -ne 0; then
47072      { $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
47073$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47074      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47075$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47076      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47077    fi
47078    # Collapse compiler output into a single line
47079    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47080    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47081        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47082  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47083    # gcc --version output typically looks like
47084    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47085    #     Copyright (C) 2013 Free Software Foundation, Inc.
47086    #     This is free software; see the source for copying conditions.  There is NO
47087    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47088    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47089    # Check that this is likely to be GCC.
47090    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47091    if test $? -ne 0; then
47092      { $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
47093$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47094      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47095$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47096      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47097    fi
47098    # Remove Copyright and legalese from version string, and
47099    # collapse into a single line
47100    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47101        $SED -e 's/ *Copyright .*//'`
47102    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47103        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47104  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47105    # clang --version output typically looks like
47106    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47107    #    clang version 3.3 (tags/RELEASE_33/final)
47108    # or
47109    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47110    #    Target: x86_64-pc-linux-gnu
47111    #    Thread model: posix
47112    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47113    # Check that this is likely to be clang
47114    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47115    if test $? -ne 0; then
47116      { $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
47117$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47118      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47119$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47120      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47121    fi
47122    # Collapse compiler output into a single line
47123    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47124    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47125        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47126  else
47127      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47128  fi
47129  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47130  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47131  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47132  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47133
47134  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47135$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47136
47137
47138  COMPILER=$BUILD_CXX
47139  COMPILER_NAME=BuildC++
47140
47141  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47142    # cc -V output typically looks like
47143    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47144    # or
47145    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47146    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47147    # Check that this is likely to be the Solaris Studio cc.
47148    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47149    if test $? -ne 0; then
47150      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47151      { $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
47152$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47153      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47154$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47155      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47156$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47157      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47158    fi
47159    # Remove usage instructions (if present), and
47160    # collapse compiler output into a single line
47161    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47162        $SED -e 's/ *[Uu]sage:.*//'`
47163    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47164        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47165  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47166    # xlc -qversion output typically looks like
47167    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47168    #     Version: 11.01.0000.0015
47169    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47170    # Check that this is likely to be the IBM XL C compiler.
47171    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47172    if test $? -ne 0; then
47173      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47174      { $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
47175$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47176      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47177$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47178      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47179$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47180      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47181    fi
47182    # Collapse compiler output into a single line
47183    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47184    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47185        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47186  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47187    # There is no specific version flag, but all output starts with a version string.
47188    # First line typically looks something like:
47189    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47190    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47191    # Check that this is likely to be Microsoft CL.EXE.
47192    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47193    if test $? -ne 0; then
47194      { $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
47195$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47196      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47197$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47198      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47199    fi
47200    # Collapse compiler output into a single line
47201    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47202    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47203        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47204  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47205    # gcc --version output typically looks like
47206    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47207    #     Copyright (C) 2013 Free Software Foundation, Inc.
47208    #     This is free software; see the source for copying conditions.  There is NO
47209    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47210    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47211    # Check that this is likely to be GCC.
47212    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47213    if test $? -ne 0; then
47214      { $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
47215$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47216      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47217$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47218      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47219    fi
47220    # Remove Copyright and legalese from version string, and
47221    # collapse into a single line
47222    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47223        $SED -e 's/ *Copyright .*//'`
47224    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47225        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47226  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47227    # clang --version output typically looks like
47228    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47229    #    clang version 3.3 (tags/RELEASE_33/final)
47230    # or
47231    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47232    #    Target: x86_64-pc-linux-gnu
47233    #    Thread model: posix
47234    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47235    # Check that this is likely to be clang
47236    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47237    if test $? -ne 0; then
47238      { $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
47239$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47240      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47241$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47242      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47243    fi
47244    # Collapse compiler output into a single line
47245    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47246    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47247        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47248  else
47249      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47250  fi
47251  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47252  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47253  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47254  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47255
47256  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47257$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47258
47259
47260  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47261    { $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
47262$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47263    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47264$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47265  fi
47266
47267  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47268  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47269    { $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
47270$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;}
47271  fi
47272
47273  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47274    { $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
47275$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47276  fi
47277
47278  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47279
47280  else
47281    # If we are not cross compiling, use the normal target compilers for
47282    # building the build platform executables.
47283    BUILD_CC="$CC"
47284    BUILD_CXX="$CXX"
47285    BUILD_LD="$LD"
47286    BUILD_LDCXX="$LDCXX"
47287    BUILD_NM="$NM"
47288    BUILD_AS="$AS"
47289    BUILD_OBJCOPY="$OBJCOPY"
47290    BUILD_STRIP="$STRIP"
47291    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47292    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47293    BUILD_AR="$AR"
47294
47295
47296  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47297    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47298$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47299    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47300$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47301  fi
47302
47303  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47304  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47305    { $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
47306$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;}
47307  fi
47308
47309  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47310    { $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
47311$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47312  fi
47313
47314  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47315
47316  fi
47317
47318
47319
47320
47321
47322
47323
47324
47325
47326
47327
47328
47329
47330
47331  # The package path is used only on macosx?
47332  # FIXME: clean this up, and/or move it elsewhere.
47333  PACKAGE_PATH=/opt/local
47334
47335
47336  # Check for extra potential brokenness.
47337  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47338    # On Windows, double-check that we got the right compiler.
47339    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47340    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47341    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47342      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47343        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
47344      fi
47345    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47346      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47347        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47348      fi
47349    fi
47350  fi
47351
47352  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47353    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47354    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47355    # This is later checked when setting flags.
47356
47357    # "-Og" suppported for GCC 4.8 and later
47358    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
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
47401
47402
47403
47404
47405
47406    # Execute function body
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
47450
47451
47452
47453
47454
47455    # Execute function body
47456
47457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47458$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47459  supports=yes
47460
47461  saved_cflags="$CFLAGS"
47462  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47463  ac_ext=c
47464ac_cpp='$CPP $CPPFLAGS'
47465ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47466ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47467ac_compiler_gnu=$ac_cv_c_compiler_gnu
47468
47469  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47470/* end confdefs.h.  */
47471int i;
47472_ACEOF
47473if ac_fn_c_try_compile "$LINENO"; then :
47474
47475else
47476  supports=no
47477fi
47478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47479  ac_ext=cpp
47480ac_cpp='$CXXCPP $CPPFLAGS'
47481ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47482ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47483ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47484
47485  CFLAGS="$saved_cflags"
47486
47487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47488$as_echo "$supports" >&6; }
47489  if test "x$supports" = "xyes" ; then
47490    :
47491    C_COMP_SUPPORTS="yes"
47492  else
47493    :
47494    C_COMP_SUPPORTS="no"
47495  fi
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
47550
47551
47552
47553
47554
47555    # Execute function body
47556
47557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47558$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47559  supports=yes
47560
47561  saved_cxxflags="$CXXFLAGS"
47562  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47563  ac_ext=cpp
47564ac_cpp='$CXXCPP $CPPFLAGS'
47565ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47566ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47567ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47568
47569  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47570/* end confdefs.h.  */
47571int i;
47572_ACEOF
47573if ac_fn_cxx_try_compile "$LINENO"; then :
47574
47575else
47576  supports=no
47577fi
47578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47579  ac_ext=cpp
47580ac_cpp='$CXXCPP $CPPFLAGS'
47581ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47582ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47583ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47584
47585  CXXFLAGS="$saved_cxxflags"
47586
47587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47588$as_echo "$supports" >&6; }
47589  if test "x$supports" = "xyes" ; then
47590    :
47591    CXX_COMP_SUPPORTS="yes"
47592  else
47593    :
47594    CXX_COMP_SUPPORTS="no"
47595  fi
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608
47609  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47610$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47611  supports=no
47612  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47613
47614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47615$as_echo "$supports" >&6; }
47616  if test "x$supports" = "xyes" ; then
47617    :
47618    HAS_CFLAG_OPTIMIZE_DEBUG=true
47619  else
47620    :
47621    HAS_CFLAG_OPTIMIZE_DEBUG=false
47622  fi
47623
47624
47625
47626
47627
47628
47629
47630    # "-z relro" supported in GNU binutils 2.17 and later
47631    LINKER_RELRO_FLAG="-Wl,-z,relro"
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
47674
47675
47676
47677
47678
47679    # Execute function body
47680
47681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47682$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47683  supports=yes
47684
47685  saved_ldflags="$LDFLAGS"
47686  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47687  ac_ext=c
47688ac_cpp='$CPP $CPPFLAGS'
47689ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47690ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47691ac_compiler_gnu=$ac_cv_c_compiler_gnu
47692
47693  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47694/* end confdefs.h.  */
47695
47696int
47697main ()
47698{
47699
47700  ;
47701  return 0;
47702}
47703_ACEOF
47704if ac_fn_c_try_link "$LINENO"; then :
47705
47706else
47707  supports=no
47708fi
47709rm -f core conftest.err conftest.$ac_objext \
47710    conftest$ac_exeext conftest.$ac_ext
47711  ac_ext=cpp
47712ac_cpp='$CXXCPP $CPPFLAGS'
47713ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47714ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47715ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47716
47717  LDFLAGS="$saved_ldflags"
47718
47719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47720$as_echo "$supports" >&6; }
47721  if test "x$supports" = "xyes" ; then
47722    :
47723    HAS_LINKER_RELRO=true
47724  else
47725    :
47726    HAS_LINKER_RELRO=false
47727  fi
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741    # "-z now" supported in GNU binutils 2.11 and later
47742    LINKER_NOW_FLAG="-Wl,-z,now"
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
47785
47786
47787
47788
47789
47790    # Execute function body
47791
47792  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47793$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47794  supports=yes
47795
47796  saved_ldflags="$LDFLAGS"
47797  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47798  ac_ext=c
47799ac_cpp='$CPP $CPPFLAGS'
47800ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47801ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47802ac_compiler_gnu=$ac_cv_c_compiler_gnu
47803
47804  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47805/* end confdefs.h.  */
47806
47807int
47808main ()
47809{
47810
47811  ;
47812  return 0;
47813}
47814_ACEOF
47815if ac_fn_c_try_link "$LINENO"; then :
47816
47817else
47818  supports=no
47819fi
47820rm -f core conftest.err conftest.$ac_objext \
47821    conftest$ac_exeext conftest.$ac_ext
47822  ac_ext=cpp
47823ac_cpp='$CXXCPP $CPPFLAGS'
47824ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47825ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47826ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47827
47828  LDFLAGS="$saved_ldflags"
47829
47830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47831$as_echo "$supports" >&6; }
47832  if test "x$supports" = "xyes" ; then
47833    :
47834    HAS_LINKER_NOW=true
47835  else
47836    :
47837    HAS_LINKER_NOW=false
47838  fi
47839
47840
47841
47842
47843
47844
47845
47846
47847
47848
47849
47850
47851  fi
47852
47853  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47854  # in executable.'
47855  USING_BROKEN_SUSE_LD=no
47856  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47858$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47859    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47860    $ECHO "int main() { }" > main.c
47861    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47863$as_echo "no" >&6; }
47864      USING_BROKEN_SUSE_LD=no
47865    else
47866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47867$as_echo "yes" >&6; }
47868      USING_BROKEN_SUSE_LD=yes
47869    fi
47870    $RM version-script.map main.c a.out
47871  fi
47872
47873
47874  # Setup hotspot lecagy names for toolchains
47875  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47876  if test "x$TOOLCHAIN_TYPE" = xclang; then
47877    HOTSPOT_TOOLCHAIN_TYPE=gcc
47878  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47879    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47880  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47881    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47882  fi
47883
47884
47885
47886# Setup the JTReg Regression Test Harness.
47887
47888
47889# Check whether --with-jtreg was given.
47890if test "${with_jtreg+set}" = set; then :
47891  withval=$with_jtreg;
47892else
47893  with_jtreg=no
47894fi
47895
47896
47897  if test "x$with_jtreg" = xno; then
47898    # jtreg disabled
47899    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47900$as_echo_n "checking for jtreg... " >&6; }
47901    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47902$as_echo "no" >&6; }
47903  else
47904    if test "x$with_jtreg" != xyes; then
47905      # with path specified.
47906      JT_HOME="$with_jtreg"
47907    fi
47908
47909    if test "x$JT_HOME" != x; then
47910      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47911$as_echo_n "checking for jtreg... " >&6; }
47912
47913      # use JT_HOME enviroment var.
47914
47915  # Only process if variable expands to non-empty
47916
47917  if test "x$JT_HOME" != x; then
47918    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47919
47920  # Input might be given as Windows format, start by converting to
47921  # unix format.
47922  path="$JT_HOME"
47923  new_path=`$CYGPATH -u "$path"`
47924
47925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47928  # "foo.exe" is OK but "foo" is an error.
47929  #
47930  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47931  # It is also a way to make sure we got the proper file name for the real test later on.
47932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47933  if test "x$test_shortpath" = x; then
47934    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47935$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47936    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47937  fi
47938
47939  # Call helper function which possibly converts this using DOS-style short mode.
47940  # If so, the updated path is stored in $new_path.
47941
47942  input_path="$new_path"
47943  # Check if we need to convert this using DOS-style short mode. If the path
47944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47945  # take no chances and rewrite it.
47946  # Note: m4 eats our [], so we need to use [ and ] instead.
47947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47948  if test "x$has_forbidden_chars" != x; then
47949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47950    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47951    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47952    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47953      # Going to short mode and back again did indeed matter. Since short mode is
47954      # case insensitive, let's make it lowercase to improve readability.
47955      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47956      # Now convert it back to Unix-style (cygpath)
47957      input_path=`$CYGPATH -u "$shortmode_path"`
47958      new_path="$input_path"
47959    fi
47960  fi
47961
47962  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47963  if test "x$test_cygdrive_prefix" = x; then
47964    # As a simple fix, exclude /usr/bin since it's not a real path.
47965    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47966      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47967      # a path prefixed by /cygdrive for fixpath to work.
47968      new_path="$CYGWIN_ROOT_PATH$input_path"
47969    fi
47970  fi
47971
47972
47973  if test "x$path" != "x$new_path"; then
47974    JT_HOME="$new_path"
47975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47976$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47977  fi
47978
47979    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47980
47981  path="$JT_HOME"
47982  has_colon=`$ECHO $path | $GREP ^.:`
47983  new_path="$path"
47984  if test "x$has_colon" = x; then
47985    # Not in mixed or Windows style, start by that.
47986    new_path=`cmd //c echo $path`
47987  fi
47988
47989
47990  input_path="$new_path"
47991  # Check if we need to convert this using DOS-style short mode. If the path
47992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47993  # take no chances and rewrite it.
47994  # Note: m4 eats our [], so we need to use [ and ] instead.
47995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47996  if test "x$has_forbidden_chars" != x; then
47997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47999  fi
48000
48001
48002  windows_path="$new_path"
48003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48004    unix_path=`$CYGPATH -u "$windows_path"`
48005    new_path="$unix_path"
48006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48008    new_path="$unix_path"
48009  fi
48010
48011  if test "x$path" != "x$new_path"; then
48012    JT_HOME="$new_path"
48013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48014$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48015  fi
48016
48017  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48018  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48019
48020    else
48021      # We're on a unix platform. Hooray! :)
48022      path="$JT_HOME"
48023      has_space=`$ECHO "$path" | $GREP " "`
48024      if test "x$has_space" != x; then
48025        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48026$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48027        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48028      fi
48029
48030      # Use eval to expand a potential ~
48031      eval path="$path"
48032      if test ! -f "$path" && test ! -d "$path"; then
48033        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48034      fi
48035
48036      if test -d "$path"; then
48037        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48038      else
48039        dir="`$DIRNAME "$path"`"
48040        base="`$BASENAME "$path"`"
48041        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48042      fi
48043    fi
48044  fi
48045
48046
48047      # jtreg win32 script works for everybody
48048      JTREGEXE="$JT_HOME/bin/jtreg"
48049
48050      if test ! -f "$JTREGEXE"; then
48051        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48052      fi
48053
48054      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48055$as_echo "$JTREGEXE" >&6; }
48056    else
48057      # try to find jtreg on path
48058
48059
48060
48061  # Publish this variable in the help.
48062
48063
48064  if [ -z "${JTREGEXE+x}" ]; then
48065    # The variable is not set by user, try to locate tool using the code snippet
48066    for ac_prog in jtreg
48067do
48068  # Extract the first word of "$ac_prog", so it can be a program name with args.
48069set dummy $ac_prog; ac_word=$2
48070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48071$as_echo_n "checking for $ac_word... " >&6; }
48072if ${ac_cv_path_JTREGEXE+:} false; then :
48073  $as_echo_n "(cached) " >&6
48074else
48075  case $JTREGEXE in
48076  [\\/]* | ?:[\\/]*)
48077  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48078  ;;
48079  *)
48080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48081for as_dir in $PATH
48082do
48083  IFS=$as_save_IFS
48084  test -z "$as_dir" && as_dir=.
48085    for ac_exec_ext in '' $ac_executable_extensions; do
48086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48087    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48089    break 2
48090  fi
48091done
48092  done
48093IFS=$as_save_IFS
48094
48095  ;;
48096esac
48097fi
48098JTREGEXE=$ac_cv_path_JTREGEXE
48099if test -n "$JTREGEXE"; then
48100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48101$as_echo "$JTREGEXE" >&6; }
48102else
48103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48104$as_echo "no" >&6; }
48105fi
48106
48107
48108  test -n "$JTREGEXE" && break
48109done
48110
48111  else
48112    # The variable is set, but is it from the command line or the environment?
48113
48114    # Try to remove the string !JTREGEXE! from our list.
48115    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48116    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48117      # If it failed, the variable was not from the command line. Ignore it,
48118      # but warn the user (except for BASH, which is always set by the calling BASH).
48119      if test "xJTREGEXE" != xBASH; then
48120        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48121$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48122      fi
48123      # Try to locate tool using the code snippet
48124      for ac_prog in jtreg
48125do
48126  # Extract the first word of "$ac_prog", so it can be a program name with args.
48127set dummy $ac_prog; ac_word=$2
48128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48129$as_echo_n "checking for $ac_word... " >&6; }
48130if ${ac_cv_path_JTREGEXE+:} false; then :
48131  $as_echo_n "(cached) " >&6
48132else
48133  case $JTREGEXE in
48134  [\\/]* | ?:[\\/]*)
48135  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48136  ;;
48137  *)
48138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48139for as_dir in $PATH
48140do
48141  IFS=$as_save_IFS
48142  test -z "$as_dir" && as_dir=.
48143    for ac_exec_ext in '' $ac_executable_extensions; do
48144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48145    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48147    break 2
48148  fi
48149done
48150  done
48151IFS=$as_save_IFS
48152
48153  ;;
48154esac
48155fi
48156JTREGEXE=$ac_cv_path_JTREGEXE
48157if test -n "$JTREGEXE"; then
48158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48159$as_echo "$JTREGEXE" >&6; }
48160else
48161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48162$as_echo "no" >&6; }
48163fi
48164
48165
48166  test -n "$JTREGEXE" && break
48167done
48168
48169    else
48170      # If it succeeded, then it was overridden by the user. We will use it
48171      # for the tool.
48172
48173      # First remove it from the list of overridden variables, so we can test
48174      # for unknown variables in the end.
48175      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48176
48177      # Check if we try to supply an empty value
48178      if test "x$JTREGEXE" = x; then
48179        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48180$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48182$as_echo_n "checking for JTREGEXE... " >&6; }
48183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48184$as_echo "disabled" >&6; }
48185      else
48186        # Check if the provided tool contains a complete path.
48187        tool_specified="$JTREGEXE"
48188        tool_basename="${tool_specified##*/}"
48189        if test "x$tool_basename" = "x$tool_specified"; then
48190          # A command without a complete path is provided, search $PATH.
48191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48192$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48193          # Extract the first word of "$tool_basename", so it can be a program name with args.
48194set dummy $tool_basename; ac_word=$2
48195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48196$as_echo_n "checking for $ac_word... " >&6; }
48197if ${ac_cv_path_JTREGEXE+:} false; then :
48198  $as_echo_n "(cached) " >&6
48199else
48200  case $JTREGEXE in
48201  [\\/]* | ?:[\\/]*)
48202  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48203  ;;
48204  *)
48205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48206for as_dir in $PATH
48207do
48208  IFS=$as_save_IFS
48209  test -z "$as_dir" && as_dir=.
48210    for ac_exec_ext in '' $ac_executable_extensions; do
48211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48212    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48214    break 2
48215  fi
48216done
48217  done
48218IFS=$as_save_IFS
48219
48220  ;;
48221esac
48222fi
48223JTREGEXE=$ac_cv_path_JTREGEXE
48224if test -n "$JTREGEXE"; then
48225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48226$as_echo "$JTREGEXE" >&6; }
48227else
48228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48229$as_echo "no" >&6; }
48230fi
48231
48232
48233          if test "x$JTREGEXE" = x; then
48234            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48235          fi
48236        else
48237          # Otherwise we believe it is a complete path. Use it as it is.
48238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48239$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48240          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48241$as_echo_n "checking for JTREGEXE... " >&6; }
48242          if test ! -x "$tool_specified"; then
48243            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48244$as_echo "not found" >&6; }
48245            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48246          fi
48247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48248$as_echo "$tool_specified" >&6; }
48249        fi
48250      fi
48251    fi
48252
48253  fi
48254
48255
48256
48257  if test "x$JTREGEXE" = x; then
48258    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48259  fi
48260
48261
48262      JT_HOME="`$DIRNAME $JTREGEXE`"
48263    fi
48264  fi
48265
48266
48267
48268
48269
48270
48271  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48272  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48273  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48274  #                              commands produced by the link step (currently AIX only)
48275  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48276    COMPILER_TARGET_BITS_FLAG="-q"
48277    COMPILER_COMMAND_FILE_FLAG="-f"
48278    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48279  else
48280    COMPILER_TARGET_BITS_FLAG="-m"
48281    COMPILER_COMMAND_FILE_FLAG="@"
48282    COMPILER_BINDCMD_FILE_FLAG=""
48283
48284    # The solstudio linker does not support @-files.
48285    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48286      COMPILER_COMMAND_FILE_FLAG=
48287    fi
48288
48289    # Check if @file is supported by gcc
48290    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48291      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48292$as_echo_n "checking if @file is supported by gcc... " >&6; }
48293      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48294      $ECHO "" "--version" > command.file
48295      if $CXX @command.file 2>&5 >&5; then
48296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48297$as_echo "yes" >&6; }
48298        COMPILER_COMMAND_FILE_FLAG="@"
48299      else
48300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48301$as_echo "no" >&6; }
48302        COMPILER_COMMAND_FILE_FLAG=
48303      fi
48304      $RM command.file
48305    fi
48306  fi
48307
48308
48309
48310
48311  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48312  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48313    ARFLAGS="-r"
48314  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48315    ARFLAGS="-X64"
48316  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48317    # lib.exe is used as AR to create static libraries.
48318    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48319  else
48320    ARFLAGS=""
48321  fi
48322
48323
48324  ## Setup strip.
48325  # FIXME: should this really be per platform, or should it be per toolchain type?
48326  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48327  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48328  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48329    STRIPFLAGS="-g"
48330  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48331    STRIPFLAGS="-x"
48332  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48333    STRIPFLAGS="-S"
48334  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48335    STRIPFLAGS="-X32_64"
48336  fi
48337
48338
48339
48340  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48341    CC_OUT_OPTION=-Fo
48342    EXE_OUT_OPTION=-out:
48343    LD_OUT_OPTION=-out:
48344    AR_OUT_OPTION=-out:
48345  else
48346    # The option used to specify the target .o,.a or .so file.
48347    # When compiling, how to specify the to be created object file.
48348    CC_OUT_OPTION='-o$(SPACE)'
48349    # When linking, how to specify the to be created executable.
48350    EXE_OUT_OPTION='-o$(SPACE)'
48351    # When linking, how to specify the to be created dynamically linkable library.
48352    LD_OUT_OPTION='-o$(SPACE)'
48353    # When archiving, how to specify the to be create static archive for object files.
48354    AR_OUT_OPTION='rcs$(SPACE)'
48355  fi
48356
48357
48358
48359
48360
48361  # On Windows, we need to set RC flags.
48362  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48363    RC_FLAGS="-nologo -l0x409"
48364    JVM_RCFLAGS="-nologo"
48365    if test "x$DEBUG_LEVEL" = xrelease; then
48366      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48367      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48368    fi
48369
48370    # The version variables used to create RC_FLAGS may be overridden
48371    # in a custom configure script, or possibly the command line.
48372    # Let those variables be expanded at make time in spec.gmk.
48373    # The \$ are escaped to the shell, and the $(...) variables
48374    # are evaluated by make.
48375    RC_FLAGS="$RC_FLAGS \
48376        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48377        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48378        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48379        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48380        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48381        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48382        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48383
48384    JVM_RCFLAGS="$JVM_RCFLAGS \
48385        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48386        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48387        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48388        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48389        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48390        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48391        -D\"HS_FNAME=jvm.dll\" \
48392        -D\"HS_INTERNAL_NAME=jvm\""
48393  fi
48394
48395
48396
48397  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48398    # silence copyright notice and other headers.
48399    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48400  fi
48401
48402
48403# Now we can test some aspects on the target using configure macros.
48404
48405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48406$as_echo_n "checking for ANSI C header files... " >&6; }
48407if ${ac_cv_header_stdc+:} false; then :
48408  $as_echo_n "(cached) " >&6
48409else
48410  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48411/* end confdefs.h.  */
48412#include <stdlib.h>
48413#include <stdarg.h>
48414#include <string.h>
48415#include <float.h>
48416
48417int
48418main ()
48419{
48420
48421  ;
48422  return 0;
48423}
48424_ACEOF
48425if ac_fn_cxx_try_compile "$LINENO"; then :
48426  ac_cv_header_stdc=yes
48427else
48428  ac_cv_header_stdc=no
48429fi
48430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48431
48432if test $ac_cv_header_stdc = yes; then
48433  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48434  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48435/* end confdefs.h.  */
48436#include <string.h>
48437
48438_ACEOF
48439if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48440  $EGREP "memchr" >/dev/null 2>&1; then :
48441
48442else
48443  ac_cv_header_stdc=no
48444fi
48445rm -f conftest*
48446
48447fi
48448
48449if test $ac_cv_header_stdc = yes; then
48450  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48451  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48452/* end confdefs.h.  */
48453#include <stdlib.h>
48454
48455_ACEOF
48456if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48457  $EGREP "free" >/dev/null 2>&1; then :
48458
48459else
48460  ac_cv_header_stdc=no
48461fi
48462rm -f conftest*
48463
48464fi
48465
48466if test $ac_cv_header_stdc = yes; then
48467  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48468  if test "$cross_compiling" = yes; then :
48469  :
48470else
48471  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48472/* end confdefs.h.  */
48473#include <ctype.h>
48474#include <stdlib.h>
48475#if ((' ' & 0x0FF) == 0x020)
48476# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48477# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48478#else
48479# define ISLOWER(c) \
48480		   (('a' <= (c) && (c) <= 'i') \
48481		     || ('j' <= (c) && (c) <= 'r') \
48482		     || ('s' <= (c) && (c) <= 'z'))
48483# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48484#endif
48485
48486#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48487int
48488main ()
48489{
48490  int i;
48491  for (i = 0; i < 256; i++)
48492    if (XOR (islower (i), ISLOWER (i))
48493	|| toupper (i) != TOUPPER (i))
48494      return 2;
48495  return 0;
48496}
48497_ACEOF
48498if ac_fn_cxx_try_run "$LINENO"; then :
48499
48500else
48501  ac_cv_header_stdc=no
48502fi
48503rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48504  conftest.$ac_objext conftest.beam conftest.$ac_ext
48505fi
48506
48507fi
48508fi
48509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48510$as_echo "$ac_cv_header_stdc" >&6; }
48511if test $ac_cv_header_stdc = yes; then
48512
48513$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48514
48515fi
48516
48517# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48518for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48519		  inttypes.h stdint.h unistd.h
48520do :
48521  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48522ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48523"
48524if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48525  cat >>confdefs.h <<_ACEOF
48526#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48527_ACEOF
48528
48529fi
48530
48531done
48532
48533
48534
48535  ###############################################################################
48536  #
48537  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48538  # (The JVM can use 32 or 64 bit Java pointers but that decision
48539  # is made at runtime.)
48540  #
48541
48542  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48543    # Always specify -m flag on Solaris
48544    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48545
48546  # When we add flags to the "official" CFLAGS etc, we need to
48547  # keep track of these additions in ADDED_CFLAGS etc. These
48548  # will later be checked to make sure only controlled additions
48549  # have been made to CFLAGS etc.
48550  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48551  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48552  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48553
48554  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48555  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48556  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48557
48558  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48559  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48560  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48561
48562  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48563  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48564  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48565
48566  elif test "x$COMPILE_TYPE" = xreduced; then
48567    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48568      # Specify -m if running reduced on unix platforms
48569
48570  # When we add flags to the "official" CFLAGS etc, we need to
48571  # keep track of these additions in ADDED_CFLAGS etc. These
48572  # will later be checked to make sure only controlled additions
48573  # have been made to CFLAGS etc.
48574  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48575  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48576  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48577
48578  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48579  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48580  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48581
48582  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48583  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48584  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48585
48586  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48587  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48588  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48589
48590    fi
48591  fi
48592  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48593    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48594    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48595    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48596  fi
48597
48598  # Make compilation sanity check
48599  for ac_header in stdio.h
48600do :
48601  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48602if test "x$ac_cv_header_stdio_h" = xyes; then :
48603  cat >>confdefs.h <<_ACEOF
48604#define HAVE_STDIO_H 1
48605_ACEOF
48606
48607else
48608
48609    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48610$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48611    if test "x$COMPILE_TYPE" = xreduced; then
48612
48613  # Print a helpful message on how to acquire the necessary build dependency.
48614  # reduced is the help tag: freetype, cups, alsa etc
48615  MISSING_DEPENDENCY=reduced
48616
48617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48618    cygwin_help $MISSING_DEPENDENCY
48619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48620    msys_help $MISSING_DEPENDENCY
48621  else
48622    PKGHANDLER_COMMAND=
48623
48624    case $PKGHANDLER in
48625      apt-get)
48626        apt_help     $MISSING_DEPENDENCY ;;
48627      yum)
48628        yum_help     $MISSING_DEPENDENCY ;;
48629      brew)
48630        brew_help    $MISSING_DEPENDENCY ;;
48631      port)
48632        port_help    $MISSING_DEPENDENCY ;;
48633      pkgutil)
48634        pkgutil_help $MISSING_DEPENDENCY ;;
48635      pkgadd)
48636        pkgadd_help  $MISSING_DEPENDENCY ;;
48637    esac
48638
48639    if test "x$PKGHANDLER_COMMAND" != x; then
48640      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48641    fi
48642  fi
48643
48644      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48645$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48646    elif test "x$COMPILE_TYPE" = xcross; then
48647      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48648$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48649    fi
48650    as_fn_error $? "Cannot continue." "$LINENO" 5
48651
48652fi
48653
48654done
48655
48656
48657  # The cast to long int works around a bug in the HP C Compiler
48658# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48659# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48660# This bug is HP SR number 8606223364.
48661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48662$as_echo_n "checking size of int *... " >&6; }
48663if ${ac_cv_sizeof_int_p+:} false; then :
48664  $as_echo_n "(cached) " >&6
48665else
48666  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48667
48668else
48669  if test "$ac_cv_type_int_p" = yes; then
48670     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48672as_fn_error 77 "cannot compute sizeof (int *)
48673See \`config.log' for more details" "$LINENO" 5; }
48674   else
48675     ac_cv_sizeof_int_p=0
48676   fi
48677fi
48678
48679fi
48680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48681$as_echo "$ac_cv_sizeof_int_p" >&6; }
48682
48683
48684
48685cat >>confdefs.h <<_ACEOF
48686#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48687_ACEOF
48688
48689
48690
48691  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48692  if test "x$ac_cv_sizeof_int_p" = x; then
48693    # The test failed, lets stick to the assumed value.
48694    { $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
48695$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48696  else
48697    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48698
48699    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48700      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48701      # Let's try to implicitely set the compilers target architecture and retry the test
48702      { $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
48703$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;}
48704      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48705$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48706
48707  # When we add flags to the "official" CFLAGS etc, we need to
48708  # keep track of these additions in ADDED_CFLAGS etc. These
48709  # will later be checked to make sure only controlled additions
48710  # have been made to CFLAGS etc.
48711  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48712  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48713  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48714
48715  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48716  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48717  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48718
48719  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48720  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48721  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48722
48723  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48724  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48725  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48726
48727
48728      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48729      unset ac_cv_sizeof_int_p
48730      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48731      cat >>confdefs.h <<_ACEOF
48732#undef SIZEOF_INT_P
48733_ACEOF
48734
48735      # The cast to long int works around a bug in the HP C Compiler
48736# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48737# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48738# This bug is HP SR number 8606223364.
48739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48740$as_echo_n "checking size of int *... " >&6; }
48741if ${ac_cv_sizeof_int_p+:} false; then :
48742  $as_echo_n "(cached) " >&6
48743else
48744  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48745
48746else
48747  if test "$ac_cv_type_int_p" = yes; then
48748     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48749$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48750as_fn_error 77 "cannot compute sizeof (int *)
48751See \`config.log' for more details" "$LINENO" 5; }
48752   else
48753     ac_cv_sizeof_int_p=0
48754   fi
48755fi
48756
48757fi
48758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48759$as_echo "$ac_cv_sizeof_int_p" >&6; }
48760
48761
48762
48763cat >>confdefs.h <<_ACEOF
48764#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48765_ACEOF
48766
48767
48768
48769      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48770
48771      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48772        { $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
48773$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;}
48774        if test "x$COMPILE_TYPE" = xreduced; then
48775
48776  # Print a helpful message on how to acquire the necessary build dependency.
48777  # reduced is the help tag: freetype, cups, alsa etc
48778  MISSING_DEPENDENCY=reduced
48779
48780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48781    cygwin_help $MISSING_DEPENDENCY
48782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48783    msys_help $MISSING_DEPENDENCY
48784  else
48785    PKGHANDLER_COMMAND=
48786
48787    case $PKGHANDLER in
48788      apt-get)
48789        apt_help     $MISSING_DEPENDENCY ;;
48790      yum)
48791        yum_help     $MISSING_DEPENDENCY ;;
48792      brew)
48793        brew_help    $MISSING_DEPENDENCY ;;
48794      port)
48795        port_help    $MISSING_DEPENDENCY ;;
48796      pkgutil)
48797        pkgutil_help $MISSING_DEPENDENCY ;;
48798      pkgadd)
48799        pkgadd_help  $MISSING_DEPENDENCY ;;
48800    esac
48801
48802    if test "x$PKGHANDLER_COMMAND" != x; then
48803      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48804    fi
48805  fi
48806
48807          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48808$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48809        elif test "x$COMPILE_TYPE" = xcross; then
48810          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48811$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48812        fi
48813        as_fn_error $? "Cannot continue." "$LINENO" 5
48814      fi
48815    fi
48816  fi
48817
48818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48819$as_echo_n "checking for target address size... " >&6; }
48820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48821$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48822
48823
48824  ###############################################################################
48825  #
48826  # Is the target little of big endian?
48827  #
48828   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48829$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48830if ${ac_cv_c_bigendian+:} false; then :
48831  $as_echo_n "(cached) " >&6
48832else
48833  ac_cv_c_bigendian=unknown
48834    # See if we're dealing with a universal compiler.
48835    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48836/* end confdefs.h.  */
48837#ifndef __APPLE_CC__
48838	       not a universal capable compiler
48839	     #endif
48840	     typedef int dummy;
48841
48842_ACEOF
48843if ac_fn_cxx_try_compile "$LINENO"; then :
48844
48845	# Check for potential -arch flags.  It is not universal unless
48846	# there are at least two -arch flags with different values.
48847	ac_arch=
48848	ac_prev=
48849	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48850	 if test -n "$ac_prev"; then
48851	   case $ac_word in
48852	     i?86 | x86_64 | ppc | ppc64)
48853	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48854		 ac_arch=$ac_word
48855	       else
48856		 ac_cv_c_bigendian=universal
48857		 break
48858	       fi
48859	       ;;
48860	   esac
48861	   ac_prev=
48862	 elif test "x$ac_word" = "x-arch"; then
48863	   ac_prev=arch
48864	 fi
48865       done
48866fi
48867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48868    if test $ac_cv_c_bigendian = unknown; then
48869      # See if sys/param.h defines the BYTE_ORDER macro.
48870      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48871/* end confdefs.h.  */
48872#include <sys/types.h>
48873	     #include <sys/param.h>
48874
48875int
48876main ()
48877{
48878#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48879		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48880		     && LITTLE_ENDIAN)
48881	      bogus endian macros
48882	     #endif
48883
48884  ;
48885  return 0;
48886}
48887_ACEOF
48888if ac_fn_cxx_try_compile "$LINENO"; then :
48889  # It does; now see whether it defined to BIG_ENDIAN or not.
48890	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48891/* end confdefs.h.  */
48892#include <sys/types.h>
48893		#include <sys/param.h>
48894
48895int
48896main ()
48897{
48898#if BYTE_ORDER != BIG_ENDIAN
48899		 not big endian
48900		#endif
48901
48902  ;
48903  return 0;
48904}
48905_ACEOF
48906if ac_fn_cxx_try_compile "$LINENO"; then :
48907  ac_cv_c_bigendian=yes
48908else
48909  ac_cv_c_bigendian=no
48910fi
48911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48912fi
48913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48914    fi
48915    if test $ac_cv_c_bigendian = unknown; then
48916      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48917      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48918/* end confdefs.h.  */
48919#include <limits.h>
48920
48921int
48922main ()
48923{
48924#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48925	      bogus endian macros
48926	     #endif
48927
48928  ;
48929  return 0;
48930}
48931_ACEOF
48932if ac_fn_cxx_try_compile "$LINENO"; then :
48933  # It does; now see whether it defined to _BIG_ENDIAN or not.
48934	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48935/* end confdefs.h.  */
48936#include <limits.h>
48937
48938int
48939main ()
48940{
48941#ifndef _BIG_ENDIAN
48942		 not big endian
48943		#endif
48944
48945  ;
48946  return 0;
48947}
48948_ACEOF
48949if ac_fn_cxx_try_compile "$LINENO"; then :
48950  ac_cv_c_bigendian=yes
48951else
48952  ac_cv_c_bigendian=no
48953fi
48954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48955fi
48956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48957    fi
48958    if test $ac_cv_c_bigendian = unknown; then
48959      # Compile a test program.
48960      if test "$cross_compiling" = yes; then :
48961  # Try to guess by grepping values from an object file.
48962	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48963/* end confdefs.h.  */
48964short int ascii_mm[] =
48965		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48966		short int ascii_ii[] =
48967		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48968		int use_ascii (int i) {
48969		  return ascii_mm[i] + ascii_ii[i];
48970		}
48971		short int ebcdic_ii[] =
48972		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48973		short int ebcdic_mm[] =
48974		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48975		int use_ebcdic (int i) {
48976		  return ebcdic_mm[i] + ebcdic_ii[i];
48977		}
48978		extern int foo;
48979
48980int
48981main ()
48982{
48983return use_ascii (foo) == use_ebcdic (foo);
48984  ;
48985  return 0;
48986}
48987_ACEOF
48988if ac_fn_cxx_try_compile "$LINENO"; then :
48989  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48990	      ac_cv_c_bigendian=yes
48991	    fi
48992	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48993	      if test "$ac_cv_c_bigendian" = unknown; then
48994		ac_cv_c_bigendian=no
48995	      else
48996		# finding both strings is unlikely to happen, but who knows?
48997		ac_cv_c_bigendian=unknown
48998	      fi
48999	    fi
49000fi
49001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49002else
49003  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49004/* end confdefs.h.  */
49005$ac_includes_default
49006int
49007main ()
49008{
49009
49010	     /* Are we little or big endian?  From Harbison&Steele.  */
49011	     union
49012	     {
49013	       long int l;
49014	       char c[sizeof (long int)];
49015	     } u;
49016	     u.l = 1;
49017	     return u.c[sizeof (long int) - 1] == 1;
49018
49019  ;
49020  return 0;
49021}
49022_ACEOF
49023if ac_fn_cxx_try_run "$LINENO"; then :
49024  ac_cv_c_bigendian=no
49025else
49026  ac_cv_c_bigendian=yes
49027fi
49028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49029  conftest.$ac_objext conftest.beam conftest.$ac_ext
49030fi
49031
49032    fi
49033fi
49034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49035$as_echo "$ac_cv_c_bigendian" >&6; }
49036 case $ac_cv_c_bigendian in #(
49037   yes)
49038     ENDIAN="big";; #(
49039   no)
49040     ENDIAN="little" ;; #(
49041   universal)
49042     ENDIAN="universal_endianness"
49043     ;; #(
49044   *)
49045     ENDIAN="unknown" ;;
49046 esac
49047
49048
49049  if test "x$ENDIAN" = xuniversal_endianness; then
49050    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49051  fi
49052  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49053    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
49054  fi
49055
49056
49057# Configure flags for the tools
49058
49059  ###############################################################################
49060  #
49061  # How to compile shared libraries.
49062  #
49063
49064  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49065    PICFLAG="-fPIC"
49066    C_FLAG_REORDER=''
49067    CXX_FLAG_REORDER=''
49068
49069    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49070      # Linking is different on MacOSX
49071      if test "x$STATIC_BUILD" = xtrue; then
49072        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49073      else
49074        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49075        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49076      fi
49077      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49078      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49079      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49080      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49081    else
49082      # Default works for linux, might work on other platforms as well.
49083      SHARED_LIBRARY_FLAGS='-shared'
49084      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49085      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49086      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49087      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49088    fi
49089  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49090    C_FLAG_REORDER=''
49091    CXX_FLAG_REORDER=''
49092
49093    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49094      # Linking is different on MacOSX
49095      PICFLAG=''
49096      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49097      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49098      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49099      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49100      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49101
49102      if test "x$STATIC_BUILD" = xfalse; then
49103        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49104      fi
49105    else
49106      # Default works for linux, might work on other platforms as well.
49107      PICFLAG='-fPIC'
49108      SHARED_LIBRARY_FLAGS='-shared'
49109      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49110      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49111      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49112
49113      # arm specific settings
49114      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49115        # '-Wl,-z,origin' isn't used on arm.
49116        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49117      else
49118        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49119      fi
49120
49121    fi
49122  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49123    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49124      PICFLAG="-xcode=pic32"
49125    else
49126      PICFLAG="-KPIC"
49127    fi
49128    C_FLAG_REORDER='-xF'
49129    CXX_FLAG_REORDER='-xF'
49130    SHARED_LIBRARY_FLAGS="-G"
49131    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49132    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49133    SET_SHARED_LIBRARY_NAME='-h $1'
49134    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49135  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49136    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49137    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49138    # will have to patch this single instruction with a call to some out-of-order code which
49139    # does the load from the TOC. This is of course slow. But in that case we also would have
49140    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49141    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49142    # can be patched directly by the linker and does not require a jump to out-of-order code.
49143    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49144    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49145    # loads for accessing a global variable). But there are rumors that this may be seen as a
49146    # 'performance feature' because of improved code locality of the symbols used in a
49147    # compilation unit.
49148    PICFLAG="-qpic"
49149    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49150    C_FLAG_REORDER=''
49151    CXX_FLAG_REORDER=''
49152    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49153    SET_EXECUTABLE_ORIGIN=""
49154    SET_SHARED_LIBRARY_ORIGIN=''
49155    SET_SHARED_LIBRARY_NAME=''
49156    SET_SHARED_LIBRARY_MAPFILE=''
49157  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49158    PICFLAG=""
49159    C_FLAG_REORDER=''
49160    CXX_FLAG_REORDER=''
49161    SHARED_LIBRARY_FLAGS="-dll"
49162    SET_EXECUTABLE_ORIGIN=''
49163    SET_SHARED_LIBRARY_ORIGIN=''
49164    SET_SHARED_LIBRARY_NAME=''
49165    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49166  fi
49167
49168
49169
49170
49171
49172
49173
49174
49175
49176  # The (cross) compiler is now configured, we can now test capabilities
49177  # of the target platform.
49178
49179
49180
49181  ###############################################################################
49182  #
49183  # Setup the opt flags for different compilers
49184  # and different operating systems.
49185  #
49186
49187  # FIXME: this was indirectly the old default, but just inherited.
49188  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49189  #   C_FLAG_DEPS="-MMD -MF"
49190  # fi
49191
49192  # Generate make dependency files
49193  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49194    C_FLAG_DEPS="-MMD -MF"
49195  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49196    C_FLAG_DEPS="-MMD -MF"
49197  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49198    C_FLAG_DEPS="-xMMD -xMF"
49199  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49200    C_FLAG_DEPS="-qmakedep=gcc -MF"
49201  fi
49202  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49203
49204
49205
49206  # Debug symbols
49207  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49208    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49209      # reduce from default "-g2" option to save space
49210      CFLAGS_DEBUG_SYMBOLS="-g1"
49211      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49212    else
49213      CFLAGS_DEBUG_SYMBOLS="-g"
49214      CXXFLAGS_DEBUG_SYMBOLS="-g"
49215    fi
49216  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49217    CFLAGS_DEBUG_SYMBOLS="-g"
49218    CXXFLAGS_DEBUG_SYMBOLS="-g"
49219  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49220    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49221    # -g0 enables debug symbols without disabling inlining.
49222    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49223  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49224    CFLAGS_DEBUG_SYMBOLS="-g"
49225    CXXFLAGS_DEBUG_SYMBOLS="-g"
49226  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49227    CFLAGS_DEBUG_SYMBOLS="-Zi"
49228    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49229  fi
49230
49231
49232
49233  # Debug symbols for JVM_CFLAGS
49234  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49235    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49236    if test "x$DEBUG_LEVEL" = xslowdebug; then
49237      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49238    else
49239      # -g0 does not disable inlining, which -g does.
49240      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49241    fi
49242  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49243    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49244  else
49245    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49246  fi
49247
49248
49249  # bounds, memory and behavior checking options
49250  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49251    case $DEBUG_LEVEL in
49252    release )
49253      # no adjustment
49254      ;;
49255    fastdebug )
49256      # no adjustment
49257      ;;
49258    slowdebug )
49259      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49260      # get's added conditionally on whether we produce debug symbols or not.
49261      # This is most likely not really correct.
49262
49263      # Add runtime stack smashing and undefined behavior checks.
49264      # Not all versions of gcc support -fstack-protector
49265      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
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
49303
49304
49305
49306
49307
49308    # Execute function body
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
49352
49353
49354
49355
49356
49357    # Execute function body
49358
49359  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49360$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49361  supports=yes
49362
49363  saved_cflags="$CFLAGS"
49364  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49365  ac_ext=c
49366ac_cpp='$CPP $CPPFLAGS'
49367ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49368ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49369ac_compiler_gnu=$ac_cv_c_compiler_gnu
49370
49371  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49372/* end confdefs.h.  */
49373int i;
49374_ACEOF
49375if ac_fn_c_try_compile "$LINENO"; then :
49376
49377else
49378  supports=no
49379fi
49380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49381  ac_ext=cpp
49382ac_cpp='$CXXCPP $CPPFLAGS'
49383ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49384ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49385ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49386
49387  CFLAGS="$saved_cflags"
49388
49389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49390$as_echo "$supports" >&6; }
49391  if test "x$supports" = "xyes" ; then
49392    :
49393    C_COMP_SUPPORTS="yes"
49394  else
49395    :
49396    C_COMP_SUPPORTS="no"
49397  fi
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
49452
49453
49454
49455
49456
49457    # Execute function body
49458
49459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49460$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49461  supports=yes
49462
49463  saved_cxxflags="$CXXFLAGS"
49464  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49465  ac_ext=cpp
49466ac_cpp='$CXXCPP $CPPFLAGS'
49467ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49468ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49469ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49470
49471  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49472/* end confdefs.h.  */
49473int i;
49474_ACEOF
49475if ac_fn_cxx_try_compile "$LINENO"; then :
49476
49477else
49478  supports=no
49479fi
49480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49481  ac_ext=cpp
49482ac_cpp='$CXXCPP $CPPFLAGS'
49483ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49484ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49485ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49486
49487  CXXFLAGS="$saved_cxxflags"
49488
49489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49490$as_echo "$supports" >&6; }
49491  if test "x$supports" = "xyes" ; then
49492    :
49493    CXX_COMP_SUPPORTS="yes"
49494  else
49495    :
49496    CXX_COMP_SUPPORTS="no"
49497  fi
49498
49499
49500
49501
49502
49503
49504
49505
49506
49507
49508
49509
49510
49511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49512$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49513  supports=no
49514  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49515
49516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49517$as_echo "$supports" >&6; }
49518  if test "x$supports" = "xyes" ; then
49519    :
49520
49521  else
49522    :
49523    STACK_PROTECTOR_CFLAG=""
49524  fi
49525
49526
49527
49528
49529
49530
49531
49532      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49533      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49534      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49535        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49536      fi
49537      ;;
49538    esac
49539  fi
49540
49541  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49542    if test "x$DEBUG_LEVEL" != xrelease; then
49543      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49544        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49545      fi
49546    fi
49547  fi
49548
49549  # Optimization levels
49550  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49551    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49552
49553    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49554      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49555      C_O_FLAG_HIGHEST_JVM="-xO4"
49556      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49557      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49558      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49559      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49560      C_O_FLAG_DEBUG_JVM=""
49561      C_O_FLAG_NONE="-xregs=no%frameptr"
49562      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49563      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49564      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49565      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49566      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49567      CXX_O_FLAG_DEBUG_JVM=""
49568      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49569      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49570        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49571        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49572      fi
49573    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49574      C_O_FLAG_HIGHEST_JVM="-xO4"
49575      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49576      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49577      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49578      C_O_FLAG_DEBUG=""
49579      C_O_FLAG_DEBUG_JVM=""
49580      C_O_FLAG_NONE=""
49581      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49582      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49583      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49584      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49585      CXX_O_FLAG_DEBUG=""
49586      CXX_O_FLAG_DEBUG_JVM=""
49587      CXX_O_FLAG_NONE=""
49588    fi
49589  else
49590    # The remaining toolchains share opt flags between CC and CXX;
49591    # setup for C and duplicate afterwards.
49592    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49593      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49594        # On MacOSX we optimize for size, something
49595        # we should do for all platforms?
49596        C_O_FLAG_HIGHEST_JVM="-Os"
49597        C_O_FLAG_HIGHEST="-Os"
49598        C_O_FLAG_HI="-Os"
49599        C_O_FLAG_NORM="-Os"
49600        C_O_FLAG_SIZE="-Os"
49601      else
49602        C_O_FLAG_HIGHEST_JVM="-O3"
49603        C_O_FLAG_HIGHEST="-O3"
49604        C_O_FLAG_HI="-O3"
49605        C_O_FLAG_NORM="-O2"
49606        C_O_FLAG_SIZE="-Os"
49607      fi
49608      C_O_FLAG_DEBUG="-O0"
49609      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49610        C_O_FLAG_DEBUG_JVM=""
49611      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49612        C_O_FLAG_DEBUG_JVM="-O0"
49613      fi
49614      C_O_FLAG_NONE="-O0"
49615    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49616      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49617        # On MacOSX we optimize for size, something
49618        # we should do for all platforms?
49619        C_O_FLAG_HIGHEST_JVM="-Os"
49620        C_O_FLAG_HIGHEST="-Os"
49621        C_O_FLAG_HI="-Os"
49622        C_O_FLAG_NORM="-Os"
49623        C_O_FLAG_SIZE="-Os"
49624      else
49625        C_O_FLAG_HIGHEST_JVM="-O3"
49626        C_O_FLAG_HIGHEST="-O3"
49627        C_O_FLAG_HI="-O3"
49628        C_O_FLAG_NORM="-O2"
49629        C_O_FLAG_SIZE="-Os"
49630      fi
49631      C_O_FLAG_DEBUG="-O0"
49632      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49633        C_O_FLAG_DEBUG_JVM=""
49634      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49635        C_O_FLAG_DEBUG_JVM="-O0"
49636      fi
49637      C_O_FLAG_NONE="-O0"
49638    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49639      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49640      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49641      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49642      C_O_FLAG_NORM="-O2"
49643      C_O_FLAG_DEBUG="-qnoopt"
49644      # FIXME: Value below not verified.
49645      C_O_FLAG_DEBUG_JVM=""
49646      C_O_FLAG_NONE="-qnoopt"
49647    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49648      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49649      C_O_FLAG_HIGHEST="-O2"
49650      C_O_FLAG_HI="-O1"
49651      C_O_FLAG_NORM="-O1"
49652      C_O_FLAG_DEBUG="-Od"
49653      C_O_FLAG_DEBUG_JVM=""
49654      C_O_FLAG_NONE="-Od"
49655      C_O_FLAG_SIZE="-Os"
49656    fi
49657    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49658    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49659    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49660    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49661    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49662    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49663    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49664    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49665  fi
49666
49667  # Adjust optimization flags according to debug level.
49668  case $DEBUG_LEVEL in
49669    release )
49670      # no adjustment
49671      ;;
49672    fastdebug )
49673      # Not quite so much optimization
49674      C_O_FLAG_HI="$C_O_FLAG_NORM"
49675      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49676      ;;
49677    slowdebug )
49678      # Disable optimization
49679      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49680      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49681      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49682      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49683      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49684      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49685      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49686      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49687      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49688      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49689      ;;
49690  esac
49691
49692
49693
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711# Check whether --with-abi-profile was given.
49712if test "${with_abi_profile+set}" = set; then :
49713  withval=$with_abi_profile;
49714fi
49715
49716
49717  if test "x$with_abi_profile" != x; then
49718    if test "x$OPENJDK_TARGET_CPU" != xarm && \
49719        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
49720      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
49721    fi
49722
49723    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
49724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
49725$as_echo_n "checking for ABI profle... " >&6; }
49726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
49727$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
49728
49729    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
49730      ARM_FLOAT_TYPE=vfp-sflt
49731      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49732    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
49733      ARM_FLOAT_TYPE=vfp-hflt
49734      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49735    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
49736      ARM_FLOAT_TYPE=sflt
49737      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49738    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
49739      ARM_FLOAT_TYPE=vfp-sflt
49740      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49741    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
49742      ARM_FLOAT_TYPE=vfp-hflt
49743      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
49744    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
49745      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49746      ARM_FLOAT_TYPE=
49747      ARM_ARCH_TYPE_FLAGS=
49748    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
49749      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49750      ARM_FLOAT_TYPE=
49751      ARM_ARCH_TYPE_FLAGS=
49752    else
49753      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
49754    fi
49755
49756    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
49757      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
49758    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
49759      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
49760    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
49761      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
49762    fi
49763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
49764$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
49765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
49766$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
49767
49768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
49769$as_echo_n "checking for arch type flags... " >&6; }
49770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
49771$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
49772
49773    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
49774    # autoconf target triplet.
49775     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
49776    # Sanity check that it is a known ABI.
49777    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
49778        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
49779        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
49780          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
49781$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
49782    fi
49783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
49784$as_echo_n "checking for ABI property name... " >&6; }
49785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
49786$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
49787
49788
49789    # Pass these on to the open part of configure as if they were set using
49790    # --with-extra-c[xx]flags.
49791    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49792    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49793    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
49794    # FIXME: This should not really be set using extra_cflags.
49795    if test "x$OPENJDK_TARGET_CPU" = xarm; then
49796        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
49797        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
49798    fi
49799    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
49800    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
49801    # And pass the architecture flags to the linker as well
49802    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49803  fi
49804
49805  # When building with an abi profile, the name of that profile is appended on the
49806  # bundle platform, which is used in bundle names.
49807  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
49808    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
49809  fi
49810
49811
49812  # Special extras...
49813  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49814    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49815      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49816      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49817    fi
49818    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49819    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49820  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49821    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49822    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49823  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49824    CXXSTD_CXXFLAG="-std=gnu++98"
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
49862
49863
49864
49865
49866
49867    # Execute function body
49868
49869  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49870$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49871  supports=yes
49872
49873  saved_cxxflags="$CXXFLAGS"
49874  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49875  ac_ext=cpp
49876ac_cpp='$CXXCPP $CPPFLAGS'
49877ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49878ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49879ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49880
49881  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49882/* end confdefs.h.  */
49883int i;
49884_ACEOF
49885if ac_fn_cxx_try_compile "$LINENO"; then :
49886
49887else
49888  supports=no
49889fi
49890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49891  ac_ext=cpp
49892ac_cpp='$CXXCPP $CPPFLAGS'
49893ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49894ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49895ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49896
49897  CXXFLAGS="$saved_cxxflags"
49898
49899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49900$as_echo "$supports" >&6; }
49901  if test "x$supports" = "xyes" ; then
49902    :
49903
49904  else
49905    :
49906    CXXSTD_CXXFLAG=""
49907  fi
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918
49919
49920    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49921    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49922
49923  fi
49924  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49925    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49926    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49927  fi
49928
49929  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49930  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49931  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49932
49933  ###############################################################################
49934  #
49935  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49936  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49937  #
49938
49939  # Setup compiler/platform specific flags into
49940  #    CFLAGS_JDK    - C Compiler flags
49941  #    CXXFLAGS_JDK  - C++ Compiler flags
49942  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49943  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49944    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49945    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49946    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49947    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49948      # Force compatibility with i586 on 32 bit intel platforms.
49949      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49950      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49951    fi
49952    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49953        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49954    case $OPENJDK_TARGET_CPU_ARCH in
49955      arm )
49956        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49957        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49958        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
49959        ;;
49960      ppc )
49961        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49962        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49963        ;;
49964      s390 )
49965        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49966        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49967        ;;
49968      * )
49969        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49970        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49971        ;;
49972    esac
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
50027    # Execute function body
50028
50029  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50030  REFERENCE_VERSION=6
50031
50032  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50033    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50034  fi
50035
50036  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50037    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50038  fi
50039
50040  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50041  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50042
50043  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50044    :
50045
50046  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50047  # runs afoul of the more aggressive versions of these optimisations.
50048  # Notably, value range propagation now assumes that the this pointer of C++
50049  # member functions is non-null.
50050  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50051        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50052        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50053$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50054  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50055  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50056
50057  else
50058    :
50059
50060  fi
50061
50062
50063
50064
50065
50066
50067
50068
50069
50070
50071
50072
50073
50074
50075  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50076    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50077
50078    # Restrict the debug information created by Clang to avoid
50079    # too big object files and speed the build up a little bit
50080    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50081    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50082    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50083      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50084        # Force compatibility with i586 on 32 bit intel platforms.
50085        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50086        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50087      fi
50088      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50089      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50090          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50091      case $OPENJDK_TARGET_CPU_ARCH in
50092        ppc )
50093          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50094          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50095          ;;
50096        * )
50097          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50098          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50099          ;;
50100      esac
50101    fi
50102  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50103    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50104    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50105    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50106      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50107    fi
50108
50109    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50110    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50111  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50112    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50113    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50114    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50115  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50116    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50117        -MD -Zc:wchar_t- -W3 -wd4800 \
50118        -DWIN32_LEAN_AND_MEAN \
50119        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50120        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50121        -DWIN32 -DIAL"
50122    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50123      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50124    else
50125      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50126    fi
50127    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50128    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50129    # studio.
50130    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50131      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50132      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50133      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50134    fi
50135  fi
50136
50137  ###############################################################################
50138
50139  # Adjust flags according to debug level.
50140  case $DEBUG_LEVEL in
50141    fastdebug | slowdebug )
50142      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50143      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50144      ;;
50145    release )
50146      ;;
50147    * )
50148      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50149      ;;
50150  esac
50151
50152  # Set some common defines. These works for all compilers, but assume
50153  # -D is universally accepted.
50154
50155  # Setup endianness
50156  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50157    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50158    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50159    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50160    #   Note: -Dmacro         is the same as    #define macro 1
50161    #         -Dmacro=        is the same as    #define macro
50162    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50163      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50164    else
50165      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50166    fi
50167  else
50168    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50169    # are defined in the system?
50170    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50171      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50172    else
50173      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50174    fi
50175  fi
50176
50177  # Setup target OS define. Use OS target name but in upper case.
50178  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50179  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50180
50181  # Setup target CPU
50182  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50183      $OPENJDK_TARGET_ADD_LP64 \
50184      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50185
50186  # Setup debug/release defines
50187  if test "x$DEBUG_LEVEL" = xrelease; then
50188    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50189    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50190      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50191    fi
50192  else
50193    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50194  fi
50195
50196  # Set some additional per-OS defines.
50197  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50198    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50199    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50200        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50201  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50202    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50203    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50204        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50205  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50206    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50207    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50208    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50209    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50210        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50211        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50212        -fno-omit-frame-pointer"
50213  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50214    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50215    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50216    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50217        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50218        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50219  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50220    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50221  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50222    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50223    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50224  fi
50225
50226  # Set some additional per-CPU defines.
50227  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50228    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50229  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50230    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50231  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50232    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50233      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50234      # fixes `relocation truncated to fit' error for gcc 4.1.
50235      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50236      # Use ppc64 instructions, but schedule for power5
50237      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50238    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50239      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50240    fi
50241  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50242    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50243      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50244      # Little endian machine uses ELFv2 ABI.
50245      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50246      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50247      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50248    fi
50249  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50250    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50251      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50252    fi
50253  fi
50254
50255  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50256    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50257  fi
50258
50259  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50260    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50261      # Solaris does not have _LP64=1 in the old build.
50262      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50263      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50264    fi
50265  fi
50266
50267  # Set JVM_CFLAGS warning handling
50268  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50269    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50270        -Wunused-value -Woverloaded-virtual"
50271
50272    if test "x$TOOLCHAIN_TYPE" = xgcc; then
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
50327    # Execute function body
50328
50329  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50330  REFERENCE_VERSION=4.8
50331
50332  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50333    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50334  fi
50335
50336  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50337    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50338  fi
50339
50340  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50341  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50342
50343  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50344    :
50345
50346            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50347            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50348
50349
50350  else
50351    :
50352
50353  fi
50354
50355
50356
50357
50358
50359
50360
50361
50362
50363
50364
50365
50366
50367
50368    fi
50369    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50370      # Non-zero builds have stricter warnings
50371      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50372    else
50373      if test "x$TOOLCHAIN_TYPE" = xclang; then
50374        # Some versions of llvm do not like -Wundef
50375        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50376      fi
50377    fi
50378  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50379    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50380        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50381  fi
50382
50383  # Additional macosx handling
50384  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50385    # Setting these parameters makes it an error to link to macosx APIs that are
50386    # newer than the given OS version and makes the linked binaries compatible
50387    # even if built on a newer version of the OS.
50388    # The expected format is X.Y.Z
50389    MACOSX_VERSION_MIN=10.7.0
50390
50391
50392    # The macro takes the version with no dots, ex: 1070
50393    # Let the flags variables get resolved in make for easier override on make
50394    # command line.
50395    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50396    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50397  fi
50398
50399  # Setup some hard coded includes
50400  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50401      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50402      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50403      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50404      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50405      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50406      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50407
50408  # The shared libraries are compiled using the picflag.
50409  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50410      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50411  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50412      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50413
50414  # Executable flags
50415  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50416  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50417
50418
50419
50420
50421
50422
50423  # Setup LDFLAGS et al.
50424  #
50425
50426  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50427    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50428    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50429    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50430    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50431      LDFLAGS_SAFESH="-safeseh"
50432      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50433      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50434      # NOTE: Old build added -machine. Probably not needed.
50435      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50436    else
50437      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50438    fi
50439  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50440      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50441      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50442        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50443        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50444    fi
50445  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50446    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50447    # We have previously set HAS_GNU_HASH if this is the case
50448    if test -n "$HAS_GNU_HASH"; then
50449      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50450      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50451      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50452    fi
50453      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50454        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50455    fi
50456    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50457      # And since we now know that the linker is gnu, then add -z defs, to forbid
50458      # undefined symbols in object files.
50459      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50460      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50461      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50462      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50463      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50464      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50465        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50466      fi
50467      case $DEBUG_LEVEL in
50468        release )
50469          # tell linker to optimize libraries.
50470          # Should this be supplied to the OSS linker as well?
50471          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50472          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50473          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50474          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50475            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50476          fi
50477          ;;
50478        slowdebug )
50479          # Hotspot always let the linker optimize
50480          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50481          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50482            # do relocations at load
50483            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50484            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50485            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50486          fi
50487          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50488            # mark relocations read only
50489            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50490            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50491            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50492          fi
50493          ;;
50494        fastdebug )
50495          # Hotspot always let the linker optimize
50496          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50497          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50498            # mark relocations read only
50499            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50500            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50501            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50502          fi
50503          ;;
50504        * )
50505          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50506          ;;
50507        esac
50508    fi
50509  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50510    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50511    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50512    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50513    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50514    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50515    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50516      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50517    fi
50518  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50519    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50520    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50521    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50522  fi
50523
50524  # Customize LDFLAGS for executables
50525
50526  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50527
50528  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50529    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50530      LDFLAGS_STACK_SIZE=1048576
50531    else
50532      LDFLAGS_STACK_SIZE=327680
50533    fi
50534    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50535  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50536    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50537  fi
50538
50539  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50540
50541  # Customize LDFLAGS for libs
50542  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50543
50544  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50545  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50546    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50547        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50548    JDKLIB_LIBS=""
50549  else
50550    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50551        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50552
50553    if test "xTARGET" = "xTARGET"; then
50554      # On some platforms (mac) the linker warns about non existing -L dirs.
50555      # For any of the variants server, client or minimal, the dir matches the
50556      # variant name. The "main" variant should be used for linking. For the
50557      # rest, the dir is just server.
50558      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50559          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50560        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50561            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50562      else
50563        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50564            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50565      fi
50566    elif test "xTARGET" = "xBUILD"; then
50567      # When building a buildjdk, it's always only the server variant
50568      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50569          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50570    fi
50571
50572    JDKLIB_LIBS="-ljava -ljvm"
50573    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50574      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50575    fi
50576
50577  fi
50578
50579LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50580
50581  # Set JVM_LIBS (per os)
50582  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50583    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50584  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50585    # FIXME: This hard-coded path is not really proper.
50586    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50587      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50588    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50589      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50590    fi
50591    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50592        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50593  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50594    JVM_LIBS="$JVM_LIBS -lm"
50595  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50596    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50597  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50598    JVM_LIBS="$JVM_LIBS -lm"
50599  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50600    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50601        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50602        wsock32.lib winmm.lib version.lib psapi.lib"
50603    fi
50604
50605  # Set JVM_ASFLAGS
50606  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50607    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50608      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50609    fi
50610  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50611    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50612  fi
50613
50614  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50615
50616
50617
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628
50629
50630  # Special extras...
50631  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50632    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50633      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50634      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50635    fi
50636    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50637    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50638  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50639    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50640    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50641  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50642    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
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
50685    # Execute function body
50686
50687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50688$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50689  supports=yes
50690
50691  saved_cxxflags="$CXXFLAGS"
50692  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50693  ac_ext=cpp
50694ac_cpp='$CXXCPP $CPPFLAGS'
50695ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50696ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50697ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50698
50699  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50700/* end confdefs.h.  */
50701int i;
50702_ACEOF
50703if ac_fn_cxx_try_compile "$LINENO"; then :
50704
50705else
50706  supports=no
50707fi
50708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50709  ac_ext=cpp
50710ac_cpp='$CXXCPP $CPPFLAGS'
50711ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50712ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50713ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50714
50715  CXXFLAGS="$saved_cxxflags"
50716
50717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50718$as_echo "$supports" >&6; }
50719  if test "x$supports" = "xyes" ; then
50720    :
50721
50722  else
50723    :
50724    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50725  fi
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735
50736
50737
50738    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50739    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50740
50741  fi
50742  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50743    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50744    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50745  fi
50746
50747  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50748  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50749  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50750
50751  ###############################################################################
50752  #
50753  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50754  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50755  #
50756
50757  # Setup compiler/platform specific flags into
50758  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50759  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50760  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50761  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50762    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50763    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50764    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50765    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50766      # Force compatibility with i586 on 32 bit intel platforms.
50767      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50768      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50769    fi
50770    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50771        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50772    case $OPENJDK_BUILD_CPU_ARCH in
50773      arm )
50774        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50775        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50776        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
50777        ;;
50778      ppc )
50779        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50780        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50781        ;;
50782      s390 )
50783        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50784        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50785        ;;
50786      * )
50787        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50788        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50789        ;;
50790    esac
50791
50792
50793
50794
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    # Execute function body
50846
50847  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50848  REFERENCE_VERSION=6
50849
50850  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50851    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50852  fi
50853
50854  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50855    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50856  fi
50857
50858  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50859  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50860
50861  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50862    :
50863
50864  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50865  # runs afoul of the more aggressive versions of these optimisations.
50866  # Notably, value range propagation now assumes that the this pointer of C++
50867  # member functions is non-null.
50868  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50869        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50870        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50871$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50872  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50873  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50874
50875  else
50876    :
50877
50878  fi
50879
50880
50881
50882
50883
50884
50885
50886
50887
50888
50889
50890
50891
50892
50893  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50894    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50895
50896    # Restrict the debug information created by Clang to avoid
50897    # too big object files and speed the build up a little bit
50898    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50899    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50900    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50901      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50902        # Force compatibility with i586 on 32 bit intel platforms.
50903        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50904        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50905      fi
50906      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50907      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50908          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50909      case $OPENJDK_BUILD_CPU_ARCH in
50910        ppc )
50911          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50912          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50913          ;;
50914        * )
50915          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50916          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50917          ;;
50918      esac
50919    fi
50920  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50921    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50922    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50923    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50924      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50925    fi
50926
50927    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50928    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50929  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50930    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50931    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50932    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50933  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50934    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50935        -MD -Zc:wchar_t- -W3 -wd4800 \
50936        -DWIN32_LEAN_AND_MEAN \
50937        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50938        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50939        -DWIN32 -DIAL"
50940    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50941      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50942    else
50943      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50944    fi
50945    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50946    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50947    # studio.
50948    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50949      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50950      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50951      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50952    fi
50953  fi
50954
50955  ###############################################################################
50956
50957  # Adjust flags according to debug level.
50958  case $DEBUG_LEVEL in
50959    fastdebug | slowdebug )
50960      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50961      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50962      ;;
50963    release )
50964      ;;
50965    * )
50966      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50967      ;;
50968  esac
50969
50970  # Set some common defines. These works for all compilers, but assume
50971  # -D is universally accepted.
50972
50973  # Setup endianness
50974  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50975    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50976    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50977    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50978    #   Note: -Dmacro         is the same as    #define macro 1
50979    #         -Dmacro=        is the same as    #define macro
50980    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50981      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50982    else
50983      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50984    fi
50985  else
50986    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50987    # are defined in the system?
50988    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50989      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50990    else
50991      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50992    fi
50993  fi
50994
50995  # Setup target OS define. Use OS target name but in upper case.
50996  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50997  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50998
50999  # Setup target CPU
51000  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51001      $OPENJDK_BUILD_ADD_LP64 \
51002      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51003
51004  # Setup debug/release defines
51005  if test "x$DEBUG_LEVEL" = xrelease; then
51006    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51007    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51008      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51009    fi
51010  else
51011    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51012  fi
51013
51014  # Set some additional per-OS defines.
51015  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51016    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51017    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51018        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51019  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51020    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51021    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51022        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51023  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51024    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51025    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51026    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51027    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51028        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51029        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51030        -fno-omit-frame-pointer"
51031  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51032    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51033    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51034    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51035        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51036        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51037  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51038    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51039  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51040    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51041    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51042  fi
51043
51044  # Set some additional per-CPU defines.
51045  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51046    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51047  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51048    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51049  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51050    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51051      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51052      # fixes `relocation truncated to fit' error for gcc 4.1.
51053      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51054      # Use ppc64 instructions, but schedule for power5
51055      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51056    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51057      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51058    fi
51059  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51060    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51061      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51062      # Little endian machine uses ELFv2 ABI.
51063      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51064      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51065      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51066    fi
51067  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51068    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51069      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51070    fi
51071  fi
51072
51073  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51074    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51075  fi
51076
51077  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51078    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51079      # Solaris does not have _LP64=1 in the old build.
51080      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51081      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51082    fi
51083  fi
51084
51085  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51086  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51087    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51088        -Wunused-value -Woverloaded-virtual"
51089
51090    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51091
51092
51093
51094
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    # Execute function body
51146
51147  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51148  REFERENCE_VERSION=4.8
51149
51150  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51151    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51152  fi
51153
51154  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51155    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51156  fi
51157
51158  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51159  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51160
51161  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51162    :
51163
51164            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51165            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51166
51167
51168  else
51169    :
51170
51171  fi
51172
51173
51174
51175
51176
51177
51178
51179
51180
51181
51182
51183
51184
51185
51186    fi
51187    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51188      # Non-zero builds have stricter warnings
51189      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51190    else
51191      if test "x$TOOLCHAIN_TYPE" = xclang; then
51192        # Some versions of llvm do not like -Wundef
51193        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51194      fi
51195    fi
51196  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51197    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51198        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51199  fi
51200
51201  # Additional macosx handling
51202  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51203    # Setting these parameters makes it an error to link to macosx APIs that are
51204    # newer than the given OS version and makes the linked binaries compatible
51205    # even if built on a newer version of the OS.
51206    # The expected format is X.Y.Z
51207    MACOSX_VERSION_MIN=10.7.0
51208
51209
51210    # The macro takes the version with no dots, ex: 1070
51211    # Let the flags variables get resolved in make for easier override on make
51212    # command line.
51213    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)"
51214    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51215  fi
51216
51217  # Setup some hard coded includes
51218  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51219      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51220      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51221      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51222      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51223      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51224      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51225
51226  # The shared libraries are compiled using the picflag.
51227  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51228      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51229  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51230      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51231
51232  # Executable flags
51233  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51234  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51235
51236
51237
51238
51239
51240
51241  # Setup LDFLAGS et al.
51242  #
51243
51244  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51245    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51246    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51247    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51248    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51249      LDFLAGS_SAFESH="-safeseh"
51250      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51251      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51252      # NOTE: Old build added -machine. Probably not needed.
51253      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51254    else
51255      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51256    fi
51257  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51258      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51259      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51260        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51261        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51262    fi
51263  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51264    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51265    # We have previously set HAS_GNU_HASH if this is the case
51266    if test -n "$HAS_GNU_HASH"; then
51267      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51268      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51269      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51270    fi
51271      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51272        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51273    fi
51274    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51275      # And since we now know that the linker is gnu, then add -z defs, to forbid
51276      # undefined symbols in object files.
51277      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51278      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51279      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51280      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51281      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51282      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51283        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51284      fi
51285      case $DEBUG_LEVEL in
51286        release )
51287          # tell linker to optimize libraries.
51288          # Should this be supplied to the OSS linker as well?
51289          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51290          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51291          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51292          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51293            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51294          fi
51295          ;;
51296        slowdebug )
51297          # Hotspot always let the linker optimize
51298          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51299          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51300            # do relocations at load
51301            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51302            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51303            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51304          fi
51305          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51306            # mark relocations read only
51307            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51308            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51309            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51310          fi
51311          ;;
51312        fastdebug )
51313          # Hotspot always let the linker optimize
51314          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51315          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51316            # mark relocations read only
51317            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51318            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51319            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51320          fi
51321          ;;
51322        * )
51323          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51324          ;;
51325        esac
51326    fi
51327  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51328    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51329    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51330    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51331    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51332    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51333    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51334      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51335    fi
51336  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51337    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51338    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51339    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51340  fi
51341
51342  # Customize LDFLAGS for executables
51343
51344  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51345
51346  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51347    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51348      LDFLAGS_STACK_SIZE=1048576
51349    else
51350      LDFLAGS_STACK_SIZE=327680
51351    fi
51352    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51353  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51354    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51355  fi
51356
51357  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51358
51359  # Customize LDFLAGS for libs
51360  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51361
51362  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51363  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51364    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51365        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51366    OPENJDK_BUILD_JDKLIB_LIBS=""
51367  else
51368    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51369        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51370
51371    if test "xBUILD" = "xTARGET"; then
51372      # On some platforms (mac) the linker warns about non existing -L dirs.
51373      # For any of the variants server, client or minimal, the dir matches the
51374      # variant name. The "main" variant should be used for linking. For the
51375      # rest, the dir is just server.
51376      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51377          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51378        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51379            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51380      else
51381        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51382            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51383      fi
51384    elif test "xBUILD" = "xBUILD"; then
51385      # When building a buildjdk, it's always only the server variant
51386      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51387          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51388    fi
51389
51390    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51391    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51392      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51393    fi
51394
51395  fi
51396
51397OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51398
51399  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51400  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51401    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51402  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51403    # FIXME: This hard-coded path is not really proper.
51404    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51405      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51406    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51407      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51408    fi
51409    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51410        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51411  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51412    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51413  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51414    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51415  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51416    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51417  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51418    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51419        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51420        wsock32.lib winmm.lib version.lib psapi.lib"
51421    fi
51422
51423  # Set OPENJDK_BUILD_JVM_ASFLAGS
51424  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51425    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51426      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51427    fi
51428  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51429    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51430  fi
51431
51432  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448  # Tests are only ever compiled for TARGET
51449  # Flags for compiling test libraries
51450  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51451  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51452
51453  # Flags for compiling test executables
51454  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51455  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51456
51457
51458
51459
51460
51461
51462  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51463  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51464
51465
51466
51467
51468
51469
51470  # Check that the compiler supports -mX (or -qX on AIX) flags
51471  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482
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    # Execute function body
51520
51521
51522
51523
51524
51525
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    # Execute function body
51569
51570  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51571$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51572  supports=yes
51573
51574  saved_cflags="$CFLAGS"
51575  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51576  ac_ext=c
51577ac_cpp='$CPP $CPPFLAGS'
51578ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51579ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51580ac_compiler_gnu=$ac_cv_c_compiler_gnu
51581
51582  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51583/* end confdefs.h.  */
51584int i;
51585_ACEOF
51586if ac_fn_c_try_compile "$LINENO"; then :
51587
51588else
51589  supports=no
51590fi
51591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51592  ac_ext=cpp
51593ac_cpp='$CXXCPP $CPPFLAGS'
51594ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51595ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51596ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51597
51598  CFLAGS="$saved_cflags"
51599
51600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51601$as_echo "$supports" >&6; }
51602  if test "x$supports" = "xyes" ; then
51603    :
51604    C_COMP_SUPPORTS="yes"
51605  else
51606    :
51607    C_COMP_SUPPORTS="no"
51608  fi
51609
51610
51611
51612
51613
51614
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    # Execute function body
51669
51670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51671$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51672  supports=yes
51673
51674  saved_cxxflags="$CXXFLAGS"
51675  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51676  ac_ext=cpp
51677ac_cpp='$CXXCPP $CPPFLAGS'
51678ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51679ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51680ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51681
51682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51683/* end confdefs.h.  */
51684int i;
51685_ACEOF
51686if ac_fn_cxx_try_compile "$LINENO"; then :
51687
51688else
51689  supports=no
51690fi
51691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51692  ac_ext=cpp
51693ac_cpp='$CXXCPP $CPPFLAGS'
51694ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51695ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51696ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51697
51698  CXXFLAGS="$saved_cxxflags"
51699
51700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51701$as_echo "$supports" >&6; }
51702  if test "x$supports" = "xyes" ; then
51703    :
51704    CXX_COMP_SUPPORTS="yes"
51705  else
51706    :
51707    CXX_COMP_SUPPORTS="no"
51708  fi
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51723$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51724  supports=no
51725  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51726
51727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51728$as_echo "$supports" >&6; }
51729  if test "x$supports" = "xyes" ; then
51730    :
51731    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51732  else
51733    :
51734    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51735  fi
51736
51737
51738
51739
51740
51741
51742
51743
51744  # Check whether --enable-warnings-as-errors was given.
51745if test "${enable_warnings_as_errors+set}" = set; then :
51746  enableval=$enable_warnings_as_errors;
51747fi
51748
51749
51750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51751$as_echo_n "checking if native warnings are errors... " >&6; }
51752  if test "x$enable_warnings_as_errors" = "xyes"; then
51753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
51754$as_echo "yes (explicitly set)" >&6; }
51755    WARNINGS_AS_ERRORS=true
51756  elif test "x$enable_warnings_as_errors" = "xno"; then
51757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51758$as_echo "no" >&6; }
51759    WARNINGS_AS_ERRORS=false
51760  elif test "x$enable_warnings_as_errors" = "x"; then
51761    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51762$as_echo "yes (default)" >&6; }
51763    WARNINGS_AS_ERRORS=true
51764  else
51765    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51766  fi
51767
51768
51769
51770  case "${TOOLCHAIN_TYPE}" in
51771    microsoft)
51772      DISABLE_WARNING_PREFIX="-wd"
51773      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51774      ;;
51775    solstudio)
51776      DISABLE_WARNING_PREFIX="-erroff="
51777      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51778      ;;
51779    gcc)
51780      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
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    # Execute function body
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838
51839
51840
51841
51842
51843
51844
51845
51846
51847
51848
51849
51850
51851
51852
51853
51854
51855
51856
51857
51858
51859
51860
51861
51862
51863
51864
51865
51866
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877    # Execute function body
51878
51879  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51880$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51881  supports=yes
51882
51883  saved_cflags="$CFLAGS"
51884  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51885  ac_ext=c
51886ac_cpp='$CPP $CPPFLAGS'
51887ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51888ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51889ac_compiler_gnu=$ac_cv_c_compiler_gnu
51890
51891  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51892/* end confdefs.h.  */
51893int i;
51894_ACEOF
51895if ac_fn_c_try_compile "$LINENO"; then :
51896
51897else
51898  supports=no
51899fi
51900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51901  ac_ext=cpp
51902ac_cpp='$CXXCPP $CPPFLAGS'
51903ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51904ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51905ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51906
51907  CFLAGS="$saved_cflags"
51908
51909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51910$as_echo "$supports" >&6; }
51911  if test "x$supports" = "xyes" ; then
51912    :
51913    C_COMP_SUPPORTS="yes"
51914  else
51915    :
51916    C_COMP_SUPPORTS="no"
51917  fi
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
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977    # Execute function body
51978
51979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51980$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51981  supports=yes
51982
51983  saved_cxxflags="$CXXFLAGS"
51984  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
51985  ac_ext=cpp
51986ac_cpp='$CXXCPP $CPPFLAGS'
51987ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51988ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51989ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51990
51991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51992/* end confdefs.h.  */
51993int i;
51994_ACEOF
51995if ac_fn_cxx_try_compile "$LINENO"; then :
51996
51997else
51998  supports=no
51999fi
52000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52001  ac_ext=cpp
52002ac_cpp='$CXXCPP $CPPFLAGS'
52003ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52004ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52005ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52006
52007  CXXFLAGS="$saved_cxxflags"
52008
52009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52010$as_echo "$supports" >&6; }
52011  if test "x$supports" = "xyes" ; then
52012    :
52013    CXX_COMP_SUPPORTS="yes"
52014  else
52015    :
52016    CXX_COMP_SUPPORTS="no"
52017  fi
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52032$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52033  supports=no
52034  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52035
52036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52037$as_echo "$supports" >&6; }
52038  if test "x$supports" = "xyes" ; then
52039    :
52040    GCC_CAN_DISABLE_WARNINGS=true
52041  else
52042    :
52043    GCC_CAN_DISABLE_WARNINGS=false
52044
52045  fi
52046
52047
52048
52049
52050
52051
52052      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52053        DISABLE_WARNING_PREFIX="-Wno-"
52054      else
52055        DISABLE_WARNING_PREFIX=
52056      fi
52057      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52058      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52059      # CFLAGS since any target specific flags will likely not work with the
52060      # build compiler
52061      CC_OLD="$CC"
52062      CXX_OLD="$CXX"
52063      CC="$BUILD_CC"
52064      CXX="$BUILD_CXX"
52065      CFLAGS_OLD="$CFLAGS"
52066      CFLAGS=""
52067
52068
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    # Execute function body
52115
52116
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    # Execute function body
52164
52165  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52166$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52167  supports=yes
52168
52169  saved_cflags="$CFLAGS"
52170  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52171  ac_ext=c
52172ac_cpp='$CPP $CPPFLAGS'
52173ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52174ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52175ac_compiler_gnu=$ac_cv_c_compiler_gnu
52176
52177  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52178/* end confdefs.h.  */
52179int i;
52180_ACEOF
52181if ac_fn_c_try_compile "$LINENO"; then :
52182
52183else
52184  supports=no
52185fi
52186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52187  ac_ext=cpp
52188ac_cpp='$CXXCPP $CPPFLAGS'
52189ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52190ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52191ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52192
52193  CFLAGS="$saved_cflags"
52194
52195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52196$as_echo "$supports" >&6; }
52197  if test "x$supports" = "xyes" ; then
52198    :
52199    C_COMP_SUPPORTS="yes"
52200  else
52201    :
52202    C_COMP_SUPPORTS="no"
52203  fi
52204
52205
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    # Execute function body
52264
52265  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52266$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52267  supports=yes
52268
52269  saved_cxxflags="$CXXFLAGS"
52270  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52271  ac_ext=cpp
52272ac_cpp='$CXXCPP $CPPFLAGS'
52273ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52274ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52275ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52276
52277  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52278/* end confdefs.h.  */
52279int i;
52280_ACEOF
52281if ac_fn_cxx_try_compile "$LINENO"; then :
52282
52283else
52284  supports=no
52285fi
52286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52287  ac_ext=cpp
52288ac_cpp='$CXXCPP $CPPFLAGS'
52289ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52290ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52291ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52292
52293  CXXFLAGS="$saved_cxxflags"
52294
52295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52296$as_echo "$supports" >&6; }
52297  if test "x$supports" = "xyes" ; then
52298    :
52299    CXX_COMP_SUPPORTS="yes"
52300  else
52301    :
52302    CXX_COMP_SUPPORTS="no"
52303  fi
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52318$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52319  supports=no
52320  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52321
52322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52323$as_echo "$supports" >&6; }
52324  if test "x$supports" = "xyes" ; then
52325    :
52326    BUILD_CC_CAN_DISABLE_WARNINGS=true
52327  else
52328    :
52329    BUILD_CC_CAN_DISABLE_WARNINGS=false
52330
52331  fi
52332
52333
52334
52335
52336
52337
52338      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52339        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52340      else
52341        BUILD_CC_DISABLE_WARNING_PREFIX=
52342      fi
52343      CC="$CC_OLD"
52344      CXX="$CXX_OLD"
52345      CFLAGS="$CFLAGS_OLD"
52346      ;;
52347    clang)
52348      DISABLE_WARNING_PREFIX="-Wno-"
52349      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52350      ;;
52351    xlc)
52352      DISABLE_WARNING_PREFIX="-qsuppress="
52353      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52354      ;;
52355  esac
52356
52357
52358
52359
52360
52361# Setup debug symbols (need objcopy from the toolchain for that)
52362
52363  #
52364  # NATIVE_DEBUG_SYMBOLS
52365  # This must be done after the toolchain is setup, since we're looking at objcopy.
52366  #
52367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52368$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52369
52370# Check whether --with-native-debug-symbols was given.
52371if test "${with_native_debug_symbols+set}" = set; then :
52372  withval=$with_native_debug_symbols;
52373        if test "x$OPENJDK_TARGET_OS" = xaix; then
52374          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52375            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52376          fi
52377        fi
52378
52379else
52380
52381        if test "x$OPENJDK_TARGET_OS" = xaix; then
52382          # AIX doesn't support 'zipped' so use 'internal' as default
52383          with_native_debug_symbols="internal"
52384        else
52385          if test "x$STATIC_BUILD" = xtrue; then
52386            with_native_debug_symbols="none"
52387          else
52388            with_native_debug_symbols="zipped"
52389          fi
52390        fi
52391
52392fi
52393
52394  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52396$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52397
52398  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52399
52400    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52401      if test "x$OBJCOPY" = x; then
52402        # enabling of enable-debug-symbols and can't find objcopy
52403        # this is an error
52404        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52405      fi
52406    fi
52407
52408    COMPILE_WITH_DEBUG_SYMBOLS=true
52409    COPY_DEBUG_SYMBOLS=true
52410    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52411  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52412    COMPILE_WITH_DEBUG_SYMBOLS=false
52413    COPY_DEBUG_SYMBOLS=false
52414    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52415  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52416    COMPILE_WITH_DEBUG_SYMBOLS=true
52417    COPY_DEBUG_SYMBOLS=false
52418    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52419  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52420
52421    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52422      if test "x$OBJCOPY" = x; then
52423        # enabling of enable-debug-symbols and can't find objcopy
52424        # this is an error
52425        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52426      fi
52427    fi
52428
52429    COMPILE_WITH_DEBUG_SYMBOLS=true
52430    COPY_DEBUG_SYMBOLS=true
52431    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52432  else
52433    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52434  fi
52435
52436  # --enable-debug-symbols is deprecated.
52437  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52438
52439  # Check whether --enable-debug-symbols was given.
52440if test "${enable_debug_symbols+set}" = set; then :
52441  enableval=$enable_debug_symbols;
52442fi
52443
52444  if test "x$enable_debug_symbols" != x; then
52445    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52446$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52447
52448    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52449      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52450$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52451    fi
52452
52453  fi
52454
52455
52456  # --enable-zip-debug-info is deprecated.
52457  # Please use --with-native-debug-symbols=zipped .
52458
52459  # Check whether --enable-zip-debug-info was given.
52460if test "${enable_zip_debug_info+set}" = set; then :
52461  enableval=$enable_zip_debug_info;
52462fi
52463
52464  if test "x$enable_zip_debug_info" != x; then
52465    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52466$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52467
52468    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52469      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52470$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52471    fi
52472
52473  fi
52474
52475
52476
52477
52478
52479
52480
52481  # Check whether --enable-native-coverage was given.
52482if test "${enable_native_coverage+set}" = set; then :
52483  enableval=$enable_native_coverage;
52484fi
52485
52486  GCOV_ENABLED="false"
52487  if test "x$enable_native_coverage" = "xyes"; then
52488    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52489      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52490$as_echo_n "checking if native coverage is enabled... " >&6; }
52491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52492$as_echo "yes" >&6; }
52493      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52494      GCOV_LDFLAGS="-fprofile-arcs"
52495      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
52496      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
52497      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52498      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52499      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52500      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52501      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52502      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52503      GCOV_ENABLED="true"
52504    else
52505      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52506    fi
52507  elif test "x$enable_native_coverage" = "xno"; then
52508    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52509$as_echo_n "checking if native coverage is enabled... " >&6; }
52510    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52511$as_echo "no" >&6; }
52512  elif test "x$enable_native_coverage" != "x"; then
52513    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52514  fi
52515
52516
52517
52518
52519# Need toolchain to setup dtrace
52520
52521  # Test for dtrace dependencies
52522  # Check whether --enable-dtrace was given.
52523if test "${enable_dtrace+set}" = set; then :
52524  enableval=$enable_dtrace;
52525fi
52526
52527
52528  DTRACE_DEP_MISSING=false
52529
52530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52531$as_echo_n "checking for dtrace tool... " >&6; }
52532  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52533    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52534$as_echo "$DTRACE" >&6; }
52535  else
52536    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52537$as_echo "not found, cannot build dtrace" >&6; }
52538    DTRACE_DEP_MISSING=true
52539  fi
52540
52541  for ac_header in sys/sdt.h
52542do :
52543  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52544if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52545  cat >>confdefs.h <<_ACEOF
52546#define HAVE_SYS_SDT_H 1
52547_ACEOF
52548 DTRACE_HEADERS_OK=yes
52549else
52550  DTRACE_HEADERS_OK=no
52551fi
52552
52553done
52554
52555  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52556    DTRACE_DEP_MISSING=true
52557  fi
52558
52559  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52560$as_echo_n "checking if dtrace should be built... " >&6; }
52561  if test "x$enable_dtrace" = "xyes"; then
52562    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52564$as_echo "no, missing dependencies" >&6; }
52565
52566  # Print a helpful message on how to acquire the necessary build dependency.
52567  # dtrace is the help tag: freetype, cups, alsa etc
52568  MISSING_DEPENDENCY=dtrace
52569
52570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52571    cygwin_help $MISSING_DEPENDENCY
52572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52573    msys_help $MISSING_DEPENDENCY
52574  else
52575    PKGHANDLER_COMMAND=
52576
52577    case $PKGHANDLER in
52578      apt-get)
52579        apt_help     $MISSING_DEPENDENCY ;;
52580      yum)
52581        yum_help     $MISSING_DEPENDENCY ;;
52582      brew)
52583        brew_help    $MISSING_DEPENDENCY ;;
52584      port)
52585        port_help    $MISSING_DEPENDENCY ;;
52586      pkgutil)
52587        pkgutil_help $MISSING_DEPENDENCY ;;
52588      pkgadd)
52589        pkgadd_help  $MISSING_DEPENDENCY ;;
52590    esac
52591
52592    if test "x$PKGHANDLER_COMMAND" != x; then
52593      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52594    fi
52595  fi
52596
52597      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52598    else
52599      INCLUDE_DTRACE=true
52600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52601$as_echo "yes, forced" >&6; }
52602    fi
52603  elif test "x$enable_dtrace" = "xno"; then
52604    INCLUDE_DTRACE=false
52605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52606$as_echo "no, forced" >&6; }
52607  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52608    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52609      INCLUDE_DTRACE=false
52610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52611$as_echo "no, missing dependencies" >&6; }
52612    else
52613      INCLUDE_DTRACE=true
52614      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52615$as_echo "yes, dependencies present" >&6; }
52616    fi
52617  else
52618    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52619  fi
52620
52621
52622  # Check whether --enable-aot was given.
52623if test "${enable_aot+set}" = set; then :
52624  enableval=$enable_aot;
52625fi
52626
52627
52628  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
52629    ENABLE_AOT="true"
52630  elif test "x$enable_aot" = "xyes"; then
52631    ENABLE_AOT="true"
52632  elif test "x$enable_aot" = "xno"; then
52633    ENABLE_AOT="false"
52634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
52635$as_echo_n "checking if aot should be enabled... " >&6; }
52636    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52637$as_echo "no, forced" >&6; }
52638  else
52639    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
52640  fi
52641
52642  if test "x$ENABLE_AOT" = "xtrue"; then
52643    # Only enable AOT on linux-X64.
52644    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
52645      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
52646        if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
52647          ENABLE_AOT="true"
52648        else
52649          ENABLE_AOT="false"
52650          if test "x$enable_aot" = "xyes"; then
52651            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
52652          fi
52653        fi
52654      else
52655        ENABLE_AOT="false"
52656        if test "x$enable_aot" = "xyes"; then
52657          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
52658        fi
52659      fi
52660    else
52661      ENABLE_AOT="false"
52662      if test "x$enable_aot" = "xyes"; then
52663        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
52664      fi
52665    fi
52666  fi
52667
52668
52669
52670
52671  # Check whether --enable-hotspot-gtest was given.
52672if test "${enable_hotspot_gtest+set}" = set; then :
52673  enableval=$enable_hotspot_gtest;
52674fi
52675
52676
52677  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52678    GTEST_DIR_EXISTS="true"
52679  else
52680    GTEST_DIR_EXISTS="false"
52681  fi
52682
52683  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52684$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52685  if test "x$enable_hotspot_gtest" = "xyes"; then
52686    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52687      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52688$as_echo "yes, forced" >&6; }
52689      BUILD_GTEST="true"
52690    else
52691      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52692    fi
52693  elif test "x$enable_hotspot_gtest" = "xno"; then
52694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52695$as_echo "no, forced" >&6; }
52696    BUILD_GTEST="false"
52697  elif test "x$enable_hotspot_gtest" = "x"; then
52698    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52700$as_echo "yes" >&6; }
52701      BUILD_GTEST="true"
52702    else
52703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52704$as_echo "no" >&6; }
52705      BUILD_GTEST="false"
52706    fi
52707  else
52708    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52709  fi
52710
52711
52712
52713
52714###############################################################################
52715#
52716# Check dependencies for external and internal libraries.
52717#
52718###############################################################################
52719
52720# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52721
52722  # When using cygwin or msys, we need a wrapper binary that renames
52723  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52724  # @files and rewrites these too! This wrapper binary is
52725  # called fixpath.
52726  FIXPATH=
52727  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52729$as_echo_n "checking if fixpath can be created... " >&6; }
52730    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52731    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52732    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52733    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52734      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52735      FIXPATH="$FIXPATH_BIN -c"
52736    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52737      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52738      # @ was chosen as separator to minimize risk of other tools messing around with it
52739      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52740          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52741      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52742      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52743    fi
52744    FIXPATH_SRC_W="$FIXPATH_SRC"
52745    FIXPATH_BIN_W="$FIXPATH_BIN"
52746
52747  unix_path="$FIXPATH_SRC_W"
52748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52749    windows_path=`$CYGPATH -m "$unix_path"`
52750    FIXPATH_SRC_W="$windows_path"
52751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52752    windows_path=`cmd //c echo $unix_path`
52753    FIXPATH_SRC_W="$windows_path"
52754  fi
52755
52756
52757  unix_path="$FIXPATH_BIN_W"
52758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52759    windows_path=`$CYGPATH -m "$unix_path"`
52760    FIXPATH_BIN_W="$windows_path"
52761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52762    windows_path=`cmd //c echo $unix_path`
52763    FIXPATH_BIN_W="$windows_path"
52764  fi
52765
52766    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52767    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52768    cd $FIXPATH_DIR
52769    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52770    cd $CURDIR
52771
52772    if test ! -x $FIXPATH_BIN; then
52773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52774$as_echo "no" >&6; }
52775      cat $FIXPATH_DIR/fixpath1.log
52776      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52777    fi
52778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52779$as_echo "yes" >&6; }
52780    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52781$as_echo_n "checking if fixpath.exe works... " >&6; }
52782    cd $FIXPATH_DIR
52783    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52784        > $FIXPATH_DIR/fixpath2.log 2>&1
52785    cd $CURDIR
52786    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52788$as_echo "no" >&6; }
52789      cat $FIXPATH_DIR/fixpath2.log
52790      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52791    fi
52792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52793$as_echo "yes" >&6; }
52794
52795    FIXPATH_DETACH_FLAG="--detach"
52796  fi
52797
52798
52799
52800
52801
52802
52803  # Check if X11 is needed
52804  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52805    # No X11 support on windows or macosx
52806    NEEDS_LIB_X11=false
52807  else
52808    # All other instances need X11, even if building headless only, libawt still
52809    # needs X11 headers.
52810    NEEDS_LIB_X11=true
52811  fi
52812
52813  # Check if cups is needed
52814  if test "x$OPENJDK_TARGET_OS" = xwindows; then
52815    # Windows have a separate print system
52816    NEEDS_LIB_CUPS=false
52817  else
52818    NEEDS_LIB_CUPS=true
52819  fi
52820
52821  # A custom hook may have set this already
52822  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
52823    NEEDS_LIB_FREETYPE=true
52824  fi
52825
52826  # Check if alsa is needed
52827  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52828    NEEDS_LIB_ALSA=true
52829  else
52830    NEEDS_LIB_ALSA=false
52831  fi
52832
52833  # Check if ffi is needed
52834  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52835    NEEDS_LIB_FFI=true
52836  else
52837    NEEDS_LIB_FFI=false
52838  fi
52839
52840
52841  # statically link libstdc++ before C++ ABI is stablized on Linux unless
52842  # dynamic build is configured on command line.
52843
52844# Check whether --with-stdc++lib was given.
52845if test "${with_stdc__lib+set}" = set; then :
52846  withval=$with_stdc__lib;
52847        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
52848                && test "x$with_stdc__lib" != xdefault; then
52849          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
52850        fi
52851
52852else
52853  with_stdc__lib=default
52854
52855fi
52856
52857
52858  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52859    # Test if stdc++ can be linked statically.
52860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
52861$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
52862    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
52863    ac_ext=cpp
52864ac_cpp='$CXXCPP $CPPFLAGS'
52865ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52866ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52867ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52868
52869    OLD_LIBS="$LIBS"
52870    LIBS="$STATIC_STDCXX_FLAGS"
52871    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52872/* end confdefs.h.  */
52873
52874int
52875main ()
52876{
52877return 0;
52878  ;
52879  return 0;
52880}
52881_ACEOF
52882if ac_fn_cxx_try_link "$LINENO"; then :
52883  has_static_libstdcxx=yes
52884else
52885  has_static_libstdcxx=no
52886fi
52887rm -f core conftest.err conftest.$ac_objext \
52888    conftest$ac_exeext conftest.$ac_ext
52889    LIBS="$OLD_LIBS"
52890    ac_ext=cpp
52891ac_cpp='$CXXCPP $CPPFLAGS'
52892ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52893ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52894ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52895
52896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
52897$as_echo "$has_static_libstdcxx" >&6; }
52898
52899    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
52900      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
52901    fi
52902
52903    # If dynamic was requested, it's available since it would fail above otherwise.
52904    # If dynamic wasn't requested, go with static unless it isn't available.
52905    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
52906$as_echo_n "checking how to link with libstdc++... " >&6; }
52907    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
52908        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52909      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
52910$as_echo "dynamic" >&6; }
52911    else
52912      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
52913      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
52914      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52915      # just use the same setting as for the TARGET toolchain.
52916      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
52917      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
52918$as_echo "static" >&6; }
52919    fi
52920  fi
52921
52922  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
52923  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
52924    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
52925  fi
52926
52927
52928
52929  # Setup Windows runtime dlls
52930  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52931
52932
52933# Check whether --with-msvcr-dll was given.
52934if test "${with_msvcr_dll+set}" = set; then :
52935  withval=$with_msvcr_dll;
52936fi
52937
52938
52939  if test "x$with_msvcr_dll" != x; then
52940    # If given explicitly by user, do not probe. If not present, fail directly.
52941
52942  DLL_NAME="$MSVCR_NAME"
52943  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
52944  METHOD="--with-msvcr-dll"
52945  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52946    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52947$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52948
52949    # Need to check if the found msvcr is correct architecture
52950    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52951$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52952    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52953    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52954      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52955      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52956      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52957        CORRECT_MSVCR_ARCH="PE32 executable"
52958      else
52959        CORRECT_MSVCR_ARCH="PE32+ executable"
52960      fi
52961    else
52962      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52963        CORRECT_MSVCR_ARCH=386
52964      else
52965        CORRECT_MSVCR_ARCH=x86-64
52966      fi
52967    fi
52968    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52969      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52970$as_echo "ok" >&6; }
52971      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52972
52973  # Only process if variable expands to non-empty
52974
52975  if test "x$MSVC_DLL" != x; then
52976    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52977
52978  # Input might be given as Windows format, start by converting to
52979  # unix format.
52980  path="$MSVC_DLL"
52981  new_path=`$CYGPATH -u "$path"`
52982
52983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52986  # "foo.exe" is OK but "foo" is an error.
52987  #
52988  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52989  # It is also a way to make sure we got the proper file name for the real test later on.
52990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52991  if test "x$test_shortpath" = x; then
52992    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52993$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52994    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52995  fi
52996
52997  # Call helper function which possibly converts this using DOS-style short mode.
52998  # If so, the updated path is stored in $new_path.
52999
53000  input_path="$new_path"
53001  # Check if we need to convert this using DOS-style short mode. If the path
53002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53003  # take no chances and rewrite it.
53004  # Note: m4 eats our [], so we need to use [ and ] instead.
53005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53006  if test "x$has_forbidden_chars" != x; then
53007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53011      # Going to short mode and back again did indeed matter. Since short mode is
53012      # case insensitive, let's make it lowercase to improve readability.
53013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53014      # Now convert it back to Unix-style (cygpath)
53015      input_path=`$CYGPATH -u "$shortmode_path"`
53016      new_path="$input_path"
53017    fi
53018  fi
53019
53020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53021  if test "x$test_cygdrive_prefix" = x; then
53022    # As a simple fix, exclude /usr/bin since it's not a real path.
53023    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53025      # a path prefixed by /cygdrive for fixpath to work.
53026      new_path="$CYGWIN_ROOT_PATH$input_path"
53027    fi
53028  fi
53029
53030
53031  if test "x$path" != "x$new_path"; then
53032    MSVC_DLL="$new_path"
53033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53034$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53035  fi
53036
53037    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53038
53039  path="$MSVC_DLL"
53040  has_colon=`$ECHO $path | $GREP ^.:`
53041  new_path="$path"
53042  if test "x$has_colon" = x; then
53043    # Not in mixed or Windows style, start by that.
53044    new_path=`cmd //c echo $path`
53045  fi
53046
53047
53048  input_path="$new_path"
53049  # Check if we need to convert this using DOS-style short mode. If the path
53050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53051  # take no chances and rewrite it.
53052  # Note: m4 eats our [], so we need to use [ and ] instead.
53053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53054  if test "x$has_forbidden_chars" != x; then
53055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53057  fi
53058
53059
53060  windows_path="$new_path"
53061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53062    unix_path=`$CYGPATH -u "$windows_path"`
53063    new_path="$unix_path"
53064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53066    new_path="$unix_path"
53067  fi
53068
53069  if test "x$path" != "x$new_path"; then
53070    MSVC_DLL="$new_path"
53071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53072$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53073  fi
53074
53075  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53076  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53077
53078    else
53079      # We're on a unix platform. Hooray! :)
53080      path="$MSVC_DLL"
53081      has_space=`$ECHO "$path" | $GREP " "`
53082      if test "x$has_space" != x; then
53083        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53084$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53085        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53086      fi
53087
53088      # Use eval to expand a potential ~
53089      eval path="$path"
53090      if test ! -f "$path" && test ! -d "$path"; then
53091        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53092      fi
53093
53094      if test -d "$path"; then
53095        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53096      else
53097        dir="`$DIRNAME "$path"`"
53098        base="`$BASENAME "$path"`"
53099        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53100      fi
53101    fi
53102  fi
53103
53104      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53105$as_echo_n "checking for $DLL_NAME... " >&6; }
53106      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53107$as_echo "$MSVC_DLL" >&6; }
53108    else
53109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53110$as_echo "incorrect, ignoring" >&6; }
53111      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53112$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53113    fi
53114  fi
53115
53116    if test "x$MSVC_DLL" = x; then
53117      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53118    fi
53119    MSVCR_DLL="$MSVC_DLL"
53120  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53121
53122  DLL_NAME="$MSVCR_NAME"
53123  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53124  METHOD="devkit"
53125  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53126    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53127$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53128
53129    # Need to check if the found msvcr is correct architecture
53130    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53131$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53132    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53134      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53135      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53136      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53137        CORRECT_MSVCR_ARCH="PE32 executable"
53138      else
53139        CORRECT_MSVCR_ARCH="PE32+ executable"
53140      fi
53141    else
53142      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53143        CORRECT_MSVCR_ARCH=386
53144      else
53145        CORRECT_MSVCR_ARCH=x86-64
53146      fi
53147    fi
53148    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53149      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53150$as_echo "ok" >&6; }
53151      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53152
53153  # Only process if variable expands to non-empty
53154
53155  if test "x$MSVC_DLL" != x; then
53156    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53157
53158  # Input might be given as Windows format, start by converting to
53159  # unix format.
53160  path="$MSVC_DLL"
53161  new_path=`$CYGPATH -u "$path"`
53162
53163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53166  # "foo.exe" is OK but "foo" is an error.
53167  #
53168  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53169  # It is also a way to make sure we got the proper file name for the real test later on.
53170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53171  if test "x$test_shortpath" = x; then
53172    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53173$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53174    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53175  fi
53176
53177  # Call helper function which possibly converts this using DOS-style short mode.
53178  # If so, the updated path is stored in $new_path.
53179
53180  input_path="$new_path"
53181  # Check if we need to convert this using DOS-style short mode. If the path
53182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53183  # take no chances and rewrite it.
53184  # Note: m4 eats our [], so we need to use [ and ] instead.
53185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53186  if test "x$has_forbidden_chars" != x; then
53187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53191      # Going to short mode and back again did indeed matter. Since short mode is
53192      # case insensitive, let's make it lowercase to improve readability.
53193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53194      # Now convert it back to Unix-style (cygpath)
53195      input_path=`$CYGPATH -u "$shortmode_path"`
53196      new_path="$input_path"
53197    fi
53198  fi
53199
53200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53201  if test "x$test_cygdrive_prefix" = x; then
53202    # As a simple fix, exclude /usr/bin since it's not a real path.
53203    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53205      # a path prefixed by /cygdrive for fixpath to work.
53206      new_path="$CYGWIN_ROOT_PATH$input_path"
53207    fi
53208  fi
53209
53210
53211  if test "x$path" != "x$new_path"; then
53212    MSVC_DLL="$new_path"
53213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53214$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53215  fi
53216
53217    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53218
53219  path="$MSVC_DLL"
53220  has_colon=`$ECHO $path | $GREP ^.:`
53221  new_path="$path"
53222  if test "x$has_colon" = x; then
53223    # Not in mixed or Windows style, start by that.
53224    new_path=`cmd //c echo $path`
53225  fi
53226
53227
53228  input_path="$new_path"
53229  # Check if we need to convert this using DOS-style short mode. If the path
53230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53231  # take no chances and rewrite it.
53232  # Note: m4 eats our [], so we need to use [ and ] instead.
53233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53234  if test "x$has_forbidden_chars" != x; then
53235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53236    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53237  fi
53238
53239
53240  windows_path="$new_path"
53241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53242    unix_path=`$CYGPATH -u "$windows_path"`
53243    new_path="$unix_path"
53244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53246    new_path="$unix_path"
53247  fi
53248
53249  if test "x$path" != "x$new_path"; then
53250    MSVC_DLL="$new_path"
53251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53252$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53253  fi
53254
53255  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53256  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53257
53258    else
53259      # We're on a unix platform. Hooray! :)
53260      path="$MSVC_DLL"
53261      has_space=`$ECHO "$path" | $GREP " "`
53262      if test "x$has_space" != x; then
53263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53264$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53265        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53266      fi
53267
53268      # Use eval to expand a potential ~
53269      eval path="$path"
53270      if test ! -f "$path" && test ! -d "$path"; then
53271        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53272      fi
53273
53274      if test -d "$path"; then
53275        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53276      else
53277        dir="`$DIRNAME "$path"`"
53278        base="`$BASENAME "$path"`"
53279        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53280      fi
53281    fi
53282  fi
53283
53284      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53285$as_echo_n "checking for $DLL_NAME... " >&6; }
53286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53287$as_echo "$MSVC_DLL" >&6; }
53288    else
53289      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53290$as_echo "incorrect, ignoring" >&6; }
53291      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53292$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53293    fi
53294  fi
53295
53296    if test "x$MSVC_DLL" = x; then
53297      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53298    fi
53299    MSVCR_DLL="$MSVC_DLL"
53300  else
53301
53302  DLL_NAME="${MSVCR_NAME}"
53303  MSVC_DLL=
53304
53305  if test "x$MSVC_DLL" = x; then
53306    # Probe: Using well-known location from Visual Studio 10.0
53307    if test "x$VCINSTALLDIR" != x; then
53308      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53309
53310  windows_path="$CYGWIN_VC_INSTALL_DIR"
53311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53312    unix_path=`$CYGPATH -u "$windows_path"`
53313    CYGWIN_VC_INSTALL_DIR="$unix_path"
53314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53316    CYGWIN_VC_INSTALL_DIR="$unix_path"
53317  fi
53318
53319      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53320        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53321      else
53322        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53323      fi
53324      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53325
53326  DLL_NAME="$DLL_NAME"
53327  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53328  METHOD="well-known location in VCINSTALLDIR"
53329  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53330    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53331$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53332
53333    # Need to check if the found msvcr is correct architecture
53334    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53335$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53336    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53337    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53338      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53339      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53340      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53341        CORRECT_MSVCR_ARCH="PE32 executable"
53342      else
53343        CORRECT_MSVCR_ARCH="PE32+ executable"
53344      fi
53345    else
53346      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53347        CORRECT_MSVCR_ARCH=386
53348      else
53349        CORRECT_MSVCR_ARCH=x86-64
53350      fi
53351    fi
53352    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53353      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53354$as_echo "ok" >&6; }
53355      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53356
53357  # Only process if variable expands to non-empty
53358
53359  if test "x$MSVC_DLL" != x; then
53360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53361
53362  # Input might be given as Windows format, start by converting to
53363  # unix format.
53364  path="$MSVC_DLL"
53365  new_path=`$CYGPATH -u "$path"`
53366
53367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53370  # "foo.exe" is OK but "foo" is an error.
53371  #
53372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53373  # It is also a way to make sure we got the proper file name for the real test later on.
53374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53375  if test "x$test_shortpath" = x; then
53376    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53377$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53378    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53379  fi
53380
53381  # Call helper function which possibly converts this using DOS-style short mode.
53382  # If so, the updated path is stored in $new_path.
53383
53384  input_path="$new_path"
53385  # Check if we need to convert this using DOS-style short mode. If the path
53386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53387  # take no chances and rewrite it.
53388  # Note: m4 eats our [], so we need to use [ and ] instead.
53389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53390  if test "x$has_forbidden_chars" != x; then
53391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53395      # Going to short mode and back again did indeed matter. Since short mode is
53396      # case insensitive, let's make it lowercase to improve readability.
53397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53398      # Now convert it back to Unix-style (cygpath)
53399      input_path=`$CYGPATH -u "$shortmode_path"`
53400      new_path="$input_path"
53401    fi
53402  fi
53403
53404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53405  if test "x$test_cygdrive_prefix" = x; then
53406    # As a simple fix, exclude /usr/bin since it's not a real path.
53407    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53409      # a path prefixed by /cygdrive for fixpath to work.
53410      new_path="$CYGWIN_ROOT_PATH$input_path"
53411    fi
53412  fi
53413
53414
53415  if test "x$path" != "x$new_path"; then
53416    MSVC_DLL="$new_path"
53417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53418$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53419  fi
53420
53421    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53422
53423  path="$MSVC_DLL"
53424  has_colon=`$ECHO $path | $GREP ^.:`
53425  new_path="$path"
53426  if test "x$has_colon" = x; then
53427    # Not in mixed or Windows style, start by that.
53428    new_path=`cmd //c echo $path`
53429  fi
53430
53431
53432  input_path="$new_path"
53433  # Check if we need to convert this using DOS-style short mode. If the path
53434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53435  # take no chances and rewrite it.
53436  # Note: m4 eats our [], so we need to use [ and ] instead.
53437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53438  if test "x$has_forbidden_chars" != x; then
53439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53441  fi
53442
53443
53444  windows_path="$new_path"
53445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53446    unix_path=`$CYGPATH -u "$windows_path"`
53447    new_path="$unix_path"
53448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53450    new_path="$unix_path"
53451  fi
53452
53453  if test "x$path" != "x$new_path"; then
53454    MSVC_DLL="$new_path"
53455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53456$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53457  fi
53458
53459  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53460  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53461
53462    else
53463      # We're on a unix platform. Hooray! :)
53464      path="$MSVC_DLL"
53465      has_space=`$ECHO "$path" | $GREP " "`
53466      if test "x$has_space" != x; then
53467        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53468$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53469        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53470      fi
53471
53472      # Use eval to expand a potential ~
53473      eval path="$path"
53474      if test ! -f "$path" && test ! -d "$path"; then
53475        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53476      fi
53477
53478      if test -d "$path"; then
53479        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53480      else
53481        dir="`$DIRNAME "$path"`"
53482        base="`$BASENAME "$path"`"
53483        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53484      fi
53485    fi
53486  fi
53487
53488      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53489$as_echo_n "checking for $DLL_NAME... " >&6; }
53490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53491$as_echo "$MSVC_DLL" >&6; }
53492    else
53493      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53494$as_echo "incorrect, ignoring" >&6; }
53495      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53496$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53497    fi
53498  fi
53499
53500    fi
53501  fi
53502
53503  if test "x$MSVC_DLL" = x; then
53504    # Probe: Check in the Boot JDK directory.
53505    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53506
53507  DLL_NAME="$DLL_NAME"
53508  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53509  METHOD="well-known location in Boot JDK"
53510  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53511    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53512$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53513
53514    # Need to check if the found msvcr is correct architecture
53515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53516$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53517    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53519      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53520      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53521      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53522        CORRECT_MSVCR_ARCH="PE32 executable"
53523      else
53524        CORRECT_MSVCR_ARCH="PE32+ executable"
53525      fi
53526    else
53527      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53528        CORRECT_MSVCR_ARCH=386
53529      else
53530        CORRECT_MSVCR_ARCH=x86-64
53531      fi
53532    fi
53533    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53534      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53535$as_echo "ok" >&6; }
53536      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53537
53538  # Only process if variable expands to non-empty
53539
53540  if test "x$MSVC_DLL" != x; then
53541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53542
53543  # Input might be given as Windows format, start by converting to
53544  # unix format.
53545  path="$MSVC_DLL"
53546  new_path=`$CYGPATH -u "$path"`
53547
53548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53551  # "foo.exe" is OK but "foo" is an error.
53552  #
53553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53554  # It is also a way to make sure we got the proper file name for the real test later on.
53555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53556  if test "x$test_shortpath" = x; then
53557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53558$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53559    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53560  fi
53561
53562  # Call helper function which possibly converts this using DOS-style short mode.
53563  # If so, the updated path is stored in $new_path.
53564
53565  input_path="$new_path"
53566  # Check if we need to convert this using DOS-style short mode. If the path
53567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53568  # take no chances and rewrite it.
53569  # Note: m4 eats our [], so we need to use [ and ] instead.
53570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53571  if test "x$has_forbidden_chars" != x; then
53572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53576      # Going to short mode and back again did indeed matter. Since short mode is
53577      # case insensitive, let's make it lowercase to improve readability.
53578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53579      # Now convert it back to Unix-style (cygpath)
53580      input_path=`$CYGPATH -u "$shortmode_path"`
53581      new_path="$input_path"
53582    fi
53583  fi
53584
53585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53586  if test "x$test_cygdrive_prefix" = x; then
53587    # As a simple fix, exclude /usr/bin since it's not a real path.
53588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53590      # a path prefixed by /cygdrive for fixpath to work.
53591      new_path="$CYGWIN_ROOT_PATH$input_path"
53592    fi
53593  fi
53594
53595
53596  if test "x$path" != "x$new_path"; then
53597    MSVC_DLL="$new_path"
53598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53599$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53600  fi
53601
53602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53603
53604  path="$MSVC_DLL"
53605  has_colon=`$ECHO $path | $GREP ^.:`
53606  new_path="$path"
53607  if test "x$has_colon" = x; then
53608    # Not in mixed or Windows style, start by that.
53609    new_path=`cmd //c echo $path`
53610  fi
53611
53612
53613  input_path="$new_path"
53614  # Check if we need to convert this using DOS-style short mode. If the path
53615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53616  # take no chances and rewrite it.
53617  # Note: m4 eats our [], so we need to use [ and ] instead.
53618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53619  if test "x$has_forbidden_chars" != x; then
53620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53622  fi
53623
53624
53625  windows_path="$new_path"
53626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53627    unix_path=`$CYGPATH -u "$windows_path"`
53628    new_path="$unix_path"
53629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53631    new_path="$unix_path"
53632  fi
53633
53634  if test "x$path" != "x$new_path"; then
53635    MSVC_DLL="$new_path"
53636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53637$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53638  fi
53639
53640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53642
53643    else
53644      # We're on a unix platform. Hooray! :)
53645      path="$MSVC_DLL"
53646      has_space=`$ECHO "$path" | $GREP " "`
53647      if test "x$has_space" != x; then
53648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53649$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53651      fi
53652
53653      # Use eval to expand a potential ~
53654      eval path="$path"
53655      if test ! -f "$path" && test ! -d "$path"; then
53656        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53657      fi
53658
53659      if test -d "$path"; then
53660        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53661      else
53662        dir="`$DIRNAME "$path"`"
53663        base="`$BASENAME "$path"`"
53664        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53665      fi
53666    fi
53667  fi
53668
53669      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53670$as_echo_n "checking for $DLL_NAME... " >&6; }
53671      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53672$as_echo "$MSVC_DLL" >&6; }
53673    else
53674      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53675$as_echo "incorrect, ignoring" >&6; }
53676      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53677$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53678    fi
53679  fi
53680
53681  fi
53682
53683  if test "x$MSVC_DLL" = x; then
53684    # Probe: Look in the Windows system32 directory
53685    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53686
53687  windows_path="$CYGWIN_SYSTEMROOT"
53688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53689    unix_path=`$CYGPATH -u "$windows_path"`
53690    CYGWIN_SYSTEMROOT="$unix_path"
53691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53693    CYGWIN_SYSTEMROOT="$unix_path"
53694  fi
53695
53696    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53697
53698  DLL_NAME="$DLL_NAME"
53699  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53700  METHOD="well-known location in SYSTEMROOT"
53701  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53702    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53703$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53704
53705    # Need to check if the found msvcr is correct architecture
53706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53707$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53708    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53709    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53710      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53711      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53712      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53713        CORRECT_MSVCR_ARCH="PE32 executable"
53714      else
53715        CORRECT_MSVCR_ARCH="PE32+ executable"
53716      fi
53717    else
53718      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53719        CORRECT_MSVCR_ARCH=386
53720      else
53721        CORRECT_MSVCR_ARCH=x86-64
53722      fi
53723    fi
53724    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53726$as_echo "ok" >&6; }
53727      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53728
53729  # Only process if variable expands to non-empty
53730
53731  if test "x$MSVC_DLL" != x; then
53732    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53733
53734  # Input might be given as Windows format, start by converting to
53735  # unix format.
53736  path="$MSVC_DLL"
53737  new_path=`$CYGPATH -u "$path"`
53738
53739  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53740  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53741  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53742  # "foo.exe" is OK but "foo" is an error.
53743  #
53744  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53745  # It is also a way to make sure we got the proper file name for the real test later on.
53746  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53747  if test "x$test_shortpath" = x; then
53748    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53749$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53750    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53751  fi
53752
53753  # Call helper function which possibly converts this using DOS-style short mode.
53754  # If so, the updated path is stored in $new_path.
53755
53756  input_path="$new_path"
53757  # Check if we need to convert this using DOS-style short mode. If the path
53758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53759  # take no chances and rewrite it.
53760  # Note: m4 eats our [], so we need to use [ and ] instead.
53761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53762  if test "x$has_forbidden_chars" != x; then
53763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53764    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53765    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53766    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53767      # Going to short mode and back again did indeed matter. Since short mode is
53768      # case insensitive, let's make it lowercase to improve readability.
53769      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53770      # Now convert it back to Unix-style (cygpath)
53771      input_path=`$CYGPATH -u "$shortmode_path"`
53772      new_path="$input_path"
53773    fi
53774  fi
53775
53776  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53777  if test "x$test_cygdrive_prefix" = x; then
53778    # As a simple fix, exclude /usr/bin since it's not a real path.
53779    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53780      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53781      # a path prefixed by /cygdrive for fixpath to work.
53782      new_path="$CYGWIN_ROOT_PATH$input_path"
53783    fi
53784  fi
53785
53786
53787  if test "x$path" != "x$new_path"; then
53788    MSVC_DLL="$new_path"
53789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53790$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53791  fi
53792
53793    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53794
53795  path="$MSVC_DLL"
53796  has_colon=`$ECHO $path | $GREP ^.:`
53797  new_path="$path"
53798  if test "x$has_colon" = x; then
53799    # Not in mixed or Windows style, start by that.
53800    new_path=`cmd //c echo $path`
53801  fi
53802
53803
53804  input_path="$new_path"
53805  # Check if we need to convert this using DOS-style short mode. If the path
53806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53807  # take no chances and rewrite it.
53808  # Note: m4 eats our [], so we need to use [ and ] instead.
53809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53810  if test "x$has_forbidden_chars" != x; then
53811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53812    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53813  fi
53814
53815
53816  windows_path="$new_path"
53817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53818    unix_path=`$CYGPATH -u "$windows_path"`
53819    new_path="$unix_path"
53820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53822    new_path="$unix_path"
53823  fi
53824
53825  if test "x$path" != "x$new_path"; then
53826    MSVC_DLL="$new_path"
53827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53828$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53829  fi
53830
53831  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53832  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53833
53834    else
53835      # We're on a unix platform. Hooray! :)
53836      path="$MSVC_DLL"
53837      has_space=`$ECHO "$path" | $GREP " "`
53838      if test "x$has_space" != x; then
53839        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53840$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53841        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53842      fi
53843
53844      # Use eval to expand a potential ~
53845      eval path="$path"
53846      if test ! -f "$path" && test ! -d "$path"; then
53847        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53848      fi
53849
53850      if test -d "$path"; then
53851        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53852      else
53853        dir="`$DIRNAME "$path"`"
53854        base="`$BASENAME "$path"`"
53855        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53856      fi
53857    fi
53858  fi
53859
53860      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53861$as_echo_n "checking for $DLL_NAME... " >&6; }
53862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53863$as_echo "$MSVC_DLL" >&6; }
53864    else
53865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53866$as_echo "incorrect, ignoring" >&6; }
53867      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53868$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53869    fi
53870  fi
53871
53872  fi
53873
53874  if test "x$MSVC_DLL" = x; then
53875    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
53876    if test "x$VS100COMNTOOLS" != x; then
53877      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
53878
53879  windows_path="$CYGWIN_VS_TOOLS_DIR"
53880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53881    unix_path=`$CYGPATH -u "$windows_path"`
53882    CYGWIN_VS_TOOLS_DIR="$unix_path"
53883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53885    CYGWIN_VS_TOOLS_DIR="$unix_path"
53886  fi
53887
53888      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53889        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53890	    | $GREP -i /x64/ | $HEAD --lines 1`
53891      else
53892        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53893	    | $GREP -i /x86/ | $HEAD --lines 1`
53894      fi
53895
53896  DLL_NAME="$DLL_NAME"
53897  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53898  METHOD="search of VS100COMNTOOLS"
53899  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53900    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53901$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53902
53903    # Need to check if the found msvcr is correct architecture
53904    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53905$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53906    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53907    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53908      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53909      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53910      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53911        CORRECT_MSVCR_ARCH="PE32 executable"
53912      else
53913        CORRECT_MSVCR_ARCH="PE32+ executable"
53914      fi
53915    else
53916      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53917        CORRECT_MSVCR_ARCH=386
53918      else
53919        CORRECT_MSVCR_ARCH=x86-64
53920      fi
53921    fi
53922    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53923      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53924$as_echo "ok" >&6; }
53925      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53926
53927  # Only process if variable expands to non-empty
53928
53929  if test "x$MSVC_DLL" != x; then
53930    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53931
53932  # Input might be given as Windows format, start by converting to
53933  # unix format.
53934  path="$MSVC_DLL"
53935  new_path=`$CYGPATH -u "$path"`
53936
53937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53940  # "foo.exe" is OK but "foo" is an error.
53941  #
53942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53943  # It is also a way to make sure we got the proper file name for the real test later on.
53944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53945  if test "x$test_shortpath" = x; then
53946    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53947$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53948    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53949  fi
53950
53951  # Call helper function which possibly converts this using DOS-style short mode.
53952  # If so, the updated path is stored in $new_path.
53953
53954  input_path="$new_path"
53955  # Check if we need to convert this using DOS-style short mode. If the path
53956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53957  # take no chances and rewrite it.
53958  # Note: m4 eats our [], so we need to use [ and ] instead.
53959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53960  if test "x$has_forbidden_chars" != x; then
53961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53965      # Going to short mode and back again did indeed matter. Since short mode is
53966      # case insensitive, let's make it lowercase to improve readability.
53967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53968      # Now convert it back to Unix-style (cygpath)
53969      input_path=`$CYGPATH -u "$shortmode_path"`
53970      new_path="$input_path"
53971    fi
53972  fi
53973
53974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53975  if test "x$test_cygdrive_prefix" = x; then
53976    # As a simple fix, exclude /usr/bin since it's not a real path.
53977    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53979      # a path prefixed by /cygdrive for fixpath to work.
53980      new_path="$CYGWIN_ROOT_PATH$input_path"
53981    fi
53982  fi
53983
53984
53985  if test "x$path" != "x$new_path"; then
53986    MSVC_DLL="$new_path"
53987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53988$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53989  fi
53990
53991    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53992
53993  path="$MSVC_DLL"
53994  has_colon=`$ECHO $path | $GREP ^.:`
53995  new_path="$path"
53996  if test "x$has_colon" = x; then
53997    # Not in mixed or Windows style, start by that.
53998    new_path=`cmd //c echo $path`
53999  fi
54000
54001
54002  input_path="$new_path"
54003  # Check if we need to convert this using DOS-style short mode. If the path
54004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54005  # take no chances and rewrite it.
54006  # Note: m4 eats our [], so we need to use [ and ] instead.
54007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54008  if test "x$has_forbidden_chars" != x; then
54009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54011  fi
54012
54013
54014  windows_path="$new_path"
54015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54016    unix_path=`$CYGPATH -u "$windows_path"`
54017    new_path="$unix_path"
54018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54020    new_path="$unix_path"
54021  fi
54022
54023  if test "x$path" != "x$new_path"; then
54024    MSVC_DLL="$new_path"
54025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54026$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54027  fi
54028
54029  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54030  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54031
54032    else
54033      # We're on a unix platform. Hooray! :)
54034      path="$MSVC_DLL"
54035      has_space=`$ECHO "$path" | $GREP " "`
54036      if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
54040      fi
54041
54042      # Use eval to expand a potential ~
54043      eval path="$path"
54044      if test ! -f "$path" && test ! -d "$path"; then
54045        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54046      fi
54047
54048      if test -d "$path"; then
54049        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54050      else
54051        dir="`$DIRNAME "$path"`"
54052        base="`$BASENAME "$path"`"
54053        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54054      fi
54055    fi
54056  fi
54057
54058      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54059$as_echo_n "checking for $DLL_NAME... " >&6; }
54060      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54061$as_echo "$MSVC_DLL" >&6; }
54062    else
54063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54064$as_echo "incorrect, ignoring" >&6; }
54065      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54066$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54067    fi
54068  fi
54069
54070    fi
54071  fi
54072
54073  if test "x$MSVC_DLL" = x; then
54074    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54075    # (This was the original behaviour; kept since it might turn something up)
54076    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54077      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54078        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54079	    | $GREP x64 | $HEAD --lines 1`
54080      else
54081        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54082	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54083        if test "x$POSSIBLE_MSVC_DLL" = x; then
54084          # We're grasping at straws now...
54085          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54086	      | $HEAD --lines 1`
54087        fi
54088      fi
54089
54090
54091  DLL_NAME="$DLL_NAME"
54092  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54093  METHOD="search of VCINSTALLDIR"
54094  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54095    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54096$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54097
54098    # Need to check if the found msvcr is correct architecture
54099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54100$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54101    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54102    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54103      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54104      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54105      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54106        CORRECT_MSVCR_ARCH="PE32 executable"
54107      else
54108        CORRECT_MSVCR_ARCH="PE32+ executable"
54109      fi
54110    else
54111      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54112        CORRECT_MSVCR_ARCH=386
54113      else
54114        CORRECT_MSVCR_ARCH=x86-64
54115      fi
54116    fi
54117    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54119$as_echo "ok" >&6; }
54120      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54121
54122  # Only process if variable expands to non-empty
54123
54124  if test "x$MSVC_DLL" != x; then
54125    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54126
54127  # Input might be given as Windows format, start by converting to
54128  # unix format.
54129  path="$MSVC_DLL"
54130  new_path=`$CYGPATH -u "$path"`
54131
54132  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54133  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54134  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54135  # "foo.exe" is OK but "foo" is an error.
54136  #
54137  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54138  # It is also a way to make sure we got the proper file name for the real test later on.
54139  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54140  if test "x$test_shortpath" = x; then
54141    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54142$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54143    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54144  fi
54145
54146  # Call helper function which possibly converts this using DOS-style short mode.
54147  # If so, the updated path is stored in $new_path.
54148
54149  input_path="$new_path"
54150  # Check if we need to convert this using DOS-style short mode. If the path
54151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54152  # take no chances and rewrite it.
54153  # Note: m4 eats our [], so we need to use [ and ] instead.
54154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54155  if test "x$has_forbidden_chars" != x; then
54156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54160      # Going to short mode and back again did indeed matter. Since short mode is
54161      # case insensitive, let's make it lowercase to improve readability.
54162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54163      # Now convert it back to Unix-style (cygpath)
54164      input_path=`$CYGPATH -u "$shortmode_path"`
54165      new_path="$input_path"
54166    fi
54167  fi
54168
54169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54170  if test "x$test_cygdrive_prefix" = x; then
54171    # As a simple fix, exclude /usr/bin since it's not a real path.
54172    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54174      # a path prefixed by /cygdrive for fixpath to work.
54175      new_path="$CYGWIN_ROOT_PATH$input_path"
54176    fi
54177  fi
54178
54179
54180  if test "x$path" != "x$new_path"; then
54181    MSVC_DLL="$new_path"
54182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54183$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54184  fi
54185
54186    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54187
54188  path="$MSVC_DLL"
54189  has_colon=`$ECHO $path | $GREP ^.:`
54190  new_path="$path"
54191  if test "x$has_colon" = x; then
54192    # Not in mixed or Windows style, start by that.
54193    new_path=`cmd //c echo $path`
54194  fi
54195
54196
54197  input_path="$new_path"
54198  # Check if we need to convert this using DOS-style short mode. If the path
54199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54200  # take no chances and rewrite it.
54201  # Note: m4 eats our [], so we need to use [ and ] instead.
54202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54203  if test "x$has_forbidden_chars" != x; then
54204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54206  fi
54207
54208
54209  windows_path="$new_path"
54210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54211    unix_path=`$CYGPATH -u "$windows_path"`
54212    new_path="$unix_path"
54213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54215    new_path="$unix_path"
54216  fi
54217
54218  if test "x$path" != "x$new_path"; then
54219    MSVC_DLL="$new_path"
54220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54221$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54222  fi
54223
54224  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54225  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54226
54227    else
54228      # We're on a unix platform. Hooray! :)
54229      path="$MSVC_DLL"
54230      has_space=`$ECHO "$path" | $GREP " "`
54231      if test "x$has_space" != x; then
54232        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54233$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54234        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54235      fi
54236
54237      # Use eval to expand a potential ~
54238      eval path="$path"
54239      if test ! -f "$path" && test ! -d "$path"; then
54240        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54241      fi
54242
54243      if test -d "$path"; then
54244        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54245      else
54246        dir="`$DIRNAME "$path"`"
54247        base="`$BASENAME "$path"`"
54248        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54249      fi
54250    fi
54251  fi
54252
54253      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54254$as_echo_n "checking for $DLL_NAME... " >&6; }
54255      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54256$as_echo "$MSVC_DLL" >&6; }
54257    else
54258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54259$as_echo "incorrect, ignoring" >&6; }
54260      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54261$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54262    fi
54263  fi
54264
54265    fi
54266  fi
54267
54268  if test "x$MSVC_DLL" = x; then
54269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54270$as_echo_n "checking for $DLL_NAME... " >&6; }
54271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54272$as_echo "no" >&6; }
54273    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54274  fi
54275
54276    MSVCR_DLL="$MSVC_DLL"
54277  fi
54278
54279
54280
54281# Check whether --with-msvcp-dll was given.
54282if test "${with_msvcp_dll+set}" = set; then :
54283  withval=$with_msvcp_dll;
54284fi
54285
54286
54287  if test "x$MSVCP_NAME" != "x"; then
54288    if test "x$with_msvcp_dll" != x; then
54289      # If given explicitly by user, do not probe. If not present, fail directly.
54290
54291  DLL_NAME="$MSVCP_NAME"
54292  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54293  METHOD="--with-msvcp-dll"
54294  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54295    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54296$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54297
54298    # Need to check if the found msvcr is correct architecture
54299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54300$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54301    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54303      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54304      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54305      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54306        CORRECT_MSVCR_ARCH="PE32 executable"
54307      else
54308        CORRECT_MSVCR_ARCH="PE32+ executable"
54309      fi
54310    else
54311      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54312        CORRECT_MSVCR_ARCH=386
54313      else
54314        CORRECT_MSVCR_ARCH=x86-64
54315      fi
54316    fi
54317    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54318      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54319$as_echo "ok" >&6; }
54320      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54321
54322  # Only process if variable expands to non-empty
54323
54324  if test "x$MSVC_DLL" != x; then
54325    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54326
54327  # Input might be given as Windows format, start by converting to
54328  # unix format.
54329  path="$MSVC_DLL"
54330  new_path=`$CYGPATH -u "$path"`
54331
54332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54335  # "foo.exe" is OK but "foo" is an error.
54336  #
54337  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54338  # It is also a way to make sure we got the proper file name for the real test later on.
54339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54340  if test "x$test_shortpath" = x; then
54341    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54342$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54343    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54344  fi
54345
54346  # Call helper function which possibly converts this using DOS-style short mode.
54347  # If so, the updated path is stored in $new_path.
54348
54349  input_path="$new_path"
54350  # Check if we need to convert this using DOS-style short mode. If the path
54351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54352  # take no chances and rewrite it.
54353  # Note: m4 eats our [], so we need to use [ and ] instead.
54354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54355  if test "x$has_forbidden_chars" != x; then
54356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54357    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54358    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54359    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54360      # Going to short mode and back again did indeed matter. Since short mode is
54361      # case insensitive, let's make it lowercase to improve readability.
54362      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54363      # Now convert it back to Unix-style (cygpath)
54364      input_path=`$CYGPATH -u "$shortmode_path"`
54365      new_path="$input_path"
54366    fi
54367  fi
54368
54369  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54370  if test "x$test_cygdrive_prefix" = x; then
54371    # As a simple fix, exclude /usr/bin since it's not a real path.
54372    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54373      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54374      # a path prefixed by /cygdrive for fixpath to work.
54375      new_path="$CYGWIN_ROOT_PATH$input_path"
54376    fi
54377  fi
54378
54379
54380  if test "x$path" != "x$new_path"; then
54381    MSVC_DLL="$new_path"
54382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54383$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54384  fi
54385
54386    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54387
54388  path="$MSVC_DLL"
54389  has_colon=`$ECHO $path | $GREP ^.:`
54390  new_path="$path"
54391  if test "x$has_colon" = x; then
54392    # Not in mixed or Windows style, start by that.
54393    new_path=`cmd //c echo $path`
54394  fi
54395
54396
54397  input_path="$new_path"
54398  # Check if we need to convert this using DOS-style short mode. If the path
54399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54400  # take no chances and rewrite it.
54401  # Note: m4 eats our [], so we need to use [ and ] instead.
54402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54403  if test "x$has_forbidden_chars" != x; then
54404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54405    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54406  fi
54407
54408
54409  windows_path="$new_path"
54410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54411    unix_path=`$CYGPATH -u "$windows_path"`
54412    new_path="$unix_path"
54413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54415    new_path="$unix_path"
54416  fi
54417
54418  if test "x$path" != "x$new_path"; then
54419    MSVC_DLL="$new_path"
54420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54421$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54422  fi
54423
54424  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54425  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54426
54427    else
54428      # We're on a unix platform. Hooray! :)
54429      path="$MSVC_DLL"
54430      has_space=`$ECHO "$path" | $GREP " "`
54431      if test "x$has_space" != x; then
54432        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54433$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54434        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54435      fi
54436
54437      # Use eval to expand a potential ~
54438      eval path="$path"
54439      if test ! -f "$path" && test ! -d "$path"; then
54440        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54441      fi
54442
54443      if test -d "$path"; then
54444        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54445      else
54446        dir="`$DIRNAME "$path"`"
54447        base="`$BASENAME "$path"`"
54448        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54449      fi
54450    fi
54451  fi
54452
54453      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54454$as_echo_n "checking for $DLL_NAME... " >&6; }
54455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54456$as_echo "$MSVC_DLL" >&6; }
54457    else
54458      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54459$as_echo "incorrect, ignoring" >&6; }
54460      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54461$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54462    fi
54463  fi
54464
54465      if test "x$MSVC_DLL" = x; then
54466        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54467      fi
54468      MSVCP_DLL="$MSVC_DLL"
54469    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54470
54471  DLL_NAME="$MSVCP_NAME"
54472  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54473  METHOD="devkit"
54474  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54475    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54476$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54477
54478    # Need to check if the found msvcr is correct architecture
54479    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54480$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54481    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54482    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54483      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54484      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54485      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54486        CORRECT_MSVCR_ARCH="PE32 executable"
54487      else
54488        CORRECT_MSVCR_ARCH="PE32+ executable"
54489      fi
54490    else
54491      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54492        CORRECT_MSVCR_ARCH=386
54493      else
54494        CORRECT_MSVCR_ARCH=x86-64
54495      fi
54496    fi
54497    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54499$as_echo "ok" >&6; }
54500      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54501
54502  # Only process if variable expands to non-empty
54503
54504  if test "x$MSVC_DLL" != x; then
54505    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54506
54507  # Input might be given as Windows format, start by converting to
54508  # unix format.
54509  path="$MSVC_DLL"
54510  new_path=`$CYGPATH -u "$path"`
54511
54512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54515  # "foo.exe" is OK but "foo" is an error.
54516  #
54517  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54518  # It is also a way to make sure we got the proper file name for the real test later on.
54519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54520  if test "x$test_shortpath" = 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 $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54524  fi
54525
54526  # Call helper function which possibly converts this using DOS-style short mode.
54527  # If so, the updated path is stored in $new_path.
54528
54529  input_path="$new_path"
54530  # Check if we need to convert this using DOS-style short mode. If the path
54531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54532  # take no chances and rewrite it.
54533  # Note: m4 eats our [], so we need to use [ and ] instead.
54534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54535  if test "x$has_forbidden_chars" != x; then
54536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54540      # Going to short mode and back again did indeed matter. Since short mode is
54541      # case insensitive, let's make it lowercase to improve readability.
54542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54543      # Now convert it back to Unix-style (cygpath)
54544      input_path=`$CYGPATH -u "$shortmode_path"`
54545      new_path="$input_path"
54546    fi
54547  fi
54548
54549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54550  if test "x$test_cygdrive_prefix" = x; then
54551    # As a simple fix, exclude /usr/bin since it's not a real path.
54552    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54554      # a path prefixed by /cygdrive for fixpath to work.
54555      new_path="$CYGWIN_ROOT_PATH$input_path"
54556    fi
54557  fi
54558
54559
54560  if test "x$path" != "x$new_path"; then
54561    MSVC_DLL="$new_path"
54562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54563$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54564  fi
54565
54566    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54567
54568  path="$MSVC_DLL"
54569  has_colon=`$ECHO $path | $GREP ^.:`
54570  new_path="$path"
54571  if test "x$has_colon" = x; then
54572    # Not in mixed or Windows style, start by that.
54573    new_path=`cmd //c echo $path`
54574  fi
54575
54576
54577  input_path="$new_path"
54578  # Check if we need to convert this using DOS-style short mode. If the path
54579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54580  # take no chances and rewrite it.
54581  # Note: m4 eats our [], so we need to use [ and ] instead.
54582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54583  if test "x$has_forbidden_chars" != x; then
54584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54586  fi
54587
54588
54589  windows_path="$new_path"
54590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54591    unix_path=`$CYGPATH -u "$windows_path"`
54592    new_path="$unix_path"
54593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54595    new_path="$unix_path"
54596  fi
54597
54598  if test "x$path" != "x$new_path"; then
54599    MSVC_DLL="$new_path"
54600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54601$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54602  fi
54603
54604  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54605  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54606
54607    else
54608      # We're on a unix platform. Hooray! :)
54609      path="$MSVC_DLL"
54610      has_space=`$ECHO "$path" | $GREP " "`
54611      if test "x$has_space" != x; then
54612        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54613$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54614        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54615      fi
54616
54617      # Use eval to expand a potential ~
54618      eval path="$path"
54619      if test ! -f "$path" && test ! -d "$path"; then
54620        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54621      fi
54622
54623      if test -d "$path"; then
54624        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54625      else
54626        dir="`$DIRNAME "$path"`"
54627        base="`$BASENAME "$path"`"
54628        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54629      fi
54630    fi
54631  fi
54632
54633      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54634$as_echo_n "checking for $DLL_NAME... " >&6; }
54635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54636$as_echo "$MSVC_DLL" >&6; }
54637    else
54638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54639$as_echo "incorrect, ignoring" >&6; }
54640      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54641$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54642    fi
54643  fi
54644
54645      if test "x$MSVC_DLL" = x; then
54646        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54647      fi
54648      MSVCP_DLL="$MSVC_DLL"
54649    else
54650
54651  DLL_NAME="${MSVCP_NAME}"
54652  MSVC_DLL=
54653
54654  if test "x$MSVC_DLL" = x; then
54655    # Probe: Using well-known location from Visual Studio 10.0
54656    if test "x$VCINSTALLDIR" != x; then
54657      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54658
54659  windows_path="$CYGWIN_VC_INSTALL_DIR"
54660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54661    unix_path=`$CYGPATH -u "$windows_path"`
54662    CYGWIN_VC_INSTALL_DIR="$unix_path"
54663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54665    CYGWIN_VC_INSTALL_DIR="$unix_path"
54666  fi
54667
54668      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54669        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54670      else
54671        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54672      fi
54673      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54674
54675  DLL_NAME="$DLL_NAME"
54676  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54677  METHOD="well-known location in VCINSTALLDIR"
54678  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54679    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54680$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54681
54682    # Need to check if the found msvcr is correct architecture
54683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54684$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54685    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54687      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54688      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54689      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54690        CORRECT_MSVCR_ARCH="PE32 executable"
54691      else
54692        CORRECT_MSVCR_ARCH="PE32+ executable"
54693      fi
54694    else
54695      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54696        CORRECT_MSVCR_ARCH=386
54697      else
54698        CORRECT_MSVCR_ARCH=x86-64
54699      fi
54700    fi
54701    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54703$as_echo "ok" >&6; }
54704      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54705
54706  # Only process if variable expands to non-empty
54707
54708  if test "x$MSVC_DLL" != x; then
54709    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54710
54711  # Input might be given as Windows format, start by converting to
54712  # unix format.
54713  path="$MSVC_DLL"
54714  new_path=`$CYGPATH -u "$path"`
54715
54716  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54717  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54718  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54719  # "foo.exe" is OK but "foo" is an error.
54720  #
54721  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54722  # It is also a way to make sure we got the proper file name for the real test later on.
54723  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54724  if test "x$test_shortpath" = x; then
54725    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54726$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54727    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54728  fi
54729
54730  # Call helper function which possibly converts this using DOS-style short mode.
54731  # If so, the updated path is stored in $new_path.
54732
54733  input_path="$new_path"
54734  # Check if we need to convert this using DOS-style short mode. If the path
54735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54736  # take no chances and rewrite it.
54737  # Note: m4 eats our [], so we need to use [ and ] instead.
54738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54739  if test "x$has_forbidden_chars" != x; then
54740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54744      # Going to short mode and back again did indeed matter. Since short mode is
54745      # case insensitive, let's make it lowercase to improve readability.
54746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54747      # Now convert it back to Unix-style (cygpath)
54748      input_path=`$CYGPATH -u "$shortmode_path"`
54749      new_path="$input_path"
54750    fi
54751  fi
54752
54753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54754  if test "x$test_cygdrive_prefix" = x; then
54755    # As a simple fix, exclude /usr/bin since it's not a real path.
54756    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54758      # a path prefixed by /cygdrive for fixpath to work.
54759      new_path="$CYGWIN_ROOT_PATH$input_path"
54760    fi
54761  fi
54762
54763
54764  if test "x$path" != "x$new_path"; then
54765    MSVC_DLL="$new_path"
54766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54767$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54768  fi
54769
54770    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54771
54772  path="$MSVC_DLL"
54773  has_colon=`$ECHO $path | $GREP ^.:`
54774  new_path="$path"
54775  if test "x$has_colon" = x; then
54776    # Not in mixed or Windows style, start by that.
54777    new_path=`cmd //c echo $path`
54778  fi
54779
54780
54781  input_path="$new_path"
54782  # Check if we need to convert this using DOS-style short mode. If the path
54783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54784  # take no chances and rewrite it.
54785  # Note: m4 eats our [], so we need to use [ and ] instead.
54786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54787  if test "x$has_forbidden_chars" != x; then
54788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54790  fi
54791
54792
54793  windows_path="$new_path"
54794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54795    unix_path=`$CYGPATH -u "$windows_path"`
54796    new_path="$unix_path"
54797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54799    new_path="$unix_path"
54800  fi
54801
54802  if test "x$path" != "x$new_path"; then
54803    MSVC_DLL="$new_path"
54804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54805$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54806  fi
54807
54808  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54809  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54810
54811    else
54812      # We're on a unix platform. Hooray! :)
54813      path="$MSVC_DLL"
54814      has_space=`$ECHO "$path" | $GREP " "`
54815      if test "x$has_space" != x; then
54816        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54817$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54818        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54819      fi
54820
54821      # Use eval to expand a potential ~
54822      eval path="$path"
54823      if test ! -f "$path" && test ! -d "$path"; then
54824        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54825      fi
54826
54827      if test -d "$path"; then
54828        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54829      else
54830        dir="`$DIRNAME "$path"`"
54831        base="`$BASENAME "$path"`"
54832        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54833      fi
54834    fi
54835  fi
54836
54837      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54838$as_echo_n "checking for $DLL_NAME... " >&6; }
54839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54840$as_echo "$MSVC_DLL" >&6; }
54841    else
54842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54843$as_echo "incorrect, ignoring" >&6; }
54844      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54845$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54846    fi
54847  fi
54848
54849    fi
54850  fi
54851
54852  if test "x$MSVC_DLL" = x; then
54853    # Probe: Check in the Boot JDK directory.
54854    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54855
54856  DLL_NAME="$DLL_NAME"
54857  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54858  METHOD="well-known location in Boot JDK"
54859  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54860    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54861$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54862
54863    # Need to check if the found msvcr is correct architecture
54864    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54865$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54866    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54868      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54869      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54870      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54871        CORRECT_MSVCR_ARCH="PE32 executable"
54872      else
54873        CORRECT_MSVCR_ARCH="PE32+ executable"
54874      fi
54875    else
54876      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54877        CORRECT_MSVCR_ARCH=386
54878      else
54879        CORRECT_MSVCR_ARCH=x86-64
54880      fi
54881    fi
54882    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54883      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54884$as_echo "ok" >&6; }
54885      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54886
54887  # Only process if variable expands to non-empty
54888
54889  if test "x$MSVC_DLL" != x; then
54890    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54891
54892  # Input might be given as Windows format, start by converting to
54893  # unix format.
54894  path="$MSVC_DLL"
54895  new_path=`$CYGPATH -u "$path"`
54896
54897  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54898  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54899  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54900  # "foo.exe" is OK but "foo" is an error.
54901  #
54902  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54903  # It is also a way to make sure we got the proper file name for the real test later on.
54904  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54905  if test "x$test_shortpath" = x; then
54906    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54907$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54908    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54909  fi
54910
54911  # Call helper function which possibly converts this using DOS-style short mode.
54912  # If so, the updated path is stored in $new_path.
54913
54914  input_path="$new_path"
54915  # Check if we need to convert this using DOS-style short mode. If the path
54916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54917  # take no chances and rewrite it.
54918  # Note: m4 eats our [], so we need to use [ and ] instead.
54919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54920  if test "x$has_forbidden_chars" != x; then
54921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54925      # Going to short mode and back again did indeed matter. Since short mode is
54926      # case insensitive, let's make it lowercase to improve readability.
54927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54928      # Now convert it back to Unix-style (cygpath)
54929      input_path=`$CYGPATH -u "$shortmode_path"`
54930      new_path="$input_path"
54931    fi
54932  fi
54933
54934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54935  if test "x$test_cygdrive_prefix" = x; then
54936    # As a simple fix, exclude /usr/bin since it's not a real path.
54937    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54939      # a path prefixed by /cygdrive for fixpath to work.
54940      new_path="$CYGWIN_ROOT_PATH$input_path"
54941    fi
54942  fi
54943
54944
54945  if test "x$path" != "x$new_path"; then
54946    MSVC_DLL="$new_path"
54947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54948$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54949  fi
54950
54951    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54952
54953  path="$MSVC_DLL"
54954  has_colon=`$ECHO $path | $GREP ^.:`
54955  new_path="$path"
54956  if test "x$has_colon" = x; then
54957    # Not in mixed or Windows style, start by that.
54958    new_path=`cmd //c echo $path`
54959  fi
54960
54961
54962  input_path="$new_path"
54963  # Check if we need to convert this using DOS-style short mode. If the path
54964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54965  # take no chances and rewrite it.
54966  # Note: m4 eats our [], so we need to use [ and ] instead.
54967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54968  if test "x$has_forbidden_chars" != x; then
54969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54970    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54971  fi
54972
54973
54974  windows_path="$new_path"
54975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54976    unix_path=`$CYGPATH -u "$windows_path"`
54977    new_path="$unix_path"
54978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54980    new_path="$unix_path"
54981  fi
54982
54983  if test "x$path" != "x$new_path"; then
54984    MSVC_DLL="$new_path"
54985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54986$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54987  fi
54988
54989  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54990  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54991
54992    else
54993      # We're on a unix platform. Hooray! :)
54994      path="$MSVC_DLL"
54995      has_space=`$ECHO "$path" | $GREP " "`
54996      if test "x$has_space" != x; then
54997        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54998$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54999        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55000      fi
55001
55002      # Use eval to expand a potential ~
55003      eval path="$path"
55004      if test ! -f "$path" && test ! -d "$path"; then
55005        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55006      fi
55007
55008      if test -d "$path"; then
55009        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55010      else
55011        dir="`$DIRNAME "$path"`"
55012        base="`$BASENAME "$path"`"
55013        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55014      fi
55015    fi
55016  fi
55017
55018      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55019$as_echo_n "checking for $DLL_NAME... " >&6; }
55020      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55021$as_echo "$MSVC_DLL" >&6; }
55022    else
55023      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55024$as_echo "incorrect, ignoring" >&6; }
55025      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55026$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55027    fi
55028  fi
55029
55030  fi
55031
55032  if test "x$MSVC_DLL" = x; then
55033    # Probe: Look in the Windows system32 directory
55034    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55035
55036  windows_path="$CYGWIN_SYSTEMROOT"
55037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55038    unix_path=`$CYGPATH -u "$windows_path"`
55039    CYGWIN_SYSTEMROOT="$unix_path"
55040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55042    CYGWIN_SYSTEMROOT="$unix_path"
55043  fi
55044
55045    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55046
55047  DLL_NAME="$DLL_NAME"
55048  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55049  METHOD="well-known location in SYSTEMROOT"
55050  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55051    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55052$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55053
55054    # Need to check if the found msvcr is correct architecture
55055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55056$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55057    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55058    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55059      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55060      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55061      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55062        CORRECT_MSVCR_ARCH="PE32 executable"
55063      else
55064        CORRECT_MSVCR_ARCH="PE32+ executable"
55065      fi
55066    else
55067      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55068        CORRECT_MSVCR_ARCH=386
55069      else
55070        CORRECT_MSVCR_ARCH=x86-64
55071      fi
55072    fi
55073    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55074      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55075$as_echo "ok" >&6; }
55076      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55077
55078  # Only process if variable expands to non-empty
55079
55080  if test "x$MSVC_DLL" != x; then
55081    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55082
55083  # Input might be given as Windows format, start by converting to
55084  # unix format.
55085  path="$MSVC_DLL"
55086  new_path=`$CYGPATH -u "$path"`
55087
55088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55091  # "foo.exe" is OK but "foo" is an error.
55092  #
55093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55094  # It is also a way to make sure we got the proper file name for the real test later on.
55095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55096  if test "x$test_shortpath" = x; then
55097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55098$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55099    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55100  fi
55101
55102  # Call helper function which possibly converts this using DOS-style short mode.
55103  # If so, the updated path is stored in $new_path.
55104
55105  input_path="$new_path"
55106  # Check if we need to convert this using DOS-style short mode. If the path
55107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55108  # take no chances and rewrite it.
55109  # Note: m4 eats our [], so we need to use [ and ] instead.
55110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55111  if test "x$has_forbidden_chars" != x; then
55112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55116      # Going to short mode and back again did indeed matter. Since short mode is
55117      # case insensitive, let's make it lowercase to improve readability.
55118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55119      # Now convert it back to Unix-style (cygpath)
55120      input_path=`$CYGPATH -u "$shortmode_path"`
55121      new_path="$input_path"
55122    fi
55123  fi
55124
55125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55126  if test "x$test_cygdrive_prefix" = x; then
55127    # As a simple fix, exclude /usr/bin since it's not a real path.
55128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55130      # a path prefixed by /cygdrive for fixpath to work.
55131      new_path="$CYGWIN_ROOT_PATH$input_path"
55132    fi
55133  fi
55134
55135
55136  if test "x$path" != "x$new_path"; then
55137    MSVC_DLL="$new_path"
55138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55139$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55140  fi
55141
55142    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55143
55144  path="$MSVC_DLL"
55145  has_colon=`$ECHO $path | $GREP ^.:`
55146  new_path="$path"
55147  if test "x$has_colon" = x; then
55148    # Not in mixed or Windows style, start by that.
55149    new_path=`cmd //c echo $path`
55150  fi
55151
55152
55153  input_path="$new_path"
55154  # Check if we need to convert this using DOS-style short mode. If the path
55155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55156  # take no chances and rewrite it.
55157  # Note: m4 eats our [], so we need to use [ and ] instead.
55158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55159  if test "x$has_forbidden_chars" != x; then
55160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55162  fi
55163
55164
55165  windows_path="$new_path"
55166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55167    unix_path=`$CYGPATH -u "$windows_path"`
55168    new_path="$unix_path"
55169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55171    new_path="$unix_path"
55172  fi
55173
55174  if test "x$path" != "x$new_path"; then
55175    MSVC_DLL="$new_path"
55176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55177$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55178  fi
55179
55180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55182
55183    else
55184      # We're on a unix platform. Hooray! :)
55185      path="$MSVC_DLL"
55186      has_space=`$ECHO "$path" | $GREP " "`
55187      if test "x$has_space" != x; then
55188        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55189$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55190        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55191      fi
55192
55193      # Use eval to expand a potential ~
55194      eval path="$path"
55195      if test ! -f "$path" && test ! -d "$path"; then
55196        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55197      fi
55198
55199      if test -d "$path"; then
55200        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55201      else
55202        dir="`$DIRNAME "$path"`"
55203        base="`$BASENAME "$path"`"
55204        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55205      fi
55206    fi
55207  fi
55208
55209      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55210$as_echo_n "checking for $DLL_NAME... " >&6; }
55211      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55212$as_echo "$MSVC_DLL" >&6; }
55213    else
55214      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55215$as_echo "incorrect, ignoring" >&6; }
55216      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55217$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55218    fi
55219  fi
55220
55221  fi
55222
55223  if test "x$MSVC_DLL" = x; then
55224    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55225    if test "x$VS100COMNTOOLS" != x; then
55226      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55227
55228  windows_path="$CYGWIN_VS_TOOLS_DIR"
55229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55230    unix_path=`$CYGPATH -u "$windows_path"`
55231    CYGWIN_VS_TOOLS_DIR="$unix_path"
55232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55234    CYGWIN_VS_TOOLS_DIR="$unix_path"
55235  fi
55236
55237      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55238        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55239	    | $GREP -i /x64/ | $HEAD --lines 1`
55240      else
55241        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55242	    | $GREP -i /x86/ | $HEAD --lines 1`
55243      fi
55244
55245  DLL_NAME="$DLL_NAME"
55246  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55247  METHOD="search of VS100COMNTOOLS"
55248  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55249    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55250$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55251
55252    # Need to check if the found msvcr is correct architecture
55253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55254$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55255    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55256    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55257      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55258      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55259      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55260        CORRECT_MSVCR_ARCH="PE32 executable"
55261      else
55262        CORRECT_MSVCR_ARCH="PE32+ executable"
55263      fi
55264    else
55265      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55266        CORRECT_MSVCR_ARCH=386
55267      else
55268        CORRECT_MSVCR_ARCH=x86-64
55269      fi
55270    fi
55271    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55272      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55273$as_echo "ok" >&6; }
55274      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55275
55276  # Only process if variable expands to non-empty
55277
55278  if test "x$MSVC_DLL" != x; then
55279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55280
55281  # Input might be given as Windows format, start by converting to
55282  # unix format.
55283  path="$MSVC_DLL"
55284  new_path=`$CYGPATH -u "$path"`
55285
55286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55289  # "foo.exe" is OK but "foo" is an error.
55290  #
55291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55292  # It is also a way to make sure we got the proper file name for the real test later on.
55293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55294  if test "x$test_shortpath" = x; then
55295    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55296$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55297    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55298  fi
55299
55300  # Call helper function which possibly converts this using DOS-style short mode.
55301  # If so, the updated path is stored in $new_path.
55302
55303  input_path="$new_path"
55304  # Check if we need to convert this using DOS-style short mode. If the path
55305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55306  # take no chances and rewrite it.
55307  # Note: m4 eats our [], so we need to use [ and ] instead.
55308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55309  if test "x$has_forbidden_chars" != x; then
55310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55314      # Going to short mode and back again did indeed matter. Since short mode is
55315      # case insensitive, let's make it lowercase to improve readability.
55316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55317      # Now convert it back to Unix-style (cygpath)
55318      input_path=`$CYGPATH -u "$shortmode_path"`
55319      new_path="$input_path"
55320    fi
55321  fi
55322
55323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55324  if test "x$test_cygdrive_prefix" = x; then
55325    # As a simple fix, exclude /usr/bin since it's not a real path.
55326    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55328      # a path prefixed by /cygdrive for fixpath to work.
55329      new_path="$CYGWIN_ROOT_PATH$input_path"
55330    fi
55331  fi
55332
55333
55334  if test "x$path" != "x$new_path"; then
55335    MSVC_DLL="$new_path"
55336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55337$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55338  fi
55339
55340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55341
55342  path="$MSVC_DLL"
55343  has_colon=`$ECHO $path | $GREP ^.:`
55344  new_path="$path"
55345  if test "x$has_colon" = x; then
55346    # Not in mixed or Windows style, start by that.
55347    new_path=`cmd //c echo $path`
55348  fi
55349
55350
55351  input_path="$new_path"
55352  # Check if we need to convert this using DOS-style short mode. If the path
55353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55354  # take no chances and rewrite it.
55355  # Note: m4 eats our [], so we need to use [ and ] instead.
55356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55357  if test "x$has_forbidden_chars" != x; then
55358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55360  fi
55361
55362
55363  windows_path="$new_path"
55364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55365    unix_path=`$CYGPATH -u "$windows_path"`
55366    new_path="$unix_path"
55367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55369    new_path="$unix_path"
55370  fi
55371
55372  if test "x$path" != "x$new_path"; then
55373    MSVC_DLL="$new_path"
55374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55375$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55376  fi
55377
55378  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55379  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55380
55381    else
55382      # We're on a unix platform. Hooray! :)
55383      path="$MSVC_DLL"
55384      has_space=`$ECHO "$path" | $GREP " "`
55385      if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
55389      fi
55390
55391      # Use eval to expand a potential ~
55392      eval path="$path"
55393      if test ! -f "$path" && test ! -d "$path"; then
55394        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55395      fi
55396
55397      if test -d "$path"; then
55398        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55399      else
55400        dir="`$DIRNAME "$path"`"
55401        base="`$BASENAME "$path"`"
55402        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55403      fi
55404    fi
55405  fi
55406
55407      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55408$as_echo_n "checking for $DLL_NAME... " >&6; }
55409      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55410$as_echo "$MSVC_DLL" >&6; }
55411    else
55412      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55413$as_echo "incorrect, ignoring" >&6; }
55414      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55415$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55416    fi
55417  fi
55418
55419    fi
55420  fi
55421
55422  if test "x$MSVC_DLL" = x; then
55423    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55424    # (This was the original behaviour; kept since it might turn something up)
55425    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55426      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55427        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55428	    | $GREP x64 | $HEAD --lines 1`
55429      else
55430        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55431	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55432        if test "x$POSSIBLE_MSVC_DLL" = x; then
55433          # We're grasping at straws now...
55434          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55435	      | $HEAD --lines 1`
55436        fi
55437      fi
55438
55439
55440  DLL_NAME="$DLL_NAME"
55441  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55442  METHOD="search of VCINSTALLDIR"
55443  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55444    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55445$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55446
55447    # Need to check if the found msvcr is correct architecture
55448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55449$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55450    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55452      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55453      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55454      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55455        CORRECT_MSVCR_ARCH="PE32 executable"
55456      else
55457        CORRECT_MSVCR_ARCH="PE32+ executable"
55458      fi
55459    else
55460      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55461        CORRECT_MSVCR_ARCH=386
55462      else
55463        CORRECT_MSVCR_ARCH=x86-64
55464      fi
55465    fi
55466    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55468$as_echo "ok" >&6; }
55469      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55470
55471  # Only process if variable expands to non-empty
55472
55473  if test "x$MSVC_DLL" != x; then
55474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55475
55476  # Input might be given as Windows format, start by converting to
55477  # unix format.
55478  path="$MSVC_DLL"
55479  new_path=`$CYGPATH -u "$path"`
55480
55481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55484  # "foo.exe" is OK but "foo" is an error.
55485  #
55486  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55487  # It is also a way to make sure we got the proper file name for the real test later on.
55488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55489  if test "x$test_shortpath" = x; then
55490    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55491$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55492    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55493  fi
55494
55495  # Call helper function which possibly converts this using DOS-style short mode.
55496  # If so, the updated path is stored in $new_path.
55497
55498  input_path="$new_path"
55499  # Check if we need to convert this using DOS-style short mode. If the path
55500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55501  # take no chances and rewrite it.
55502  # Note: m4 eats our [], so we need to use [ and ] instead.
55503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55504  if test "x$has_forbidden_chars" != x; then
55505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55509      # Going to short mode and back again did indeed matter. Since short mode is
55510      # case insensitive, let's make it lowercase to improve readability.
55511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55512      # Now convert it back to Unix-style (cygpath)
55513      input_path=`$CYGPATH -u "$shortmode_path"`
55514      new_path="$input_path"
55515    fi
55516  fi
55517
55518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55519  if test "x$test_cygdrive_prefix" = x; then
55520    # As a simple fix, exclude /usr/bin since it's not a real path.
55521    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55523      # a path prefixed by /cygdrive for fixpath to work.
55524      new_path="$CYGWIN_ROOT_PATH$input_path"
55525    fi
55526  fi
55527
55528
55529  if test "x$path" != "x$new_path"; then
55530    MSVC_DLL="$new_path"
55531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55532$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55533  fi
55534
55535    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55536
55537  path="$MSVC_DLL"
55538  has_colon=`$ECHO $path | $GREP ^.:`
55539  new_path="$path"
55540  if test "x$has_colon" = x; then
55541    # Not in mixed or Windows style, start by that.
55542    new_path=`cmd //c echo $path`
55543  fi
55544
55545
55546  input_path="$new_path"
55547  # Check if we need to convert this using DOS-style short mode. If the path
55548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55549  # take no chances and rewrite it.
55550  # Note: m4 eats our [], so we need to use [ and ] instead.
55551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55552  if test "x$has_forbidden_chars" != x; then
55553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55555  fi
55556
55557
55558  windows_path="$new_path"
55559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55560    unix_path=`$CYGPATH -u "$windows_path"`
55561    new_path="$unix_path"
55562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55564    new_path="$unix_path"
55565  fi
55566
55567  if test "x$path" != "x$new_path"; then
55568    MSVC_DLL="$new_path"
55569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55570$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55571  fi
55572
55573  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55574  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55575
55576    else
55577      # We're on a unix platform. Hooray! :)
55578      path="$MSVC_DLL"
55579      has_space=`$ECHO "$path" | $GREP " "`
55580      if test "x$has_space" != x; then
55581        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55582$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55583        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55584      fi
55585
55586      # Use eval to expand a potential ~
55587      eval path="$path"
55588      if test ! -f "$path" && test ! -d "$path"; then
55589        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55590      fi
55591
55592      if test -d "$path"; then
55593        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55594      else
55595        dir="`$DIRNAME "$path"`"
55596        base="`$BASENAME "$path"`"
55597        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55598      fi
55599    fi
55600  fi
55601
55602      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55603$as_echo_n "checking for $DLL_NAME... " >&6; }
55604      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55605$as_echo "$MSVC_DLL" >&6; }
55606    else
55607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55608$as_echo "incorrect, ignoring" >&6; }
55609      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55610$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55611    fi
55612  fi
55613
55614    fi
55615  fi
55616
55617  if test "x$MSVC_DLL" = x; then
55618    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55619$as_echo_n "checking for $DLL_NAME... " >&6; }
55620    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55621$as_echo "no" >&6; }
55622    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55623  fi
55624
55625      MSVCP_DLL="$MSVC_DLL"
55626    fi
55627
55628  fi
55629
55630  fi
55631
55632
55633  if test "x$NEEDS_LIB_X11" = xfalse; then
55634    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55635      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55636$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55637    fi
55638    X_CFLAGS=
55639    X_LIBS=
55640  else
55641
55642    if test "x${with_x}" = xno; then
55643      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55644    fi
55645
55646    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55647      # The user has specified a X11 base directory. Use it for includes and
55648      # libraries, unless explicitly overridden.
55649      if test "x$x_includes" = xNONE; then
55650        x_includes="${with_x}/include"
55651      fi
55652      if test "x$x_libraries" = xNONE; then
55653        x_libraries="${with_x}/lib"
55654      fi
55655    else
55656      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55657      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55658      # --x-libraries for the sysroot, if that seems to be correct.
55659      if test "x$SYSROOT" != "x"; then
55660        if test "x$x_includes" = xNONE; then
55661          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55662            x_includes="$SYSROOT/usr/X11R6/include"
55663          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55664            x_includes="$SYSROOT/usr/include"
55665          fi
55666        fi
55667        if test "x$x_libraries" = xNONE; then
55668          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55669            x_libraries="$SYSROOT/usr/X11R6/lib"
55670          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55671            x_libraries="$SYSROOT/usr/lib64"
55672          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55673            x_libraries="$SYSROOT/usr/lib"
55674          fi
55675        fi
55676      fi
55677    fi
55678
55679    # Now let autoconf do it's magic
55680    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55681$as_echo_n "checking for X... " >&6; }
55682
55683
55684# Check whether --with-x was given.
55685if test "${with_x+set}" = set; then :
55686  withval=$with_x;
55687fi
55688
55689# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55690if test "x$with_x" = xno; then
55691  # The user explicitly disabled X.
55692  have_x=disabled
55693else
55694  case $x_includes,$x_libraries in #(
55695    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55696    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55697  $as_echo_n "(cached) " >&6
55698else
55699  # One or both of the vars are not set, and there is no cached value.
55700ac_x_includes=no ac_x_libraries=no
55701rm -f -r conftest.dir
55702if mkdir conftest.dir; then
55703  cd conftest.dir
55704  cat >Imakefile <<'_ACEOF'
55705incroot:
55706	@echo incroot='${INCROOT}'
55707usrlibdir:
55708	@echo usrlibdir='${USRLIBDIR}'
55709libdir:
55710	@echo libdir='${LIBDIR}'
55711_ACEOF
55712  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55713    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55714    for ac_var in incroot usrlibdir libdir; do
55715      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55716    done
55717    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55718    for ac_extension in a so sl dylib la dll; do
55719      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55720	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55721	ac_im_usrlibdir=$ac_im_libdir; break
55722      fi
55723    done
55724    # Screen out bogus values from the imake configuration.  They are
55725    # bogus both because they are the default anyway, and because
55726    # using them would break gcc on systems where it needs fixed includes.
55727    case $ac_im_incroot in
55728	/usr/include) ac_x_includes= ;;
55729	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55730    esac
55731    case $ac_im_usrlibdir in
55732	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55733	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55734    esac
55735  fi
55736  cd ..
55737  rm -f -r conftest.dir
55738fi
55739
55740# Standard set of common directories for X headers.
55741# Check X11 before X11Rn because it is often a symlink to the current release.
55742ac_x_header_dirs='
55743/usr/X11/include
55744/usr/X11R7/include
55745/usr/X11R6/include
55746/usr/X11R5/include
55747/usr/X11R4/include
55748
55749/usr/include/X11
55750/usr/include/X11R7
55751/usr/include/X11R6
55752/usr/include/X11R5
55753/usr/include/X11R4
55754
55755/usr/local/X11/include
55756/usr/local/X11R7/include
55757/usr/local/X11R6/include
55758/usr/local/X11R5/include
55759/usr/local/X11R4/include
55760
55761/usr/local/include/X11
55762/usr/local/include/X11R7
55763/usr/local/include/X11R6
55764/usr/local/include/X11R5
55765/usr/local/include/X11R4
55766
55767/usr/X386/include
55768/usr/x386/include
55769/usr/XFree86/include/X11
55770
55771/usr/include
55772/usr/local/include
55773/usr/unsupported/include
55774/usr/athena/include
55775/usr/local/x11r5/include
55776/usr/lpp/Xamples/include
55777
55778/usr/openwin/include
55779/usr/openwin/share/include'
55780
55781if test "$ac_x_includes" = no; then
55782  # Guess where to find include files, by looking for Xlib.h.
55783  # First, try using that file with no special directory specified.
55784  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55785/* end confdefs.h.  */
55786#include <X11/Xlib.h>
55787_ACEOF
55788if ac_fn_cxx_try_cpp "$LINENO"; then :
55789  # We can compile using X headers with no special include directory.
55790ac_x_includes=
55791else
55792  for ac_dir in $ac_x_header_dirs; do
55793  if test -r "$ac_dir/X11/Xlib.h"; then
55794    ac_x_includes=$ac_dir
55795    break
55796  fi
55797done
55798fi
55799rm -f conftest.err conftest.i conftest.$ac_ext
55800fi # $ac_x_includes = no
55801
55802if test "$ac_x_libraries" = no; then
55803  # Check for the libraries.
55804  # See if we find them without any special options.
55805  # Don't add to $LIBS permanently.
55806  ac_save_LIBS=$LIBS
55807  LIBS="-lX11 $LIBS"
55808  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55809/* end confdefs.h.  */
55810#include <X11/Xlib.h>
55811int
55812main ()
55813{
55814XrmInitialize ()
55815  ;
55816  return 0;
55817}
55818_ACEOF
55819if ac_fn_cxx_try_link "$LINENO"; then :
55820  LIBS=$ac_save_LIBS
55821# We can link X programs with no special library path.
55822ac_x_libraries=
55823else
55824  LIBS=$ac_save_LIBS
55825for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
55826do
55827  # Don't even attempt the hair of trying to link an X program!
55828  for ac_extension in a so sl dylib la dll; do
55829    if test -r "$ac_dir/libX11.$ac_extension"; then
55830      ac_x_libraries=$ac_dir
55831      break 2
55832    fi
55833  done
55834done
55835fi
55836rm -f core conftest.err conftest.$ac_objext \
55837    conftest$ac_exeext conftest.$ac_ext
55838fi # $ac_x_libraries = no
55839
55840case $ac_x_includes,$ac_x_libraries in #(
55841  no,* | *,no | *\'*)
55842    # Didn't find X, or a directory has "'" in its name.
55843    ac_cv_have_x="have_x=no";; #(
55844  *)
55845    # Record where we found X for the cache.
55846    ac_cv_have_x="have_x=yes\
55847	ac_x_includes='$ac_x_includes'\
55848	ac_x_libraries='$ac_x_libraries'"
55849esac
55850fi
55851;; #(
55852    *) have_x=yes;;
55853  esac
55854  eval "$ac_cv_have_x"
55855fi # $with_x != no
55856
55857if test "$have_x" != yes; then
55858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
55859$as_echo "$have_x" >&6; }
55860  no_x=yes
55861else
55862  # If each of the values was on the command line, it overrides each guess.
55863  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
55864  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
55865  # Update the cache value to reflect the command line values.
55866  ac_cv_have_x="have_x=yes\
55867	ac_x_includes='$x_includes'\
55868	ac_x_libraries='$x_libraries'"
55869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
55870$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
55871fi
55872
55873    if test "$no_x" = yes; then
55874  # Not all programs may use this symbol, but it does not hurt to define it.
55875
55876$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
55877
55878  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
55879else
55880  if test -n "$x_includes"; then
55881    X_CFLAGS="$X_CFLAGS -I$x_includes"
55882  fi
55883
55884  # It would also be nice to do this for all -L options, not just this one.
55885  if test -n "$x_libraries"; then
55886    X_LIBS="$X_LIBS -L$x_libraries"
55887    # For Solaris; some versions of Sun CC require a space after -R and
55888    # others require no space.  Words are not sufficient . . . .
55889    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
55890$as_echo_n "checking whether -R must be followed by a space... " >&6; }
55891    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
55892    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
55893    ac_cxx_werror_flag=yes
55894    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55895/* end confdefs.h.  */
55896
55897int
55898main ()
55899{
55900
55901  ;
55902  return 0;
55903}
55904_ACEOF
55905if ac_fn_cxx_try_link "$LINENO"; then :
55906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55907$as_echo "no" >&6; }
55908       X_LIBS="$X_LIBS -R$x_libraries"
55909else
55910  LIBS="$ac_xsave_LIBS -R $x_libraries"
55911       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55912/* end confdefs.h.  */
55913
55914int
55915main ()
55916{
55917
55918  ;
55919  return 0;
55920}
55921_ACEOF
55922if ac_fn_cxx_try_link "$LINENO"; then :
55923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55924$as_echo "yes" >&6; }
55925	  X_LIBS="$X_LIBS -R $x_libraries"
55926else
55927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
55928$as_echo "neither works" >&6; }
55929fi
55930rm -f core conftest.err conftest.$ac_objext \
55931    conftest$ac_exeext conftest.$ac_ext
55932fi
55933rm -f core conftest.err conftest.$ac_objext \
55934    conftest$ac_exeext conftest.$ac_ext
55935    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
55936    LIBS=$ac_xsave_LIBS
55937  fi
55938
55939  # Check for system-dependent libraries X programs must link with.
55940  # Do this before checking for the system-independent R6 libraries
55941  # (-lICE), since we may need -lsocket or whatever for X linking.
55942
55943  if test "$ISC" = yes; then
55944    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
55945  else
55946    # Martyn Johnson says this is needed for Ultrix, if the X
55947    # libraries were built with DECnet support.  And Karl Berry says
55948    # the Alpha needs dnet_stub (dnet does not exist).
55949    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
55950    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55951/* end confdefs.h.  */
55952
55953/* Override any GCC internal prototype to avoid an error.
55954   Use char because int might match the return type of a GCC
55955   builtin and then its argument prototype would still apply.  */
55956#ifdef __cplusplus
55957extern "C"
55958#endif
55959char XOpenDisplay ();
55960int
55961main ()
55962{
55963return XOpenDisplay ();
55964  ;
55965  return 0;
55966}
55967_ACEOF
55968if ac_fn_cxx_try_link "$LINENO"; then :
55969
55970else
55971  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
55972$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
55973if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
55974  $as_echo_n "(cached) " >&6
55975else
55976  ac_check_lib_save_LIBS=$LIBS
55977LIBS="-ldnet  $LIBS"
55978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55979/* end confdefs.h.  */
55980
55981/* Override any GCC internal prototype to avoid an error.
55982   Use char because int might match the return type of a GCC
55983   builtin and then its argument prototype would still apply.  */
55984#ifdef __cplusplus
55985extern "C"
55986#endif
55987char dnet_ntoa ();
55988int
55989main ()
55990{
55991return dnet_ntoa ();
55992  ;
55993  return 0;
55994}
55995_ACEOF
55996if ac_fn_cxx_try_link "$LINENO"; then :
55997  ac_cv_lib_dnet_dnet_ntoa=yes
55998else
55999  ac_cv_lib_dnet_dnet_ntoa=no
56000fi
56001rm -f core conftest.err conftest.$ac_objext \
56002    conftest$ac_exeext conftest.$ac_ext
56003LIBS=$ac_check_lib_save_LIBS
56004fi
56005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56006$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56007if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56008  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56009fi
56010
56011    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56012      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56013$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56014if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56015  $as_echo_n "(cached) " >&6
56016else
56017  ac_check_lib_save_LIBS=$LIBS
56018LIBS="-ldnet_stub  $LIBS"
56019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56020/* end confdefs.h.  */
56021
56022/* Override any GCC internal prototype to avoid an error.
56023   Use char because int might match the return type of a GCC
56024   builtin and then its argument prototype would still apply.  */
56025#ifdef __cplusplus
56026extern "C"
56027#endif
56028char dnet_ntoa ();
56029int
56030main ()
56031{
56032return dnet_ntoa ();
56033  ;
56034  return 0;
56035}
56036_ACEOF
56037if ac_fn_cxx_try_link "$LINENO"; then :
56038  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56039else
56040  ac_cv_lib_dnet_stub_dnet_ntoa=no
56041fi
56042rm -f core conftest.err conftest.$ac_objext \
56043    conftest$ac_exeext conftest.$ac_ext
56044LIBS=$ac_check_lib_save_LIBS
56045fi
56046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56047$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56048if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56049  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56050fi
56051
56052    fi
56053fi
56054rm -f core conftest.err conftest.$ac_objext \
56055    conftest$ac_exeext conftest.$ac_ext
56056    LIBS="$ac_xsave_LIBS"
56057
56058    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56059    # to get the SysV transport functions.
56060    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56061    # needs -lnsl.
56062    # The nsl library prevents programs from opening the X display
56063    # on Irix 5.2, according to T.E. Dickey.
56064    # The functions gethostbyname, getservbyname, and inet_addr are
56065    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56066    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56067if test "x$ac_cv_func_gethostbyname" = xyes; then :
56068
56069fi
56070
56071    if test $ac_cv_func_gethostbyname = no; then
56072      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56073$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56074if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56075  $as_echo_n "(cached) " >&6
56076else
56077  ac_check_lib_save_LIBS=$LIBS
56078LIBS="-lnsl  $LIBS"
56079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56080/* end confdefs.h.  */
56081
56082/* Override any GCC internal prototype to avoid an error.
56083   Use char because int might match the return type of a GCC
56084   builtin and then its argument prototype would still apply.  */
56085#ifdef __cplusplus
56086extern "C"
56087#endif
56088char gethostbyname ();
56089int
56090main ()
56091{
56092return gethostbyname ();
56093  ;
56094  return 0;
56095}
56096_ACEOF
56097if ac_fn_cxx_try_link "$LINENO"; then :
56098  ac_cv_lib_nsl_gethostbyname=yes
56099else
56100  ac_cv_lib_nsl_gethostbyname=no
56101fi
56102rm -f core conftest.err conftest.$ac_objext \
56103    conftest$ac_exeext conftest.$ac_ext
56104LIBS=$ac_check_lib_save_LIBS
56105fi
56106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56107$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56108if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56109  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56110fi
56111
56112      if test $ac_cv_lib_nsl_gethostbyname = no; then
56113	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56114$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56115if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56116  $as_echo_n "(cached) " >&6
56117else
56118  ac_check_lib_save_LIBS=$LIBS
56119LIBS="-lbsd  $LIBS"
56120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56121/* end confdefs.h.  */
56122
56123/* Override any GCC internal prototype to avoid an error.
56124   Use char because int might match the return type of a GCC
56125   builtin and then its argument prototype would still apply.  */
56126#ifdef __cplusplus
56127extern "C"
56128#endif
56129char gethostbyname ();
56130int
56131main ()
56132{
56133return gethostbyname ();
56134  ;
56135  return 0;
56136}
56137_ACEOF
56138if ac_fn_cxx_try_link "$LINENO"; then :
56139  ac_cv_lib_bsd_gethostbyname=yes
56140else
56141  ac_cv_lib_bsd_gethostbyname=no
56142fi
56143rm -f core conftest.err conftest.$ac_objext \
56144    conftest$ac_exeext conftest.$ac_ext
56145LIBS=$ac_check_lib_save_LIBS
56146fi
56147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56148$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56149if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56150  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56151fi
56152
56153      fi
56154    fi
56155
56156    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56157    # socket/setsockopt and other routines are undefined under SCO ODT
56158    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56159    # on later versions), says Simon Leinen: it contains gethostby*
56160    # variants that don't use the name server (or something).  -lsocket
56161    # must be given before -lnsl if both are needed.  We assume that
56162    # if connect needs -lnsl, so does gethostbyname.
56163    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56164if test "x$ac_cv_func_connect" = xyes; then :
56165
56166fi
56167
56168    if test $ac_cv_func_connect = no; then
56169      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56170$as_echo_n "checking for connect in -lsocket... " >&6; }
56171if ${ac_cv_lib_socket_connect+:} false; then :
56172  $as_echo_n "(cached) " >&6
56173else
56174  ac_check_lib_save_LIBS=$LIBS
56175LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56177/* end confdefs.h.  */
56178
56179/* Override any GCC internal prototype to avoid an error.
56180   Use char because int might match the return type of a GCC
56181   builtin and then its argument prototype would still apply.  */
56182#ifdef __cplusplus
56183extern "C"
56184#endif
56185char connect ();
56186int
56187main ()
56188{
56189return connect ();
56190  ;
56191  return 0;
56192}
56193_ACEOF
56194if ac_fn_cxx_try_link "$LINENO"; then :
56195  ac_cv_lib_socket_connect=yes
56196else
56197  ac_cv_lib_socket_connect=no
56198fi
56199rm -f core conftest.err conftest.$ac_objext \
56200    conftest$ac_exeext conftest.$ac_ext
56201LIBS=$ac_check_lib_save_LIBS
56202fi
56203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56204$as_echo "$ac_cv_lib_socket_connect" >&6; }
56205if test "x$ac_cv_lib_socket_connect" = xyes; then :
56206  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56207fi
56208
56209    fi
56210
56211    # Guillermo Gomez says -lposix is necessary on A/UX.
56212    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56213if test "x$ac_cv_func_remove" = xyes; then :
56214
56215fi
56216
56217    if test $ac_cv_func_remove = no; then
56218      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56219$as_echo_n "checking for remove in -lposix... " >&6; }
56220if ${ac_cv_lib_posix_remove+:} false; then :
56221  $as_echo_n "(cached) " >&6
56222else
56223  ac_check_lib_save_LIBS=$LIBS
56224LIBS="-lposix  $LIBS"
56225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56226/* end confdefs.h.  */
56227
56228/* Override any GCC internal prototype to avoid an error.
56229   Use char because int might match the return type of a GCC
56230   builtin and then its argument prototype would still apply.  */
56231#ifdef __cplusplus
56232extern "C"
56233#endif
56234char remove ();
56235int
56236main ()
56237{
56238return remove ();
56239  ;
56240  return 0;
56241}
56242_ACEOF
56243if ac_fn_cxx_try_link "$LINENO"; then :
56244  ac_cv_lib_posix_remove=yes
56245else
56246  ac_cv_lib_posix_remove=no
56247fi
56248rm -f core conftest.err conftest.$ac_objext \
56249    conftest$ac_exeext conftest.$ac_ext
56250LIBS=$ac_check_lib_save_LIBS
56251fi
56252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56253$as_echo "$ac_cv_lib_posix_remove" >&6; }
56254if test "x$ac_cv_lib_posix_remove" = xyes; then :
56255  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56256fi
56257
56258    fi
56259
56260    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56261    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56262if test "x$ac_cv_func_shmat" = xyes; then :
56263
56264fi
56265
56266    if test $ac_cv_func_shmat = no; then
56267      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56268$as_echo_n "checking for shmat in -lipc... " >&6; }
56269if ${ac_cv_lib_ipc_shmat+:} false; then :
56270  $as_echo_n "(cached) " >&6
56271else
56272  ac_check_lib_save_LIBS=$LIBS
56273LIBS="-lipc  $LIBS"
56274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56275/* end confdefs.h.  */
56276
56277/* Override any GCC internal prototype to avoid an error.
56278   Use char because int might match the return type of a GCC
56279   builtin and then its argument prototype would still apply.  */
56280#ifdef __cplusplus
56281extern "C"
56282#endif
56283char shmat ();
56284int
56285main ()
56286{
56287return shmat ();
56288  ;
56289  return 0;
56290}
56291_ACEOF
56292if ac_fn_cxx_try_link "$LINENO"; then :
56293  ac_cv_lib_ipc_shmat=yes
56294else
56295  ac_cv_lib_ipc_shmat=no
56296fi
56297rm -f core conftest.err conftest.$ac_objext \
56298    conftest$ac_exeext conftest.$ac_ext
56299LIBS=$ac_check_lib_save_LIBS
56300fi
56301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56302$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56303if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56304  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56305fi
56306
56307    fi
56308  fi
56309
56310  # Check for libraries that X11R6 Xt/Xaw programs need.
56311  ac_save_LDFLAGS=$LDFLAGS
56312  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56313  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56314  # check for ICE first), but we must link in the order -lSM -lICE or
56315  # we get undefined symbols.  So assume we have SM if we have ICE.
56316  # These have to be linked with before -lX11, unlike the other
56317  # libraries we check for below, so use a different variable.
56318  # John Interrante, Karl Berry
56319  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56320$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56321if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56322  $as_echo_n "(cached) " >&6
56323else
56324  ac_check_lib_save_LIBS=$LIBS
56325LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56327/* end confdefs.h.  */
56328
56329/* Override any GCC internal prototype to avoid an error.
56330   Use char because int might match the return type of a GCC
56331   builtin and then its argument prototype would still apply.  */
56332#ifdef __cplusplus
56333extern "C"
56334#endif
56335char IceConnectionNumber ();
56336int
56337main ()
56338{
56339return IceConnectionNumber ();
56340  ;
56341  return 0;
56342}
56343_ACEOF
56344if ac_fn_cxx_try_link "$LINENO"; then :
56345  ac_cv_lib_ICE_IceConnectionNumber=yes
56346else
56347  ac_cv_lib_ICE_IceConnectionNumber=no
56348fi
56349rm -f core conftest.err conftest.$ac_objext \
56350    conftest$ac_exeext conftest.$ac_ext
56351LIBS=$ac_check_lib_save_LIBS
56352fi
56353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56354$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56355if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56356  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56357fi
56358
56359  LDFLAGS=$ac_save_LDFLAGS
56360
56361fi
56362
56363
56364    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56365    # this doesn't make sense so we remove it.
56366    if test "x$COMPILE_TYPE" = xcross; then
56367      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56368    fi
56369
56370    if test "x$no_x" = xyes; then
56371
56372  # Print a helpful message on how to acquire the necessary build dependency.
56373  # x11 is the help tag: freetype, cups, alsa etc
56374  MISSING_DEPENDENCY=x11
56375
56376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56377    cygwin_help $MISSING_DEPENDENCY
56378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56379    msys_help $MISSING_DEPENDENCY
56380  else
56381    PKGHANDLER_COMMAND=
56382
56383    case $PKGHANDLER in
56384      apt-get)
56385        apt_help     $MISSING_DEPENDENCY ;;
56386      yum)
56387        yum_help     $MISSING_DEPENDENCY ;;
56388      brew)
56389        brew_help    $MISSING_DEPENDENCY ;;
56390      port)
56391        port_help    $MISSING_DEPENDENCY ;;
56392      pkgutil)
56393        pkgutil_help $MISSING_DEPENDENCY ;;
56394      pkgadd)
56395        pkgadd_help  $MISSING_DEPENDENCY ;;
56396    esac
56397
56398    if test "x$PKGHANDLER_COMMAND" != x; then
56399      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56400    fi
56401  fi
56402
56403      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56404    fi
56405
56406    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56407      OPENWIN_HOME="/usr/openwin"
56408      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56409      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56410          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56411    fi
56412
56413    ac_ext=c
56414ac_cpp='$CPP $CPPFLAGS'
56415ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56416ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56417ac_compiler_gnu=$ac_cv_c_compiler_gnu
56418
56419    OLD_CFLAGS="$CFLAGS"
56420    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56421
56422    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56423    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56424do :
56425  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56426ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56427          # include <X11/Xlib.h>
56428          # include <X11/Xutil.h>
56429
56430
56431"
56432if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56433  cat >>confdefs.h <<_ACEOF
56434#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56435_ACEOF
56436 X11_HEADERS_OK=yes
56437else
56438  X11_HEADERS_OK=no; break
56439fi
56440
56441done
56442
56443
56444    if test "x$X11_HEADERS_OK" = xno; then
56445
56446  # Print a helpful message on how to acquire the necessary build dependency.
56447  # x11 is the help tag: freetype, cups, alsa etc
56448  MISSING_DEPENDENCY=x11
56449
56450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56451    cygwin_help $MISSING_DEPENDENCY
56452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56453    msys_help $MISSING_DEPENDENCY
56454  else
56455    PKGHANDLER_COMMAND=
56456
56457    case $PKGHANDLER in
56458      apt-get)
56459        apt_help     $MISSING_DEPENDENCY ;;
56460      yum)
56461        yum_help     $MISSING_DEPENDENCY ;;
56462      brew)
56463        brew_help    $MISSING_DEPENDENCY ;;
56464      port)
56465        port_help    $MISSING_DEPENDENCY ;;
56466      pkgutil)
56467        pkgutil_help $MISSING_DEPENDENCY ;;
56468      pkgadd)
56469        pkgadd_help  $MISSING_DEPENDENCY ;;
56470    esac
56471
56472    if test "x$PKGHANDLER_COMMAND" != x; then
56473      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56474    fi
56475  fi
56476
56477      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56478    fi
56479
56480    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56481    # defined in libawt_xawt.
56482    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56483$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56484    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56485/* end confdefs.h.  */
56486#include <X11/extensions/Xrender.h>
56487int
56488main ()
56489{
56490XLinearGradient x;
56491  ;
56492  return 0;
56493}
56494_ACEOF
56495if ac_fn_c_try_compile "$LINENO"; then :
56496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56497$as_echo "yes" >&6; }
56498else
56499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56500$as_echo "no" >&6; }
56501         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56502fi
56503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56504
56505    CFLAGS="$OLD_CFLAGS"
56506    ac_ext=cpp
56507ac_cpp='$CXXCPP $CPPFLAGS'
56508ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56509ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56510ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56511
56512  fi # NEEDS_LIB_X11
56513
56514
56515
56516
56517
56518
56519# Check whether --with-cups was given.
56520if test "${with_cups+set}" = set; then :
56521  withval=$with_cups;
56522fi
56523
56524
56525# Check whether --with-cups-include was given.
56526if test "${with_cups_include+set}" = set; then :
56527  withval=$with_cups_include;
56528fi
56529
56530
56531  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56532    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56533        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56534      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56535$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56536    fi
56537    CUPS_CFLAGS=
56538  else
56539    CUPS_FOUND=no
56540
56541    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56542      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56543    fi
56544
56545    if test "x${with_cups}" != x; then
56546      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56547$as_echo_n "checking for cups headers... " >&6; }
56548      if test -s "${with_cups}/include/cups/cups.h"; then
56549        CUPS_CFLAGS="-I${with_cups}/include"
56550        CUPS_FOUND=yes
56551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56552$as_echo "$CUPS_FOUND" >&6; }
56553      else
56554        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56555      fi
56556    fi
56557    if test "x${with_cups_include}" != x; then
56558      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56559$as_echo_n "checking for cups headers... " >&6; }
56560      if test -s "${with_cups_include}/cups/cups.h"; then
56561        CUPS_CFLAGS="-I${with_cups_include}"
56562        CUPS_FOUND=yes
56563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56564$as_echo "$CUPS_FOUND" >&6; }
56565      else
56566        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56567      fi
56568    fi
56569    if test "x$CUPS_FOUND" = xno; then
56570      # Are the cups headers installed in the default /usr/include location?
56571      for ac_header in cups/cups.h cups/ppd.h
56572do :
56573  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56574ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56575if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56576  cat >>confdefs.h <<_ACEOF
56577#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56578_ACEOF
56579
56580          CUPS_FOUND=yes
56581          CUPS_CFLAGS=
56582          DEFAULT_CUPS=yes
56583
56584fi
56585
56586done
56587
56588    fi
56589    if test "x$CUPS_FOUND" = xno; then
56590
56591  # Print a helpful message on how to acquire the necessary build dependency.
56592  # cups is the help tag: freetype, cups, alsa etc
56593  MISSING_DEPENDENCY=cups
56594
56595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56596    cygwin_help $MISSING_DEPENDENCY
56597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56598    msys_help $MISSING_DEPENDENCY
56599  else
56600    PKGHANDLER_COMMAND=
56601
56602    case $PKGHANDLER in
56603      apt-get)
56604        apt_help     $MISSING_DEPENDENCY ;;
56605      yum)
56606        yum_help     $MISSING_DEPENDENCY ;;
56607      brew)
56608        brew_help    $MISSING_DEPENDENCY ;;
56609      port)
56610        port_help    $MISSING_DEPENDENCY ;;
56611      pkgutil)
56612        pkgutil_help $MISSING_DEPENDENCY ;;
56613      pkgadd)
56614        pkgadd_help  $MISSING_DEPENDENCY ;;
56615    esac
56616
56617    if test "x$PKGHANDLER_COMMAND" != x; then
56618      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56619    fi
56620  fi
56621
56622      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56623    fi
56624  fi
56625
56626
56627
56628
56629
56630# Check whether --with-freetype was given.
56631if test "${with_freetype+set}" = set; then :
56632  withval=$with_freetype;
56633fi
56634
56635
56636# Check whether --with-freetype-include was given.
56637if test "${with_freetype_include+set}" = set; then :
56638  withval=$with_freetype_include;
56639fi
56640
56641
56642# Check whether --with-freetype-lib was given.
56643if test "${with_freetype_lib+set}" = set; then :
56644  withval=$with_freetype_lib;
56645fi
56646
56647
56648# Check whether --with-freetype-src was given.
56649if test "${with_freetype_src+set}" = set; then :
56650  withval=$with_freetype_src;
56651fi
56652
56653  # Check whether --enable-freetype-bundling was given.
56654if test "${enable_freetype_bundling+set}" = set; then :
56655  enableval=$enable_freetype_bundling;
56656fi
56657
56658
56659  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56660  FREETYPE_BASE_NAME=freetype
56661  FREETYPE_CFLAGS=
56662  FREETYPE_LIBS=
56663  FREETYPE_BUNDLE_LIB_PATH=
56664
56665  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56666    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56667        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56668        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56669        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56670      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56671$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56672    fi
56673    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56674      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56675$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56676    fi
56677  else
56678    # freetype is needed to build; go get it!
56679
56680    BUNDLE_FREETYPE="$enable_freetype_bundling"
56681
56682    if  test "x$with_freetype_src" != x; then
56683      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56684        # Try to build freetype if --with-freetype-src was given on Windows
56685
56686  FREETYPE_SRC_PATH="$with_freetype_src"
56687  BUILD_FREETYPE=yes
56688
56689  # Check if the freetype sources are acessible..
56690  if ! test -d $FREETYPE_SRC_PATH; then
56691    { $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
56692$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56693    BUILD_FREETYPE=no
56694  fi
56695  # ..and contain a vc2010 project file
56696  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56697  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56698    { $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
56699$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56700    BUILD_FREETYPE=no
56701  fi
56702  # Now check if configure found a version of 'msbuild.exe'
56703  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56704    { $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
56705$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;}
56706    BUILD_FREETYPE=no
56707  fi
56708
56709  # Ready to go..
56710  if test "x$BUILD_FREETYPE" = xyes; then
56711    # msbuild requires trailing slashes for output directories
56712    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56713    freetype_lib_path_unix="$freetype_lib_path"
56714    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56715
56716  unix_path="$vcxproj_path"
56717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56718    windows_path=`$CYGPATH -m "$unix_path"`
56719    vcxproj_path="$windows_path"
56720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56721    windows_path=`cmd //c echo $unix_path`
56722    vcxproj_path="$windows_path"
56723  fi
56724
56725
56726  unix_path="$freetype_lib_path"
56727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56728    windows_path=`$CYGPATH -m "$unix_path"`
56729    freetype_lib_path="$windows_path"
56730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56731    windows_path=`cmd //c echo $unix_path`
56732    freetype_lib_path="$windows_path"
56733  fi
56734
56735
56736  unix_path="$freetype_obj_path"
56737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56738    windows_path=`$CYGPATH -m "$unix_path"`
56739    freetype_obj_path="$windows_path"
56740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56741    windows_path=`cmd //c echo $unix_path`
56742    freetype_obj_path="$windows_path"
56743  fi
56744
56745    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56746      freetype_platform=x64
56747    else
56748      freetype_platform=win32
56749    fi
56750
56751    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56752    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56753    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56754    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56755    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56756$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56757
56758    # First we try to build the freetype.dll
56759    $ECHO -e "@echo off\n"\
56760        "$MSBUILD $vcxproj_path "\
56761        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56762        "/p:Configuration=\"Release Multithreaded\" "\
56763        "/p:Platform=$freetype_platform "\
56764        "/p:ConfigurationType=DynamicLibrary "\
56765        "/p:TargetName=freetype "\
56766        "/p:OutDir=\"$freetype_lib_path\" "\
56767        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56768    cmd /c freetype.bat
56769
56770    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56771      # If that succeeds we also build freetype.lib
56772      $ECHO -e "@echo off\n"\
56773          "$MSBUILD $vcxproj_path "\
56774          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56775          "/p:Configuration=\"Release Multithreaded\" "\
56776          "/p:Platform=$freetype_platform "\
56777          "/p:ConfigurationType=StaticLibrary "\
56778          "/p:TargetName=freetype "\
56779          "/p:OutDir=\"$freetype_lib_path\" "\
56780          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56781      cmd /c freetype.bat
56782
56783      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56784        # Once we build both, lib and dll, set freetype lib and include path appropriately
56785        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56786        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56787        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56788$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56789      else
56790        BUILD_FREETYPE=no
56791      fi
56792    else
56793      BUILD_FREETYPE=no
56794    fi
56795  fi
56796
56797        if test "x$BUILD_FREETYPE" = xyes; then
56798          # Okay, we built it. Check that it works.
56799
56800  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56801  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56802  METHOD="--with-freetype-src"
56803
56804  # Let's start with an optimistic view of the world :-)
56805  FOUND_FREETYPE=yes
56806
56807  # First look for the canonical freetype main include file ft2build.h.
56808  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56809    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56810    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56811    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56812      # Fail.
56813      FOUND_FREETYPE=no
56814    fi
56815  fi
56816
56817  if test "x$FOUND_FREETYPE" = xyes; then
56818    # Include file found, let's continue the sanity check.
56819    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56820$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56821
56822    # Reset to default value
56823    FREETYPE_BASE_NAME=freetype
56824    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56825    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56826      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56827          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56828        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56829        # for the .6 version explicitly.
56830        FREETYPE_BASE_NAME=freetype.6
56831        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56832        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56833$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56834      else
56835        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56836$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56837        FOUND_FREETYPE=no
56838      fi
56839    else
56840      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56841        # On Windows, we will need both .lib and .dll file.
56842        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56843          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56844$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56845          FOUND_FREETYPE=no
56846        fi
56847      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56848          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56849        # Found lib in isa dir, use that instead.
56850        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56851        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56852$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56853      fi
56854    fi
56855  fi
56856
56857  if test "x$FOUND_FREETYPE" = xyes; then
56858
56859  # Only process if variable expands to non-empty
56860
56861  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56862    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56863
56864  # Input might be given as Windows format, start by converting to
56865  # unix format.
56866  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56867  new_path=`$CYGPATH -u "$path"`
56868
56869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56872  # "foo.exe" is OK but "foo" is an error.
56873  #
56874  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56875  # It is also a way to make sure we got the proper file name for the real test later on.
56876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56877  if test "x$test_shortpath" = x; then
56878    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56879$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56880    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56881  fi
56882
56883  # Call helper function which possibly converts this using DOS-style short mode.
56884  # If so, the updated path is stored in $new_path.
56885
56886  input_path="$new_path"
56887  # Check if we need to convert this using DOS-style short mode. If the path
56888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56889  # take no chances and rewrite it.
56890  # Note: m4 eats our [], so we need to use [ and ] instead.
56891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56892  if test "x$has_forbidden_chars" != x; then
56893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56897      # Going to short mode and back again did indeed matter. Since short mode is
56898      # case insensitive, let's make it lowercase to improve readability.
56899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56900      # Now convert it back to Unix-style (cygpath)
56901      input_path=`$CYGPATH -u "$shortmode_path"`
56902      new_path="$input_path"
56903    fi
56904  fi
56905
56906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56907  if test "x$test_cygdrive_prefix" = x; then
56908    # As a simple fix, exclude /usr/bin since it's not a real path.
56909    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56911      # a path prefixed by /cygdrive for fixpath to work.
56912      new_path="$CYGWIN_ROOT_PATH$input_path"
56913    fi
56914  fi
56915
56916
56917  if test "x$path" != "x$new_path"; then
56918    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56920$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56921  fi
56922
56923    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56924
56925  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56926  has_colon=`$ECHO $path | $GREP ^.:`
56927  new_path="$path"
56928  if test "x$has_colon" = x; then
56929    # Not in mixed or Windows style, start by that.
56930    new_path=`cmd //c echo $path`
56931  fi
56932
56933
56934  input_path="$new_path"
56935  # Check if we need to convert this using DOS-style short mode. If the path
56936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56937  # take no chances and rewrite it.
56938  # Note: m4 eats our [], so we need to use [ and ] instead.
56939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56940  if test "x$has_forbidden_chars" != x; then
56941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56943  fi
56944
56945
56946  windows_path="$new_path"
56947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56948    unix_path=`$CYGPATH -u "$windows_path"`
56949    new_path="$unix_path"
56950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56952    new_path="$unix_path"
56953  fi
56954
56955  if test "x$path" != "x$new_path"; then
56956    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56958$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56959  fi
56960
56961  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56962  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56963
56964    else
56965      # We're on a unix platform. Hooray! :)
56966      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56967      has_space=`$ECHO "$path" | $GREP " "`
56968      if test "x$has_space" != x; then
56969        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56970$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56971        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56972      fi
56973
56974      # Use eval to expand a potential ~
56975      eval path="$path"
56976      if test ! -f "$path" && test ! -d "$path"; then
56977        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56978      fi
56979
56980      if test -d "$path"; then
56981        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56982      else
56983        dir="`$DIRNAME "$path"`"
56984        base="`$BASENAME "$path"`"
56985        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56986      fi
56987    fi
56988  fi
56989
56990
56991  # Only process if variable expands to non-empty
56992
56993  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56995
56996  # Input might be given as Windows format, start by converting to
56997  # unix format.
56998  path="$POTENTIAL_FREETYPE_LIB_PATH"
56999  new_path=`$CYGPATH -u "$path"`
57000
57001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57004  # "foo.exe" is OK but "foo" is an error.
57005  #
57006  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57007  # It is also a way to make sure we got the proper file name for the real test later on.
57008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57009  if test "x$test_shortpath" = x; then
57010    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57011$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57012    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57013  fi
57014
57015  # Call helper function which possibly converts this using DOS-style short mode.
57016  # If so, the updated path is stored in $new_path.
57017
57018  input_path="$new_path"
57019  # Check if we need to convert this using DOS-style short mode. If the path
57020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57021  # take no chances and rewrite it.
57022  # Note: m4 eats our [], so we need to use [ and ] instead.
57023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57024  if test "x$has_forbidden_chars" != x; then
57025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57029      # Going to short mode and back again did indeed matter. Since short mode is
57030      # case insensitive, let's make it lowercase to improve readability.
57031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57032      # Now convert it back to Unix-style (cygpath)
57033      input_path=`$CYGPATH -u "$shortmode_path"`
57034      new_path="$input_path"
57035    fi
57036  fi
57037
57038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57039  if test "x$test_cygdrive_prefix" = x; then
57040    # As a simple fix, exclude /usr/bin since it's not a real path.
57041    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57043      # a path prefixed by /cygdrive for fixpath to work.
57044      new_path="$CYGWIN_ROOT_PATH$input_path"
57045    fi
57046  fi
57047
57048
57049  if test "x$path" != "x$new_path"; then
57050    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57052$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57053  fi
57054
57055    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57056
57057  path="$POTENTIAL_FREETYPE_LIB_PATH"
57058  has_colon=`$ECHO $path | $GREP ^.:`
57059  new_path="$path"
57060  if test "x$has_colon" = x; then
57061    # Not in mixed or Windows style, start by that.
57062    new_path=`cmd //c echo $path`
57063  fi
57064
57065
57066  input_path="$new_path"
57067  # Check if we need to convert this using DOS-style short mode. If the path
57068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57069  # take no chances and rewrite it.
57070  # Note: m4 eats our [], so we need to use [ and ] instead.
57071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57072  if test "x$has_forbidden_chars" != x; then
57073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57075  fi
57076
57077
57078  windows_path="$new_path"
57079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57080    unix_path=`$CYGPATH -u "$windows_path"`
57081    new_path="$unix_path"
57082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57084    new_path="$unix_path"
57085  fi
57086
57087  if test "x$path" != "x$new_path"; then
57088    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57090$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57091  fi
57092
57093  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57094  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57095
57096    else
57097      # We're on a unix platform. Hooray! :)
57098      path="$POTENTIAL_FREETYPE_LIB_PATH"
57099      has_space=`$ECHO "$path" | $GREP " "`
57100      if test "x$has_space" != x; then
57101        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57102$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57103        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57104      fi
57105
57106      # Use eval to expand a potential ~
57107      eval path="$path"
57108      if test ! -f "$path" && test ! -d "$path"; then
57109        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57110      fi
57111
57112      if test -d "$path"; then
57113        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57114      else
57115        dir="`$DIRNAME "$path"`"
57116        base="`$BASENAME "$path"`"
57117        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57118      fi
57119    fi
57120  fi
57121
57122
57123    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57125$as_echo_n "checking for freetype includes... " >&6; }
57126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57127$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57128    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57130$as_echo_n "checking for freetype libraries... " >&6; }
57131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57132$as_echo "$FREETYPE_LIB_PATH" >&6; }
57133  fi
57134
57135          if test "x$FOUND_FREETYPE" != xyes; then
57136            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57137          fi
57138        else
57139          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57140$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57141          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57142        fi
57143      else
57144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57145$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57146      fi
57147    fi
57148
57149    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57150      # User has specified settings
57151
57152      if test "x$BUNDLE_FREETYPE" = x; then
57153        # If not specified, default is to bundle freetype
57154        BUNDLE_FREETYPE=yes
57155      fi
57156
57157      if test "x$with_freetype" != x; then
57158        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57159        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57160      fi
57161
57162      # Allow --with-freetype-lib and --with-freetype-include to override
57163      if test "x$with_freetype_include" != x; then
57164        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57165      fi
57166      if test "x$with_freetype_lib" != x; then
57167        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57168      fi
57169
57170      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57171        # Okay, we got it. Check that it works.
57172
57173  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57174  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57175  METHOD="--with-freetype"
57176
57177  # Let's start with an optimistic view of the world :-)
57178  FOUND_FREETYPE=yes
57179
57180  # First look for the canonical freetype main include file ft2build.h.
57181  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57182    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57183    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57184    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57185      # Fail.
57186      FOUND_FREETYPE=no
57187    fi
57188  fi
57189
57190  if test "x$FOUND_FREETYPE" = xyes; then
57191    # Include file found, let's continue the sanity check.
57192    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57193$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57194
57195    # Reset to default value
57196    FREETYPE_BASE_NAME=freetype
57197    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57198    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57199      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57200          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57201        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57202        # for the .6 version explicitly.
57203        FREETYPE_BASE_NAME=freetype.6
57204        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57205        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57206$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57207      else
57208        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57209$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57210        FOUND_FREETYPE=no
57211      fi
57212    else
57213      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57214        # On Windows, we will need both .lib and .dll file.
57215        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57216          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57217$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57218          FOUND_FREETYPE=no
57219        fi
57220      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57221          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57222        # Found lib in isa dir, use that instead.
57223        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57224        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57225$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57226      fi
57227    fi
57228  fi
57229
57230  if test "x$FOUND_FREETYPE" = xyes; then
57231
57232  # Only process if variable expands to non-empty
57233
57234  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57236
57237  # Input might be given as Windows format, start by converting to
57238  # unix format.
57239  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57240  new_path=`$CYGPATH -u "$path"`
57241
57242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57245  # "foo.exe" is OK but "foo" is an error.
57246  #
57247  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57248  # It is also a way to make sure we got the proper file name for the real test later on.
57249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57250  if test "x$test_shortpath" = x; then
57251    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57252$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57253    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57254  fi
57255
57256  # Call helper function which possibly converts this using DOS-style short mode.
57257  # If so, the updated path is stored in $new_path.
57258
57259  input_path="$new_path"
57260  # Check if we need to convert this using DOS-style short mode. If the path
57261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57262  # take no chances and rewrite it.
57263  # Note: m4 eats our [], so we need to use [ and ] instead.
57264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57265  if test "x$has_forbidden_chars" != x; then
57266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57270      # Going to short mode and back again did indeed matter. Since short mode is
57271      # case insensitive, let's make it lowercase to improve readability.
57272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57273      # Now convert it back to Unix-style (cygpath)
57274      input_path=`$CYGPATH -u "$shortmode_path"`
57275      new_path="$input_path"
57276    fi
57277  fi
57278
57279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57280  if test "x$test_cygdrive_prefix" = x; then
57281    # As a simple fix, exclude /usr/bin since it's not a real path.
57282    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57284      # a path prefixed by /cygdrive for fixpath to work.
57285      new_path="$CYGWIN_ROOT_PATH$input_path"
57286    fi
57287  fi
57288
57289
57290  if test "x$path" != "x$new_path"; then
57291    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57293$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57294  fi
57295
57296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57297
57298  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57299  has_colon=`$ECHO $path | $GREP ^.:`
57300  new_path="$path"
57301  if test "x$has_colon" = x; then
57302    # Not in mixed or Windows style, start by that.
57303    new_path=`cmd //c echo $path`
57304  fi
57305
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57316  fi
57317
57318
57319  windows_path="$new_path"
57320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57321    unix_path=`$CYGPATH -u "$windows_path"`
57322    new_path="$unix_path"
57323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57325    new_path="$unix_path"
57326  fi
57327
57328  if test "x$path" != "x$new_path"; then
57329    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57331$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57332  fi
57333
57334  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57335  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57336
57337    else
57338      # We're on a unix platform. Hooray! :)
57339      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57340      has_space=`$ECHO "$path" | $GREP " "`
57341      if test "x$has_space" != x; then
57342        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57343$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57344        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57345      fi
57346
57347      # Use eval to expand a potential ~
57348      eval path="$path"
57349      if test ! -f "$path" && test ! -d "$path"; then
57350        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57351      fi
57352
57353      if test -d "$path"; then
57354        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57355      else
57356        dir="`$DIRNAME "$path"`"
57357        base="`$BASENAME "$path"`"
57358        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57359      fi
57360    fi
57361  fi
57362
57363
57364  # Only process if variable expands to non-empty
57365
57366  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57368
57369  # Input might be given as Windows format, start by converting to
57370  # unix format.
57371  path="$POTENTIAL_FREETYPE_LIB_PATH"
57372  new_path=`$CYGPATH -u "$path"`
57373
57374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57377  # "foo.exe" is OK but "foo" is an error.
57378  #
57379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57380  # It is also a way to make sure we got the proper file name for the real test later on.
57381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57382  if test "x$test_shortpath" = x; then
57383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57384$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57385    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57386  fi
57387
57388  # Call helper function which possibly converts this using DOS-style short mode.
57389  # If so, the updated path is stored in $new_path.
57390
57391  input_path="$new_path"
57392  # Check if we need to convert this using DOS-style short mode. If the path
57393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57394  # take no chances and rewrite it.
57395  # Note: m4 eats our [], so we need to use [ and ] instead.
57396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57397  if test "x$has_forbidden_chars" != x; then
57398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57402      # Going to short mode and back again did indeed matter. Since short mode is
57403      # case insensitive, let's make it lowercase to improve readability.
57404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57405      # Now convert it back to Unix-style (cygpath)
57406      input_path=`$CYGPATH -u "$shortmode_path"`
57407      new_path="$input_path"
57408    fi
57409  fi
57410
57411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57412  if test "x$test_cygdrive_prefix" = x; then
57413    # As a simple fix, exclude /usr/bin since it's not a real path.
57414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57416      # a path prefixed by /cygdrive for fixpath to work.
57417      new_path="$CYGWIN_ROOT_PATH$input_path"
57418    fi
57419  fi
57420
57421
57422  if test "x$path" != "x$new_path"; then
57423    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57425$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57426  fi
57427
57428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57429
57430  path="$POTENTIAL_FREETYPE_LIB_PATH"
57431  has_colon=`$ECHO $path | $GREP ^.:`
57432  new_path="$path"
57433  if test "x$has_colon" = x; then
57434    # Not in mixed or Windows style, start by that.
57435    new_path=`cmd //c echo $path`
57436  fi
57437
57438
57439  input_path="$new_path"
57440  # Check if we need to convert this using DOS-style short mode. If the path
57441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57442  # take no chances and rewrite it.
57443  # Note: m4 eats our [], so we need to use [ and ] instead.
57444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57445  if test "x$has_forbidden_chars" != x; then
57446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57448  fi
57449
57450
57451  windows_path="$new_path"
57452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57453    unix_path=`$CYGPATH -u "$windows_path"`
57454    new_path="$unix_path"
57455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57457    new_path="$unix_path"
57458  fi
57459
57460  if test "x$path" != "x$new_path"; then
57461    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57463$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57464  fi
57465
57466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57468
57469    else
57470      # We're on a unix platform. Hooray! :)
57471      path="$POTENTIAL_FREETYPE_LIB_PATH"
57472      has_space=`$ECHO "$path" | $GREP " "`
57473      if test "x$has_space" != x; then
57474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57475$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57476        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57477      fi
57478
57479      # Use eval to expand a potential ~
57480      eval path="$path"
57481      if test ! -f "$path" && test ! -d "$path"; then
57482        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57483      fi
57484
57485      if test -d "$path"; then
57486        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57487      else
57488        dir="`$DIRNAME "$path"`"
57489        base="`$BASENAME "$path"`"
57490        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57491      fi
57492    fi
57493  fi
57494
57495
57496    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57497    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57498$as_echo_n "checking for freetype includes... " >&6; }
57499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57500$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57501    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57503$as_echo_n "checking for freetype libraries... " >&6; }
57504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57505$as_echo "$FREETYPE_LIB_PATH" >&6; }
57506  fi
57507
57508        if test "x$FOUND_FREETYPE" != xyes; then
57509          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57510        fi
57511      else
57512        # User specified only one of lib or include. This is an error.
57513        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57514          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57515$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57516          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57517        else
57518          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57519$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57520          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57521        fi
57522      fi
57523    else
57524      # User did not specify settings, but we need freetype. Try to locate it.
57525
57526      if test "x$BUNDLE_FREETYPE" = x; then
57527        # If not specified, default is to bundle freetype only on windows
57528        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57529          BUNDLE_FREETYPE=yes
57530        else
57531          BUNDLE_FREETYPE=no
57532        fi
57533      fi
57534
57535      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57536      if test "x$SYSROOT" = x; then
57537        if test "x$FOUND_FREETYPE" != xyes; then
57538          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57539          if test "x$PKG_CONFIG" != x; then
57540
57541pkg_failed=no
57542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57543$as_echo_n "checking for FREETYPE... " >&6; }
57544
57545if test -n "$FREETYPE_CFLAGS"; then
57546    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57547 elif test -n "$PKG_CONFIG"; then
57548    if test -n "$PKG_CONFIG" && \
57549    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57550  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57551  ac_status=$?
57552  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57553  test $ac_status = 0; }; then
57554  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57555else
57556  pkg_failed=yes
57557fi
57558 else
57559    pkg_failed=untried
57560fi
57561if test -n "$FREETYPE_LIBS"; then
57562    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57563 elif test -n "$PKG_CONFIG"; then
57564    if test -n "$PKG_CONFIG" && \
57565    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57566  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57567  ac_status=$?
57568  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57569  test $ac_status = 0; }; then
57570  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57571else
57572  pkg_failed=yes
57573fi
57574 else
57575    pkg_failed=untried
57576fi
57577
57578
57579
57580if test $pkg_failed = yes; then
57581
57582if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57583        _pkg_short_errors_supported=yes
57584else
57585        _pkg_short_errors_supported=no
57586fi
57587        if test $_pkg_short_errors_supported = yes; then
57588	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57589        else
57590	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57591        fi
57592	# Put the nasty error message in config.log where it belongs
57593	echo "$FREETYPE_PKG_ERRORS" >&5
57594
57595	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57596$as_echo "no" >&6; }
57597                FOUND_FREETYPE=no
57598elif test $pkg_failed = untried; then
57599	FOUND_FREETYPE=no
57600else
57601	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57602	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57603        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57604$as_echo "yes" >&6; }
57605	FOUND_FREETYPE=yes
57606fi
57607            if test "x$FOUND_FREETYPE" = xyes; then
57608              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57609              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57610              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57611              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57612                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57613              fi
57614              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57615              if test "x$BUNDLE_FREETYPE" = xyes; then
57616                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57617$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57618                FOUND_FREETYPE=no
57619              else
57620                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57621$as_echo_n "checking for freetype... " >&6; }
57622                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57623$as_echo "yes (using pkg-config)" >&6; }
57624              fi
57625            fi
57626          fi
57627        fi
57628      fi
57629
57630      if test "x$FOUND_FREETYPE" != xyes; then
57631        # Check in well-known locations
57632        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57633          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57634
57635  windows_path="$FREETYPE_BASE_DIR"
57636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57637    unix_path=`$CYGPATH -u "$windows_path"`
57638    FREETYPE_BASE_DIR="$unix_path"
57639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57641    FREETYPE_BASE_DIR="$unix_path"
57642  fi
57643
57644
57645  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57646  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57647  METHOD="well-known location"
57648
57649  # Let's start with an optimistic view of the world :-)
57650  FOUND_FREETYPE=yes
57651
57652  # First look for the canonical freetype main include file ft2build.h.
57653  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57654    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57655    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57656    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57657      # Fail.
57658      FOUND_FREETYPE=no
57659    fi
57660  fi
57661
57662  if test "x$FOUND_FREETYPE" = xyes; then
57663    # Include file found, let's continue the sanity check.
57664    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57665$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57666
57667    # Reset to default value
57668    FREETYPE_BASE_NAME=freetype
57669    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57670    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57671      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57672          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57673        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57674        # for the .6 version explicitly.
57675        FREETYPE_BASE_NAME=freetype.6
57676        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57677        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57678$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57679      else
57680        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57681$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57682        FOUND_FREETYPE=no
57683      fi
57684    else
57685      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57686        # On Windows, we will need both .lib and .dll file.
57687        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57688          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57689$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57690          FOUND_FREETYPE=no
57691        fi
57692      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57693          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57694        # Found lib in isa dir, use that instead.
57695        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57696        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57697$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57698      fi
57699    fi
57700  fi
57701
57702  if test "x$FOUND_FREETYPE" = xyes; then
57703
57704  # Only process if variable expands to non-empty
57705
57706  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57707    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57708
57709  # Input might be given as Windows format, start by converting to
57710  # unix format.
57711  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57712  new_path=`$CYGPATH -u "$path"`
57713
57714  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57715  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57716  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57717  # "foo.exe" is OK but "foo" is an error.
57718  #
57719  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57720  # It is also a way to make sure we got the proper file name for the real test later on.
57721  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57722  if test "x$test_shortpath" = x; then
57723    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57724$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57725    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57726  fi
57727
57728  # Call helper function which possibly converts this using DOS-style short mode.
57729  # If so, the updated path is stored in $new_path.
57730
57731  input_path="$new_path"
57732  # Check if we need to convert this using DOS-style short mode. If the path
57733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57734  # take no chances and rewrite it.
57735  # Note: m4 eats our [], so we need to use [ and ] instead.
57736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57737  if test "x$has_forbidden_chars" != x; then
57738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57742      # Going to short mode and back again did indeed matter. Since short mode is
57743      # case insensitive, let's make it lowercase to improve readability.
57744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57745      # Now convert it back to Unix-style (cygpath)
57746      input_path=`$CYGPATH -u "$shortmode_path"`
57747      new_path="$input_path"
57748    fi
57749  fi
57750
57751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57752  if test "x$test_cygdrive_prefix" = x; then
57753    # As a simple fix, exclude /usr/bin since it's not a real path.
57754    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57756      # a path prefixed by /cygdrive for fixpath to work.
57757      new_path="$CYGWIN_ROOT_PATH$input_path"
57758    fi
57759  fi
57760
57761
57762  if test "x$path" != "x$new_path"; then
57763    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57765$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57766  fi
57767
57768    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57769
57770  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57771  has_colon=`$ECHO $path | $GREP ^.:`
57772  new_path="$path"
57773  if test "x$has_colon" = x; then
57774    # Not in mixed or Windows style, start by that.
57775    new_path=`cmd //c echo $path`
57776  fi
57777
57778
57779  input_path="$new_path"
57780  # Check if we need to convert this using DOS-style short mode. If the path
57781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57782  # take no chances and rewrite it.
57783  # Note: m4 eats our [], so we need to use [ and ] instead.
57784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57785  if test "x$has_forbidden_chars" != x; then
57786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57788  fi
57789
57790
57791  windows_path="$new_path"
57792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57793    unix_path=`$CYGPATH -u "$windows_path"`
57794    new_path="$unix_path"
57795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57797    new_path="$unix_path"
57798  fi
57799
57800  if test "x$path" != "x$new_path"; then
57801    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57803$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57804  fi
57805
57806  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57807  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57808
57809    else
57810      # We're on a unix platform. Hooray! :)
57811      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57812      has_space=`$ECHO "$path" | $GREP " "`
57813      if test "x$has_space" != x; then
57814        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57815$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57816        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57817      fi
57818
57819      # Use eval to expand a potential ~
57820      eval path="$path"
57821      if test ! -f "$path" && test ! -d "$path"; then
57822        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57823      fi
57824
57825      if test -d "$path"; then
57826        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57827      else
57828        dir="`$DIRNAME "$path"`"
57829        base="`$BASENAME "$path"`"
57830        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57831      fi
57832    fi
57833  fi
57834
57835
57836  # Only process if variable expands to non-empty
57837
57838  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57839    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57840
57841  # Input might be given as Windows format, start by converting to
57842  # unix format.
57843  path="$POTENTIAL_FREETYPE_LIB_PATH"
57844  new_path=`$CYGPATH -u "$path"`
57845
57846  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57847  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57848  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57849  # "foo.exe" is OK but "foo" is an error.
57850  #
57851  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57852  # It is also a way to make sure we got the proper file name for the real test later on.
57853  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57854  if test "x$test_shortpath" = x; then
57855    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57856$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57857    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57858  fi
57859
57860  # Call helper function which possibly converts this using DOS-style short mode.
57861  # If so, the updated path is stored in $new_path.
57862
57863  input_path="$new_path"
57864  # Check if we need to convert this using DOS-style short mode. If the path
57865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57866  # take no chances and rewrite it.
57867  # Note: m4 eats our [], so we need to use [ and ] instead.
57868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57869  if test "x$has_forbidden_chars" != x; then
57870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57874      # Going to short mode and back again did indeed matter. Since short mode is
57875      # case insensitive, let's make it lowercase to improve readability.
57876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57877      # Now convert it back to Unix-style (cygpath)
57878      input_path=`$CYGPATH -u "$shortmode_path"`
57879      new_path="$input_path"
57880    fi
57881  fi
57882
57883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57884  if test "x$test_cygdrive_prefix" = x; then
57885    # As a simple fix, exclude /usr/bin since it's not a real path.
57886    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57888      # a path prefixed by /cygdrive for fixpath to work.
57889      new_path="$CYGWIN_ROOT_PATH$input_path"
57890    fi
57891  fi
57892
57893
57894  if test "x$path" != "x$new_path"; then
57895    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57897$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57898  fi
57899
57900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57901
57902  path="$POTENTIAL_FREETYPE_LIB_PATH"
57903  has_colon=`$ECHO $path | $GREP ^.:`
57904  new_path="$path"
57905  if test "x$has_colon" = x; then
57906    # Not in mixed or Windows style, start by that.
57907    new_path=`cmd //c echo $path`
57908  fi
57909
57910
57911  input_path="$new_path"
57912  # Check if we need to convert this using DOS-style short mode. If the path
57913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57914  # take no chances and rewrite it.
57915  # Note: m4 eats our [], so we need to use [ and ] instead.
57916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57917  if test "x$has_forbidden_chars" != x; then
57918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57920  fi
57921
57922
57923  windows_path="$new_path"
57924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57925    unix_path=`$CYGPATH -u "$windows_path"`
57926    new_path="$unix_path"
57927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57929    new_path="$unix_path"
57930  fi
57931
57932  if test "x$path" != "x$new_path"; then
57933    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57935$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57936  fi
57937
57938  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57939  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57940
57941    else
57942      # We're on a unix platform. Hooray! :)
57943      path="$POTENTIAL_FREETYPE_LIB_PATH"
57944      has_space=`$ECHO "$path" | $GREP " "`
57945      if test "x$has_space" != x; then
57946        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57947$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57948        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57949      fi
57950
57951      # Use eval to expand a potential ~
57952      eval path="$path"
57953      if test ! -f "$path" && test ! -d "$path"; then
57954        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57955      fi
57956
57957      if test -d "$path"; then
57958        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57959      else
57960        dir="`$DIRNAME "$path"`"
57961        base="`$BASENAME "$path"`"
57962        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57963      fi
57964    fi
57965  fi
57966
57967
57968    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57969    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57970$as_echo_n "checking for freetype includes... " >&6; }
57971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57972$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57973    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57975$as_echo_n "checking for freetype libraries... " >&6; }
57976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57977$as_echo "$FREETYPE_LIB_PATH" >&6; }
57978  fi
57979
57980          if test "x$FOUND_FREETYPE" != xyes; then
57981            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
57982
57983  windows_path="$FREETYPE_BASE_DIR"
57984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57985    unix_path=`$CYGPATH -u "$windows_path"`
57986    FREETYPE_BASE_DIR="$unix_path"
57987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57989    FREETYPE_BASE_DIR="$unix_path"
57990  fi
57991
57992
57993  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57994  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57995  METHOD="well-known location"
57996
57997  # Let's start with an optimistic view of the world :-)
57998  FOUND_FREETYPE=yes
57999
58000  # First look for the canonical freetype main include file ft2build.h.
58001  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58002    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58003    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58004    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58005      # Fail.
58006      FOUND_FREETYPE=no
58007    fi
58008  fi
58009
58010  if test "x$FOUND_FREETYPE" = xyes; then
58011    # Include file found, let's continue the sanity check.
58012    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58013$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58014
58015    # Reset to default value
58016    FREETYPE_BASE_NAME=freetype
58017    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58018    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58019      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58020          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58021        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58022        # for the .6 version explicitly.
58023        FREETYPE_BASE_NAME=freetype.6
58024        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58025        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58026$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58027      else
58028        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58029$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58030        FOUND_FREETYPE=no
58031      fi
58032    else
58033      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58034        # On Windows, we will need both .lib and .dll file.
58035        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58036          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58037$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58038          FOUND_FREETYPE=no
58039        fi
58040      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58041          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58042        # Found lib in isa dir, use that instead.
58043        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58044        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58045$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58046      fi
58047    fi
58048  fi
58049
58050  if test "x$FOUND_FREETYPE" = xyes; then
58051
58052  # Only process if variable expands to non-empty
58053
58054  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58055    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58056
58057  # Input might be given as Windows format, start by converting to
58058  # unix format.
58059  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58060  new_path=`$CYGPATH -u "$path"`
58061
58062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58065  # "foo.exe" is OK but "foo" is an error.
58066  #
58067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58068  # It is also a way to make sure we got the proper file name for the real test later on.
58069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58070  if test "x$test_shortpath" = x; then
58071    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58072$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58073    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58074  fi
58075
58076  # Call helper function which possibly converts this using DOS-style short mode.
58077  # If so, the updated path is stored in $new_path.
58078
58079  input_path="$new_path"
58080  # Check if we need to convert this using DOS-style short mode. If the path
58081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58082  # take no chances and rewrite it.
58083  # Note: m4 eats our [], so we need to use [ and ] instead.
58084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58085  if test "x$has_forbidden_chars" != x; then
58086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58090      # Going to short mode and back again did indeed matter. Since short mode is
58091      # case insensitive, let's make it lowercase to improve readability.
58092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58093      # Now convert it back to Unix-style (cygpath)
58094      input_path=`$CYGPATH -u "$shortmode_path"`
58095      new_path="$input_path"
58096    fi
58097  fi
58098
58099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58100  if test "x$test_cygdrive_prefix" = x; then
58101    # As a simple fix, exclude /usr/bin since it's not a real path.
58102    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58104      # a path prefixed by /cygdrive for fixpath to work.
58105      new_path="$CYGWIN_ROOT_PATH$input_path"
58106    fi
58107  fi
58108
58109
58110  if test "x$path" != "x$new_path"; then
58111    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58113$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58114  fi
58115
58116    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58117
58118  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58119  has_colon=`$ECHO $path | $GREP ^.:`
58120  new_path="$path"
58121  if test "x$has_colon" = x; then
58122    # Not in mixed or Windows style, start by that.
58123    new_path=`cmd //c echo $path`
58124  fi
58125
58126
58127  input_path="$new_path"
58128  # Check if we need to convert this using DOS-style short mode. If the path
58129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58130  # take no chances and rewrite it.
58131  # Note: m4 eats our [], so we need to use [ and ] instead.
58132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58133  if test "x$has_forbidden_chars" != x; then
58134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58136  fi
58137
58138
58139  windows_path="$new_path"
58140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58141    unix_path=`$CYGPATH -u "$windows_path"`
58142    new_path="$unix_path"
58143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58145    new_path="$unix_path"
58146  fi
58147
58148  if test "x$path" != "x$new_path"; then
58149    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58151$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58152  fi
58153
58154  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58155  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58156
58157    else
58158      # We're on a unix platform. Hooray! :)
58159      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58160      has_space=`$ECHO "$path" | $GREP " "`
58161      if test "x$has_space" != x; then
58162        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58163$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58164        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58165      fi
58166
58167      # Use eval to expand a potential ~
58168      eval path="$path"
58169      if test ! -f "$path" && test ! -d "$path"; then
58170        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58171      fi
58172
58173      if test -d "$path"; then
58174        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58175      else
58176        dir="`$DIRNAME "$path"`"
58177        base="`$BASENAME "$path"`"
58178        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58179      fi
58180    fi
58181  fi
58182
58183
58184  # Only process if variable expands to non-empty
58185
58186  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58187    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58188
58189  # Input might be given as Windows format, start by converting to
58190  # unix format.
58191  path="$POTENTIAL_FREETYPE_LIB_PATH"
58192  new_path=`$CYGPATH -u "$path"`
58193
58194  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58195  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58196  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58197  # "foo.exe" is OK but "foo" is an error.
58198  #
58199  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58200  # It is also a way to make sure we got the proper file name for the real test later on.
58201  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58202  if test "x$test_shortpath" = x; then
58203    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58204$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58205    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58206  fi
58207
58208  # Call helper function which possibly converts this using DOS-style short mode.
58209  # If so, the updated path is stored in $new_path.
58210
58211  input_path="$new_path"
58212  # Check if we need to convert this using DOS-style short mode. If the path
58213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58214  # take no chances and rewrite it.
58215  # Note: m4 eats our [], so we need to use [ and ] instead.
58216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58217  if test "x$has_forbidden_chars" != x; then
58218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58222      # Going to short mode and back again did indeed matter. Since short mode is
58223      # case insensitive, let's make it lowercase to improve readability.
58224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58225      # Now convert it back to Unix-style (cygpath)
58226      input_path=`$CYGPATH -u "$shortmode_path"`
58227      new_path="$input_path"
58228    fi
58229  fi
58230
58231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58232  if test "x$test_cygdrive_prefix" = x; then
58233    # As a simple fix, exclude /usr/bin since it's not a real path.
58234    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58236      # a path prefixed by /cygdrive for fixpath to work.
58237      new_path="$CYGWIN_ROOT_PATH$input_path"
58238    fi
58239  fi
58240
58241
58242  if test "x$path" != "x$new_path"; then
58243    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58245$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58246  fi
58247
58248    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58249
58250  path="$POTENTIAL_FREETYPE_LIB_PATH"
58251  has_colon=`$ECHO $path | $GREP ^.:`
58252  new_path="$path"
58253  if test "x$has_colon" = x; then
58254    # Not in mixed or Windows style, start by that.
58255    new_path=`cmd //c echo $path`
58256  fi
58257
58258
58259  input_path="$new_path"
58260  # Check if we need to convert this using DOS-style short mode. If the path
58261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58262  # take no chances and rewrite it.
58263  # Note: m4 eats our [], so we need to use [ and ] instead.
58264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58265  if test "x$has_forbidden_chars" != x; then
58266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58267    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58268  fi
58269
58270
58271  windows_path="$new_path"
58272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58273    unix_path=`$CYGPATH -u "$windows_path"`
58274    new_path="$unix_path"
58275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58277    new_path="$unix_path"
58278  fi
58279
58280  if test "x$path" != "x$new_path"; then
58281    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58283$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58284  fi
58285
58286  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58287  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58288
58289    else
58290      # We're on a unix platform. Hooray! :)
58291      path="$POTENTIAL_FREETYPE_LIB_PATH"
58292      has_space=`$ECHO "$path" | $GREP " "`
58293      if test "x$has_space" != x; then
58294        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58295$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58296        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58297      fi
58298
58299      # Use eval to expand a potential ~
58300      eval path="$path"
58301      if test ! -f "$path" && test ! -d "$path"; then
58302        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58303      fi
58304
58305      if test -d "$path"; then
58306        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58307      else
58308        dir="`$DIRNAME "$path"`"
58309        base="`$BASENAME "$path"`"
58310        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58311      fi
58312    fi
58313  fi
58314
58315
58316    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58317    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58318$as_echo_n "checking for freetype includes... " >&6; }
58319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58320$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58321    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58323$as_echo_n "checking for freetype libraries... " >&6; }
58324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58325$as_echo "$FREETYPE_LIB_PATH" >&6; }
58326  fi
58327
58328          fi
58329          if test "x$FOUND_FREETYPE" != xyes; then
58330            FREETYPE_BASE_DIR="$HOME/freetype"
58331
58332  windows_path="$FREETYPE_BASE_DIR"
58333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58334    unix_path=`$CYGPATH -u "$windows_path"`
58335    FREETYPE_BASE_DIR="$unix_path"
58336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58338    FREETYPE_BASE_DIR="$unix_path"
58339  fi
58340
58341            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58342
58343  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58344  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58345  METHOD="well-known location"
58346
58347  # Let's start with an optimistic view of the world :-)
58348  FOUND_FREETYPE=yes
58349
58350  # First look for the canonical freetype main include file ft2build.h.
58351  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58352    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58353    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58354    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58355      # Fail.
58356      FOUND_FREETYPE=no
58357    fi
58358  fi
58359
58360  if test "x$FOUND_FREETYPE" = xyes; then
58361    # Include file found, let's continue the sanity check.
58362    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58363$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58364
58365    # Reset to default value
58366    FREETYPE_BASE_NAME=freetype
58367    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58368    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58369      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58370          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58371        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58372        # for the .6 version explicitly.
58373        FREETYPE_BASE_NAME=freetype.6
58374        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58375        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58376$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58377      else
58378        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58379$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58380        FOUND_FREETYPE=no
58381      fi
58382    else
58383      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58384        # On Windows, we will need both .lib and .dll file.
58385        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58386          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58387$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58388          FOUND_FREETYPE=no
58389        fi
58390      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58391          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58392        # Found lib in isa dir, use that instead.
58393        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58394        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58395$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58396      fi
58397    fi
58398  fi
58399
58400  if test "x$FOUND_FREETYPE" = xyes; then
58401
58402  # Only process if variable expands to non-empty
58403
58404  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58405    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58406
58407  # Input might be given as Windows format, start by converting to
58408  # unix format.
58409  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58410  new_path=`$CYGPATH -u "$path"`
58411
58412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58415  # "foo.exe" is OK but "foo" is an error.
58416  #
58417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58418  # It is also a way to make sure we got the proper file name for the real test later on.
58419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58420  if test "x$test_shortpath" = x; then
58421    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58422$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58423    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58424  fi
58425
58426  # Call helper function which possibly converts this using DOS-style short mode.
58427  # If so, the updated path is stored in $new_path.
58428
58429  input_path="$new_path"
58430  # Check if we need to convert this using DOS-style short mode. If the path
58431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58432  # take no chances and rewrite it.
58433  # Note: m4 eats our [], so we need to use [ and ] instead.
58434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58435  if test "x$has_forbidden_chars" != x; then
58436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58440      # Going to short mode and back again did indeed matter. Since short mode is
58441      # case insensitive, let's make it lowercase to improve readability.
58442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58443      # Now convert it back to Unix-style (cygpath)
58444      input_path=`$CYGPATH -u "$shortmode_path"`
58445      new_path="$input_path"
58446    fi
58447  fi
58448
58449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58450  if test "x$test_cygdrive_prefix" = x; then
58451    # As a simple fix, exclude /usr/bin since it's not a real path.
58452    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58454      # a path prefixed by /cygdrive for fixpath to work.
58455      new_path="$CYGWIN_ROOT_PATH$input_path"
58456    fi
58457  fi
58458
58459
58460  if test "x$path" != "x$new_path"; then
58461    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58463$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58464  fi
58465
58466    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58467
58468  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58469  has_colon=`$ECHO $path | $GREP ^.:`
58470  new_path="$path"
58471  if test "x$has_colon" = x; then
58472    # Not in mixed or Windows style, start by that.
58473    new_path=`cmd //c echo $path`
58474  fi
58475
58476
58477  input_path="$new_path"
58478  # Check if we need to convert this using DOS-style short mode. If the path
58479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58480  # take no chances and rewrite it.
58481  # Note: m4 eats our [], so we need to use [ and ] instead.
58482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58483  if test "x$has_forbidden_chars" != x; then
58484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58486  fi
58487
58488
58489  windows_path="$new_path"
58490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58491    unix_path=`$CYGPATH -u "$windows_path"`
58492    new_path="$unix_path"
58493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58495    new_path="$unix_path"
58496  fi
58497
58498  if test "x$path" != "x$new_path"; then
58499    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58501$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58502  fi
58503
58504  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58505  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58506
58507    else
58508      # We're on a unix platform. Hooray! :)
58509      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58510      has_space=`$ECHO "$path" | $GREP " "`
58511      if test "x$has_space" != x; then
58512        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58513$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58514        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58515      fi
58516
58517      # Use eval to expand a potential ~
58518      eval path="$path"
58519      if test ! -f "$path" && test ! -d "$path"; then
58520        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58521      fi
58522
58523      if test -d "$path"; then
58524        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58525      else
58526        dir="`$DIRNAME "$path"`"
58527        base="`$BASENAME "$path"`"
58528        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58529      fi
58530    fi
58531  fi
58532
58533
58534  # Only process if variable expands to non-empty
58535
58536  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58538
58539  # Input might be given as Windows format, start by converting to
58540  # unix format.
58541  path="$POTENTIAL_FREETYPE_LIB_PATH"
58542  new_path=`$CYGPATH -u "$path"`
58543
58544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58547  # "foo.exe" is OK but "foo" is an error.
58548  #
58549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58550  # It is also a way to make sure we got the proper file name for the real test later on.
58551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58552  if test "x$test_shortpath" = x; then
58553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58554$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58555    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58556  fi
58557
58558  # Call helper function which possibly converts this using DOS-style short mode.
58559  # If so, the updated path is stored in $new_path.
58560
58561  input_path="$new_path"
58562  # Check if we need to convert this using DOS-style short mode. If the path
58563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58564  # take no chances and rewrite it.
58565  # Note: m4 eats our [], so we need to use [ and ] instead.
58566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58567  if test "x$has_forbidden_chars" != x; then
58568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58572      # Going to short mode and back again did indeed matter. Since short mode is
58573      # case insensitive, let's make it lowercase to improve readability.
58574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58575      # Now convert it back to Unix-style (cygpath)
58576      input_path=`$CYGPATH -u "$shortmode_path"`
58577      new_path="$input_path"
58578    fi
58579  fi
58580
58581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58582  if test "x$test_cygdrive_prefix" = x; then
58583    # As a simple fix, exclude /usr/bin since it's not a real path.
58584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58586      # a path prefixed by /cygdrive for fixpath to work.
58587      new_path="$CYGWIN_ROOT_PATH$input_path"
58588    fi
58589  fi
58590
58591
58592  if test "x$path" != "x$new_path"; then
58593    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58595$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58596  fi
58597
58598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58599
58600  path="$POTENTIAL_FREETYPE_LIB_PATH"
58601  has_colon=`$ECHO $path | $GREP ^.:`
58602  new_path="$path"
58603  if test "x$has_colon" = x; then
58604    # Not in mixed or Windows style, start by that.
58605    new_path=`cmd //c echo $path`
58606  fi
58607
58608
58609  input_path="$new_path"
58610  # Check if we need to convert this using DOS-style short mode. If the path
58611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58612  # take no chances and rewrite it.
58613  # Note: m4 eats our [], so we need to use [ and ] instead.
58614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58615  if test "x$has_forbidden_chars" != x; then
58616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58618  fi
58619
58620
58621  windows_path="$new_path"
58622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58623    unix_path=`$CYGPATH -u "$windows_path"`
58624    new_path="$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    new_path="$unix_path"
58628  fi
58629
58630  if test "x$path" != "x$new_path"; then
58631    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58633$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58634  fi
58635
58636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58638
58639    else
58640      # We're on a unix platform. Hooray! :)
58641      path="$POTENTIAL_FREETYPE_LIB_PATH"
58642      has_space=`$ECHO "$path" | $GREP " "`
58643      if test "x$has_space" != x; then
58644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58645$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58646        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58647      fi
58648
58649      # Use eval to expand a potential ~
58650      eval path="$path"
58651      if test ! -f "$path" && test ! -d "$path"; then
58652        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58653      fi
58654
58655      if test -d "$path"; then
58656        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58657      else
58658        dir="`$DIRNAME "$path"`"
58659        base="`$BASENAME "$path"`"
58660        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58661      fi
58662    fi
58663  fi
58664
58665
58666    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58668$as_echo_n "checking for freetype includes... " >&6; }
58669    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58670$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58671    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58672    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58673$as_echo_n "checking for freetype libraries... " >&6; }
58674    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58675$as_echo "$FREETYPE_LIB_PATH" >&6; }
58676  fi
58677
58678            else
58679
58680  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58681  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58682  METHOD="well-known location"
58683
58684  # Let's start with an optimistic view of the world :-)
58685  FOUND_FREETYPE=yes
58686
58687  # First look for the canonical freetype main include file ft2build.h.
58688  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58689    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58690    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58691    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58692      # Fail.
58693      FOUND_FREETYPE=no
58694    fi
58695  fi
58696
58697  if test "x$FOUND_FREETYPE" = xyes; then
58698    # Include file found, let's continue the sanity check.
58699    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58700$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58701
58702    # Reset to default value
58703    FREETYPE_BASE_NAME=freetype
58704    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58705    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58706      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58707          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58708        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58709        # for the .6 version explicitly.
58710        FREETYPE_BASE_NAME=freetype.6
58711        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58712        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58713$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58714      else
58715        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58716$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58717        FOUND_FREETYPE=no
58718      fi
58719    else
58720      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58721        # On Windows, we will need both .lib and .dll file.
58722        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58723          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58724$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58725          FOUND_FREETYPE=no
58726        fi
58727      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58728          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58729        # Found lib in isa dir, use that instead.
58730        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58731        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58732$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58733      fi
58734    fi
58735  fi
58736
58737  if test "x$FOUND_FREETYPE" = xyes; then
58738
58739  # Only process if variable expands to non-empty
58740
58741  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58743
58744  # Input might be given as Windows format, start by converting to
58745  # unix format.
58746  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58747  new_path=`$CYGPATH -u "$path"`
58748
58749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58752  # "foo.exe" is OK but "foo" is an error.
58753  #
58754  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58755  # It is also a way to make sure we got the proper file name for the real test later on.
58756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58757  if test "x$test_shortpath" = x; then
58758    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58759$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58760    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58761  fi
58762
58763  # Call helper function which possibly converts this using DOS-style short mode.
58764  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58777      # Going to short mode and back again did indeed matter. Since short mode is
58778      # case insensitive, let's make it lowercase to improve readability.
58779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58780      # Now convert it back to Unix-style (cygpath)
58781      input_path=`$CYGPATH -u "$shortmode_path"`
58782      new_path="$input_path"
58783    fi
58784  fi
58785
58786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58787  if test "x$test_cygdrive_prefix" = x; then
58788    # As a simple fix, exclude /usr/bin since it's not a real path.
58789    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58791      # a path prefixed by /cygdrive for fixpath to work.
58792      new_path="$CYGWIN_ROOT_PATH$input_path"
58793    fi
58794  fi
58795
58796
58797  if test "x$path" != "x$new_path"; then
58798    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58800$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58801  fi
58802
58803    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58804
58805  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58806  has_colon=`$ECHO $path | $GREP ^.:`
58807  new_path="$path"
58808  if test "x$has_colon" = x; then
58809    # Not in mixed or Windows style, start by that.
58810    new_path=`cmd //c echo $path`
58811  fi
58812
58813
58814  input_path="$new_path"
58815  # Check if we need to convert this using DOS-style short mode. If the path
58816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58817  # take no chances and rewrite it.
58818  # Note: m4 eats our [], so we need to use [ and ] instead.
58819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58820  if test "x$has_forbidden_chars" != x; then
58821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58823  fi
58824
58825
58826  windows_path="$new_path"
58827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58828    unix_path=`$CYGPATH -u "$windows_path"`
58829    new_path="$unix_path"
58830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58832    new_path="$unix_path"
58833  fi
58834
58835  if test "x$path" != "x$new_path"; then
58836    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58838$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58839  fi
58840
58841  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58842  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58843
58844    else
58845      # We're on a unix platform. Hooray! :)
58846      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58847      has_space=`$ECHO "$path" | $GREP " "`
58848      if test "x$has_space" != x; then
58849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58850$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58851        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58852      fi
58853
58854      # Use eval to expand a potential ~
58855      eval path="$path"
58856      if test ! -f "$path" && test ! -d "$path"; then
58857        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58858      fi
58859
58860      if test -d "$path"; then
58861        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58862      else
58863        dir="`$DIRNAME "$path"`"
58864        base="`$BASENAME "$path"`"
58865        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58866      fi
58867    fi
58868  fi
58869
58870
58871  # Only process if variable expands to non-empty
58872
58873  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58875
58876  # Input might be given as Windows format, start by converting to
58877  # unix format.
58878  path="$POTENTIAL_FREETYPE_LIB_PATH"
58879  new_path=`$CYGPATH -u "$path"`
58880
58881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58884  # "foo.exe" is OK but "foo" is an error.
58885  #
58886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58887  # It is also a way to make sure we got the proper file name for the real test later on.
58888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58889  if test "x$test_shortpath" = x; then
58890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58891$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58892    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58893  fi
58894
58895  # Call helper function which possibly converts this using DOS-style short mode.
58896  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58909      # Going to short mode and back again did indeed matter. Since short mode is
58910      # case insensitive, let's make it lowercase to improve readability.
58911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58912      # Now convert it back to Unix-style (cygpath)
58913      input_path=`$CYGPATH -u "$shortmode_path"`
58914      new_path="$input_path"
58915    fi
58916  fi
58917
58918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58919  if test "x$test_cygdrive_prefix" = x; then
58920    # As a simple fix, exclude /usr/bin since it's not a real path.
58921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58923      # a path prefixed by /cygdrive for fixpath to work.
58924      new_path="$CYGWIN_ROOT_PATH$input_path"
58925    fi
58926  fi
58927
58928
58929  if test "x$path" != "x$new_path"; then
58930    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58932$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58933  fi
58934
58935    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58936
58937  path="$POTENTIAL_FREETYPE_LIB_PATH"
58938  has_colon=`$ECHO $path | $GREP ^.:`
58939  new_path="$path"
58940  if test "x$has_colon" = x; then
58941    # Not in mixed or Windows style, start by that.
58942    new_path=`cmd //c echo $path`
58943  fi
58944
58945
58946  input_path="$new_path"
58947  # Check if we need to convert this using DOS-style short mode. If the path
58948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58949  # take no chances and rewrite it.
58950  # Note: m4 eats our [], so we need to use [ and ] instead.
58951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58952  if test "x$has_forbidden_chars" != x; then
58953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58955  fi
58956
58957
58958  windows_path="$new_path"
58959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58960    unix_path=`$CYGPATH -u "$windows_path"`
58961    new_path="$unix_path"
58962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58964    new_path="$unix_path"
58965  fi
58966
58967  if test "x$path" != "x$new_path"; then
58968    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58970$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58971  fi
58972
58973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58975
58976    else
58977      # We're on a unix platform. Hooray! :)
58978      path="$POTENTIAL_FREETYPE_LIB_PATH"
58979      has_space=`$ECHO "$path" | $GREP " "`
58980      if test "x$has_space" != x; then
58981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58982$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58983        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58984      fi
58985
58986      # Use eval to expand a potential ~
58987      eval path="$path"
58988      if test ! -f "$path" && test ! -d "$path"; then
58989        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58990      fi
58991
58992      if test -d "$path"; then
58993        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58994      else
58995        dir="`$DIRNAME "$path"`"
58996        base="`$BASENAME "$path"`"
58997        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58998      fi
58999    fi
59000  fi
59001
59002
59003    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59005$as_echo_n "checking for freetype includes... " >&6; }
59006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59007$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59008    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59010$as_echo_n "checking for freetype libraries... " >&6; }
59011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59012$as_echo "$FREETYPE_LIB_PATH" >&6; }
59013  fi
59014
59015            fi
59016            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59017                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59018              # Source is available, as a last resort try to build freetype in default location
59019
59020  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59021  BUILD_FREETYPE=yes
59022
59023  # Check if the freetype sources are acessible..
59024  if ! test -d $FREETYPE_SRC_PATH; then
59025    { $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
59026$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59027    BUILD_FREETYPE=no
59028  fi
59029  # ..and contain a vc2010 project file
59030  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59031  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59032    { $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
59033$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59034    BUILD_FREETYPE=no
59035  fi
59036  # Now check if configure found a version of 'msbuild.exe'
59037  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59038    { $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
59039$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;}
59040    BUILD_FREETYPE=no
59041  fi
59042
59043  # Ready to go..
59044  if test "x$BUILD_FREETYPE" = xyes; then
59045    # msbuild requires trailing slashes for output directories
59046    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59047    freetype_lib_path_unix="$freetype_lib_path"
59048    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59049
59050  unix_path="$vcxproj_path"
59051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59052    windows_path=`$CYGPATH -m "$unix_path"`
59053    vcxproj_path="$windows_path"
59054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59055    windows_path=`cmd //c echo $unix_path`
59056    vcxproj_path="$windows_path"
59057  fi
59058
59059
59060  unix_path="$freetype_lib_path"
59061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59062    windows_path=`$CYGPATH -m "$unix_path"`
59063    freetype_lib_path="$windows_path"
59064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59065    windows_path=`cmd //c echo $unix_path`
59066    freetype_lib_path="$windows_path"
59067  fi
59068
59069
59070  unix_path="$freetype_obj_path"
59071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59072    windows_path=`$CYGPATH -m "$unix_path"`
59073    freetype_obj_path="$windows_path"
59074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59075    windows_path=`cmd //c echo $unix_path`
59076    freetype_obj_path="$windows_path"
59077  fi
59078
59079    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59080      freetype_platform=x64
59081    else
59082      freetype_platform=win32
59083    fi
59084
59085    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59086    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59087    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59088    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59089    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59090$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59091
59092    # First we try to build the freetype.dll
59093    $ECHO -e "@echo off\n"\
59094        "$MSBUILD $vcxproj_path "\
59095        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59096        "/p:Configuration=\"Release Multithreaded\" "\
59097        "/p:Platform=$freetype_platform "\
59098        "/p:ConfigurationType=DynamicLibrary "\
59099        "/p:TargetName=freetype "\
59100        "/p:OutDir=\"$freetype_lib_path\" "\
59101        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59102    cmd /c freetype.bat
59103
59104    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59105      # If that succeeds we also build freetype.lib
59106      $ECHO -e "@echo off\n"\
59107          "$MSBUILD $vcxproj_path "\
59108          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59109          "/p:Configuration=\"Release Multithreaded\" "\
59110          "/p:Platform=$freetype_platform "\
59111          "/p:ConfigurationType=StaticLibrary "\
59112          "/p:TargetName=freetype "\
59113          "/p:OutDir=\"$freetype_lib_path\" "\
59114          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59115      cmd /c freetype.bat
59116
59117      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59118        # Once we build both, lib and dll, set freetype lib and include path appropriately
59119        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59120        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59121        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59122$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59123      else
59124        BUILD_FREETYPE=no
59125      fi
59126    else
59127      BUILD_FREETYPE=no
59128    fi
59129  fi
59130
59131              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59132
59133  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59134  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59135  METHOD="well-known location"
59136
59137  # Let's start with an optimistic view of the world :-)
59138  FOUND_FREETYPE=yes
59139
59140  # First look for the canonical freetype main include file ft2build.h.
59141  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59142    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59143    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59144    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59145      # Fail.
59146      FOUND_FREETYPE=no
59147    fi
59148  fi
59149
59150  if test "x$FOUND_FREETYPE" = xyes; then
59151    # Include file found, let's continue the sanity check.
59152    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59153$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59154
59155    # Reset to default value
59156    FREETYPE_BASE_NAME=freetype
59157    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59158    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59159      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59160          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59161        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59162        # for the .6 version explicitly.
59163        FREETYPE_BASE_NAME=freetype.6
59164        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59165        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59166$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59167      else
59168        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59169$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59170        FOUND_FREETYPE=no
59171      fi
59172    else
59173      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59174        # On Windows, we will need both .lib and .dll file.
59175        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59176          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59177$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59178          FOUND_FREETYPE=no
59179        fi
59180      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59181          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59182        # Found lib in isa dir, use that instead.
59183        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59184        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59185$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59186      fi
59187    fi
59188  fi
59189
59190  if test "x$FOUND_FREETYPE" = xyes; then
59191
59192  # Only process if variable expands to non-empty
59193
59194  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59195    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59196
59197  # Input might be given as Windows format, start by converting to
59198  # unix format.
59199  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59200  new_path=`$CYGPATH -u "$path"`
59201
59202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59205  # "foo.exe" is OK but "foo" is an error.
59206  #
59207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59208  # It is also a way to make sure we got the proper file name for the real test later on.
59209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59210  if test "x$test_shortpath" = x; then
59211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59212$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59213    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59214  fi
59215
59216  # Call helper function which possibly converts this using DOS-style short mode.
59217  # If so, the updated path is stored in $new_path.
59218
59219  input_path="$new_path"
59220  # Check if we need to convert this using DOS-style short mode. If the path
59221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59222  # take no chances and rewrite it.
59223  # Note: m4 eats our [], so we need to use [ and ] instead.
59224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59225  if test "x$has_forbidden_chars" != x; then
59226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59230      # Going to short mode and back again did indeed matter. Since short mode is
59231      # case insensitive, let's make it lowercase to improve readability.
59232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59233      # Now convert it back to Unix-style (cygpath)
59234      input_path=`$CYGPATH -u "$shortmode_path"`
59235      new_path="$input_path"
59236    fi
59237  fi
59238
59239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59240  if test "x$test_cygdrive_prefix" = x; then
59241    # As a simple fix, exclude /usr/bin since it's not a real path.
59242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59244      # a path prefixed by /cygdrive for fixpath to work.
59245      new_path="$CYGWIN_ROOT_PATH$input_path"
59246    fi
59247  fi
59248
59249
59250  if test "x$path" != "x$new_path"; then
59251    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59253$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59254  fi
59255
59256    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59257
59258  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59259  has_colon=`$ECHO $path | $GREP ^.:`
59260  new_path="$path"
59261  if test "x$has_colon" = x; then
59262    # Not in mixed or Windows style, start by that.
59263    new_path=`cmd //c echo $path`
59264  fi
59265
59266
59267  input_path="$new_path"
59268  # Check if we need to convert this using DOS-style short mode. If the path
59269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59270  # take no chances and rewrite it.
59271  # Note: m4 eats our [], so we need to use [ and ] instead.
59272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59273  if test "x$has_forbidden_chars" != x; then
59274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59276  fi
59277
59278
59279  windows_path="$new_path"
59280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59281    unix_path=`$CYGPATH -u "$windows_path"`
59282    new_path="$unix_path"
59283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59285    new_path="$unix_path"
59286  fi
59287
59288  if test "x$path" != "x$new_path"; then
59289    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59291$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59292  fi
59293
59294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59296
59297    else
59298      # We're on a unix platform. Hooray! :)
59299      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59300      has_space=`$ECHO "$path" | $GREP " "`
59301      if test "x$has_space" != x; then
59302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59303$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59304        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59305      fi
59306
59307      # Use eval to expand a potential ~
59308      eval path="$path"
59309      if test ! -f "$path" && test ! -d "$path"; then
59310        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59311      fi
59312
59313      if test -d "$path"; then
59314        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59315      else
59316        dir="`$DIRNAME "$path"`"
59317        base="`$BASENAME "$path"`"
59318        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59319      fi
59320    fi
59321  fi
59322
59323
59324  # Only process if variable expands to non-empty
59325
59326  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59327    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59328
59329  # Input might be given as Windows format, start by converting to
59330  # unix format.
59331  path="$POTENTIAL_FREETYPE_LIB_PATH"
59332  new_path=`$CYGPATH -u "$path"`
59333
59334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59337  # "foo.exe" is OK but "foo" is an error.
59338  #
59339  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59340  # It is also a way to make sure we got the proper file name for the real test later on.
59341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59342  if test "x$test_shortpath" = x; then
59343    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59344$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59345    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59346  fi
59347
59348  # Call helper function which possibly converts this using DOS-style short mode.
59349  # If so, the updated path is stored in $new_path.
59350
59351  input_path="$new_path"
59352  # Check if we need to convert this using DOS-style short mode. If the path
59353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59354  # take no chances and rewrite it.
59355  # Note: m4 eats our [], so we need to use [ and ] instead.
59356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59357  if test "x$has_forbidden_chars" != x; then
59358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59362      # Going to short mode and back again did indeed matter. Since short mode is
59363      # case insensitive, let's make it lowercase to improve readability.
59364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59365      # Now convert it back to Unix-style (cygpath)
59366      input_path=`$CYGPATH -u "$shortmode_path"`
59367      new_path="$input_path"
59368    fi
59369  fi
59370
59371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59372  if test "x$test_cygdrive_prefix" = x; then
59373    # As a simple fix, exclude /usr/bin since it's not a real path.
59374    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59376      # a path prefixed by /cygdrive for fixpath to work.
59377      new_path="$CYGWIN_ROOT_PATH$input_path"
59378    fi
59379  fi
59380
59381
59382  if test "x$path" != "x$new_path"; then
59383    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59385$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59386  fi
59387
59388    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59389
59390  path="$POTENTIAL_FREETYPE_LIB_PATH"
59391  has_colon=`$ECHO $path | $GREP ^.:`
59392  new_path="$path"
59393  if test "x$has_colon" = x; then
59394    # Not in mixed or Windows style, start by that.
59395    new_path=`cmd //c echo $path`
59396  fi
59397
59398
59399  input_path="$new_path"
59400  # Check if we need to convert this using DOS-style short mode. If the path
59401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59402  # take no chances and rewrite it.
59403  # Note: m4 eats our [], so we need to use [ and ] instead.
59404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59405  if test "x$has_forbidden_chars" != x; then
59406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59407    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59408  fi
59409
59410
59411  windows_path="$new_path"
59412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59413    unix_path=`$CYGPATH -u "$windows_path"`
59414    new_path="$unix_path"
59415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59417    new_path="$unix_path"
59418  fi
59419
59420  if test "x$path" != "x$new_path"; then
59421    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59423$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59424  fi
59425
59426  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59427  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59428
59429    else
59430      # We're on a unix platform. Hooray! :)
59431      path="$POTENTIAL_FREETYPE_LIB_PATH"
59432      has_space=`$ECHO "$path" | $GREP " "`
59433      if test "x$has_space" != x; then
59434        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59435$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59436        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59437      fi
59438
59439      # Use eval to expand a potential ~
59440      eval path="$path"
59441      if test ! -f "$path" && test ! -d "$path"; then
59442        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59443      fi
59444
59445      if test -d "$path"; then
59446        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59447      else
59448        dir="`$DIRNAME "$path"`"
59449        base="`$BASENAME "$path"`"
59450        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59451      fi
59452    fi
59453  fi
59454
59455
59456    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59457    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59458$as_echo_n "checking for freetype includes... " >&6; }
59459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59460$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59461    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59463$as_echo_n "checking for freetype libraries... " >&6; }
59464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59465$as_echo "$FREETYPE_LIB_PATH" >&6; }
59466  fi
59467
59468              else
59469
59470  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59471  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59472  METHOD="well-known location"
59473
59474  # Let's start with an optimistic view of the world :-)
59475  FOUND_FREETYPE=yes
59476
59477  # First look for the canonical freetype main include file ft2build.h.
59478  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59479    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59480    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59481    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59482      # Fail.
59483      FOUND_FREETYPE=no
59484    fi
59485  fi
59486
59487  if test "x$FOUND_FREETYPE" = xyes; then
59488    # Include file found, let's continue the sanity check.
59489    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59490$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59491
59492    # Reset to default value
59493    FREETYPE_BASE_NAME=freetype
59494    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59495    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59496      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59497          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59498        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59499        # for the .6 version explicitly.
59500        FREETYPE_BASE_NAME=freetype.6
59501        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59502        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59503$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59504      else
59505        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59506$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59507        FOUND_FREETYPE=no
59508      fi
59509    else
59510      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59511        # On Windows, we will need both .lib and .dll file.
59512        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59513          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59514$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59515          FOUND_FREETYPE=no
59516        fi
59517      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59518          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59519        # Found lib in isa dir, use that instead.
59520        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59521        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59522$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59523      fi
59524    fi
59525  fi
59526
59527  if test "x$FOUND_FREETYPE" = xyes; then
59528
59529  # Only process if variable expands to non-empty
59530
59531  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59533
59534  # Input might be given as Windows format, start by converting to
59535  # unix format.
59536  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59537  new_path=`$CYGPATH -u "$path"`
59538
59539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59542  # "foo.exe" is OK but "foo" is an error.
59543  #
59544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59545  # It is also a way to make sure we got the proper file name for the real test later on.
59546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59547  if test "x$test_shortpath" = x; then
59548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59549$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59550    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59551  fi
59552
59553  # Call helper function which possibly converts this using DOS-style short mode.
59554  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59567      # Going to short mode and back again did indeed matter. Since short mode is
59568      # case insensitive, let's make it lowercase to improve readability.
59569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59570      # Now convert it back to Unix-style (cygpath)
59571      input_path=`$CYGPATH -u "$shortmode_path"`
59572      new_path="$input_path"
59573    fi
59574  fi
59575
59576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59577  if test "x$test_cygdrive_prefix" = x; then
59578    # As a simple fix, exclude /usr/bin since it's not a real path.
59579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59581      # a path prefixed by /cygdrive for fixpath to work.
59582      new_path="$CYGWIN_ROOT_PATH$input_path"
59583    fi
59584  fi
59585
59586
59587  if test "x$path" != "x$new_path"; then
59588    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59590$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59591  fi
59592
59593    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59594
59595  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59596  has_colon=`$ECHO $path | $GREP ^.:`
59597  new_path="$path"
59598  if test "x$has_colon" = x; then
59599    # Not in mixed or Windows style, start by that.
59600    new_path=`cmd //c echo $path`
59601  fi
59602
59603
59604  input_path="$new_path"
59605  # Check if we need to convert this using DOS-style short mode. If the path
59606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59607  # take no chances and rewrite it.
59608  # Note: m4 eats our [], so we need to use [ and ] instead.
59609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59610  if test "x$has_forbidden_chars" != x; then
59611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59613  fi
59614
59615
59616  windows_path="$new_path"
59617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59618    unix_path=`$CYGPATH -u "$windows_path"`
59619    new_path="$unix_path"
59620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59622    new_path="$unix_path"
59623  fi
59624
59625  if test "x$path" != "x$new_path"; then
59626    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59628$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59629  fi
59630
59631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59633
59634    else
59635      # We're on a unix platform. Hooray! :)
59636      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59637      has_space=`$ECHO "$path" | $GREP " "`
59638      if test "x$has_space" != x; then
59639        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59640$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59641        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59642      fi
59643
59644      # Use eval to expand a potential ~
59645      eval path="$path"
59646      if test ! -f "$path" && test ! -d "$path"; then
59647        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59648      fi
59649
59650      if test -d "$path"; then
59651        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59652      else
59653        dir="`$DIRNAME "$path"`"
59654        base="`$BASENAME "$path"`"
59655        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59656      fi
59657    fi
59658  fi
59659
59660
59661  # Only process if variable expands to non-empty
59662
59663  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59664    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59665
59666  # Input might be given as Windows format, start by converting to
59667  # unix format.
59668  path="$POTENTIAL_FREETYPE_LIB_PATH"
59669  new_path=`$CYGPATH -u "$path"`
59670
59671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59674  # "foo.exe" is OK but "foo" is an error.
59675  #
59676  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59677  # It is also a way to make sure we got the proper file name for the real test later on.
59678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59679  if test "x$test_shortpath" = x; then
59680    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59681$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59682    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59683  fi
59684
59685  # Call helper function which possibly converts this using DOS-style short mode.
59686  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59697    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59698    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59699      # Going to short mode and back again did indeed matter. Since short mode is
59700      # case insensitive, let's make it lowercase to improve readability.
59701      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59702      # Now convert it back to Unix-style (cygpath)
59703      input_path=`$CYGPATH -u "$shortmode_path"`
59704      new_path="$input_path"
59705    fi
59706  fi
59707
59708  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59709  if test "x$test_cygdrive_prefix" = x; then
59710    # As a simple fix, exclude /usr/bin since it's not a real path.
59711    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59712      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59713      # a path prefixed by /cygdrive for fixpath to work.
59714      new_path="$CYGWIN_ROOT_PATH$input_path"
59715    fi
59716  fi
59717
59718
59719  if test "x$path" != "x$new_path"; then
59720    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59722$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59723  fi
59724
59725    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59726
59727  path="$POTENTIAL_FREETYPE_LIB_PATH"
59728  has_colon=`$ECHO $path | $GREP ^.:`
59729  new_path="$path"
59730  if test "x$has_colon" = x; then
59731    # Not in mixed or Windows style, start by that.
59732    new_path=`cmd //c echo $path`
59733  fi
59734
59735
59736  input_path="$new_path"
59737  # Check if we need to convert this using DOS-style short mode. If the path
59738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59739  # take no chances and rewrite it.
59740  # Note: m4 eats our [], so we need to use [ and ] instead.
59741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59742  if test "x$has_forbidden_chars" != x; then
59743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59745  fi
59746
59747
59748  windows_path="$new_path"
59749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59750    unix_path=`$CYGPATH -u "$windows_path"`
59751    new_path="$unix_path"
59752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59754    new_path="$unix_path"
59755  fi
59756
59757  if test "x$path" != "x$new_path"; then
59758    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59760$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59761  fi
59762
59763  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59764  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59765
59766    else
59767      # We're on a unix platform. Hooray! :)
59768      path="$POTENTIAL_FREETYPE_LIB_PATH"
59769      has_space=`$ECHO "$path" | $GREP " "`
59770      if test "x$has_space" != x; then
59771        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59772$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59773        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59774      fi
59775
59776      # Use eval to expand a potential ~
59777      eval path="$path"
59778      if test ! -f "$path" && test ! -d "$path"; then
59779        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59780      fi
59781
59782      if test -d "$path"; then
59783        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59784      else
59785        dir="`$DIRNAME "$path"`"
59786        base="`$BASENAME "$path"`"
59787        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59788      fi
59789    fi
59790  fi
59791
59792
59793    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59794    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59795$as_echo_n "checking for freetype includes... " >&6; }
59796    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59797$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59798    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59800$as_echo_n "checking for freetype libraries... " >&6; }
59801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59802$as_echo "$FREETYPE_LIB_PATH" >&6; }
59803  fi
59804
59805              fi
59806            fi
59807          fi
59808        else
59809          FREETYPE_BASE_DIR="$SYSROOT/usr"
59810
59811  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59812  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59813  METHOD="well-known location"
59814
59815  # Let's start with an optimistic view of the world :-)
59816  FOUND_FREETYPE=yes
59817
59818  # First look for the canonical freetype main include file ft2build.h.
59819  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59820    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59821    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59822    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59823      # Fail.
59824      FOUND_FREETYPE=no
59825    fi
59826  fi
59827
59828  if test "x$FOUND_FREETYPE" = xyes; then
59829    # Include file found, let's continue the sanity check.
59830    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59831$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59832
59833    # Reset to default value
59834    FREETYPE_BASE_NAME=freetype
59835    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59836    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59837      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59838          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59839        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59840        # for the .6 version explicitly.
59841        FREETYPE_BASE_NAME=freetype.6
59842        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59843        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59844$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59845      else
59846        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59847$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59848        FOUND_FREETYPE=no
59849      fi
59850    else
59851      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59852        # On Windows, we will need both .lib and .dll file.
59853        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59854          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59855$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59856          FOUND_FREETYPE=no
59857        fi
59858      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59859          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59860        # Found lib in isa dir, use that instead.
59861        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59862        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59863$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59864      fi
59865    fi
59866  fi
59867
59868  if test "x$FOUND_FREETYPE" = xyes; then
59869
59870  # Only process if variable expands to non-empty
59871
59872  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59874
59875  # Input might be given as Windows format, start by converting to
59876  # unix format.
59877  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59878  new_path=`$CYGPATH -u "$path"`
59879
59880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59883  # "foo.exe" is OK but "foo" is an error.
59884  #
59885  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59886  # It is also a way to make sure we got the proper file name for the real test later on.
59887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59888  if test "x$test_shortpath" = x; then
59889    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59890$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59891    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59892  fi
59893
59894  # Call helper function which possibly converts this using DOS-style short mode.
59895  # If so, the updated path is stored in $new_path.
59896
59897  input_path="$new_path"
59898  # Check if we need to convert this using DOS-style short mode. If the path
59899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59900  # take no chances and rewrite it.
59901  # Note: m4 eats our [], so we need to use [ and ] instead.
59902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59903  if test "x$has_forbidden_chars" != x; then
59904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59908      # Going to short mode and back again did indeed matter. Since short mode is
59909      # case insensitive, let's make it lowercase to improve readability.
59910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59911      # Now convert it back to Unix-style (cygpath)
59912      input_path=`$CYGPATH -u "$shortmode_path"`
59913      new_path="$input_path"
59914    fi
59915  fi
59916
59917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59918  if test "x$test_cygdrive_prefix" = x; then
59919    # As a simple fix, exclude /usr/bin since it's not a real path.
59920    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59922      # a path prefixed by /cygdrive for fixpath to work.
59923      new_path="$CYGWIN_ROOT_PATH$input_path"
59924    fi
59925  fi
59926
59927
59928  if test "x$path" != "x$new_path"; then
59929    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59931$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59932  fi
59933
59934    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59935
59936  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59937  has_colon=`$ECHO $path | $GREP ^.:`
59938  new_path="$path"
59939  if test "x$has_colon" = x; then
59940    # Not in mixed or Windows style, start by that.
59941    new_path=`cmd //c echo $path`
59942  fi
59943
59944
59945  input_path="$new_path"
59946  # Check if we need to convert this using DOS-style short mode. If the path
59947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59948  # take no chances and rewrite it.
59949  # Note: m4 eats our [], so we need to use [ and ] instead.
59950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59951  if test "x$has_forbidden_chars" != x; then
59952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59954  fi
59955
59956
59957  windows_path="$new_path"
59958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59959    unix_path=`$CYGPATH -u "$windows_path"`
59960    new_path="$unix_path"
59961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59963    new_path="$unix_path"
59964  fi
59965
59966  if test "x$path" != "x$new_path"; then
59967    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59969$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59970  fi
59971
59972  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59973  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59974
59975    else
59976      # We're on a unix platform. Hooray! :)
59977      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59978      has_space=`$ECHO "$path" | $GREP " "`
59979      if test "x$has_space" != x; then
59980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59981$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59982        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59983      fi
59984
59985      # Use eval to expand a potential ~
59986      eval path="$path"
59987      if test ! -f "$path" && test ! -d "$path"; then
59988        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59989      fi
59990
59991      if test -d "$path"; then
59992        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59993      else
59994        dir="`$DIRNAME "$path"`"
59995        base="`$BASENAME "$path"`"
59996        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59997      fi
59998    fi
59999  fi
60000
60001
60002  # Only process if variable expands to non-empty
60003
60004  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60005    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60006
60007  # Input might be given as Windows format, start by converting to
60008  # unix format.
60009  path="$POTENTIAL_FREETYPE_LIB_PATH"
60010  new_path=`$CYGPATH -u "$path"`
60011
60012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60015  # "foo.exe" is OK but "foo" is an error.
60016  #
60017  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60018  # It is also a way to make sure we got the proper file name for the real test later on.
60019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60020  if test "x$test_shortpath" = x; then
60021    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60022$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60023    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60024  fi
60025
60026  # Call helper function which possibly converts this using DOS-style short mode.
60027  # If so, the updated path is stored in $new_path.
60028
60029  input_path="$new_path"
60030  # Check if we need to convert this using DOS-style short mode. If the path
60031  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60032  # take no chances and rewrite it.
60033  # Note: m4 eats our [], so we need to use [ and ] instead.
60034  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60035  if test "x$has_forbidden_chars" != x; then
60036    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60037    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60038    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60039    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60040      # Going to short mode and back again did indeed matter. Since short mode is
60041      # case insensitive, let's make it lowercase to improve readability.
60042      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60043      # Now convert it back to Unix-style (cygpath)
60044      input_path=`$CYGPATH -u "$shortmode_path"`
60045      new_path="$input_path"
60046    fi
60047  fi
60048
60049  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60050  if test "x$test_cygdrive_prefix" = x; then
60051    # As a simple fix, exclude /usr/bin since it's not a real path.
60052    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60053      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60054      # a path prefixed by /cygdrive for fixpath to work.
60055      new_path="$CYGWIN_ROOT_PATH$input_path"
60056    fi
60057  fi
60058
60059
60060  if test "x$path" != "x$new_path"; then
60061    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60063$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60064  fi
60065
60066    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60067
60068  path="$POTENTIAL_FREETYPE_LIB_PATH"
60069  has_colon=`$ECHO $path | $GREP ^.:`
60070  new_path="$path"
60071  if test "x$has_colon" = x; then
60072    # Not in mixed or Windows style, start by that.
60073    new_path=`cmd //c echo $path`
60074  fi
60075
60076
60077  input_path="$new_path"
60078  # Check if we need to convert this using DOS-style short mode. If the path
60079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60080  # take no chances and rewrite it.
60081  # Note: m4 eats our [], so we need to use [ and ] instead.
60082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60083  if test "x$has_forbidden_chars" != x; then
60084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60085    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60086  fi
60087
60088
60089  windows_path="$new_path"
60090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60091    unix_path=`$CYGPATH -u "$windows_path"`
60092    new_path="$unix_path"
60093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60095    new_path="$unix_path"
60096  fi
60097
60098  if test "x$path" != "x$new_path"; then
60099    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60101$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60102  fi
60103
60104  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60105  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60106
60107    else
60108      # We're on a unix platform. Hooray! :)
60109      path="$POTENTIAL_FREETYPE_LIB_PATH"
60110      has_space=`$ECHO "$path" | $GREP " "`
60111      if test "x$has_space" != x; then
60112        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60113$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60114        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60115      fi
60116
60117      # Use eval to expand a potential ~
60118      eval path="$path"
60119      if test ! -f "$path" && test ! -d "$path"; then
60120        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60121      fi
60122
60123      if test -d "$path"; then
60124        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60125      else
60126        dir="`$DIRNAME "$path"`"
60127        base="`$BASENAME "$path"`"
60128        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60129      fi
60130    fi
60131  fi
60132
60133
60134    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60135    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60136$as_echo_n "checking for freetype includes... " >&6; }
60137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60138$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60139    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60141$as_echo_n "checking for freetype libraries... " >&6; }
60142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60143$as_echo "$FREETYPE_LIB_PATH" >&6; }
60144  fi
60145
60146
60147          if test "x$FOUND_FREETYPE" != xyes; then
60148            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60149
60150  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60151  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60152  METHOD="well-known location"
60153
60154  # Let's start with an optimistic view of the world :-)
60155  FOUND_FREETYPE=yes
60156
60157  # First look for the canonical freetype main include file ft2build.h.
60158  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60159    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60160    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60161    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60162      # Fail.
60163      FOUND_FREETYPE=no
60164    fi
60165  fi
60166
60167  if test "x$FOUND_FREETYPE" = xyes; then
60168    # Include file found, let's continue the sanity check.
60169    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60170$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60171
60172    # Reset to default value
60173    FREETYPE_BASE_NAME=freetype
60174    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60175    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60176      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60177          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60178        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60179        # for the .6 version explicitly.
60180        FREETYPE_BASE_NAME=freetype.6
60181        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60182        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60183$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60184      else
60185        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60186$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60187        FOUND_FREETYPE=no
60188      fi
60189    else
60190      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60191        # On Windows, we will need both .lib and .dll file.
60192        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60193          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60194$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60195          FOUND_FREETYPE=no
60196        fi
60197      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60198          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60199        # Found lib in isa dir, use that instead.
60200        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60201        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60202$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60203      fi
60204    fi
60205  fi
60206
60207  if test "x$FOUND_FREETYPE" = xyes; then
60208
60209  # Only process if variable expands to non-empty
60210
60211  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60213
60214  # Input might be given as Windows format, start by converting to
60215  # unix format.
60216  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60217  new_path=`$CYGPATH -u "$path"`
60218
60219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60222  # "foo.exe" is OK but "foo" is an error.
60223  #
60224  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60225  # It is also a way to make sure we got the proper file name for the real test later on.
60226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60227  if test "x$test_shortpath" = x; then
60228    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60229$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60230    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60231  fi
60232
60233  # Call helper function which possibly converts this using DOS-style short mode.
60234  # If so, the updated path is stored in $new_path.
60235
60236  input_path="$new_path"
60237  # Check if we need to convert this using DOS-style short mode. If the path
60238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60239  # take no chances and rewrite it.
60240  # Note: m4 eats our [], so we need to use [ and ] instead.
60241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60242  if test "x$has_forbidden_chars" != x; then
60243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60247      # Going to short mode and back again did indeed matter. Since short mode is
60248      # case insensitive, let's make it lowercase to improve readability.
60249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60250      # Now convert it back to Unix-style (cygpath)
60251      input_path=`$CYGPATH -u "$shortmode_path"`
60252      new_path="$input_path"
60253    fi
60254  fi
60255
60256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60257  if test "x$test_cygdrive_prefix" = x; then
60258    # As a simple fix, exclude /usr/bin since it's not a real path.
60259    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60261      # a path prefixed by /cygdrive for fixpath to work.
60262      new_path="$CYGWIN_ROOT_PATH$input_path"
60263    fi
60264  fi
60265
60266
60267  if test "x$path" != "x$new_path"; then
60268    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60270$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60271  fi
60272
60273    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60274
60275  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60276  has_colon=`$ECHO $path | $GREP ^.:`
60277  new_path="$path"
60278  if test "x$has_colon" = x; then
60279    # Not in mixed or Windows style, start by that.
60280    new_path=`cmd //c echo $path`
60281  fi
60282
60283
60284  input_path="$new_path"
60285  # Check if we need to convert this using DOS-style short mode. If the path
60286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60287  # take no chances and rewrite it.
60288  # Note: m4 eats our [], so we need to use [ and ] instead.
60289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60290  if test "x$has_forbidden_chars" != x; then
60291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60293  fi
60294
60295
60296  windows_path="$new_path"
60297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60298    unix_path=`$CYGPATH -u "$windows_path"`
60299    new_path="$unix_path"
60300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60302    new_path="$unix_path"
60303  fi
60304
60305  if test "x$path" != "x$new_path"; then
60306    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60308$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60309  fi
60310
60311  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60312  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60313
60314    else
60315      # We're on a unix platform. Hooray! :)
60316      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60317      has_space=`$ECHO "$path" | $GREP " "`
60318      if test "x$has_space" != x; then
60319        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60320$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60321        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60322      fi
60323
60324      # Use eval to expand a potential ~
60325      eval path="$path"
60326      if test ! -f "$path" && test ! -d "$path"; then
60327        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60328      fi
60329
60330      if test -d "$path"; then
60331        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60332      else
60333        dir="`$DIRNAME "$path"`"
60334        base="`$BASENAME "$path"`"
60335        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60336      fi
60337    fi
60338  fi
60339
60340
60341  # Only process if variable expands to non-empty
60342
60343  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60345
60346  # Input might be given as Windows format, start by converting to
60347  # unix format.
60348  path="$POTENTIAL_FREETYPE_LIB_PATH"
60349  new_path=`$CYGPATH -u "$path"`
60350
60351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60354  # "foo.exe" is OK but "foo" is an error.
60355  #
60356  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60357  # It is also a way to make sure we got the proper file name for the real test later on.
60358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60359  if test "x$test_shortpath" = x; then
60360    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60361$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60362    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60363  fi
60364
60365  # Call helper function which possibly converts this using DOS-style short mode.
60366  # If so, the updated path is stored in $new_path.
60367
60368  input_path="$new_path"
60369  # Check if we need to convert this using DOS-style short mode. If the path
60370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60371  # take no chances and rewrite it.
60372  # Note: m4 eats our [], so we need to use [ and ] instead.
60373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60374  if test "x$has_forbidden_chars" != x; then
60375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60379      # Going to short mode and back again did indeed matter. Since short mode is
60380      # case insensitive, let's make it lowercase to improve readability.
60381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60382      # Now convert it back to Unix-style (cygpath)
60383      input_path=`$CYGPATH -u "$shortmode_path"`
60384      new_path="$input_path"
60385    fi
60386  fi
60387
60388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60389  if test "x$test_cygdrive_prefix" = x; then
60390    # As a simple fix, exclude /usr/bin since it's not a real path.
60391    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60393      # a path prefixed by /cygdrive for fixpath to work.
60394      new_path="$CYGWIN_ROOT_PATH$input_path"
60395    fi
60396  fi
60397
60398
60399  if test "x$path" != "x$new_path"; then
60400    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60402$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60403  fi
60404
60405    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60406
60407  path="$POTENTIAL_FREETYPE_LIB_PATH"
60408  has_colon=`$ECHO $path | $GREP ^.:`
60409  new_path="$path"
60410  if test "x$has_colon" = x; then
60411    # Not in mixed or Windows style, start by that.
60412    new_path=`cmd //c echo $path`
60413  fi
60414
60415
60416  input_path="$new_path"
60417  # Check if we need to convert this using DOS-style short mode. If the path
60418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60419  # take no chances and rewrite it.
60420  # Note: m4 eats our [], so we need to use [ and ] instead.
60421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60422  if test "x$has_forbidden_chars" != x; then
60423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60425  fi
60426
60427
60428  windows_path="$new_path"
60429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60430    unix_path=`$CYGPATH -u "$windows_path"`
60431    new_path="$unix_path"
60432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60434    new_path="$unix_path"
60435  fi
60436
60437  if test "x$path" != "x$new_path"; then
60438    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60440$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60441  fi
60442
60443  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60444  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60445
60446    else
60447      # We're on a unix platform. Hooray! :)
60448      path="$POTENTIAL_FREETYPE_LIB_PATH"
60449      has_space=`$ECHO "$path" | $GREP " "`
60450      if test "x$has_space" != x; then
60451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60452$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60453        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60454      fi
60455
60456      # Use eval to expand a potential ~
60457      eval path="$path"
60458      if test ! -f "$path" && test ! -d "$path"; then
60459        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60460      fi
60461
60462      if test -d "$path"; then
60463        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60464      else
60465        dir="`$DIRNAME "$path"`"
60466        base="`$BASENAME "$path"`"
60467        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60468      fi
60469    fi
60470  fi
60471
60472
60473    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60475$as_echo_n "checking for freetype includes... " >&6; }
60476    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60477$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60478    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60479    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60480$as_echo_n "checking for freetype libraries... " >&6; }
60481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60482$as_echo "$FREETYPE_LIB_PATH" >&6; }
60483  fi
60484
60485          fi
60486          if test "x$FOUND_FREETYPE" != xyes; then
60487            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
60488
60489  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60490  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60491  METHOD="well-known location"
60492
60493  # Let's start with an optimistic view of the world :-)
60494  FOUND_FREETYPE=yes
60495
60496  # First look for the canonical freetype main include file ft2build.h.
60497  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60498    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60499    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60500    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60501      # Fail.
60502      FOUND_FREETYPE=no
60503    fi
60504  fi
60505
60506  if test "x$FOUND_FREETYPE" = xyes; then
60507    # Include file found, let's continue the sanity check.
60508    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60509$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60510
60511    # Reset to default value
60512    FREETYPE_BASE_NAME=freetype
60513    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60514    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60515      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60516          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60517        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60518        # for the .6 version explicitly.
60519        FREETYPE_BASE_NAME=freetype.6
60520        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60521        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60522$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60523      else
60524        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60525$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60526        FOUND_FREETYPE=no
60527      fi
60528    else
60529      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60530        # On Windows, we will need both .lib and .dll file.
60531        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60532          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60533$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60534          FOUND_FREETYPE=no
60535        fi
60536      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60537          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60538        # Found lib in isa dir, use that instead.
60539        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60540        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60541$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60542      fi
60543    fi
60544  fi
60545
60546  if test "x$FOUND_FREETYPE" = xyes; then
60547
60548  # Only process if variable expands to non-empty
60549
60550  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60552
60553  # Input might be given as Windows format, start by converting to
60554  # unix format.
60555  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60556  new_path=`$CYGPATH -u "$path"`
60557
60558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60561  # "foo.exe" is OK but "foo" is an error.
60562  #
60563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60564  # It is also a way to make sure we got the proper file name for the real test later on.
60565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60566  if test "x$test_shortpath" = x; then
60567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60568$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60569    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60570  fi
60571
60572  # Call helper function which possibly converts this using DOS-style short mode.
60573  # If so, the updated path is stored in $new_path.
60574
60575  input_path="$new_path"
60576  # Check if we need to convert this using DOS-style short mode. If the path
60577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60578  # take no chances and rewrite it.
60579  # Note: m4 eats our [], so we need to use [ and ] instead.
60580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60581  if test "x$has_forbidden_chars" != x; then
60582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60586      # Going to short mode and back again did indeed matter. Since short mode is
60587      # case insensitive, let's make it lowercase to improve readability.
60588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60589      # Now convert it back to Unix-style (cygpath)
60590      input_path=`$CYGPATH -u "$shortmode_path"`
60591      new_path="$input_path"
60592    fi
60593  fi
60594
60595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60596  if test "x$test_cygdrive_prefix" = x; then
60597    # As a simple fix, exclude /usr/bin since it's not a real path.
60598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60600      # a path prefixed by /cygdrive for fixpath to work.
60601      new_path="$CYGWIN_ROOT_PATH$input_path"
60602    fi
60603  fi
60604
60605
60606  if test "x$path" != "x$new_path"; then
60607    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60609$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60610  fi
60611
60612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60613
60614  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60615  has_colon=`$ECHO $path | $GREP ^.:`
60616  new_path="$path"
60617  if test "x$has_colon" = x; then
60618    # Not in mixed or Windows style, start by that.
60619    new_path=`cmd //c echo $path`
60620  fi
60621
60622
60623  input_path="$new_path"
60624  # Check if we need to convert this using DOS-style short mode. If the path
60625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60626  # take no chances and rewrite it.
60627  # Note: m4 eats our [], so we need to use [ and ] instead.
60628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60629  if test "x$has_forbidden_chars" != x; then
60630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60632  fi
60633
60634
60635  windows_path="$new_path"
60636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60637    unix_path=`$CYGPATH -u "$windows_path"`
60638    new_path="$unix_path"
60639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60641    new_path="$unix_path"
60642  fi
60643
60644  if test "x$path" != "x$new_path"; then
60645    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60647$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60648  fi
60649
60650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60652
60653    else
60654      # We're on a unix platform. Hooray! :)
60655      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60656      has_space=`$ECHO "$path" | $GREP " "`
60657      if test "x$has_space" != x; then
60658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60659$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60660        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60661      fi
60662
60663      # Use eval to expand a potential ~
60664      eval path="$path"
60665      if test ! -f "$path" && test ! -d "$path"; then
60666        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60667      fi
60668
60669      if test -d "$path"; then
60670        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60671      else
60672        dir="`$DIRNAME "$path"`"
60673        base="`$BASENAME "$path"`"
60674        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60675      fi
60676    fi
60677  fi
60678
60679
60680  # Only process if variable expands to non-empty
60681
60682  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60683    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60684
60685  # Input might be given as Windows format, start by converting to
60686  # unix format.
60687  path="$POTENTIAL_FREETYPE_LIB_PATH"
60688  new_path=`$CYGPATH -u "$path"`
60689
60690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60693  # "foo.exe" is OK but "foo" is an error.
60694  #
60695  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60696  # It is also a way to make sure we got the proper file name for the real test later on.
60697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60698  if test "x$test_shortpath" = x; then
60699    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60700$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60701    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60702  fi
60703
60704  # Call helper function which possibly converts this using DOS-style short mode.
60705  # If so, the updated path is stored in $new_path.
60706
60707  input_path="$new_path"
60708  # Check if we need to convert this using DOS-style short mode. If the path
60709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60710  # take no chances and rewrite it.
60711  # Note: m4 eats our [], so we need to use [ and ] instead.
60712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60713  if test "x$has_forbidden_chars" != x; then
60714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60718      # Going to short mode and back again did indeed matter. Since short mode is
60719      # case insensitive, let's make it lowercase to improve readability.
60720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60721      # Now convert it back to Unix-style (cygpath)
60722      input_path=`$CYGPATH -u "$shortmode_path"`
60723      new_path="$input_path"
60724    fi
60725  fi
60726
60727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60728  if test "x$test_cygdrive_prefix" = x; then
60729    # As a simple fix, exclude /usr/bin since it's not a real path.
60730    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60732      # a path prefixed by /cygdrive for fixpath to work.
60733      new_path="$CYGWIN_ROOT_PATH$input_path"
60734    fi
60735  fi
60736
60737
60738  if test "x$path" != "x$new_path"; then
60739    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60740    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60741$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60742  fi
60743
60744    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60745
60746  path="$POTENTIAL_FREETYPE_LIB_PATH"
60747  has_colon=`$ECHO $path | $GREP ^.:`
60748  new_path="$path"
60749  if test "x$has_colon" = x; then
60750    # Not in mixed or Windows style, start by that.
60751    new_path=`cmd //c echo $path`
60752  fi
60753
60754
60755  input_path="$new_path"
60756  # Check if we need to convert this using DOS-style short mode. If the path
60757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60758  # take no chances and rewrite it.
60759  # Note: m4 eats our [], so we need to use [ and ] instead.
60760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60761  if test "x$has_forbidden_chars" != x; then
60762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60763    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60764  fi
60765
60766
60767  windows_path="$new_path"
60768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60769    unix_path=`$CYGPATH -u "$windows_path"`
60770    new_path="$unix_path"
60771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60773    new_path="$unix_path"
60774  fi
60775
60776  if test "x$path" != "x$new_path"; then
60777    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60778    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60779$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60780  fi
60781
60782  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60783  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60784
60785    else
60786      # We're on a unix platform. Hooray! :)
60787      path="$POTENTIAL_FREETYPE_LIB_PATH"
60788      has_space=`$ECHO "$path" | $GREP " "`
60789      if test "x$has_space" != x; then
60790        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60791$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60792        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60793      fi
60794
60795      # Use eval to expand a potential ~
60796      eval path="$path"
60797      if test ! -f "$path" && test ! -d "$path"; then
60798        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60799      fi
60800
60801      if test -d "$path"; then
60802        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60803      else
60804        dir="`$DIRNAME "$path"`"
60805        base="`$BASENAME "$path"`"
60806        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60807      fi
60808    fi
60809  fi
60810
60811
60812    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60813    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60814$as_echo_n "checking for freetype includes... " >&6; }
60815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60816$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60817    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60818    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60819$as_echo_n "checking for freetype libraries... " >&6; }
60820    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60821$as_echo "$FREETYPE_LIB_PATH" >&6; }
60822  fi
60823
60824          fi
60825
60826          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60827            if test "x$FOUND_FREETYPE" != xyes; then
60828              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60829              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60830
60831  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60832  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60833  METHOD="well-known location"
60834
60835  # Let's start with an optimistic view of the world :-)
60836  FOUND_FREETYPE=yes
60837
60838  # First look for the canonical freetype main include file ft2build.h.
60839  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60840    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60841    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60842    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60843      # Fail.
60844      FOUND_FREETYPE=no
60845    fi
60846  fi
60847
60848  if test "x$FOUND_FREETYPE" = xyes; then
60849    # Include file found, let's continue the sanity check.
60850    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60851$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60852
60853    # Reset to default value
60854    FREETYPE_BASE_NAME=freetype
60855    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60856    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60857      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60858          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60859        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60860        # for the .6 version explicitly.
60861        FREETYPE_BASE_NAME=freetype.6
60862        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60863        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60864$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60865      else
60866        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60867$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60868        FOUND_FREETYPE=no
60869      fi
60870    else
60871      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60872        # On Windows, we will need both .lib and .dll file.
60873        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60874          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60875$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60876          FOUND_FREETYPE=no
60877        fi
60878      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60879          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60880        # Found lib in isa dir, use that instead.
60881        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60882        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60883$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60884      fi
60885    fi
60886  fi
60887
60888  if test "x$FOUND_FREETYPE" = xyes; then
60889
60890  # Only process if variable expands to non-empty
60891
60892  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60893    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60894
60895  # Input might be given as Windows format, start by converting to
60896  # unix format.
60897  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60898  new_path=`$CYGPATH -u "$path"`
60899
60900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60903  # "foo.exe" is OK but "foo" is an error.
60904  #
60905  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60906  # It is also a way to make sure we got the proper file name for the real test later on.
60907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60908  if test "x$test_shortpath" = x; then
60909    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60910$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60911    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60912  fi
60913
60914  # Call helper function which possibly converts this using DOS-style short mode.
60915  # If so, the updated path is stored in $new_path.
60916
60917  input_path="$new_path"
60918  # Check if we need to convert this using DOS-style short mode. If the path
60919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60920  # take no chances and rewrite it.
60921  # Note: m4 eats our [], so we need to use [ and ] instead.
60922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60923  if test "x$has_forbidden_chars" != x; then
60924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60928      # Going to short mode and back again did indeed matter. Since short mode is
60929      # case insensitive, let's make it lowercase to improve readability.
60930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60931      # Now convert it back to Unix-style (cygpath)
60932      input_path=`$CYGPATH -u "$shortmode_path"`
60933      new_path="$input_path"
60934    fi
60935  fi
60936
60937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60938  if test "x$test_cygdrive_prefix" = x; then
60939    # As a simple fix, exclude /usr/bin since it's not a real path.
60940    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60942      # a path prefixed by /cygdrive for fixpath to work.
60943      new_path="$CYGWIN_ROOT_PATH$input_path"
60944    fi
60945  fi
60946
60947
60948  if test "x$path" != "x$new_path"; then
60949    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60951$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60952  fi
60953
60954    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60955
60956  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60957  has_colon=`$ECHO $path | $GREP ^.:`
60958  new_path="$path"
60959  if test "x$has_colon" = x; then
60960    # Not in mixed or Windows style, start by that.
60961    new_path=`cmd //c echo $path`
60962  fi
60963
60964
60965  input_path="$new_path"
60966  # Check if we need to convert this using DOS-style short mode. If the path
60967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60968  # take no chances and rewrite it.
60969  # Note: m4 eats our [], so we need to use [ and ] instead.
60970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60971  if test "x$has_forbidden_chars" != x; then
60972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60974  fi
60975
60976
60977  windows_path="$new_path"
60978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60979    unix_path=`$CYGPATH -u "$windows_path"`
60980    new_path="$unix_path"
60981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60983    new_path="$unix_path"
60984  fi
60985
60986  if test "x$path" != "x$new_path"; then
60987    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60989$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60990  fi
60991
60992  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60993  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60994
60995    else
60996      # We're on a unix platform. Hooray! :)
60997      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60998      has_space=`$ECHO "$path" | $GREP " "`
60999      if test "x$has_space" != x; then
61000        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61001$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61002        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61003      fi
61004
61005      # Use eval to expand a potential ~
61006      eval path="$path"
61007      if test ! -f "$path" && test ! -d "$path"; then
61008        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61009      fi
61010
61011      if test -d "$path"; then
61012        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61013      else
61014        dir="`$DIRNAME "$path"`"
61015        base="`$BASENAME "$path"`"
61016        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61017      fi
61018    fi
61019  fi
61020
61021
61022  # Only process if variable expands to non-empty
61023
61024  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61026
61027  # Input might be given as Windows format, start by converting to
61028  # unix format.
61029  path="$POTENTIAL_FREETYPE_LIB_PATH"
61030  new_path=`$CYGPATH -u "$path"`
61031
61032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61035  # "foo.exe" is OK but "foo" is an error.
61036  #
61037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61038  # It is also a way to make sure we got the proper file name for the real test later on.
61039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61040  if test "x$test_shortpath" = x; then
61041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61042$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61043    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61044  fi
61045
61046  # Call helper function which possibly converts this using DOS-style short mode.
61047  # If so, the updated path is stored in $new_path.
61048
61049  input_path="$new_path"
61050  # Check if we need to convert this using DOS-style short mode. If the path
61051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61052  # take no chances and rewrite it.
61053  # Note: m4 eats our [], so we need to use [ and ] instead.
61054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61055  if test "x$has_forbidden_chars" != x; then
61056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61060      # Going to short mode and back again did indeed matter. Since short mode is
61061      # case insensitive, let's make it lowercase to improve readability.
61062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61063      # Now convert it back to Unix-style (cygpath)
61064      input_path=`$CYGPATH -u "$shortmode_path"`
61065      new_path="$input_path"
61066    fi
61067  fi
61068
61069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61070  if test "x$test_cygdrive_prefix" = x; then
61071    # As a simple fix, exclude /usr/bin since it's not a real path.
61072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61074      # a path prefixed by /cygdrive for fixpath to work.
61075      new_path="$CYGWIN_ROOT_PATH$input_path"
61076    fi
61077  fi
61078
61079
61080  if test "x$path" != "x$new_path"; then
61081    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61083$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61084  fi
61085
61086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61087
61088  path="$POTENTIAL_FREETYPE_LIB_PATH"
61089  has_colon=`$ECHO $path | $GREP ^.:`
61090  new_path="$path"
61091  if test "x$has_colon" = x; then
61092    # Not in mixed or Windows style, start by that.
61093    new_path=`cmd //c echo $path`
61094  fi
61095
61096
61097  input_path="$new_path"
61098  # Check if we need to convert this using DOS-style short mode. If the path
61099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61100  # take no chances and rewrite it.
61101  # Note: m4 eats our [], so we need to use [ and ] instead.
61102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61103  if test "x$has_forbidden_chars" != x; then
61104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61106  fi
61107
61108
61109  windows_path="$new_path"
61110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61111    unix_path=`$CYGPATH -u "$windows_path"`
61112    new_path="$unix_path"
61113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61115    new_path="$unix_path"
61116  fi
61117
61118  if test "x$path" != "x$new_path"; then
61119    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61121$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61122  fi
61123
61124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61126
61127    else
61128      # We're on a unix platform. Hooray! :)
61129      path="$POTENTIAL_FREETYPE_LIB_PATH"
61130      has_space=`$ECHO "$path" | $GREP " "`
61131      if test "x$has_space" != x; then
61132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61133$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61134        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61135      fi
61136
61137      # Use eval to expand a potential ~
61138      eval path="$path"
61139      if test ! -f "$path" && test ! -d "$path"; then
61140        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61141      fi
61142
61143      if test -d "$path"; then
61144        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61145      else
61146        dir="`$DIRNAME "$path"`"
61147        base="`$BASENAME "$path"`"
61148        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61149      fi
61150    fi
61151  fi
61152
61153
61154    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61156$as_echo_n "checking for freetype includes... " >&6; }
61157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61158$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61159    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61161$as_echo_n "checking for freetype libraries... " >&6; }
61162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61163$as_echo "$FREETYPE_LIB_PATH" >&6; }
61164  fi
61165
61166            fi
61167          fi
61168
61169          if test "x$FOUND_FREETYPE" != xyes; then
61170            FREETYPE_BASE_DIR="$SYSROOT/usr"
61171            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61172
61173  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61174  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61175  METHOD="well-known location"
61176
61177  # Let's start with an optimistic view of the world :-)
61178  FOUND_FREETYPE=yes
61179
61180  # First look for the canonical freetype main include file ft2build.h.
61181  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61182    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61183    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61184    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61185      # Fail.
61186      FOUND_FREETYPE=no
61187    fi
61188  fi
61189
61190  if test "x$FOUND_FREETYPE" = xyes; then
61191    # Include file found, let's continue the sanity check.
61192    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61193$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61194
61195    # Reset to default value
61196    FREETYPE_BASE_NAME=freetype
61197    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61198    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61199      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61200          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61201        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61202        # for the .6 version explicitly.
61203        FREETYPE_BASE_NAME=freetype.6
61204        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61205        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61206$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61207      else
61208        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61209$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61210        FOUND_FREETYPE=no
61211      fi
61212    else
61213      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61214        # On Windows, we will need both .lib and .dll file.
61215        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61216          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61217$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61218          FOUND_FREETYPE=no
61219        fi
61220      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61221          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61222        # Found lib in isa dir, use that instead.
61223        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61224        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61225$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61226      fi
61227    fi
61228  fi
61229
61230  if test "x$FOUND_FREETYPE" = xyes; then
61231
61232  # Only process if variable expands to non-empty
61233
61234  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61236
61237  # Input might be given as Windows format, start by converting to
61238  # unix format.
61239  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61240  new_path=`$CYGPATH -u "$path"`
61241
61242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61245  # "foo.exe" is OK but "foo" is an error.
61246  #
61247  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61248  # It is also a way to make sure we got the proper file name for the real test later on.
61249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61250  if test "x$test_shortpath" = x; then
61251    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61252$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61253    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61254  fi
61255
61256  # Call helper function which possibly converts this using DOS-style short mode.
61257  # If so, the updated path is stored in $new_path.
61258
61259  input_path="$new_path"
61260  # Check if we need to convert this using DOS-style short mode. If the path
61261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61262  # take no chances and rewrite it.
61263  # Note: m4 eats our [], so we need to use [ and ] instead.
61264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61265  if test "x$has_forbidden_chars" != x; then
61266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61270      # Going to short mode and back again did indeed matter. Since short mode is
61271      # case insensitive, let's make it lowercase to improve readability.
61272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61273      # Now convert it back to Unix-style (cygpath)
61274      input_path=`$CYGPATH -u "$shortmode_path"`
61275      new_path="$input_path"
61276    fi
61277  fi
61278
61279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61280  if test "x$test_cygdrive_prefix" = x; then
61281    # As a simple fix, exclude /usr/bin since it's not a real path.
61282    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61284      # a path prefixed by /cygdrive for fixpath to work.
61285      new_path="$CYGWIN_ROOT_PATH$input_path"
61286    fi
61287  fi
61288
61289
61290  if test "x$path" != "x$new_path"; then
61291    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61293$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61294  fi
61295
61296    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61297
61298  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61299  has_colon=`$ECHO $path | $GREP ^.:`
61300  new_path="$path"
61301  if test "x$has_colon" = x; then
61302    # Not in mixed or Windows style, start by that.
61303    new_path=`cmd //c echo $path`
61304  fi
61305
61306
61307  input_path="$new_path"
61308  # Check if we need to convert this using DOS-style short mode. If the path
61309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61310  # take no chances and rewrite it.
61311  # Note: m4 eats our [], so we need to use [ and ] instead.
61312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61313  if test "x$has_forbidden_chars" != x; then
61314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61315    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61316  fi
61317
61318
61319  windows_path="$new_path"
61320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61321    unix_path=`$CYGPATH -u "$windows_path"`
61322    new_path="$unix_path"
61323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61325    new_path="$unix_path"
61326  fi
61327
61328  if test "x$path" != "x$new_path"; then
61329    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61331$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61332  fi
61333
61334  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61335  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61336
61337    else
61338      # We're on a unix platform. Hooray! :)
61339      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61340      has_space=`$ECHO "$path" | $GREP " "`
61341      if test "x$has_space" != x; then
61342        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61343$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61344        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61345      fi
61346
61347      # Use eval to expand a potential ~
61348      eval path="$path"
61349      if test ! -f "$path" && test ! -d "$path"; then
61350        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61351      fi
61352
61353      if test -d "$path"; then
61354        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61355      else
61356        dir="`$DIRNAME "$path"`"
61357        base="`$BASENAME "$path"`"
61358        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61359      fi
61360    fi
61361  fi
61362
61363
61364  # Only process if variable expands to non-empty
61365
61366  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61368
61369  # Input might be given as Windows format, start by converting to
61370  # unix format.
61371  path="$POTENTIAL_FREETYPE_LIB_PATH"
61372  new_path=`$CYGPATH -u "$path"`
61373
61374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61377  # "foo.exe" is OK but "foo" is an error.
61378  #
61379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61380  # It is also a way to make sure we got the proper file name for the real test later on.
61381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61382  if test "x$test_shortpath" = x; then
61383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61384$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61385    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61386  fi
61387
61388  # Call helper function which possibly converts this using DOS-style short mode.
61389  # If so, the updated path is stored in $new_path.
61390
61391  input_path="$new_path"
61392  # Check if we need to convert this using DOS-style short mode. If the path
61393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61394  # take no chances and rewrite it.
61395  # Note: m4 eats our [], so we need to use [ and ] instead.
61396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61397  if test "x$has_forbidden_chars" != x; then
61398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61402      # Going to short mode and back again did indeed matter. Since short mode is
61403      # case insensitive, let's make it lowercase to improve readability.
61404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61405      # Now convert it back to Unix-style (cygpath)
61406      input_path=`$CYGPATH -u "$shortmode_path"`
61407      new_path="$input_path"
61408    fi
61409  fi
61410
61411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61412  if test "x$test_cygdrive_prefix" = x; then
61413    # As a simple fix, exclude /usr/bin since it's not a real path.
61414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61416      # a path prefixed by /cygdrive for fixpath to work.
61417      new_path="$CYGWIN_ROOT_PATH$input_path"
61418    fi
61419  fi
61420
61421
61422  if test "x$path" != "x$new_path"; then
61423    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61425$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61426  fi
61427
61428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61429
61430  path="$POTENTIAL_FREETYPE_LIB_PATH"
61431  has_colon=`$ECHO $path | $GREP ^.:`
61432  new_path="$path"
61433  if test "x$has_colon" = x; then
61434    # Not in mixed or Windows style, start by that.
61435    new_path=`cmd //c echo $path`
61436  fi
61437
61438
61439  input_path="$new_path"
61440  # Check if we need to convert this using DOS-style short mode. If the path
61441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61442  # take no chances and rewrite it.
61443  # Note: m4 eats our [], so we need to use [ and ] instead.
61444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61445  if test "x$has_forbidden_chars" != x; then
61446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61448  fi
61449
61450
61451  windows_path="$new_path"
61452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61453    unix_path=`$CYGPATH -u "$windows_path"`
61454    new_path="$unix_path"
61455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61457    new_path="$unix_path"
61458  fi
61459
61460  if test "x$path" != "x$new_path"; then
61461    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61463$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61464  fi
61465
61466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61468
61469    else
61470      # We're on a unix platform. Hooray! :)
61471      path="$POTENTIAL_FREETYPE_LIB_PATH"
61472      has_space=`$ECHO "$path" | $GREP " "`
61473      if test "x$has_space" != x; then
61474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61475$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61476        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61477      fi
61478
61479      # Use eval to expand a potential ~
61480      eval path="$path"
61481      if test ! -f "$path" && test ! -d "$path"; then
61482        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61483      fi
61484
61485      if test -d "$path"; then
61486        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61487      else
61488        dir="`$DIRNAME "$path"`"
61489        base="`$BASENAME "$path"`"
61490        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61491      fi
61492    fi
61493  fi
61494
61495
61496    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61497    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61498$as_echo_n "checking for freetype includes... " >&6; }
61499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61500$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61501    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61503$as_echo_n "checking for freetype libraries... " >&6; }
61504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61505$as_echo "$FREETYPE_LIB_PATH" >&6; }
61506  fi
61507
61508            else
61509
61510  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61511  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61512  METHOD="well-known location"
61513
61514  # Let's start with an optimistic view of the world :-)
61515  FOUND_FREETYPE=yes
61516
61517  # First look for the canonical freetype main include file ft2build.h.
61518  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61519    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61520    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61521    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61522      # Fail.
61523      FOUND_FREETYPE=no
61524    fi
61525  fi
61526
61527  if test "x$FOUND_FREETYPE" = xyes; then
61528    # Include file found, let's continue the sanity check.
61529    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61530$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61531
61532    # Reset to default value
61533    FREETYPE_BASE_NAME=freetype
61534    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61535    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61536      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61537          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61538        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61539        # for the .6 version explicitly.
61540        FREETYPE_BASE_NAME=freetype.6
61541        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61542        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61543$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61544      else
61545        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61546$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61547        FOUND_FREETYPE=no
61548      fi
61549    else
61550      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61551        # On Windows, we will need both .lib and .dll file.
61552        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61553          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61554$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61555          FOUND_FREETYPE=no
61556        fi
61557      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61558          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61559        # Found lib in isa dir, use that instead.
61560        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61561        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61562$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61563      fi
61564    fi
61565  fi
61566
61567  if test "x$FOUND_FREETYPE" = xyes; then
61568
61569  # Only process if variable expands to non-empty
61570
61571  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61573
61574  # Input might be given as Windows format, start by converting to
61575  # unix format.
61576  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61577  new_path=`$CYGPATH -u "$path"`
61578
61579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61582  # "foo.exe" is OK but "foo" is an error.
61583  #
61584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61585  # It is also a way to make sure we got the proper file name for the real test later on.
61586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61587  if test "x$test_shortpath" = x; then
61588    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61589$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61590    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61591  fi
61592
61593  # Call helper function which possibly converts this using DOS-style short mode.
61594  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61607      # Going to short mode and back again did indeed matter. Since short mode is
61608      # case insensitive, let's make it lowercase to improve readability.
61609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61610      # Now convert it back to Unix-style (cygpath)
61611      input_path=`$CYGPATH -u "$shortmode_path"`
61612      new_path="$input_path"
61613    fi
61614  fi
61615
61616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61617  if test "x$test_cygdrive_prefix" = x; then
61618    # As a simple fix, exclude /usr/bin since it's not a real path.
61619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61621      # a path prefixed by /cygdrive for fixpath to work.
61622      new_path="$CYGWIN_ROOT_PATH$input_path"
61623    fi
61624  fi
61625
61626
61627  if test "x$path" != "x$new_path"; then
61628    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61630$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61631  fi
61632
61633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61634
61635  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61636  has_colon=`$ECHO $path | $GREP ^.:`
61637  new_path="$path"
61638  if test "x$has_colon" = x; then
61639    # Not in mixed or Windows style, start by that.
61640    new_path=`cmd //c echo $path`
61641  fi
61642
61643
61644  input_path="$new_path"
61645  # Check if we need to convert this using DOS-style short mode. If the path
61646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61647  # take no chances and rewrite it.
61648  # Note: m4 eats our [], so we need to use [ and ] instead.
61649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61650  if test "x$has_forbidden_chars" != x; then
61651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61653  fi
61654
61655
61656  windows_path="$new_path"
61657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61658    unix_path=`$CYGPATH -u "$windows_path"`
61659    new_path="$unix_path"
61660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61662    new_path="$unix_path"
61663  fi
61664
61665  if test "x$path" != "x$new_path"; then
61666    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61668$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61669  fi
61670
61671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61673
61674    else
61675      # We're on a unix platform. Hooray! :)
61676      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61677      has_space=`$ECHO "$path" | $GREP " "`
61678      if test "x$has_space" != x; then
61679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61680$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61681        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61682      fi
61683
61684      # Use eval to expand a potential ~
61685      eval path="$path"
61686      if test ! -f "$path" && test ! -d "$path"; then
61687        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61688      fi
61689
61690      if test -d "$path"; then
61691        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61692      else
61693        dir="`$DIRNAME "$path"`"
61694        base="`$BASENAME "$path"`"
61695        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61696      fi
61697    fi
61698  fi
61699
61700
61701  # Only process if variable expands to non-empty
61702
61703  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61704    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61705
61706  # Input might be given as Windows format, start by converting to
61707  # unix format.
61708  path="$POTENTIAL_FREETYPE_LIB_PATH"
61709  new_path=`$CYGPATH -u "$path"`
61710
61711  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61712  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61713  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61714  # "foo.exe" is OK but "foo" is an error.
61715  #
61716  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61717  # It is also a way to make sure we got the proper file name for the real test later on.
61718  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61719  if test "x$test_shortpath" = x; then
61720    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61721$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61722    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61723  fi
61724
61725  # Call helper function which possibly converts this using DOS-style short mode.
61726  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61739      # Going to short mode and back again did indeed matter. Since short mode is
61740      # case insensitive, let's make it lowercase to improve readability.
61741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61742      # Now convert it back to Unix-style (cygpath)
61743      input_path=`$CYGPATH -u "$shortmode_path"`
61744      new_path="$input_path"
61745    fi
61746  fi
61747
61748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61749  if test "x$test_cygdrive_prefix" = x; then
61750    # As a simple fix, exclude /usr/bin since it's not a real path.
61751    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61753      # a path prefixed by /cygdrive for fixpath to work.
61754      new_path="$CYGWIN_ROOT_PATH$input_path"
61755    fi
61756  fi
61757
61758
61759  if test "x$path" != "x$new_path"; then
61760    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61762$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61763  fi
61764
61765    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61766
61767  path="$POTENTIAL_FREETYPE_LIB_PATH"
61768  has_colon=`$ECHO $path | $GREP ^.:`
61769  new_path="$path"
61770  if test "x$has_colon" = x; then
61771    # Not in mixed or Windows style, start by that.
61772    new_path=`cmd //c echo $path`
61773  fi
61774
61775
61776  input_path="$new_path"
61777  # Check if we need to convert this using DOS-style short mode. If the path
61778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61779  # take no chances and rewrite it.
61780  # Note: m4 eats our [], so we need to use [ and ] instead.
61781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61782  if test "x$has_forbidden_chars" != x; then
61783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61784    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61785  fi
61786
61787
61788  windows_path="$new_path"
61789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61790    unix_path=`$CYGPATH -u "$windows_path"`
61791    new_path="$unix_path"
61792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61794    new_path="$unix_path"
61795  fi
61796
61797  if test "x$path" != "x$new_path"; then
61798    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61800$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61801  fi
61802
61803  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61804  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61805
61806    else
61807      # We're on a unix platform. Hooray! :)
61808      path="$POTENTIAL_FREETYPE_LIB_PATH"
61809      has_space=`$ECHO "$path" | $GREP " "`
61810      if test "x$has_space" != x; then
61811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61812$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61813        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61814      fi
61815
61816      # Use eval to expand a potential ~
61817      eval path="$path"
61818      if test ! -f "$path" && test ! -d "$path"; then
61819        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61820      fi
61821
61822      if test -d "$path"; then
61823        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61824      else
61825        dir="`$DIRNAME "$path"`"
61826        base="`$BASENAME "$path"`"
61827        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61828      fi
61829    fi
61830  fi
61831
61832
61833    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61834    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61835$as_echo_n "checking for freetype includes... " >&6; }
61836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61837$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61838    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61840$as_echo_n "checking for freetype libraries... " >&6; }
61841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61842$as_echo "$FREETYPE_LIB_PATH" >&6; }
61843  fi
61844
61845              if test "x$FOUND_FREETYPE" != xyes; then
61846
61847  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61848  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61849  METHOD="well-known location"
61850
61851  # Let's start with an optimistic view of the world :-)
61852  FOUND_FREETYPE=yes
61853
61854  # First look for the canonical freetype main include file ft2build.h.
61855  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61856    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61857    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61858    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61859      # Fail.
61860      FOUND_FREETYPE=no
61861    fi
61862  fi
61863
61864  if test "x$FOUND_FREETYPE" = xyes; then
61865    # Include file found, let's continue the sanity check.
61866    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61867$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61868
61869    # Reset to default value
61870    FREETYPE_BASE_NAME=freetype
61871    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61872    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61873      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61874          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61875        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61876        # for the .6 version explicitly.
61877        FREETYPE_BASE_NAME=freetype.6
61878        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61879        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61880$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61881      else
61882        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61883$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61884        FOUND_FREETYPE=no
61885      fi
61886    else
61887      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61888        # On Windows, we will need both .lib and .dll file.
61889        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61890          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61891$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61892          FOUND_FREETYPE=no
61893        fi
61894      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61895          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61896        # Found lib in isa dir, use that instead.
61897        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61898        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61899$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61900      fi
61901    fi
61902  fi
61903
61904  if test "x$FOUND_FREETYPE" = xyes; then
61905
61906  # Only process if variable expands to non-empty
61907
61908  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61909    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61910
61911  # Input might be given as Windows format, start by converting to
61912  # unix format.
61913  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61914  new_path=`$CYGPATH -u "$path"`
61915
61916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61919  # "foo.exe" is OK but "foo" is an error.
61920  #
61921  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61922  # It is also a way to make sure we got the proper file name for the real test later on.
61923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61924  if test "x$test_shortpath" = x; then
61925    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61926$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61927    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61928  fi
61929
61930  # Call helper function which possibly converts this using DOS-style short mode.
61931  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61944      # Going to short mode and back again did indeed matter. Since short mode is
61945      # case insensitive, let's make it lowercase to improve readability.
61946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61947      # Now convert it back to Unix-style (cygpath)
61948      input_path=`$CYGPATH -u "$shortmode_path"`
61949      new_path="$input_path"
61950    fi
61951  fi
61952
61953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61954  if test "x$test_cygdrive_prefix" = x; then
61955    # As a simple fix, exclude /usr/bin since it's not a real path.
61956    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61958      # a path prefixed by /cygdrive for fixpath to work.
61959      new_path="$CYGWIN_ROOT_PATH$input_path"
61960    fi
61961  fi
61962
61963
61964  if test "x$path" != "x$new_path"; then
61965    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61967$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61968  fi
61969
61970    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61971
61972  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61973  has_colon=`$ECHO $path | $GREP ^.:`
61974  new_path="$path"
61975  if test "x$has_colon" = x; then
61976    # Not in mixed or Windows style, start by that.
61977    new_path=`cmd //c echo $path`
61978  fi
61979
61980
61981  input_path="$new_path"
61982  # Check if we need to convert this using DOS-style short mode. If the path
61983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61984  # take no chances and rewrite it.
61985  # Note: m4 eats our [], so we need to use [ and ] instead.
61986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61987  if test "x$has_forbidden_chars" != x; then
61988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61989    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61990  fi
61991
61992
61993  windows_path="$new_path"
61994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61995    unix_path=`$CYGPATH -u "$windows_path"`
61996    new_path="$unix_path"
61997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61999    new_path="$unix_path"
62000  fi
62001
62002  if test "x$path" != "x$new_path"; then
62003    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62005$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62006  fi
62007
62008  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62009  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62010
62011    else
62012      # We're on a unix platform. Hooray! :)
62013      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62014      has_space=`$ECHO "$path" | $GREP " "`
62015      if test "x$has_space" != x; then
62016        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62017$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62018        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62019      fi
62020
62021      # Use eval to expand a potential ~
62022      eval path="$path"
62023      if test ! -f "$path" && test ! -d "$path"; then
62024        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62025      fi
62026
62027      if test -d "$path"; then
62028        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62029      else
62030        dir="`$DIRNAME "$path"`"
62031        base="`$BASENAME "$path"`"
62032        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62033      fi
62034    fi
62035  fi
62036
62037
62038  # Only process if variable expands to non-empty
62039
62040  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62041    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62042
62043  # Input might be given as Windows format, start by converting to
62044  # unix format.
62045  path="$POTENTIAL_FREETYPE_LIB_PATH"
62046  new_path=`$CYGPATH -u "$path"`
62047
62048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62051  # "foo.exe" is OK but "foo" is an error.
62052  #
62053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62054  # It is also a way to make sure we got the proper file name for the real test later on.
62055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62056  if test "x$test_shortpath" = x; then
62057    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62058$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62059    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62060  fi
62061
62062  # Call helper function which possibly converts this using DOS-style short mode.
62063  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62076      # Going to short mode and back again did indeed matter. Since short mode is
62077      # case insensitive, let's make it lowercase to improve readability.
62078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62079      # Now convert it back to Unix-style (cygpath)
62080      input_path=`$CYGPATH -u "$shortmode_path"`
62081      new_path="$input_path"
62082    fi
62083  fi
62084
62085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62086  if test "x$test_cygdrive_prefix" = x; then
62087    # As a simple fix, exclude /usr/bin since it's not a real path.
62088    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62090      # a path prefixed by /cygdrive for fixpath to work.
62091      new_path="$CYGWIN_ROOT_PATH$input_path"
62092    fi
62093  fi
62094
62095
62096  if test "x$path" != "x$new_path"; then
62097    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62099$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62100  fi
62101
62102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62103
62104  path="$POTENTIAL_FREETYPE_LIB_PATH"
62105  has_colon=`$ECHO $path | $GREP ^.:`
62106  new_path="$path"
62107  if test "x$has_colon" = x; then
62108    # Not in mixed or Windows style, start by that.
62109    new_path=`cmd //c echo $path`
62110  fi
62111
62112
62113  input_path="$new_path"
62114  # Check if we need to convert this using DOS-style short mode. If the path
62115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62116  # take no chances and rewrite it.
62117  # Note: m4 eats our [], so we need to use [ and ] instead.
62118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62119  if test "x$has_forbidden_chars" != x; then
62120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62122  fi
62123
62124
62125  windows_path="$new_path"
62126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62127    unix_path=`$CYGPATH -u "$windows_path"`
62128    new_path="$unix_path"
62129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62131    new_path="$unix_path"
62132  fi
62133
62134  if test "x$path" != "x$new_path"; then
62135    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62137$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62138  fi
62139
62140  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62141  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62142
62143    else
62144      # We're on a unix platform. Hooray! :)
62145      path="$POTENTIAL_FREETYPE_LIB_PATH"
62146      has_space=`$ECHO "$path" | $GREP " "`
62147      if test "x$has_space" != x; then
62148        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62149$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62150        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62151      fi
62152
62153      # Use eval to expand a potential ~
62154      eval path="$path"
62155      if test ! -f "$path" && test ! -d "$path"; then
62156        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62157      fi
62158
62159      if test -d "$path"; then
62160        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62161      else
62162        dir="`$DIRNAME "$path"`"
62163        base="`$BASENAME "$path"`"
62164        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62165      fi
62166    fi
62167  fi
62168
62169
62170    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62172$as_echo_n "checking for freetype includes... " >&6; }
62173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62174$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62175    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62177$as_echo_n "checking for freetype libraries... " >&6; }
62178    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62179$as_echo "$FREETYPE_LIB_PATH" >&6; }
62180  fi
62181
62182              fi
62183            fi
62184          fi
62185        fi
62186      fi # end check in well-known locations
62187
62188      if test "x$FOUND_FREETYPE" != xyes; then
62189
62190  # Print a helpful message on how to acquire the necessary build dependency.
62191  # freetype is the help tag: freetype, cups, alsa etc
62192  MISSING_DEPENDENCY=freetype
62193
62194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62195    cygwin_help $MISSING_DEPENDENCY
62196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62197    msys_help $MISSING_DEPENDENCY
62198  else
62199    PKGHANDLER_COMMAND=
62200
62201    case $PKGHANDLER in
62202      apt-get)
62203        apt_help     $MISSING_DEPENDENCY ;;
62204      yum)
62205        yum_help     $MISSING_DEPENDENCY ;;
62206      brew)
62207        brew_help    $MISSING_DEPENDENCY ;;
62208      port)
62209        port_help    $MISSING_DEPENDENCY ;;
62210      pkgutil)
62211        pkgutil_help $MISSING_DEPENDENCY ;;
62212      pkgadd)
62213        pkgadd_help  $MISSING_DEPENDENCY ;;
62214    esac
62215
62216    if test "x$PKGHANDLER_COMMAND" != x; then
62217      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62218    fi
62219  fi
62220
62221        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62222      fi
62223    fi # end user specified settings
62224
62225    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62226    if test "x$FREETYPE_CFLAGS" = x; then
62227
62228  # Only process if variable expands to non-empty
62229
62230  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62231    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62232
62233  # Input might be given as Windows format, start by converting to
62234  # unix format.
62235  path="$FREETYPE_INCLUDE_PATH"
62236  new_path=`$CYGPATH -u "$path"`
62237
62238  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62239  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62240  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62241  # "foo.exe" is OK but "foo" is an error.
62242  #
62243  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62244  # It is also a way to make sure we got the proper file name for the real test later on.
62245  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62246  if test "x$test_shortpath" = x; then
62247    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62248$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62249    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62250  fi
62251
62252  # Call helper function which possibly converts this using DOS-style short mode.
62253  # If so, the updated path is stored in $new_path.
62254
62255  input_path="$new_path"
62256  # Check if we need to convert this using DOS-style short mode. If the path
62257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62258  # take no chances and rewrite it.
62259  # Note: m4 eats our [], so we need to use [ and ] instead.
62260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62261  if test "x$has_forbidden_chars" != x; then
62262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62266      # Going to short mode and back again did indeed matter. Since short mode is
62267      # case insensitive, let's make it lowercase to improve readability.
62268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62269      # Now convert it back to Unix-style (cygpath)
62270      input_path=`$CYGPATH -u "$shortmode_path"`
62271      new_path="$input_path"
62272    fi
62273  fi
62274
62275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62276  if test "x$test_cygdrive_prefix" = x; then
62277    # As a simple fix, exclude /usr/bin since it's not a real path.
62278    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62280      # a path prefixed by /cygdrive for fixpath to work.
62281      new_path="$CYGWIN_ROOT_PATH$input_path"
62282    fi
62283  fi
62284
62285
62286  if test "x$path" != "x$new_path"; then
62287    FREETYPE_INCLUDE_PATH="$new_path"
62288    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62289$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62290  fi
62291
62292    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62293
62294  path="$FREETYPE_INCLUDE_PATH"
62295  has_colon=`$ECHO $path | $GREP ^.:`
62296  new_path="$path"
62297  if test "x$has_colon" = x; then
62298    # Not in mixed or Windows style, start by that.
62299    new_path=`cmd //c echo $path`
62300  fi
62301
62302
62303  input_path="$new_path"
62304  # Check if we need to convert this using DOS-style short mode. If the path
62305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62306  # take no chances and rewrite it.
62307  # Note: m4 eats our [], so we need to use [ and ] instead.
62308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62309  if test "x$has_forbidden_chars" != x; then
62310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62311    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62312  fi
62313
62314
62315  windows_path="$new_path"
62316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62317    unix_path=`$CYGPATH -u "$windows_path"`
62318    new_path="$unix_path"
62319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62321    new_path="$unix_path"
62322  fi
62323
62324  if test "x$path" != "x$new_path"; then
62325    FREETYPE_INCLUDE_PATH="$new_path"
62326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62327$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62328  fi
62329
62330  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62331  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62332
62333    else
62334      # We're on a unix platform. Hooray! :)
62335      path="$FREETYPE_INCLUDE_PATH"
62336      has_space=`$ECHO "$path" | $GREP " "`
62337      if test "x$has_space" != x; then
62338        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62339$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62340        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62341      fi
62342
62343      # Use eval to expand a potential ~
62344      eval path="$path"
62345      if test ! -f "$path" && test ! -d "$path"; then
62346        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62347      fi
62348
62349      if test -d "$path"; then
62350        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62351      else
62352        dir="`$DIRNAME "$path"`"
62353        base="`$BASENAME "$path"`"
62354        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62355      fi
62356    fi
62357  fi
62358
62359      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62360        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62361      else
62362        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62363      fi
62364    fi
62365
62366    if test "x$FREETYPE_LIBS" = x; then
62367
62368  # Only process if variable expands to non-empty
62369
62370  if test "x$FREETYPE_LIB_PATH" != x; then
62371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62372
62373  # Input might be given as Windows format, start by converting to
62374  # unix format.
62375  path="$FREETYPE_LIB_PATH"
62376  new_path=`$CYGPATH -u "$path"`
62377
62378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62381  # "foo.exe" is OK but "foo" is an error.
62382  #
62383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62384  # It is also a way to make sure we got the proper file name for the real test later on.
62385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62386  if test "x$test_shortpath" = x; then
62387    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62388$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62389    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62390  fi
62391
62392  # Call helper function which possibly converts this using DOS-style short mode.
62393  # If so, the updated path is stored in $new_path.
62394
62395  input_path="$new_path"
62396  # Check if we need to convert this using DOS-style short mode. If the path
62397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62398  # take no chances and rewrite it.
62399  # Note: m4 eats our [], so we need to use [ and ] instead.
62400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62401  if test "x$has_forbidden_chars" != x; then
62402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62406      # Going to short mode and back again did indeed matter. Since short mode is
62407      # case insensitive, let's make it lowercase to improve readability.
62408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62409      # Now convert it back to Unix-style (cygpath)
62410      input_path=`$CYGPATH -u "$shortmode_path"`
62411      new_path="$input_path"
62412    fi
62413  fi
62414
62415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62416  if test "x$test_cygdrive_prefix" = x; then
62417    # As a simple fix, exclude /usr/bin since it's not a real path.
62418    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62420      # a path prefixed by /cygdrive for fixpath to work.
62421      new_path="$CYGWIN_ROOT_PATH$input_path"
62422    fi
62423  fi
62424
62425
62426  if test "x$path" != "x$new_path"; then
62427    FREETYPE_LIB_PATH="$new_path"
62428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62429$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62430  fi
62431
62432    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62433
62434  path="$FREETYPE_LIB_PATH"
62435  has_colon=`$ECHO $path | $GREP ^.:`
62436  new_path="$path"
62437  if test "x$has_colon" = x; then
62438    # Not in mixed or Windows style, start by that.
62439    new_path=`cmd //c echo $path`
62440  fi
62441
62442
62443  input_path="$new_path"
62444  # Check if we need to convert this using DOS-style short mode. If the path
62445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62446  # take no chances and rewrite it.
62447  # Note: m4 eats our [], so we need to use [ and ] instead.
62448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62449  if test "x$has_forbidden_chars" != x; then
62450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62452  fi
62453
62454
62455  windows_path="$new_path"
62456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62457    unix_path=`$CYGPATH -u "$windows_path"`
62458    new_path="$unix_path"
62459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62461    new_path="$unix_path"
62462  fi
62463
62464  if test "x$path" != "x$new_path"; then
62465    FREETYPE_LIB_PATH="$new_path"
62466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62467$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62468  fi
62469
62470  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62471  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62472
62473    else
62474      # We're on a unix platform. Hooray! :)
62475      path="$FREETYPE_LIB_PATH"
62476      has_space=`$ECHO "$path" | $GREP " "`
62477      if test "x$has_space" != x; then
62478        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62479$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62480        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62481      fi
62482
62483      # Use eval to expand a potential ~
62484      eval path="$path"
62485      if test ! -f "$path" && test ! -d "$path"; then
62486        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62487      fi
62488
62489      if test -d "$path"; then
62490        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62491      else
62492        dir="`$DIRNAME "$path"`"
62493        base="`$BASENAME "$path"`"
62494        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62495      fi
62496    fi
62497  fi
62498
62499      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62500        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62501      else
62502        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62503      fi
62504    fi
62505
62506    # Try to compile it
62507    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62508$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62509    ac_ext=cpp
62510ac_cpp='$CXXCPP $CPPFLAGS'
62511ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62512ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62513ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62514
62515    PREV_CXXCFLAGS="$CXXFLAGS"
62516    PREV_LIBS="$LIBS"
62517    PREV_CXX="$CXX"
62518    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62519    LIBS="$LIBS $FREETYPE_LIBS"
62520    CXX="$FIXPATH $CXX"
62521    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62522/* end confdefs.h.  */
62523
62524          #include<ft2build.h>
62525          #include FT_FREETYPE_H
62526          int main () {
62527            FT_Init_FreeType(NULL);
62528            return 0;
62529          }
62530
62531_ACEOF
62532if ac_fn_cxx_try_link "$LINENO"; then :
62533
62534          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62535$as_echo "yes" >&6; }
62536
62537else
62538
62539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62540$as_echo "no" >&6; }
62541          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62542$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62543          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62544$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62545
62546
62547  # Print a helpful message on how to acquire the necessary build dependency.
62548  # freetype is the help tag: freetype, cups, alsa etc
62549  MISSING_DEPENDENCY=freetype
62550
62551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62552    cygwin_help $MISSING_DEPENDENCY
62553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62554    msys_help $MISSING_DEPENDENCY
62555  else
62556    PKGHANDLER_COMMAND=
62557
62558    case $PKGHANDLER in
62559      apt-get)
62560        apt_help     $MISSING_DEPENDENCY ;;
62561      yum)
62562        yum_help     $MISSING_DEPENDENCY ;;
62563      brew)
62564        brew_help    $MISSING_DEPENDENCY ;;
62565      port)
62566        port_help    $MISSING_DEPENDENCY ;;
62567      pkgutil)
62568        pkgutil_help $MISSING_DEPENDENCY ;;
62569      pkgadd)
62570        pkgadd_help  $MISSING_DEPENDENCY ;;
62571    esac
62572
62573    if test "x$PKGHANDLER_COMMAND" != x; then
62574      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62575    fi
62576  fi
62577
62578
62579          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62580
62581
62582fi
62583rm -f core conftest.err conftest.$ac_objext \
62584    conftest$ac_exeext conftest.$ac_ext
62585    CXXCFLAGS="$PREV_CXXFLAGS"
62586    LIBS="$PREV_LIBS"
62587    CXX="$PREV_CXX"
62588    ac_ext=cpp
62589ac_cpp='$CXXCPP $CPPFLAGS'
62590ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62591ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62592ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62593
62594
62595    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62596$as_echo_n "checking if we should bundle freetype... " >&6; }
62597    if test "x$BUNDLE_FREETYPE" = xyes; then
62598      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62599    fi
62600    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62601$as_echo "$BUNDLE_FREETYPE" >&6; }
62602
62603  fi # end freetype needed
62604
62605
62606
62607
62608
62609
62610
62611# Check whether --with-alsa was given.
62612if test "${with_alsa+set}" = set; then :
62613  withval=$with_alsa;
62614fi
62615
62616
62617# Check whether --with-alsa-include was given.
62618if test "${with_alsa_include+set}" = set; then :
62619  withval=$with_alsa_include;
62620fi
62621
62622
62623# Check whether --with-alsa-lib was given.
62624if test "${with_alsa_lib+set}" = set; then :
62625  withval=$with_alsa_lib;
62626fi
62627
62628
62629  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62630    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62631        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62632        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62633      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62634$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62635    fi
62636    ALSA_CFLAGS=
62637    ALSA_LIBS=
62638  else
62639    ALSA_FOUND=no
62640
62641    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62642      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62643    fi
62644
62645    if test "x${with_alsa}" != x; then
62646      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62647      ALSA_CFLAGS="-I${with_alsa}/include"
62648      ALSA_FOUND=yes
62649    fi
62650    if test "x${with_alsa_include}" != x; then
62651      ALSA_CFLAGS="-I${with_alsa_include}"
62652      ALSA_FOUND=yes
62653    fi
62654    if test "x${with_alsa_lib}" != x; then
62655      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62656      ALSA_FOUND=yes
62657    fi
62658    # Do not try pkg-config if we have a sysroot set.
62659    if test "x$SYSROOT" = x; then
62660      if test "x$ALSA_FOUND" = xno; then
62661
62662pkg_failed=no
62663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62664$as_echo_n "checking for ALSA... " >&6; }
62665
62666if test -n "$ALSA_CFLAGS"; then
62667    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62668 elif test -n "$PKG_CONFIG"; then
62669    if test -n "$PKG_CONFIG" && \
62670    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62671  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62672  ac_status=$?
62673  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62674  test $ac_status = 0; }; then
62675  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62676else
62677  pkg_failed=yes
62678fi
62679 else
62680    pkg_failed=untried
62681fi
62682if test -n "$ALSA_LIBS"; then
62683    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62684 elif test -n "$PKG_CONFIG"; then
62685    if test -n "$PKG_CONFIG" && \
62686    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62687  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62688  ac_status=$?
62689  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62690  test $ac_status = 0; }; then
62691  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62692else
62693  pkg_failed=yes
62694fi
62695 else
62696    pkg_failed=untried
62697fi
62698
62699
62700
62701if test $pkg_failed = yes; then
62702
62703if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62704        _pkg_short_errors_supported=yes
62705else
62706        _pkg_short_errors_supported=no
62707fi
62708        if test $_pkg_short_errors_supported = yes; then
62709	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62710        else
62711	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62712        fi
62713	# Put the nasty error message in config.log where it belongs
62714	echo "$ALSA_PKG_ERRORS" >&5
62715
62716	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62717$as_echo "no" >&6; }
62718                ALSA_FOUND=no
62719elif test $pkg_failed = untried; then
62720	ALSA_FOUND=no
62721else
62722	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62723	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62725$as_echo "yes" >&6; }
62726	ALSA_FOUND=yes
62727fi
62728      fi
62729    fi
62730    if test "x$ALSA_FOUND" = xno; then
62731      for ac_header in alsa/asoundlib.h
62732do :
62733  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62734if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62735  cat >>confdefs.h <<_ACEOF
62736#define HAVE_ALSA_ASOUNDLIB_H 1
62737_ACEOF
62738
62739            ALSA_FOUND=yes
62740            ALSA_CFLAGS=-Iignoreme
62741            ALSA_LIBS=-lasound
62742            DEFAULT_ALSA=yes
62743
62744else
62745  ALSA_FOUND=no
62746
62747fi
62748
62749done
62750
62751    fi
62752    if test "x$ALSA_FOUND" = xno; then
62753
62754  # Print a helpful message on how to acquire the necessary build dependency.
62755  # alsa is the help tag: freetype, cups, alsa etc
62756  MISSING_DEPENDENCY=alsa
62757
62758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62759    cygwin_help $MISSING_DEPENDENCY
62760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62761    msys_help $MISSING_DEPENDENCY
62762  else
62763    PKGHANDLER_COMMAND=
62764
62765    case $PKGHANDLER in
62766      apt-get)
62767        apt_help     $MISSING_DEPENDENCY ;;
62768      yum)
62769        yum_help     $MISSING_DEPENDENCY ;;
62770      brew)
62771        brew_help    $MISSING_DEPENDENCY ;;
62772      port)
62773        port_help    $MISSING_DEPENDENCY ;;
62774      pkgutil)
62775        pkgutil_help $MISSING_DEPENDENCY ;;
62776      pkgadd)
62777        pkgadd_help  $MISSING_DEPENDENCY ;;
62778    esac
62779
62780    if test "x$PKGHANDLER_COMMAND" != x; then
62781      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62782    fi
62783  fi
62784
62785      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62786    fi
62787  fi
62788
62789
62790
62791
62792
62793
62794# Check whether --with-libffi was given.
62795if test "${with_libffi+set}" = set; then :
62796  withval=$with_libffi;
62797fi
62798
62799
62800# Check whether --with-libffi-include was given.
62801if test "${with_libffi_include+set}" = set; then :
62802  withval=$with_libffi_include;
62803fi
62804
62805
62806# Check whether --with-libffi-lib was given.
62807if test "${with_libffi_lib+set}" = set; then :
62808  withval=$with_libffi_lib;
62809fi
62810
62811  # Check whether --enable-libffi-bundling was given.
62812if test "${enable_libffi_bundling+set}" = set; then :
62813  enableval=$enable_libffi_bundling;
62814fi
62815
62816
62817  if test "x$NEEDS_LIB_FFI" = xfalse; then
62818    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62819        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62820        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62821      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62822$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62823    fi
62824    LIBFFI_CFLAGS=
62825    LIBFFI_LIBS=
62826  else
62827    LIBFFI_FOUND=no
62828
62829    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62830      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62831    fi
62832
62833    if test "x${with_libffi}" != x; then
62834      LIBFFI_LIB_PATH="${with_libffi}/lib"
62835      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62836      LIBFFI_CFLAGS="-I${with_libffi}/include"
62837      LIBFFI_FOUND=yes
62838    fi
62839    if test "x${with_libffi_include}" != x; then
62840      LIBFFI_CFLAGS="-I${with_libffi_include}"
62841      LIBFFI_FOUND=yes
62842    fi
62843    if test "x${with_libffi_lib}" != x; then
62844      LIBFFI_LIB_PATH="${with_libffi_lib}"
62845      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62846      LIBFFI_FOUND=yes
62847    fi
62848    # Do not try pkg-config if we have a sysroot set.
62849    if test "x$SYSROOT" = x; then
62850      if test "x$LIBFFI_FOUND" = xno; then
62851        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62852
62853pkg_failed=no
62854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62855$as_echo_n "checking for LIBFFI... " >&6; }
62856
62857if test -n "$LIBFFI_CFLAGS"; then
62858    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62859 elif test -n "$PKG_CONFIG"; then
62860    if test -n "$PKG_CONFIG" && \
62861    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62862  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62863  ac_status=$?
62864  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62865  test $ac_status = 0; }; then
62866  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62867else
62868  pkg_failed=yes
62869fi
62870 else
62871    pkg_failed=untried
62872fi
62873if test -n "$LIBFFI_LIBS"; then
62874    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62875 elif test -n "$PKG_CONFIG"; then
62876    if test -n "$PKG_CONFIG" && \
62877    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62878  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62879  ac_status=$?
62880  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62881  test $ac_status = 0; }; then
62882  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62883else
62884  pkg_failed=yes
62885fi
62886 else
62887    pkg_failed=untried
62888fi
62889
62890
62891
62892if test $pkg_failed = yes; then
62893
62894if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62895        _pkg_short_errors_supported=yes
62896else
62897        _pkg_short_errors_supported=no
62898fi
62899        if test $_pkg_short_errors_supported = yes; then
62900	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62901        else
62902	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62903        fi
62904	# Put the nasty error message in config.log where it belongs
62905	echo "$LIBFFI_PKG_ERRORS" >&5
62906
62907	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62908$as_echo "no" >&6; }
62909                LIBFFI_FOUND=no
62910elif test $pkg_failed = untried; then
62911	LIBFFI_FOUND=no
62912else
62913	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62914	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62915        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62916$as_echo "yes" >&6; }
62917	LIBFFI_FOUND=yes
62918fi
62919      fi
62920    fi
62921    if test "x$LIBFFI_FOUND" = xno; then
62922      for ac_header in ffi.h
62923do :
62924  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62925if test "x$ac_cv_header_ffi_h" = xyes; then :
62926  cat >>confdefs.h <<_ACEOF
62927#define HAVE_FFI_H 1
62928_ACEOF
62929
62930            LIBFFI_FOUND=yes
62931            LIBFFI_CFLAGS=
62932            LIBFFI_LIBS=-lffi
62933
62934else
62935  LIBFFI_FOUND=no
62936
62937fi
62938
62939done
62940
62941    fi
62942    if test "x$LIBFFI_FOUND" = xno; then
62943
62944  # Print a helpful message on how to acquire the necessary build dependency.
62945  # ffi is the help tag: freetype, cups, alsa etc
62946  MISSING_DEPENDENCY=ffi
62947
62948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62949    cygwin_help $MISSING_DEPENDENCY
62950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62951    msys_help $MISSING_DEPENDENCY
62952  else
62953    PKGHANDLER_COMMAND=
62954
62955    case $PKGHANDLER in
62956      apt-get)
62957        apt_help     $MISSING_DEPENDENCY ;;
62958      yum)
62959        yum_help     $MISSING_DEPENDENCY ;;
62960      brew)
62961        brew_help    $MISSING_DEPENDENCY ;;
62962      port)
62963        port_help    $MISSING_DEPENDENCY ;;
62964      pkgutil)
62965        pkgutil_help $MISSING_DEPENDENCY ;;
62966      pkgadd)
62967        pkgadd_help  $MISSING_DEPENDENCY ;;
62968    esac
62969
62970    if test "x$PKGHANDLER_COMMAND" != x; then
62971      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62972    fi
62973  fi
62974
62975      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62976    fi
62977
62978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62979$as_echo_n "checking if libffi works... " >&6; }
62980    ac_ext=c
62981ac_cpp='$CPP $CPPFLAGS'
62982ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62983ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62984ac_compiler_gnu=$ac_cv_c_compiler_gnu
62985
62986    OLD_CFLAGS="$CFLAGS"
62987    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62988    OLD_LIBS="$LIBS"
62989    LIBS="$LIBS $LIBFFI_LIBS"
62990    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62991/* end confdefs.h.  */
62992#include <ffi.h>
62993int
62994main ()
62995{
62996
62997          ffi_call(NULL, NULL, NULL, NULL);
62998          return 0;
62999
63000  ;
63001  return 0;
63002}
63003_ACEOF
63004if ac_fn_c_try_link "$LINENO"; then :
63005  LIBFFI_WORKS=yes
63006else
63007  LIBFFI_WORKS=no
63008
63009fi
63010rm -f core conftest.err conftest.$ac_objext \
63011    conftest$ac_exeext conftest.$ac_ext
63012    CFLAGS="$OLD_CFLAGS"
63013    LIBS="$OLD_LIBS"
63014    ac_ext=cpp
63015ac_cpp='$CXXCPP $CPPFLAGS'
63016ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63017ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63018ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63019
63020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63021$as_echo "$LIBFFI_WORKS" >&6; }
63022
63023    if test "x$LIBFFI_WORKS" = xno; then
63024
63025  # Print a helpful message on how to acquire the necessary build dependency.
63026  # ffi is the help tag: freetype, cups, alsa etc
63027  MISSING_DEPENDENCY=ffi
63028
63029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63030    cygwin_help $MISSING_DEPENDENCY
63031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63032    msys_help $MISSING_DEPENDENCY
63033  else
63034    PKGHANDLER_COMMAND=
63035
63036    case $PKGHANDLER in
63037      apt-get)
63038        apt_help     $MISSING_DEPENDENCY ;;
63039      yum)
63040        yum_help     $MISSING_DEPENDENCY ;;
63041      brew)
63042        brew_help    $MISSING_DEPENDENCY ;;
63043      port)
63044        port_help    $MISSING_DEPENDENCY ;;
63045      pkgutil)
63046        pkgutil_help $MISSING_DEPENDENCY ;;
63047      pkgadd)
63048        pkgadd_help  $MISSING_DEPENDENCY ;;
63049    esac
63050
63051    if test "x$PKGHANDLER_COMMAND" != x; then
63052      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63053    fi
63054  fi
63055
63056      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63057    fi
63058
63059    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63060$as_echo_n "checking if libffi should be bundled... " >&6; }
63061    if test "x$enable_libffi_bundling" = "x"; then
63062      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63063$as_echo "no" >&6; }
63064      ENABLE_LIBFFI_BUNDLING=false
63065    elif  test "x$enable_libffi_bundling" = "xno"; then
63066      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63067$as_echo "no, forced" >&6; }
63068      ENABLE_LIBFFI_BUNDLING=false
63069    elif  test "x$enable_libffi_bundling" = "xyes"; then
63070      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63071$as_echo "yes, forced" >&6; }
63072      ENABLE_LIBFFI_BUNDLING=true
63073    else
63074      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63075    fi
63076
63077    # Find the libffi.so.X to bundle
63078    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63079      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63080$as_echo_n "checking for libffi lib file location... " >&6; }
63081      if test "x${LIBFFI_LIB_PATH}" != x; then
63082        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63083          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63084        else
63085          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63086        fi
63087      else
63088        # If we don't have an explicit path, look in a few obvious places
63089        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63090          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63091            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63092          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63093            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63094          else
63095            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63096          fi
63097        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63098          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63099            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63100          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63101            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63102          else
63103            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63104          fi
63105        else
63106          # Fallback on the default /usr/lib dir
63107          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63108            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63109          else
63110            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63111          fi
63112        fi
63113      fi
63114      # Make sure the wildcard is evaluated
63115      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63116      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63117$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63118    fi
63119  fi
63120
63121
63122
63123
63124
63125
63126
63127  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63128    # Extract the first word of "llvm-config", so it can be a program name with args.
63129set dummy llvm-config; ac_word=$2
63130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63131$as_echo_n "checking for $ac_word... " >&6; }
63132if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63133  $as_echo_n "(cached) " >&6
63134else
63135  if test -n "$LLVM_CONFIG"; then
63136  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63137else
63138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63139for as_dir in $PATH
63140do
63141  IFS=$as_save_IFS
63142  test -z "$as_dir" && as_dir=.
63143    for ac_exec_ext in '' $ac_executable_extensions; do
63144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63145    ac_cv_prog_LLVM_CONFIG="llvm-config"
63146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63147    break 2
63148  fi
63149done
63150  done
63151IFS=$as_save_IFS
63152
63153fi
63154fi
63155LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63156if test -n "$LLVM_CONFIG"; then
63157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63158$as_echo "$LLVM_CONFIG" >&6; }
63159else
63160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63161$as_echo "no" >&6; }
63162fi
63163
63164
63165
63166    if test "x$LLVM_CONFIG" != xllvm-config; then
63167      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63168    fi
63169
63170    llvm_components="jit mcjit engine nativecodegen native"
63171    unset LLVM_CFLAGS
63172    for flag in $("$LLVM_CONFIG" --cxxflags); do
63173      if echo "${flag}" | grep -q '^-[ID]'; then
63174        if test "${flag}" != "-D_DEBUG" ; then
63175          if test "${LLVM_CFLAGS}" != "" ; then
63176            LLVM_CFLAGS="${LLVM_CFLAGS} "
63177          fi
63178          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63179        fi
63180      fi
63181    done
63182    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63183    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63184
63185    unset LLVM_LDFLAGS
63186    for flag in $("${LLVM_CONFIG}" --ldflags); do
63187      if echo "${flag}" | grep -q '^-L'; then
63188        if test "${LLVM_LDFLAGS}" != ""; then
63189          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63190        fi
63191        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63192      fi
63193    done
63194
63195    unset LLVM_LIBS
63196    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63197      if echo "${flag}" | grep -q '^-l'; then
63198        if test "${LLVM_LIBS}" != ""; then
63199          LLVM_LIBS="${LLVM_LIBS} "
63200        fi
63201        LLVM_LIBS="${LLVM_LIBS}${flag}"
63202      fi
63203    done
63204
63205    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63206    # always properly detect -ltinfo
63207    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63208
63209
63210
63211
63212  fi
63213
63214
63215
63216# Check whether --with-libjpeg was given.
63217if test "${with_libjpeg+set}" = set; then :
63218  withval=$with_libjpeg;
63219fi
63220
63221
63222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63223$as_echo_n "checking for which libjpeg to use... " >&6; }
63224  # default is bundled
63225  DEFAULT_LIBJPEG=bundled
63226  # if user didn't specify, use DEFAULT_LIBJPEG
63227  if test "x${with_libjpeg}" = "x"; then
63228    with_libjpeg=${DEFAULT_LIBJPEG}
63229  fi
63230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63231$as_echo "${with_libjpeg}" >&6; }
63232
63233  if test "x${with_libjpeg}" = "xbundled"; then
63234    USE_EXTERNAL_LIBJPEG=false
63235  elif test "x${with_libjpeg}" = "xsystem"; then
63236    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63237if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63238
63239else
63240   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63241fi
63242
63243
63244    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63245$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63246if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63247  $as_echo_n "(cached) " >&6
63248else
63249  ac_check_lib_save_LIBS=$LIBS
63250LIBS="-ljpeg  $LIBS"
63251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63252/* end confdefs.h.  */
63253
63254/* Override any GCC internal prototype to avoid an error.
63255   Use char because int might match the return type of a GCC
63256   builtin and then its argument prototype would still apply.  */
63257#ifdef __cplusplus
63258extern "C"
63259#endif
63260char jpeg_CreateDecompress ();
63261int
63262main ()
63263{
63264return jpeg_CreateDecompress ();
63265  ;
63266  return 0;
63267}
63268_ACEOF
63269if ac_fn_cxx_try_link "$LINENO"; then :
63270  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63271else
63272  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63273fi
63274rm -f core conftest.err conftest.$ac_objext \
63275    conftest$ac_exeext conftest.$ac_ext
63276LIBS=$ac_check_lib_save_LIBS
63277fi
63278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63279$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63280if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63281  cat >>confdefs.h <<_ACEOF
63282#define HAVE_LIBJPEG 1
63283_ACEOF
63284
63285  LIBS="-ljpeg $LIBS"
63286
63287else
63288   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63289fi
63290
63291
63292    USE_EXTERNAL_LIBJPEG=true
63293  else
63294    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63295  fi
63296
63297
63298
63299
63300
63301# Check whether --with-giflib was given.
63302if test "${with_giflib+set}" = set; then :
63303  withval=$with_giflib;
63304fi
63305
63306
63307  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63308$as_echo_n "checking for which giflib to use... " >&6; }
63309  # default is bundled
63310  DEFAULT_GIFLIB=bundled
63311  # if user didn't specify, use DEFAULT_GIFLIB
63312  if test "x${with_giflib}" = "x"; then
63313    with_giflib=${DEFAULT_GIFLIB}
63314  fi
63315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63316$as_echo "${with_giflib}" >&6; }
63317
63318  if test "x${with_giflib}" = "xbundled"; then
63319    USE_EXTERNAL_LIBGIF=false
63320  elif test "x${with_giflib}" = "xsystem"; then
63321    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63322if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63323
63324else
63325   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63326fi
63327
63328
63329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63330$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63331if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63332  $as_echo_n "(cached) " >&6
63333else
63334  ac_check_lib_save_LIBS=$LIBS
63335LIBS="-lgif  $LIBS"
63336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63337/* end confdefs.h.  */
63338
63339/* Override any GCC internal prototype to avoid an error.
63340   Use char because int might match the return type of a GCC
63341   builtin and then its argument prototype would still apply.  */
63342#ifdef __cplusplus
63343extern "C"
63344#endif
63345char DGifGetCode ();
63346int
63347main ()
63348{
63349return DGifGetCode ();
63350  ;
63351  return 0;
63352}
63353_ACEOF
63354if ac_fn_cxx_try_link "$LINENO"; then :
63355  ac_cv_lib_gif_DGifGetCode=yes
63356else
63357  ac_cv_lib_gif_DGifGetCode=no
63358fi
63359rm -f core conftest.err conftest.$ac_objext \
63360    conftest$ac_exeext conftest.$ac_ext
63361LIBS=$ac_check_lib_save_LIBS
63362fi
63363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63364$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63365if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63366  cat >>confdefs.h <<_ACEOF
63367#define HAVE_LIBGIF 1
63368_ACEOF
63369
63370  LIBS="-lgif $LIBS"
63371
63372else
63373   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63374fi
63375
63376
63377    USE_EXTERNAL_LIBGIF=true
63378  else
63379    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63380  fi
63381
63382
63383
63384
63385
63386# Check whether --with-libpng was given.
63387if test "${with_libpng+set}" = set; then :
63388  withval=$with_libpng;
63389fi
63390
63391
63392  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63393$as_echo_n "checking for which libpng to use... " >&6; }
63394
63395  # default is bundled
63396  DEFAULT_LIBPNG=bundled
63397  # if user didn't specify, use DEFAULT_LIBPNG
63398  if test "x${with_libpng}" = "x"; then
63399    with_libpng=${DEFAULT_LIBPNG}
63400  fi
63401
63402  if test "x${with_libpng}" = "xbundled"; then
63403    USE_EXTERNAL_LIBPNG=false
63404    PNG_CFLAGS=""
63405    PNG_LIBS=""
63406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63407$as_echo "bundled" >&6; }
63408  elif test "x${with_libpng}" = "xsystem"; then
63409
63410pkg_failed=no
63411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63412$as_echo_n "checking for PNG... " >&6; }
63413
63414if test -n "$PNG_CFLAGS"; then
63415    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63416 elif test -n "$PKG_CONFIG"; then
63417    if test -n "$PKG_CONFIG" && \
63418    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63419  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63420  ac_status=$?
63421  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63422  test $ac_status = 0; }; then
63423  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63424else
63425  pkg_failed=yes
63426fi
63427 else
63428    pkg_failed=untried
63429fi
63430if test -n "$PNG_LIBS"; then
63431    pkg_cv_PNG_LIBS="$PNG_LIBS"
63432 elif test -n "$PKG_CONFIG"; then
63433    if test -n "$PKG_CONFIG" && \
63434    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63435  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63436  ac_status=$?
63437  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63438  test $ac_status = 0; }; then
63439  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63440else
63441  pkg_failed=yes
63442fi
63443 else
63444    pkg_failed=untried
63445fi
63446
63447
63448
63449if test $pkg_failed = yes; then
63450
63451if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63452        _pkg_short_errors_supported=yes
63453else
63454        _pkg_short_errors_supported=no
63455fi
63456        if test $_pkg_short_errors_supported = yes; then
63457	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63458        else
63459	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63460        fi
63461	# Put the nasty error message in config.log where it belongs
63462	echo "$PNG_PKG_ERRORS" >&5
63463
63464	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63465$as_echo "no" >&6; }
63466                LIBPNG_FOUND=no
63467elif test $pkg_failed = untried; then
63468	LIBPNG_FOUND=no
63469else
63470	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63471	PNG_LIBS=$pkg_cv_PNG_LIBS
63472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63473$as_echo "yes" >&6; }
63474	LIBPNG_FOUND=yes
63475fi
63476    if test "x${LIBPNG_FOUND}" = "xyes"; then
63477      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
63478      USE_EXTERNAL_LIBPNG=true
63479      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63480$as_echo "system" >&6; }
63481    else
63482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63483$as_echo "system not found" >&6; }
63484      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63485    fi
63486  else
63487    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63488  fi
63489
63490
63491
63492
63493
63494
63495
63496# Check whether --with-zlib was given.
63497if test "${with_zlib+set}" = set; then :
63498  withval=$with_zlib;
63499fi
63500
63501
63502  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63503$as_echo_n "checking for compress in -lz... " >&6; }
63504if ${ac_cv_lib_z_compress+:} false; then :
63505  $as_echo_n "(cached) " >&6
63506else
63507  ac_check_lib_save_LIBS=$LIBS
63508LIBS="-lz  $LIBS"
63509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63510/* end confdefs.h.  */
63511
63512/* Override any GCC internal prototype to avoid an error.
63513   Use char because int might match the return type of a GCC
63514   builtin and then its argument prototype would still apply.  */
63515#ifdef __cplusplus
63516extern "C"
63517#endif
63518char compress ();
63519int
63520main ()
63521{
63522return compress ();
63523  ;
63524  return 0;
63525}
63526_ACEOF
63527if ac_fn_cxx_try_link "$LINENO"; then :
63528  ac_cv_lib_z_compress=yes
63529else
63530  ac_cv_lib_z_compress=no
63531fi
63532rm -f core conftest.err conftest.$ac_objext \
63533    conftest$ac_exeext conftest.$ac_ext
63534LIBS=$ac_check_lib_save_LIBS
63535fi
63536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63537$as_echo "$ac_cv_lib_z_compress" >&6; }
63538if test "x$ac_cv_lib_z_compress" = xyes; then :
63539   ZLIB_FOUND=yes
63540else
63541   ZLIB_FOUND=no
63542fi
63543
63544
63545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63546$as_echo_n "checking for which zlib to use... " >&6; }
63547
63548  DEFAULT_ZLIB=system
63549  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63550    # On windows default is bundled...on others default is system
63551    DEFAULT_ZLIB=bundled
63552  fi
63553
63554  if test "x${ZLIB_FOUND}" != "xyes"; then
63555    # If we don't find any system...set default to bundled
63556    DEFAULT_ZLIB=bundled
63557  fi
63558
63559  # If user didn't specify, use DEFAULT_ZLIB
63560  if test "x${with_zlib}" = "x"; then
63561    with_zlib=${DEFAULT_ZLIB}
63562  fi
63563
63564  if test "x${with_zlib}" = "xbundled"; then
63565    USE_EXTERNAL_LIBZ=false
63566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63567$as_echo "bundled" >&6; }
63568  elif test "x${with_zlib}" = "xsystem"; then
63569    if test "x${ZLIB_FOUND}" = "xyes"; then
63570      USE_EXTERNAL_LIBZ=true
63571      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63572$as_echo "system" >&6; }
63573    else
63574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63575$as_echo "system not found" >&6; }
63576      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63577    fi
63578  else
63579    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63580  fi
63581
63582
63583
63584
63585
63586# Check whether --with-lcms was given.
63587if test "${with_lcms+set}" = set; then :
63588  withval=$with_lcms;
63589fi
63590
63591
63592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63593$as_echo_n "checking for which lcms to use... " >&6; }
63594
63595  DEFAULT_LCMS=bundled
63596  # If user didn't specify, use DEFAULT_LCMS
63597  if test "x${with_lcms}" = "x"; then
63598    with_lcms=${DEFAULT_LCMS}
63599  fi
63600
63601  if test "x${with_lcms}" = "xbundled"; then
63602    USE_EXTERNAL_LCMS=false
63603    LCMS_CFLAGS=""
63604    LCMS_LIBS=""
63605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63606$as_echo "bundled" >&6; }
63607  elif test "x${with_lcms}" = "xsystem"; then
63608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63609$as_echo "system" >&6; }
63610
63611pkg_failed=no
63612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63613$as_echo_n "checking for LCMS... " >&6; }
63614
63615if test -n "$LCMS_CFLAGS"; then
63616    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63617 elif test -n "$PKG_CONFIG"; then
63618    if test -n "$PKG_CONFIG" && \
63619    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63620  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63621  ac_status=$?
63622  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63623  test $ac_status = 0; }; then
63624  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63625else
63626  pkg_failed=yes
63627fi
63628 else
63629    pkg_failed=untried
63630fi
63631if test -n "$LCMS_LIBS"; then
63632    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63633 elif test -n "$PKG_CONFIG"; then
63634    if test -n "$PKG_CONFIG" && \
63635    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63636  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63637  ac_status=$?
63638  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63639  test $ac_status = 0; }; then
63640  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63641else
63642  pkg_failed=yes
63643fi
63644 else
63645    pkg_failed=untried
63646fi
63647
63648
63649
63650if test $pkg_failed = yes; then
63651
63652if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63653        _pkg_short_errors_supported=yes
63654else
63655        _pkg_short_errors_supported=no
63656fi
63657        if test $_pkg_short_errors_supported = yes; then
63658	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63659        else
63660	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63661        fi
63662	# Put the nasty error message in config.log where it belongs
63663	echo "$LCMS_PKG_ERRORS" >&5
63664
63665	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63666$as_echo "no" >&6; }
63667                LCMS_FOUND=no
63668elif test $pkg_failed = untried; then
63669	LCMS_FOUND=no
63670else
63671	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63672	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63674$as_echo "yes" >&6; }
63675	LCMS_FOUND=yes
63676fi
63677    if test "x${LCMS_FOUND}" = "xyes"; then
63678      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
63679      USE_EXTERNAL_LCMS=true
63680    else
63681      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63682    fi
63683  else
63684    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63685  fi
63686
63687
63688
63689
63690
63691
63692
63693
63694
63695
63696
63697
63698
63699  # Setup libm (the maths library)
63700  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63701    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63702$as_echo_n "checking for cos in -lm... " >&6; }
63703if ${ac_cv_lib_m_cos+:} false; then :
63704  $as_echo_n "(cached) " >&6
63705else
63706  ac_check_lib_save_LIBS=$LIBS
63707LIBS="-lm  $LIBS"
63708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63709/* end confdefs.h.  */
63710
63711/* Override any GCC internal prototype to avoid an error.
63712   Use char because int might match the return type of a GCC
63713   builtin and then its argument prototype would still apply.  */
63714#ifdef __cplusplus
63715extern "C"
63716#endif
63717char cos ();
63718int
63719main ()
63720{
63721return cos ();
63722  ;
63723  return 0;
63724}
63725_ACEOF
63726if ac_fn_cxx_try_link "$LINENO"; then :
63727  ac_cv_lib_m_cos=yes
63728else
63729  ac_cv_lib_m_cos=no
63730fi
63731rm -f core conftest.err conftest.$ac_objext \
63732    conftest$ac_exeext conftest.$ac_ext
63733LIBS=$ac_check_lib_save_LIBS
63734fi
63735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63736$as_echo "$ac_cv_lib_m_cos" >&6; }
63737if test "x$ac_cv_lib_m_cos" = xyes; then :
63738  cat >>confdefs.h <<_ACEOF
63739#define HAVE_LIBM 1
63740_ACEOF
63741
63742  LIBS="-lm $LIBS"
63743
63744else
63745
63746        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63747$as_echo "$as_me: Maths library was not found" >&6;}
63748
63749fi
63750
63751    LIBM="-lm"
63752  else
63753    LIBM=""
63754  fi
63755
63756
63757  # Setup libdl (for dynamic library loading)
63758  save_LIBS="$LIBS"
63759  LIBS=""
63760  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63761$as_echo_n "checking for dlopen in -ldl... " >&6; }
63762if ${ac_cv_lib_dl_dlopen+:} false; then :
63763  $as_echo_n "(cached) " >&6
63764else
63765  ac_check_lib_save_LIBS=$LIBS
63766LIBS="-ldl  $LIBS"
63767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63768/* end confdefs.h.  */
63769
63770/* Override any GCC internal prototype to avoid an error.
63771   Use char because int might match the return type of a GCC
63772   builtin and then its argument prototype would still apply.  */
63773#ifdef __cplusplus
63774extern "C"
63775#endif
63776char dlopen ();
63777int
63778main ()
63779{
63780return dlopen ();
63781  ;
63782  return 0;
63783}
63784_ACEOF
63785if ac_fn_cxx_try_link "$LINENO"; then :
63786  ac_cv_lib_dl_dlopen=yes
63787else
63788  ac_cv_lib_dl_dlopen=no
63789fi
63790rm -f core conftest.err conftest.$ac_objext \
63791    conftest$ac_exeext conftest.$ac_ext
63792LIBS=$ac_check_lib_save_LIBS
63793fi
63794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63795$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63796if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63797  cat >>confdefs.h <<_ACEOF
63798#define HAVE_LIBDL 1
63799_ACEOF
63800
63801  LIBS="-ldl $LIBS"
63802
63803fi
63804
63805  LIBDL="$LIBS"
63806
63807  LIBS="$save_LIBS"
63808
63809  # Deprecated libraries, keep the flags for backwards compatibility
63810  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63811
63812
63813# Check whether --with-dxsdk was given.
63814if test "${with_dxsdk+set}" = set; then :
63815  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63816$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63817fi
63818
63819
63820
63821
63822# Check whether --with-dxsdk-lib was given.
63823if test "${with_dxsdk_lib+set}" = set; then :
63824  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63825$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63826fi
63827
63828
63829
63830
63831# Check whether --with-dxsdk-include was given.
63832if test "${with_dxsdk_include+set}" = set; then :
63833  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63834$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63835fi
63836
63837
63838  fi
63839
63840  # Control if libzip can use mmap. Available for purposes of overriding.
63841  LIBZIP_CAN_USE_MMAP=true
63842
63843
63844
63845  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63846    # Find the root of the Solaris Studio installation from the compiler path
63847    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63848    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63849    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63850$as_echo_n "checking for libstlport.so.1... " >&6; }
63851    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63852      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63853      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63854    fi
63855    if test -f "$STLPORT_LIB"; then
63856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63857$as_echo "yes, $STLPORT_LIB" >&6; }
63858
63859  # Only process if variable expands to non-empty
63860
63861  if test "x$STLPORT_LIB" != x; then
63862    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63863
63864  # Input might be given as Windows format, start by converting to
63865  # unix format.
63866  path="$STLPORT_LIB"
63867  new_path=`$CYGPATH -u "$path"`
63868
63869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63872  # "foo.exe" is OK but "foo" is an error.
63873  #
63874  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63875  # It is also a way to make sure we got the proper file name for the real test later on.
63876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63877  if test "x$test_shortpath" = x; then
63878    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63879$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63880    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63881  fi
63882
63883  # Call helper function which possibly converts this using DOS-style short mode.
63884  # If so, the updated path is stored in $new_path.
63885
63886  input_path="$new_path"
63887  # Check if we need to convert this using DOS-style short mode. If the path
63888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63889  # take no chances and rewrite it.
63890  # Note: m4 eats our [], so we need to use [ and ] instead.
63891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63892  if test "x$has_forbidden_chars" != x; then
63893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63897      # Going to short mode and back again did indeed matter. Since short mode is
63898      # case insensitive, let's make it lowercase to improve readability.
63899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63900      # Now convert it back to Unix-style (cygpath)
63901      input_path=`$CYGPATH -u "$shortmode_path"`
63902      new_path="$input_path"
63903    fi
63904  fi
63905
63906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63907  if test "x$test_cygdrive_prefix" = x; then
63908    # As a simple fix, exclude /usr/bin since it's not a real path.
63909    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63911      # a path prefixed by /cygdrive for fixpath to work.
63912      new_path="$CYGWIN_ROOT_PATH$input_path"
63913    fi
63914  fi
63915
63916
63917  if test "x$path" != "x$new_path"; then
63918    STLPORT_LIB="$new_path"
63919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63920$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63921  fi
63922
63923    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63924
63925  path="$STLPORT_LIB"
63926  has_colon=`$ECHO $path | $GREP ^.:`
63927  new_path="$path"
63928  if test "x$has_colon" = x; then
63929    # Not in mixed or Windows style, start by that.
63930    new_path=`cmd //c echo $path`
63931  fi
63932
63933
63934  input_path="$new_path"
63935  # Check if we need to convert this using DOS-style short mode. If the path
63936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63937  # take no chances and rewrite it.
63938  # Note: m4 eats our [], so we need to use [ and ] instead.
63939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63940  if test "x$has_forbidden_chars" != x; then
63941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63943  fi
63944
63945
63946  windows_path="$new_path"
63947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63948    unix_path=`$CYGPATH -u "$windows_path"`
63949    new_path="$unix_path"
63950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63952    new_path="$unix_path"
63953  fi
63954
63955  if test "x$path" != "x$new_path"; then
63956    STLPORT_LIB="$new_path"
63957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63958$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63959  fi
63960
63961  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63962  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63963
63964    else
63965      # We're on a unix platform. Hooray! :)
63966      path="$STLPORT_LIB"
63967      has_space=`$ECHO "$path" | $GREP " "`
63968      if test "x$has_space" != x; then
63969        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63970$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63971        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63972      fi
63973
63974      # Use eval to expand a potential ~
63975      eval path="$path"
63976      if test ! -f "$path" && test ! -d "$path"; then
63977        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63978      fi
63979
63980      if test -d "$path"; then
63981        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63982      else
63983        dir="`$DIRNAME "$path"`"
63984        base="`$BASENAME "$path"`"
63985        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63986      fi
63987    fi
63988  fi
63989
63990    else
63991      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63992$as_echo "no, not found at $STLPORT_LIB" >&6; }
63993      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63994    fi
63995
63996  fi
63997
63998
63999
64000# Check whether --with-libelf was given.
64001if test "${with_libelf+set}" = set; then :
64002  withval=$with_libelf;
64003fi
64004
64005
64006# Check whether --with-libelf-include was given.
64007if test "${with_libelf_include+set}" = set; then :
64008  withval=$with_libelf_include;
64009fi
64010
64011
64012# Check whether --with-libelf-lib was given.
64013if test "${with_libelf_lib+set}" = set; then :
64014  withval=$with_libelf_lib;
64015fi
64016
64017
64018  if test "x$ENABLE_AOT" = xfalse; then
64019    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
64020        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
64021        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
64022      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
64023$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
64024    fi
64025    LIBELF_CFLAGS=
64026    LIBELF_LIBS=
64027  else
64028    LIBELF_FOUND=no
64029
64030    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
64031      ENABLE_AOT="false"
64032      if test "x${enable_aot}" = xyes; then
64033        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
64034      fi
64035    else
64036      if test "x${with_libelf}" != x; then
64037        ELF_LIBS="-L${with_libelf}/lib -lelf"
64038        ELF_CFLAGS="-I${with_libelf}/include"
64039        LIBELF_FOUND=yes
64040      fi
64041      if test "x${with_libelf_include}" != x; then
64042        ELF_CFLAGS="-I${with_libelf_include}"
64043        LIBELF_FOUND=yes
64044      fi
64045      if test "x${with_libelf_lib}" != x; then
64046        ELF_LIBS="-L${with_libelf_lib} -lelf"
64047        LIBELF_FOUND=yes
64048      fi
64049      # Do not try pkg-config if we have a sysroot set.
64050      if test "x$SYSROOT" = x; then
64051        if test "x$LIBELF_FOUND" = xno; then
64052          # Figure out ELF_CFLAGS and ELF_LIBS
64053
64054pkg_failed=no
64055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
64056$as_echo_n "checking for ELF... " >&6; }
64057
64058if test -n "$ELF_CFLAGS"; then
64059    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
64060 elif test -n "$PKG_CONFIG"; then
64061    if test -n "$PKG_CONFIG" && \
64062    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64063  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64064  ac_status=$?
64065  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64066  test $ac_status = 0; }; then
64067  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64068else
64069  pkg_failed=yes
64070fi
64071 else
64072    pkg_failed=untried
64073fi
64074if test -n "$ELF_LIBS"; then
64075    pkg_cv_ELF_LIBS="$ELF_LIBS"
64076 elif test -n "$PKG_CONFIG"; then
64077    if test -n "$PKG_CONFIG" && \
64078    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64079  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64080  ac_status=$?
64081  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64082  test $ac_status = 0; }; then
64083  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64084else
64085  pkg_failed=yes
64086fi
64087 else
64088    pkg_failed=untried
64089fi
64090
64091
64092
64093if test $pkg_failed = yes; then
64094
64095if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64096        _pkg_short_errors_supported=yes
64097else
64098        _pkg_short_errors_supported=no
64099fi
64100        if test $_pkg_short_errors_supported = yes; then
64101	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64102        else
64103	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64104        fi
64105	# Put the nasty error message in config.log where it belongs
64106	echo "$ELF_PKG_ERRORS" >&5
64107
64108	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64109$as_echo "no" >&6; }
64110                LIBELF_FOUND=no
64111elif test $pkg_failed = untried; then
64112	LIBELF_FOUND=no
64113else
64114	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64115	ELF_LIBS=$pkg_cv_ELF_LIBS
64116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64117$as_echo "yes" >&6; }
64118	LIBELF_FOUND=yes
64119fi
64120        fi
64121      fi
64122      if test "x$LIBELF_FOUND" = xno; then
64123        for ac_header in libelf.h
64124do :
64125  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64126if test "x$ac_cv_header_libelf_h" = xyes; then :
64127  cat >>confdefs.h <<_ACEOF
64128#define HAVE_LIBELF_H 1
64129_ACEOF
64130
64131              LIBELF_FOUND=yes
64132              ELF_CFLAGS=
64133              ELF_LIBS=-lelf
64134
64135else
64136  LIBELF_FOUND=no
64137
64138fi
64139
64140done
64141
64142      fi
64143      if test "x$LIBELF_FOUND" = xno; then
64144        ENABLE_AOT="false"
64145
64146  # Print a helpful message on how to acquire the necessary build dependency.
64147  # elf is the help tag: freetype, cups, alsa etc
64148  MISSING_DEPENDENCY=elf
64149
64150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64151    cygwin_help $MISSING_DEPENDENCY
64152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64153    msys_help $MISSING_DEPENDENCY
64154  else
64155    PKGHANDLER_COMMAND=
64156
64157    case $PKGHANDLER in
64158      apt-get)
64159        apt_help     $MISSING_DEPENDENCY ;;
64160      yum)
64161        yum_help     $MISSING_DEPENDENCY ;;
64162      brew)
64163        brew_help    $MISSING_DEPENDENCY ;;
64164      port)
64165        port_help    $MISSING_DEPENDENCY ;;
64166      pkgutil)
64167        pkgutil_help $MISSING_DEPENDENCY ;;
64168      pkgadd)
64169        pkgadd_help  $MISSING_DEPENDENCY ;;
64170    esac
64171
64172    if test "x$PKGHANDLER_COMMAND" != x; then
64173      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64174    fi
64175  fi
64176
64177        if test "x${enable_aot}" = xyes; then
64178          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64179        else
64180          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64181$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64182        fi
64183      else
64184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64185$as_echo_n "checking if libelf works... " >&6; }
64186        ac_ext=c
64187ac_cpp='$CPP $CPPFLAGS'
64188ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64189ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64190ac_compiler_gnu=$ac_cv_c_compiler_gnu
64191
64192        OLD_CFLAGS="$CFLAGS"
64193        CFLAGS="$CFLAGS $ELF_CFLAGS"
64194        OLD_LIBS="$LIBS"
64195        LIBS="$LIBS $ELF_LIBS"
64196        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64197/* end confdefs.h.  */
64198#include <libelf.h>
64199int
64200main ()
64201{
64202
64203              elf_version(0);
64204              return 0;
64205
64206  ;
64207  return 0;
64208}
64209_ACEOF
64210if ac_fn_c_try_link "$LINENO"; then :
64211  LIBELF_WORKS=yes
64212else
64213  LIBELF_WORKS=no
64214
64215fi
64216rm -f core conftest.err conftest.$ac_objext \
64217    conftest$ac_exeext conftest.$ac_ext
64218        CFLAGS="$OLD_CFLAGS"
64219        LIBS="$OLD_LIBS"
64220        ac_ext=cpp
64221ac_cpp='$CXXCPP $CPPFLAGS'
64222ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64223ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64224ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64225
64226        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64227$as_echo "$LIBELF_WORKS" >&6; }
64228
64229        if test "x$LIBELF_WORKS" = xno; then
64230          ENABLE_AOT="false"
64231
64232  # Print a helpful message on how to acquire the necessary build dependency.
64233  # elf is the help tag: freetype, cups, alsa etc
64234  MISSING_DEPENDENCY=elf
64235
64236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64237    cygwin_help $MISSING_DEPENDENCY
64238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64239    msys_help $MISSING_DEPENDENCY
64240  else
64241    PKGHANDLER_COMMAND=
64242
64243    case $PKGHANDLER in
64244      apt-get)
64245        apt_help     $MISSING_DEPENDENCY ;;
64246      yum)
64247        yum_help     $MISSING_DEPENDENCY ;;
64248      brew)
64249        brew_help    $MISSING_DEPENDENCY ;;
64250      port)
64251        port_help    $MISSING_DEPENDENCY ;;
64252      pkgutil)
64253        pkgutil_help $MISSING_DEPENDENCY ;;
64254      pkgadd)
64255        pkgadd_help  $MISSING_DEPENDENCY ;;
64256    esac
64257
64258    if test "x$PKGHANDLER_COMMAND" != x; then
64259      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64260    fi
64261  fi
64262
64263          if test "x$enable_aot" = "xyes"; then
64264            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64265          else
64266            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64267$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64268          fi
64269        fi
64270      fi
64271    fi
64272  fi
64273
64274
64275
64276
64277
64278
64279
64280
64281
64282
64283
64284
64285
64286
64287
64288
64289
64290
64291# Hotspot setup depends on lib checks (AOT needs libelf).
64292
64293
64294  # The user can in some cases supply additional jvm features. For the custom
64295  # variant, this defines the entire variant.
64296
64297# Check whether --with-jvm-features was given.
64298if test "${with_jvm_features+set}" = set; then :
64299  withval=$with_jvm_features;
64300fi
64301
64302  if test "x$with_jvm_features" != x; then
64303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64304$as_echo_n "checking additional JVM features... " >&6; }
64305    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64307$as_echo "$JVM_FEATURES" >&6; }
64308  fi
64309
64310  # Override hotspot cpu definitions for ARM platforms
64311  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64312    HOTSPOT_TARGET_CPU=arm_32
64313    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64314    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64315    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64316  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64317    HOTSPOT_TARGET_CPU=arm_64
64318    HOTSPOT_TARGET_CPU_ARCH=arm
64319    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64320    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64321  fi
64322
64323  # Verify that dependencies are met for explicitly set features.
64324  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64325    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64326  fi
64327
64328  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64329    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64330  fi
64331
64332  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64333    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64334  fi
64335
64336  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64337    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64338  fi
64339
64340  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64341    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64342  fi
64343
64344  # Turn on additional features based on other parts of configure
64345  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64346    JVM_FEATURES="$JVM_FEATURES dtrace"
64347  else
64348    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64349      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64350    fi
64351  fi
64352
64353  if test "x$STATIC_BUILD" = "xtrue"; then
64354    JVM_FEATURES="$JVM_FEATURES static-build"
64355  else
64356    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64357      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64358    fi
64359  fi
64360
64361  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64362    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64363      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64364    fi
64365  fi
64366
64367  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64368    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64369      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64370    fi
64371  fi
64372
64373  # Only enable jvmci on x86_64, sparcv9 and aarch64.
64374  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64375     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64376     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64377    JVM_FEATURES_jvmci="jvmci"
64378  else
64379    JVM_FEATURES_jvmci=""
64380  fi
64381
64382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.vm.compiler should be built" >&5
64383$as_echo_n "checking if jdk.vm.compiler should be built... " >&6; }
64384  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64386$as_echo "yes, forced" >&6; }
64387    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
64388      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
64389    fi
64390    INCLUDE_GRAAL="true"
64391  else
64392    # By default enable graal build where AOT is available
64393    if test "x$ENABLE_AOT" = "xtrue"; then
64394      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64395$as_echo "yes" >&6; }
64396      JVM_FEATURES_graal="graal"
64397      INCLUDE_GRAAL="true"
64398    else
64399      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64400$as_echo "no" >&6; }
64401      JVM_FEATURES_graal=""
64402      INCLUDE_GRAAL="false"
64403    fi
64404  fi
64405
64406
64407
64408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
64409$as_echo_n "checking if aot should be enabled... " >&6; }
64410  if test "x$ENABLE_AOT" = "xtrue"; then
64411    if test "x$enable_aot" = "xyes"; then
64412      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64413$as_echo "yes, forced" >&6; }
64414    else
64415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64416$as_echo "yes" >&6; }
64417    fi
64418    JVM_FEATURES_aot="aot"
64419  else
64420    if test "x$enable_aot" = "xno"; then
64421      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64422$as_echo "no, forced" >&6; }
64423    else
64424      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64425$as_echo "no" >&6; }
64426    fi
64427    JVM_FEATURES_aot=""
64428  fi
64429
64430  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
64431    # Default to use link time optimizations on minimal on arm
64432    JVM_FEATURES_link_time_opt="link-time-opt"
64433  else
64434    JVM_FEATURES_link_time_opt=""
64435  fi
64436
64437  # All variants but minimal (and custom) get these features
64438  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
64439
64440  # Enable features depending on variant.
64441  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
64442  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
64443  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
64444  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
64445  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
64446  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
64447  JVM_FEATURES_custom="$JVM_FEATURES"
64448
64449
64450
64451
64452
64453
64454
64455
64456
64457  # Used for verification of Makefiles by check-jvm-feature
64458
64459
64460  # We don't support --with-jvm-interpreter anymore, use zero instead.
64461
64462
64463# Check whether --with-jvm-interpreter was given.
64464if test "${with_jvm_interpreter+set}" = set; then :
64465  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
64466$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
64467fi
64468
64469
64470
64471
64472###############################################################################
64473#
64474# We need to do some final tweaking, when everything else is done.
64475#
64476###############################################################################
64477
64478
64479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64480$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64481
64482  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64483    ENABLE_INTREE_EC=true
64484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64485$as_echo "yes" >&6; }
64486  else
64487    ENABLE_INTREE_EC=false
64488    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64489$as_echo "no" >&6; }
64490  fi
64491
64492
64493
64494
64495  # Check whether --enable-jtreg-failure-handler was given.
64496if test "${enable_jtreg_failure_handler+set}" = set; then :
64497  enableval=$enable_jtreg_failure_handler;
64498fi
64499
64500
64501  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64502$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64503
64504  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64505    if test "x$JT_HOME" = "x"; then
64506      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64507    else
64508      BUILD_FAILURE_HANDLER=true
64509      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64510$as_echo "yes, forced" >&6; }
64511    fi
64512  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64513    BUILD_FAILURE_HANDLER=false
64514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64515$as_echo "no, forced" >&6; }
64516  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64517      || test "x$enable_jtreg_failure_handler" = "x"; then
64518    if test "x$JT_HOME" = "x"; then
64519      BUILD_FAILURE_HANDLER=false
64520      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64521$as_echo "no, missing jtreg" >&6; }
64522    else
64523      BUILD_FAILURE_HANDLER=true
64524      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64525$as_echo "yes, jtreg present" >&6; }
64526    fi
64527  else
64528    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64529  fi
64530
64531
64532
64533
64534  # Check whether --enable-generate-classlist was given.
64535if test "${enable_generate_classlist+set}" = set; then :
64536  enableval=$enable_generate_classlist;
64537fi
64538
64539
64540  # Check if it's likely that it's possible to generate the classlist. Depending
64541  # on exact jvm configuration it could be possible anyway.
64542  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64543    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64544  else
64545    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64546  fi
64547
64548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64549$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64550  if test "x$enable_generate_classlist" = "xyes"; then
64551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64552$as_echo "yes, forced" >&6; }
64553    ENABLE_GENERATE_CLASSLIST="true"
64554    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64555      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64556$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64557    fi
64558  elif test "x$enable_generate_classlist" = "xno"; then
64559    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64560$as_echo "no, forced" >&6; }
64561    ENABLE_GENERATE_CLASSLIST="false"
64562  elif test "x$enable_generate_classlist" = "x"; then
64563    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64564      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64565$as_echo "yes" >&6; }
64566      ENABLE_GENERATE_CLASSLIST="true"
64567    else
64568      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64569$as_echo "no" >&6; }
64570      ENABLE_GENERATE_CLASSLIST="false"
64571    fi
64572  else
64573    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64574  fi
64575
64576
64577
64578
64579###############################################################################
64580#
64581# Configure parts of the build that only affect the build performance,
64582# not the result.
64583#
64584###############################################################################
64585
64586
64587  # How many cores do we have on this build system?
64588
64589# Check whether --with-num-cores was given.
64590if test "${with_num_cores+set}" = set; then :
64591  withval=$with_num_cores;
64592fi
64593
64594  if test "x$with_num_cores" = x; then
64595    # The number of cores were not specified, try to probe them.
64596
64597  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64598$as_echo_n "checking for number of cores... " >&6; }
64599  NUM_CORES=1
64600  FOUND_CORES=no
64601
64602  if test -f /proc/cpuinfo; then
64603    # Looks like a Linux (or cygwin) system
64604    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64605    FOUND_CORES=yes
64606  elif test -x /usr/sbin/psrinfo; then
64607    # Looks like a Solaris system
64608    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64609    FOUND_CORES=yes
64610  elif test -x /usr/sbin/sysctl; then
64611    # Looks like a MacOSX system
64612    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64613    FOUND_CORES=yes
64614  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64615    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64616    FOUND_CORES=yes
64617  elif test -n "$NUMBER_OF_PROCESSORS"; then
64618    # On windows, look in the env
64619    NUM_CORES=$NUMBER_OF_PROCESSORS
64620    FOUND_CORES=yes
64621  fi
64622
64623  if test "x$FOUND_CORES" = xyes; then
64624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64625$as_echo "$NUM_CORES" >&6; }
64626  else
64627    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64628$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64629    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64630$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64631  fi
64632
64633  else
64634    NUM_CORES=$with_num_cores
64635  fi
64636
64637
64638
64639  # How much memory do we have on this build system?
64640
64641# Check whether --with-memory-size was given.
64642if test "${with_memory_size+set}" = set; then :
64643  withval=$with_memory_size;
64644fi
64645
64646  if test "x$with_memory_size" = x; then
64647    # The memory size was not specified, try to probe it.
64648
64649  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64650$as_echo_n "checking for memory size... " >&6; }
64651  # Default to 1024 MB
64652  MEMORY_SIZE=1024
64653  FOUND_MEM=no
64654
64655  if test -f /proc/meminfo; then
64656    # Looks like a Linux (or cygwin) system
64657    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64658    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64659    FOUND_MEM=yes
64660  elif test -x /usr/sbin/prtconf; then
64661    # Looks like a Solaris or AIX system
64662    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64663    FOUND_MEM=yes
64664  elif test -x /usr/sbin/sysctl; then
64665    # Looks like a MacOSX system
64666    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64667    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64668    FOUND_MEM=yes
64669  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64670    # Windows, but without cygwin
64671    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64672    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64673    FOUND_MEM=yes
64674  fi
64675
64676  if test "x$FOUND_MEM" = xyes; then
64677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64678$as_echo "$MEMORY_SIZE MB" >&6; }
64679  else
64680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64681$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64682    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64683$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64684  fi
64685
64686  else
64687    MEMORY_SIZE=$with_memory_size
64688  fi
64689
64690
64691
64692  # Provide a decent default number of parallel jobs for make depending on
64693  # number of cores, amount of memory and machine architecture.
64694
64695# Check whether --with-jobs was given.
64696if test "${with_jobs+set}" = set; then :
64697  withval=$with_jobs;
64698fi
64699
64700  if test "x$with_jobs" = x; then
64701    # Number of jobs was not specified, calculate.
64702    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64703$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64704    # Approximate memory in GB.
64705    memory_gb=`expr $MEMORY_SIZE / 1024`
64706    # Pick the lowest of memory in gb and number of cores.
64707    if test "$memory_gb" -lt "$NUM_CORES"; then
64708      JOBS="$memory_gb"
64709    else
64710      JOBS="$NUM_CORES"
64711    fi
64712    if test "$JOBS" -eq "0"; then
64713      JOBS=1
64714    fi
64715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64716$as_echo "$JOBS" >&6; }
64717  else
64718    JOBS=$with_jobs
64719  fi
64720
64721
64722
64723  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64724
64725# Check whether --with-test-jobs was given.
64726if test "${with_test_jobs+set}" = set; then :
64727  withval=$with_test_jobs;
64728fi
64729
64730  if test "x$with_test_jobs" = x; then
64731      TEST_JOBS=0
64732  else
64733      TEST_JOBS=$with_test_jobs
64734  fi
64735
64736
64737
64738# Setup arguments for the boot jdk (after cores and memory have been setup)
64739
64740  ##############################################################################
64741  #
64742  # Specify jvm options for anything that is run with the Boot JDK.
64743  # Not all JVM:s accept the same arguments on the command line.
64744  #
64745
64746# Check whether --with-boot-jdk-jvmargs was given.
64747if test "${with_boot_jdk_jvmargs+set}" = set; then :
64748  withval=$with_boot_jdk_jvmargs;
64749fi
64750
64751
64752  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64753$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64754
64755  # Disable special log output when a debug build is used as Boot JDK...
64756
64757  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64758  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64759  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64760  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64761  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64762  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64763    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64764    JVM_ARG_OK=true
64765  else
64766    $ECHO "Arg failed:" >&5
64767    $ECHO "$OUTPUT" >&5
64768    JVM_ARG_OK=false
64769  fi
64770
64771
64772  # Force en-US environment
64773
64774  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64775  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64776  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64777  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64778  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64779  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64780    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64781    JVM_ARG_OK=true
64782  else
64783    $ECHO "Arg failed:" >&5
64784    $ECHO "$OUTPUT" >&5
64785    JVM_ARG_OK=false
64786  fi
64787
64788
64789  # Apply user provided options.
64790
64791  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64792  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64793  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64794  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64795  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64796  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64797    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64798    JVM_ARG_OK=true
64799  else
64800    $ECHO "Arg failed:" >&5
64801    $ECHO "$OUTPUT" >&5
64802    JVM_ARG_OK=false
64803  fi
64804
64805
64806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64807$as_echo "$boot_jdk_jvmargs" >&6; }
64808
64809  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64810  JAVA_FLAGS=$boot_jdk_jvmargs
64811
64812
64813
64814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64815$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64816
64817  # Starting amount of heap memory.
64818
64819  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64820  $ECHO "Command: $JAVA -Xms64M -version" >&5
64821  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64822  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64823  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64824  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64825    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64826    JVM_ARG_OK=true
64827  else
64828    $ECHO "Arg failed:" >&5
64829    $ECHO "$OUTPUT" >&5
64830    JVM_ARG_OK=false
64831  fi
64832
64833  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64834
64835  # Maximum amount of heap memory and stack size.
64836  JVM_HEAP_LIMIT_32="1024"
64837  # Running a 64 bit JVM allows for and requires a bigger heap
64838  JVM_HEAP_LIMIT_64="1600"
64839  STACK_SIZE_32=768
64840  STACK_SIZE_64=1536
64841  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64842  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64843    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64844  fi
64845  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64846    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64847  fi
64848  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64849    JVM_HEAP_LIMIT_32=512
64850    JVM_HEAP_LIMIT_64=512
64851  fi
64852
64853  if test "x$BOOT_JDK_BITS" = "x32"; then
64854    STACK_SIZE=$STACK_SIZE_32
64855    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64856  else
64857    STACK_SIZE=$STACK_SIZE_64
64858    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64859  fi
64860
64861  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64862  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64863  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64864  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64865  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64866  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64867    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64868    JVM_ARG_OK=true
64869  else
64870    $ECHO "Arg failed:" >&5
64871    $ECHO "$OUTPUT" >&5
64872    JVM_ARG_OK=false
64873  fi
64874
64875
64876  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64877  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64878  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64879  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64880  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64881  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64882    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64883    JVM_ARG_OK=true
64884  else
64885    $ECHO "Arg failed:" >&5
64886    $ECHO "$OUTPUT" >&5
64887    JVM_ARG_OK=false
64888  fi
64889
64890
64891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64892$as_echo "$boot_jdk_jvmargs_big" >&6; }
64893
64894  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64895
64896
64897  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64898    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64899    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64900  else
64901    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64902    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64903  fi
64904  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64905  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64906  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64907$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64909$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64910
64911
64912  # By default, the main javac compilations use big
64913  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64914
64915
64916  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64917$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64918
64919  # Use serial gc for small short lived tools if possible
64920
64921  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64922  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64923  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64924  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64925  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64926  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64927    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64928    JVM_ARG_OK=true
64929  else
64930    $ECHO "Arg failed:" >&5
64931    $ECHO "$OUTPUT" >&5
64932    JVM_ARG_OK=false
64933  fi
64934
64935
64936  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64937  $ECHO "Command: $JAVA -Xms32M -version" >&5
64938  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64939  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64940  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64941  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64942    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64943    JVM_ARG_OK=true
64944  else
64945    $ECHO "Arg failed:" >&5
64946    $ECHO "$OUTPUT" >&5
64947    JVM_ARG_OK=false
64948  fi
64949
64950
64951  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64952  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64953  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64954  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64955  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64956  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64957    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64958    JVM_ARG_OK=true
64959  else
64960    $ECHO "Arg failed:" >&5
64961    $ECHO "$OUTPUT" >&5
64962    JVM_ARG_OK=false
64963  fi
64964
64965
64966  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64967  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64968  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64969  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64970  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64971  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64972    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64973    JVM_ARG_OK=true
64974  else
64975    $ECHO "Arg failed:" >&5
64976    $ECHO "$OUTPUT" >&5
64977    JVM_ARG_OK=false
64978  fi
64979
64980
64981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64982$as_echo "$boot_jdk_jvmargs_small" >&6; }
64983
64984  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64985
64986
64987  JAVA_TOOL_FLAGS_SMALL=""
64988  for f in $JAVA_FLAGS_SMALL; do
64989    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64990  done
64991
64992
64993
64994# Setup smart javac (after cores and memory have been setup)
64995
64996
64997# Check whether --with-sjavac-server-java was given.
64998if test "${with_sjavac_server_java+set}" = set; then :
64999  withval=$with_sjavac_server_java;
65000fi
65001
65002
65003  if test "x$with_sjavac_server_java" != x; then
65004    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65005    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65006    if test "x$FOUND_VERSION" = x; then
65007      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65008    fi
65009  else
65010    SJAVAC_SERVER_JAVA="$JAVA"
65011  fi
65012
65013
65014  if test "$MEMORY_SIZE" -gt "3000"; then
65015
65016  $ECHO "Check if jvm arg is ok: -d64" >&5
65017  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65018  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65019  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65020  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65021  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65022    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65023    JVM_ARG_OK=true
65024  else
65025    $ECHO "Arg failed:" >&5
65026    $ECHO "$OUTPUT" >&5
65027    JVM_ARG_OK=false
65028  fi
65029
65030    if test "$JVM_ARG_OK" = true; then
65031      JVM_64BIT=true
65032      JVM_ARG_OK=false
65033    fi
65034  fi
65035
65036  MX_VALUE=`expr $MEMORY_SIZE / 2`
65037  if test "$JVM_64BIT" = true; then
65038    # Set ms lower than mx since more than one instance of the server might
65039    # get launched at the same time before they figure out which instance won.
65040    MS_VALUE=512
65041    if test "$MX_VALUE" -gt "2048"; then
65042      MX_VALUE=2048
65043    fi
65044  else
65045    MS_VALUE=256
65046    if test "$MX_VALUE" -gt "1500"; then
65047      MX_VALUE=1500
65048    fi
65049  fi
65050  if test "$MX_VALUE" -lt "512"; then
65051    MX_VALUE=512
65052  fi
65053
65054  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65055  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65056  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65057  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65058  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65059  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65060    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65061    JVM_ARG_OK=true
65062  else
65063    $ECHO "Arg failed:" >&5
65064    $ECHO "$OUTPUT" >&5
65065    JVM_ARG_OK=false
65066  fi
65067
65068
65069
65070  # Check whether --enable-sjavac was given.
65071if test "${enable_sjavac+set}" = set; then :
65072  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65073else
65074  ENABLE_SJAVAC="no"
65075fi
65076
65077  if test "x$JVM_ARG_OK" = "xfalse"; then
65078    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65079$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65080    ENABLE_SJAVAC="no"
65081  fi
65082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65083$as_echo_n "checking whether to use sjavac... " >&6; }
65084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65085$as_echo "$ENABLE_SJAVAC" >&6; }
65086
65087
65088  # Check whether --enable-javac-server was given.
65089if test "${enable_javac_server+set}" = set; then :
65090  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65091else
65092  ENABLE_JAVAC_SERVER="yes"
65093fi
65094
65095  if test "x$JVM_ARG_OK" = "xfalse"; then
65096    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65097$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65098    ENABLE_JAVAC_SERVER="no"
65099  fi
65100  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65101$as_echo_n "checking whether to use javac server... " >&6; }
65102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65103$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65104
65105
65106  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65107    # When using a server javac, the small client instances do not need much
65108    # resources.
65109    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65110  fi
65111
65112
65113# Setup use of icecc if requested
65114
65115  # Check whether --enable-icecc was given.
65116if test "${enable_icecc+set}" = set; then :
65117  enableval=$enable_icecc;
65118fi
65119
65120
65121  if test "x${enable_icecc}" = "xyes"; then
65122
65123
65124
65125  # Publish this variable in the help.
65126
65127
65128  if [ -z "${ICECC_CMD+x}" ]; then
65129    # The variable is not set by user, try to locate tool using the code snippet
65130    for ac_prog in icecc
65131do
65132  # Extract the first word of "$ac_prog", so it can be a program name with args.
65133set dummy $ac_prog; ac_word=$2
65134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65135$as_echo_n "checking for $ac_word... " >&6; }
65136if ${ac_cv_path_ICECC_CMD+:} false; then :
65137  $as_echo_n "(cached) " >&6
65138else
65139  case $ICECC_CMD in
65140  [\\/]* | ?:[\\/]*)
65141  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65142  ;;
65143  *)
65144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65145for as_dir in $PATH
65146do
65147  IFS=$as_save_IFS
65148  test -z "$as_dir" && as_dir=.
65149    for ac_exec_ext in '' $ac_executable_extensions; do
65150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65151    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65153    break 2
65154  fi
65155done
65156  done
65157IFS=$as_save_IFS
65158
65159  ;;
65160esac
65161fi
65162ICECC_CMD=$ac_cv_path_ICECC_CMD
65163if test -n "$ICECC_CMD"; then
65164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65165$as_echo "$ICECC_CMD" >&6; }
65166else
65167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65168$as_echo "no" >&6; }
65169fi
65170
65171
65172  test -n "$ICECC_CMD" && break
65173done
65174
65175  else
65176    # The variable is set, but is it from the command line or the environment?
65177
65178    # Try to remove the string !ICECC_CMD! from our list.
65179    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65180    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65181      # If it failed, the variable was not from the command line. Ignore it,
65182      # but warn the user (except for BASH, which is always set by the calling BASH).
65183      if test "xICECC_CMD" != xBASH; then
65184        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65185$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65186      fi
65187      # Try to locate tool using the code snippet
65188      for ac_prog in icecc
65189do
65190  # Extract the first word of "$ac_prog", so it can be a program name with args.
65191set dummy $ac_prog; ac_word=$2
65192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65193$as_echo_n "checking for $ac_word... " >&6; }
65194if ${ac_cv_path_ICECC_CMD+:} false; then :
65195  $as_echo_n "(cached) " >&6
65196else
65197  case $ICECC_CMD in
65198  [\\/]* | ?:[\\/]*)
65199  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65200  ;;
65201  *)
65202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65203for as_dir in $PATH
65204do
65205  IFS=$as_save_IFS
65206  test -z "$as_dir" && as_dir=.
65207    for ac_exec_ext in '' $ac_executable_extensions; do
65208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65209    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65211    break 2
65212  fi
65213done
65214  done
65215IFS=$as_save_IFS
65216
65217  ;;
65218esac
65219fi
65220ICECC_CMD=$ac_cv_path_ICECC_CMD
65221if test -n "$ICECC_CMD"; then
65222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65223$as_echo "$ICECC_CMD" >&6; }
65224else
65225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65226$as_echo "no" >&6; }
65227fi
65228
65229
65230  test -n "$ICECC_CMD" && break
65231done
65232
65233    else
65234      # If it succeeded, then it was overridden by the user. We will use it
65235      # for the tool.
65236
65237      # First remove it from the list of overridden variables, so we can test
65238      # for unknown variables in the end.
65239      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65240
65241      # Check if we try to supply an empty value
65242      if test "x$ICECC_CMD" = x; then
65243        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65244$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65245        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65246$as_echo_n "checking for ICECC_CMD... " >&6; }
65247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65248$as_echo "disabled" >&6; }
65249      else
65250        # Check if the provided tool contains a complete path.
65251        tool_specified="$ICECC_CMD"
65252        tool_basename="${tool_specified##*/}"
65253        if test "x$tool_basename" = "x$tool_specified"; then
65254          # A command without a complete path is provided, search $PATH.
65255          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65256$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65257          # Extract the first word of "$tool_basename", so it can be a program name with args.
65258set dummy $tool_basename; ac_word=$2
65259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65260$as_echo_n "checking for $ac_word... " >&6; }
65261if ${ac_cv_path_ICECC_CMD+:} false; then :
65262  $as_echo_n "(cached) " >&6
65263else
65264  case $ICECC_CMD in
65265  [\\/]* | ?:[\\/]*)
65266  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65267  ;;
65268  *)
65269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65270for as_dir in $PATH
65271do
65272  IFS=$as_save_IFS
65273  test -z "$as_dir" && as_dir=.
65274    for ac_exec_ext in '' $ac_executable_extensions; do
65275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65276    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65278    break 2
65279  fi
65280done
65281  done
65282IFS=$as_save_IFS
65283
65284  ;;
65285esac
65286fi
65287ICECC_CMD=$ac_cv_path_ICECC_CMD
65288if test -n "$ICECC_CMD"; then
65289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65290$as_echo "$ICECC_CMD" >&6; }
65291else
65292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65293$as_echo "no" >&6; }
65294fi
65295
65296
65297          if test "x$ICECC_CMD" = x; then
65298            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65299          fi
65300        else
65301          # Otherwise we believe it is a complete path. Use it as it is.
65302          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65303$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65304          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65305$as_echo_n "checking for ICECC_CMD... " >&6; }
65306          if test ! -x "$tool_specified"; then
65307            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65308$as_echo "not found" >&6; }
65309            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65310          fi
65311          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65312$as_echo "$tool_specified" >&6; }
65313        fi
65314      fi
65315    fi
65316
65317  fi
65318
65319
65320
65321  if test "x$ICECC_CMD" = x; then
65322    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65323  fi
65324
65325
65326    old_path="$PATH"
65327
65328    # Look for icecc-create-env in some known places
65329    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65330
65331
65332
65333  # Publish this variable in the help.
65334
65335
65336  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65337    # The variable is not set by user, try to locate tool using the code snippet
65338    for ac_prog in icecc-create-env
65339do
65340  # Extract the first word of "$ac_prog", so it can be a program name with args.
65341set dummy $ac_prog; ac_word=$2
65342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65343$as_echo_n "checking for $ac_word... " >&6; }
65344if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65345  $as_echo_n "(cached) " >&6
65346else
65347  case $ICECC_CREATE_ENV in
65348  [\\/]* | ?:[\\/]*)
65349  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65350  ;;
65351  *)
65352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65353for as_dir in $PATH
65354do
65355  IFS=$as_save_IFS
65356  test -z "$as_dir" && as_dir=.
65357    for ac_exec_ext in '' $ac_executable_extensions; do
65358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65359    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65361    break 2
65362  fi
65363done
65364  done
65365IFS=$as_save_IFS
65366
65367  ;;
65368esac
65369fi
65370ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65371if test -n "$ICECC_CREATE_ENV"; then
65372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65373$as_echo "$ICECC_CREATE_ENV" >&6; }
65374else
65375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65376$as_echo "no" >&6; }
65377fi
65378
65379
65380  test -n "$ICECC_CREATE_ENV" && break
65381done
65382
65383  else
65384    # The variable is set, but is it from the command line or the environment?
65385
65386    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65387    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65388    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65389      # If it failed, the variable was not from the command line. Ignore it,
65390      # but warn the user (except for BASH, which is always set by the calling BASH).
65391      if test "xICECC_CREATE_ENV" != xBASH; then
65392        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65393$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65394      fi
65395      # Try to locate tool using the code snippet
65396      for ac_prog in icecc-create-env
65397do
65398  # Extract the first word of "$ac_prog", so it can be a program name with args.
65399set dummy $ac_prog; ac_word=$2
65400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65401$as_echo_n "checking for $ac_word... " >&6; }
65402if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65403  $as_echo_n "(cached) " >&6
65404else
65405  case $ICECC_CREATE_ENV in
65406  [\\/]* | ?:[\\/]*)
65407  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65408  ;;
65409  *)
65410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65411for as_dir in $PATH
65412do
65413  IFS=$as_save_IFS
65414  test -z "$as_dir" && as_dir=.
65415    for ac_exec_ext in '' $ac_executable_extensions; do
65416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65417    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65419    break 2
65420  fi
65421done
65422  done
65423IFS=$as_save_IFS
65424
65425  ;;
65426esac
65427fi
65428ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65429if test -n "$ICECC_CREATE_ENV"; then
65430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65431$as_echo "$ICECC_CREATE_ENV" >&6; }
65432else
65433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65434$as_echo "no" >&6; }
65435fi
65436
65437
65438  test -n "$ICECC_CREATE_ENV" && break
65439done
65440
65441    else
65442      # If it succeeded, then it was overridden by the user. We will use it
65443      # for the tool.
65444
65445      # First remove it from the list of overridden variables, so we can test
65446      # for unknown variables in the end.
65447      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65448
65449      # Check if we try to supply an empty value
65450      if test "x$ICECC_CREATE_ENV" = x; then
65451        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65452$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65453        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65454$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65456$as_echo "disabled" >&6; }
65457      else
65458        # Check if the provided tool contains a complete path.
65459        tool_specified="$ICECC_CREATE_ENV"
65460        tool_basename="${tool_specified##*/}"
65461        if test "x$tool_basename" = "x$tool_specified"; then
65462          # A command without a complete path is provided, search $PATH.
65463          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65464$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65465          # Extract the first word of "$tool_basename", so it can be a program name with args.
65466set dummy $tool_basename; ac_word=$2
65467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65468$as_echo_n "checking for $ac_word... " >&6; }
65469if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65470  $as_echo_n "(cached) " >&6
65471else
65472  case $ICECC_CREATE_ENV in
65473  [\\/]* | ?:[\\/]*)
65474  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65475  ;;
65476  *)
65477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65478for as_dir in $PATH
65479do
65480  IFS=$as_save_IFS
65481  test -z "$as_dir" && as_dir=.
65482    for ac_exec_ext in '' $ac_executable_extensions; do
65483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65484    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65486    break 2
65487  fi
65488done
65489  done
65490IFS=$as_save_IFS
65491
65492  ;;
65493esac
65494fi
65495ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65496if test -n "$ICECC_CREATE_ENV"; then
65497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65498$as_echo "$ICECC_CREATE_ENV" >&6; }
65499else
65500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65501$as_echo "no" >&6; }
65502fi
65503
65504
65505          if test "x$ICECC_CREATE_ENV" = x; then
65506            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65507          fi
65508        else
65509          # Otherwise we believe it is a complete path. Use it as it is.
65510          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65511$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65512          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65513$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65514          if test ! -x "$tool_specified"; then
65515            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65516$as_echo "not found" >&6; }
65517            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65518          fi
65519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65520$as_echo "$tool_specified" >&6; }
65521        fi
65522      fi
65523    fi
65524
65525  fi
65526
65527
65528
65529  if test "x$ICECC_CREATE_ENV" = x; then
65530    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65531  fi
65532
65533
65534    # Use icecc-create-env to create a minimal compilation environment that can
65535    # be sent to the other hosts in the icecream cluster.
65536    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65537    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65538    # Older versions of icecc does not have the --gcc parameter
65539    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65540      icecc_gcc_arg="--gcc"
65541    fi
65542    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65543
65544  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65545      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65546          ${icecc_create_env_log} 2>&1 )
65547  if test "$?" != "0"; then
65548    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65549$as_echo "$as_me: icecc-create-env output:" >&6;}
65550    cat \
65551          ${icecc_create_env_log}
65552    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65553  fi
65554
65555    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65556      # For clang, the icecc compilerwrapper is needed. It usually resides next
65557      # to icecc-create-env.
65558
65559
65560
65561  # Publish this variable in the help.
65562
65563
65564  if [ -z "${ICECC_WRAPPER+x}" ]; then
65565    # The variable is not set by user, try to locate tool using the code snippet
65566    for ac_prog in compilerwrapper
65567do
65568  # Extract the first word of "$ac_prog", so it can be a program name with args.
65569set dummy $ac_prog; ac_word=$2
65570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65571$as_echo_n "checking for $ac_word... " >&6; }
65572if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65573  $as_echo_n "(cached) " >&6
65574else
65575  case $ICECC_WRAPPER in
65576  [\\/]* | ?:[\\/]*)
65577  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65578  ;;
65579  *)
65580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65581for as_dir in $PATH
65582do
65583  IFS=$as_save_IFS
65584  test -z "$as_dir" && as_dir=.
65585    for ac_exec_ext in '' $ac_executable_extensions; do
65586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65587    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65589    break 2
65590  fi
65591done
65592  done
65593IFS=$as_save_IFS
65594
65595  ;;
65596esac
65597fi
65598ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65599if test -n "$ICECC_WRAPPER"; then
65600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65601$as_echo "$ICECC_WRAPPER" >&6; }
65602else
65603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65604$as_echo "no" >&6; }
65605fi
65606
65607
65608  test -n "$ICECC_WRAPPER" && break
65609done
65610
65611  else
65612    # The variable is set, but is it from the command line or the environment?
65613
65614    # Try to remove the string !ICECC_WRAPPER! from our list.
65615    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65616    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65617      # If it failed, the variable was not from the command line. Ignore it,
65618      # but warn the user (except for BASH, which is always set by the calling BASH).
65619      if test "xICECC_WRAPPER" != xBASH; then
65620        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65621$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65622      fi
65623      # Try to locate tool using the code snippet
65624      for ac_prog in compilerwrapper
65625do
65626  # Extract the first word of "$ac_prog", so it can be a program name with args.
65627set dummy $ac_prog; ac_word=$2
65628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65629$as_echo_n "checking for $ac_word... " >&6; }
65630if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65631  $as_echo_n "(cached) " >&6
65632else
65633  case $ICECC_WRAPPER in
65634  [\\/]* | ?:[\\/]*)
65635  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65636  ;;
65637  *)
65638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65639for as_dir in $PATH
65640do
65641  IFS=$as_save_IFS
65642  test -z "$as_dir" && as_dir=.
65643    for ac_exec_ext in '' $ac_executable_extensions; do
65644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65645    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65647    break 2
65648  fi
65649done
65650  done
65651IFS=$as_save_IFS
65652
65653  ;;
65654esac
65655fi
65656ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65657if test -n "$ICECC_WRAPPER"; then
65658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65659$as_echo "$ICECC_WRAPPER" >&6; }
65660else
65661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65662$as_echo "no" >&6; }
65663fi
65664
65665
65666  test -n "$ICECC_WRAPPER" && break
65667done
65668
65669    else
65670      # If it succeeded, then it was overridden by the user. We will use it
65671      # for the tool.
65672
65673      # First remove it from the list of overridden variables, so we can test
65674      # for unknown variables in the end.
65675      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65676
65677      # Check if we try to supply an empty value
65678      if test "x$ICECC_WRAPPER" = x; then
65679        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65680$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65681        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65682$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65683        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65684$as_echo "disabled" >&6; }
65685      else
65686        # Check if the provided tool contains a complete path.
65687        tool_specified="$ICECC_WRAPPER"
65688        tool_basename="${tool_specified##*/}"
65689        if test "x$tool_basename" = "x$tool_specified"; then
65690          # A command without a complete path is provided, search $PATH.
65691          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65692$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65693          # Extract the first word of "$tool_basename", so it can be a program name with args.
65694set dummy $tool_basename; ac_word=$2
65695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65696$as_echo_n "checking for $ac_word... " >&6; }
65697if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65698  $as_echo_n "(cached) " >&6
65699else
65700  case $ICECC_WRAPPER in
65701  [\\/]* | ?:[\\/]*)
65702  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65703  ;;
65704  *)
65705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65706for as_dir in $PATH
65707do
65708  IFS=$as_save_IFS
65709  test -z "$as_dir" && as_dir=.
65710    for ac_exec_ext in '' $ac_executable_extensions; do
65711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65712    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65714    break 2
65715  fi
65716done
65717  done
65718IFS=$as_save_IFS
65719
65720  ;;
65721esac
65722fi
65723ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65724if test -n "$ICECC_WRAPPER"; then
65725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65726$as_echo "$ICECC_WRAPPER" >&6; }
65727else
65728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65729$as_echo "no" >&6; }
65730fi
65731
65732
65733          if test "x$ICECC_WRAPPER" = x; then
65734            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65735          fi
65736        else
65737          # Otherwise we believe it is a complete path. Use it as it is.
65738          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65739$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65740          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65741$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65742          if test ! -x "$tool_specified"; then
65743            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65744$as_echo "not found" >&6; }
65745            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65746          fi
65747          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65748$as_echo "$tool_specified" >&6; }
65749        fi
65750      fi
65751    fi
65752
65753  fi
65754
65755
65756
65757  if test "x$ICECC_WRAPPER" = x; then
65758    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65759  fi
65760
65761
65762
65763  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65764      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65765  if test "$?" != "0"; then
65766    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65767$as_echo "$as_me: icecc-create-env output:" >&6;}
65768    cat ${icecc_create_env_log}
65769    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65770  fi
65771
65772    else
65773      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65774    fi
65775    PATH="$old_path"
65776    # The bundle with the compiler gets a name based on checksums. Parse log file
65777    # to find it.
65778    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65779    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65780    if test ! -f ${ICECC_ENV_BUNDLE}; then
65781      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65782    fi
65783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65784$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65786$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65787    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65788
65789    if test "x${COMPILE_TYPE}" = "xcross"; then
65790      # If cross compiling, create a separate env package for the build compiler
65791      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65792      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65793      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65794
65795  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65796      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65797            ${icecc_create_env_log_build} 2>&1 )
65798  if test "$?" != "0"; then
65799    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65800$as_echo "$as_me: icecc-create-env output:" >&6;}
65801    cat \
65802            ${icecc_create_env_log_build}
65803    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65804  fi
65805
65806      elif test "x${BUILD_CC##*/}" = "xclang"; then
65807
65808  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65809      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65810  if test "$?" != "0"; then
65811    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65812$as_echo "$as_me: icecc-create-env output:" >&6;}
65813    cat ${icecc_create_env_log_build}
65814    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65815  fi
65816
65817      else
65818        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65819      fi
65820      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65821      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65822      if test ! -f ${ICECC_ENV_BUNDLE}; then
65823        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65824      fi
65825      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65826$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65827      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65828$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65829      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65830          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65831    else
65832      BUILD_ICECC="${ICECC}"
65833    fi
65834
65835
65836  fi
65837
65838
65839# Can the C/C++ compiler use precompiled headers?
65840
65841
65842  ###############################################################################
65843  #
65844  # Can the C/C++ compiler use precompiled headers?
65845  #
65846  # Check whether --enable-precompiled-headers was given.
65847if test "${enable_precompiled_headers+set}" = set; then :
65848  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65849else
65850  ENABLE_PRECOMPH=yes
65851fi
65852
65853
65854  USE_PRECOMPILED_HEADER=true
65855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65856$as_echo_n "checking If precompiled header is enabled... " >&6; }
65857  if test "x$ENABLE_PRECOMPH" = xno; then
65858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65859$as_echo "no, forced" >&6; }
65860    USE_PRECOMPILED_HEADER=false
65861  elif test "x$ICECC" != "x"; then
65862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65863$as_echo "no, does not work effectively with icecc" >&6; }
65864    USE_PRECOMPILED_HEADER=false
65865  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65867$as_echo "no, does not work with Solaris Studio" >&6; }
65868    USE_PRECOMPILED_HEADER=false
65869  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65871$as_echo "no, does not work with xlc" >&6; }
65872    USE_PRECOMPILED_HEADER=false
65873  else
65874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65875$as_echo "yes" >&6; }
65876  fi
65877
65878  if test "x$ENABLE_PRECOMPH" = xyes; then
65879    # Check that the compiler actually supports precomp headers.
65880    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65881      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65882$as_echo_n "checking that precompiled headers work... " >&6; }
65883      echo "int alfa();" > conftest.h
65884      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65885      if test ! -f conftest.hpp.gch; then
65886        USE_PRECOMPILED_HEADER=false
65887        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65888$as_echo "no" >&6; }
65889      else
65890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65891$as_echo "yes" >&6; }
65892      fi
65893      $RM conftest.h conftest.hpp.gch
65894    fi
65895  fi
65896
65897
65898
65899
65900# Setup use of ccache, if available
65901
65902  # Check whether --enable-ccache was given.
65903if test "${enable_ccache+set}" = set; then :
65904  enableval=$enable_ccache;
65905fi
65906
65907
65908  CCACHE_STATUS=
65909  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65910$as_echo_n "checking is ccache enabled... " >&6; }
65911  if test "x$enable_ccache" = xyes; then
65912    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65913      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65914$as_echo "yes" >&6; }
65915      OLD_PATH="$PATH"
65916      if test "x$TOOLCHAIN_PATH" != x; then
65917        PATH=$TOOLCHAIN_PATH:$PATH
65918      fi
65919
65920
65921
65922  # Publish this variable in the help.
65923
65924
65925  if [ -z "${CCACHE+x}" ]; then
65926    # The variable is not set by user, try to locate tool using the code snippet
65927    for ac_prog in ccache
65928do
65929  # Extract the first word of "$ac_prog", so it can be a program name with args.
65930set dummy $ac_prog; ac_word=$2
65931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65932$as_echo_n "checking for $ac_word... " >&6; }
65933if ${ac_cv_path_CCACHE+:} false; then :
65934  $as_echo_n "(cached) " >&6
65935else
65936  case $CCACHE in
65937  [\\/]* | ?:[\\/]*)
65938  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65939  ;;
65940  *)
65941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65942for as_dir in $PATH
65943do
65944  IFS=$as_save_IFS
65945  test -z "$as_dir" && as_dir=.
65946    for ac_exec_ext in '' $ac_executable_extensions; do
65947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65948    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65950    break 2
65951  fi
65952done
65953  done
65954IFS=$as_save_IFS
65955
65956  ;;
65957esac
65958fi
65959CCACHE=$ac_cv_path_CCACHE
65960if test -n "$CCACHE"; then
65961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65962$as_echo "$CCACHE" >&6; }
65963else
65964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65965$as_echo "no" >&6; }
65966fi
65967
65968
65969  test -n "$CCACHE" && break
65970done
65971
65972  else
65973    # The variable is set, but is it from the command line or the environment?
65974
65975    # Try to remove the string !CCACHE! from our list.
65976    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65977    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65978      # If it failed, the variable was not from the command line. Ignore it,
65979      # but warn the user (except for BASH, which is always set by the calling BASH).
65980      if test "xCCACHE" != xBASH; then
65981        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65982$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65983      fi
65984      # Try to locate tool using the code snippet
65985      for ac_prog in ccache
65986do
65987  # Extract the first word of "$ac_prog", so it can be a program name with args.
65988set dummy $ac_prog; ac_word=$2
65989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65990$as_echo_n "checking for $ac_word... " >&6; }
65991if ${ac_cv_path_CCACHE+:} false; then :
65992  $as_echo_n "(cached) " >&6
65993else
65994  case $CCACHE in
65995  [\\/]* | ?:[\\/]*)
65996  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65997  ;;
65998  *)
65999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66000for as_dir in $PATH
66001do
66002  IFS=$as_save_IFS
66003  test -z "$as_dir" && as_dir=.
66004    for ac_exec_ext in '' $ac_executable_extensions; do
66005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66006    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66008    break 2
66009  fi
66010done
66011  done
66012IFS=$as_save_IFS
66013
66014  ;;
66015esac
66016fi
66017CCACHE=$ac_cv_path_CCACHE
66018if test -n "$CCACHE"; then
66019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66020$as_echo "$CCACHE" >&6; }
66021else
66022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66023$as_echo "no" >&6; }
66024fi
66025
66026
66027  test -n "$CCACHE" && break
66028done
66029
66030    else
66031      # If it succeeded, then it was overridden by the user. We will use it
66032      # for the tool.
66033
66034      # First remove it from the list of overridden variables, so we can test
66035      # for unknown variables in the end.
66036      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66037
66038      # Check if we try to supply an empty value
66039      if test "x$CCACHE" = x; then
66040        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66041$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66043$as_echo_n "checking for CCACHE... " >&6; }
66044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66045$as_echo "disabled" >&6; }
66046      else
66047        # Check if the provided tool contains a complete path.
66048        tool_specified="$CCACHE"
66049        tool_basename="${tool_specified##*/}"
66050        if test "x$tool_basename" = "x$tool_specified"; then
66051          # A command without a complete path is provided, search $PATH.
66052          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66053$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66054          # Extract the first word of "$tool_basename", so it can be a program name with args.
66055set dummy $tool_basename; ac_word=$2
66056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66057$as_echo_n "checking for $ac_word... " >&6; }
66058if ${ac_cv_path_CCACHE+:} false; then :
66059  $as_echo_n "(cached) " >&6
66060else
66061  case $CCACHE in
66062  [\\/]* | ?:[\\/]*)
66063  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66064  ;;
66065  *)
66066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66067for as_dir in $PATH
66068do
66069  IFS=$as_save_IFS
66070  test -z "$as_dir" && as_dir=.
66071    for ac_exec_ext in '' $ac_executable_extensions; do
66072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66073    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66075    break 2
66076  fi
66077done
66078  done
66079IFS=$as_save_IFS
66080
66081  ;;
66082esac
66083fi
66084CCACHE=$ac_cv_path_CCACHE
66085if test -n "$CCACHE"; then
66086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66087$as_echo "$CCACHE" >&6; }
66088else
66089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66090$as_echo "no" >&6; }
66091fi
66092
66093
66094          if test "x$CCACHE" = x; then
66095            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66096          fi
66097        else
66098          # Otherwise we believe it is a complete path. Use it as it is.
66099          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66100$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66101          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66102$as_echo_n "checking for CCACHE... " >&6; }
66103          if test ! -x "$tool_specified"; then
66104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66105$as_echo "not found" >&6; }
66106            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66107          fi
66108          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66109$as_echo "$tool_specified" >&6; }
66110        fi
66111      fi
66112    fi
66113
66114  fi
66115
66116
66117
66118  if test "x$CCACHE" = x; then
66119    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66120  fi
66121
66122
66123      PATH="$OLD_PATH"
66124      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66125      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66126    else
66127      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66128$as_echo "no" >&6; }
66129      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66130$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66131    fi
66132  elif test "x$enable_ccache" = xno; then
66133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66134$as_echo "no, explicitly disabled" >&6; }
66135    CCACHE_STATUS="Disabled"
66136  elif test "x$enable_ccache" = x; then
66137    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66138$as_echo "no" >&6; }
66139  else
66140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66141$as_echo "unknown" >&6; }
66142    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66143  fi
66144
66145
66146
66147# Check whether --with-ccache-dir was given.
66148if test "${with_ccache_dir+set}" = set; then :
66149  withval=$with_ccache_dir;
66150fi
66151
66152
66153  if test "x$with_ccache_dir" != x; then
66154    # When using a non home ccache directory, assume the use is to share ccache files
66155    # with other users. Thus change the umask.
66156    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66157    if test "x$CCACHE" = x; then
66158      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66159$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66160    fi
66161  fi
66162
66163  if test "x$CCACHE" != x; then
66164
66165  if test "x$CCACHE" != x; then
66166    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66167      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66168          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66169      if test "x$HAS_BAD_CCACHE" != "x"; then
66170        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66171      fi
66172    fi
66173    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
66174      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66175          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66176      if test "x$HAS_BAD_CCACHE" != "x"; then
66177        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66178      fi
66179      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66180$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66181      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66182      PUSHED_FLAGS="$CXXFLAGS"
66183      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66184      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66185/* end confdefs.h.  */
66186
66187int
66188main ()
66189{
66190
66191  ;
66192  return 0;
66193}
66194_ACEOF
66195if ac_fn_cxx_try_compile "$LINENO"; then :
66196  CC_KNOWS_CCACHE_TRICK=yes
66197else
66198  CC_KNOWS_CCACHE_TRICK=no
66199fi
66200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66201      CXXFLAGS="$PUSHED_FLAGS"
66202      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66203        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66204$as_echo "yes" >&6; }
66205        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66206
66207        CCACHE_SLOPPINESS=pch_defines,time_macros
66208      else
66209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66210$as_echo "no" >&6; }
66211        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66212      fi
66213    fi
66214
66215    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66216        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66217
66218    if test "x$SET_CCACHE_DIR" != x; then
66219      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66220      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66221    fi
66222  fi
66223
66224  fi
66225
66226
66227###############################################################################
66228#
66229# And now the finish...
66230#
66231###############################################################################
66232
66233# Check for some common pitfalls
66234
66235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66236    file_to_test="$SRC_ROOT/LICENSE"
66237    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66238      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
66239    fi
66240  fi
66241
66242
66243  # Did user specify any unknown variables?
66244
66245  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66246    # Replace the separating ! with spaces before presenting for end user.
66247    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66248    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66249$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66250  fi
66251
66252
66253  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66254$as_echo_n "checking if build directory is on local disk... " >&6; }
66255
66256  # df -l lists only local disks; if the given directory is not found then
66257  # a non-zero exit code is given
66258  if test "x$DF" = x; then
66259    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66260      # msys does not have df; use Windows "net use" instead.
66261      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66262      if test "x$IS_NETWORK_DISK" = x; then
66263        OUTPUT_DIR_IS_LOCAL="yes"
66264      else
66265        OUTPUT_DIR_IS_LOCAL="no"
66266      fi
66267    else
66268      # No df here, say it's local
66269      OUTPUT_DIR_IS_LOCAL="yes"
66270    fi
66271  else
66272    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66273      OUTPUT_DIR_IS_LOCAL="yes"
66274    else
66275      OUTPUT_DIR_IS_LOCAL="no"
66276    fi
66277  fi
66278
66279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66280$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66281
66282
66283
66284  # Check if the user has any old-style ALT_ variables set.
66285  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66286
66287  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66288  # Since we can't properly handle the dependencies for this, warn the user about the situation
66289  if test -e $OUTPUT_ROOT/spec.gmk; then
66290    IS_RECONFIGURE=yes
66291  else
66292    IS_RECONFIGURE=no
66293  fi
66294
66295
66296# At the end, call the custom hook. (Dummy macro if no custom sources available)
66297
66298
66299# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66300
66301  # Keep feature lists sorted and free of duplicates
66302  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66303  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66304  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66305  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66306  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66307  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66308  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66309
66310  # Validate features
66311  for variant in $JVM_VARIANTS; do
66312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66313$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66314    features_var_name=JVM_FEATURES_$variant
66315    JVM_FEATURES_TO_TEST=${!features_var_name}
66316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66317$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66318    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66319    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66320    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66321    if test "x$INVALID_FEATURES" != x; then
66322      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66323    fi
66324  done
66325
66326
66327# We're messing a bit with internal autoconf variables to put the config.status
66328# in the output directory instead of the current directory.
66329CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66330
66331# Create the actual output files. Now the main work of configure is done.
66332cat >confcache <<\_ACEOF
66333# This file is a shell script that caches the results of configure
66334# tests run on this system so they can be shared between configure
66335# scripts and configure runs, see configure's option --config-cache.
66336# It is not useful on other systems.  If it contains results you don't
66337# want to keep, you may remove or edit it.
66338#
66339# config.status only pays attention to the cache file if you give it
66340# the --recheck option to rerun configure.
66341#
66342# `ac_cv_env_foo' variables (set or unset) will be overridden when
66343# loading this file, other *unset* `ac_cv_foo' will be assigned the
66344# following values.
66345
66346_ACEOF
66347
66348# The following way of writing the cache mishandles newlines in values,
66349# but we know of no workaround that is simple, portable, and efficient.
66350# So, we kill variables containing newlines.
66351# Ultrix sh set writes to stderr and can't be redirected directly,
66352# and sets the high bit in the cache file unless we assign to the vars.
66353(
66354  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66355    eval ac_val=\$$ac_var
66356    case $ac_val in #(
66357    *${as_nl}*)
66358      case $ac_var in #(
66359      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66360$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66361      esac
66362      case $ac_var in #(
66363      _ | IFS | as_nl) ;; #(
66364      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66365      *) { eval $ac_var=; unset $ac_var;} ;;
66366      esac ;;
66367    esac
66368  done
66369
66370  (set) 2>&1 |
66371    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66372    *${as_nl}ac_space=\ *)
66373      # `set' does not quote correctly, so add quotes: double-quote
66374      # substitution turns \\\\ into \\, and sed turns \\ into \.
66375      sed -n \
66376	"s/'/'\\\\''/g;
66377	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66378      ;; #(
66379    *)
66380      # `set' quotes correctly as required by POSIX, so do not add quotes.
66381      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66382      ;;
66383    esac |
66384    sort
66385) |
66386  sed '
66387     /^ac_cv_env_/b end
66388     t clear
66389     :clear
66390     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66391     t end
66392     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66393     :end' >>confcache
66394if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66395  if test -w "$cache_file"; then
66396    if test "x$cache_file" != "x/dev/null"; then
66397      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66398$as_echo "$as_me: updating cache $cache_file" >&6;}
66399      if test ! -f "$cache_file" || test -h "$cache_file"; then
66400	cat confcache >"$cache_file"
66401      else
66402        case $cache_file in #(
66403        */* | ?:*)
66404	  mv -f confcache "$cache_file"$$ &&
66405	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66406        *)
66407	  mv -f confcache "$cache_file" ;;
66408	esac
66409      fi
66410    fi
66411  else
66412    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66413$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66414  fi
66415fi
66416rm -f confcache
66417
66418test "x$prefix" = xNONE && prefix=$ac_default_prefix
66419# Let make expand exec_prefix.
66420test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66421
66422# Transform confdefs.h into DEFS.
66423# Protect against shell expansion while executing Makefile rules.
66424# Protect against Makefile macro expansion.
66425#
66426# If the first sed substitution is executed (which looks for macros that
66427# take arguments), then branch to the quote section.  Otherwise,
66428# look for a macro that doesn't take arguments.
66429ac_script='
66430:mline
66431/\\$/{
66432 N
66433 s,\\\n,,
66434 b mline
66435}
66436t clear
66437:clear
66438s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66439t quote
66440s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66441t quote
66442b any
66443:quote
66444s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66445s/\[/\\&/g
66446s/\]/\\&/g
66447s/\$/$$/g
66448H
66449:any
66450${
66451	g
66452	s/^\n//
66453	s/\n/ /g
66454	p
66455}
66456'
66457DEFS=`sed -n "$ac_script" confdefs.h`
66458
66459
66460ac_libobjs=
66461ac_ltlibobjs=
66462U=
66463for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66464  # 1. Remove the extension, and $U if already installed.
66465  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66466  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66467  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66468  #    will be set to the directory where LIBOBJS objects are built.
66469  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66470  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66471done
66472LIBOBJS=$ac_libobjs
66473
66474LTLIBOBJS=$ac_ltlibobjs
66475
66476
66477
66478: "${CONFIG_STATUS=./config.status}"
66479ac_write_fail=0
66480ac_clean_files_save=$ac_clean_files
66481ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66482{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66483$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66484as_write_fail=0
66485cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66486#! $SHELL
66487# Generated by $as_me.
66488# Run this file to recreate the current configuration.
66489# Compiler output produced by configure, useful for debugging
66490# configure, is in config.log if it exists.
66491
66492debug=false
66493ac_cs_recheck=false
66494ac_cs_silent=false
66495
66496SHELL=\${CONFIG_SHELL-$SHELL}
66497export SHELL
66498_ASEOF
66499cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66500## -------------------- ##
66501## M4sh Initialization. ##
66502## -------------------- ##
66503
66504# Be more Bourne compatible
66505DUALCASE=1; export DUALCASE # for MKS sh
66506if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66507  emulate sh
66508  NULLCMD=:
66509  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66510  # is contrary to our usage.  Disable this feature.
66511  alias -g '${1+"$@"}'='"$@"'
66512  setopt NO_GLOB_SUBST
66513else
66514  case `(set -o) 2>/dev/null` in #(
66515  *posix*) :
66516    set -o posix ;; #(
66517  *) :
66518     ;;
66519esac
66520fi
66521
66522
66523as_nl='
66524'
66525export as_nl
66526# Printing a long string crashes Solaris 7 /usr/bin/printf.
66527as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66528as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66529as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66530# Prefer a ksh shell builtin over an external printf program on Solaris,
66531# but without wasting forks for bash or zsh.
66532if test -z "$BASH_VERSION$ZSH_VERSION" \
66533    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66534  as_echo='print -r --'
66535  as_echo_n='print -rn --'
66536elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66537  as_echo='printf %s\n'
66538  as_echo_n='printf %s'
66539else
66540  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66541    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66542    as_echo_n='/usr/ucb/echo -n'
66543  else
66544    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66545    as_echo_n_body='eval
66546      arg=$1;
66547      case $arg in #(
66548      *"$as_nl"*)
66549	expr "X$arg" : "X\\(.*\\)$as_nl";
66550	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66551      esac;
66552      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66553    '
66554    export as_echo_n_body
66555    as_echo_n='sh -c $as_echo_n_body as_echo'
66556  fi
66557  export as_echo_body
66558  as_echo='sh -c $as_echo_body as_echo'
66559fi
66560
66561# The user is always right.
66562if test "${PATH_SEPARATOR+set}" != set; then
66563  PATH_SEPARATOR=:
66564  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66565    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66566      PATH_SEPARATOR=';'
66567  }
66568fi
66569
66570
66571# IFS
66572# We need space, tab and new line, in precisely that order.  Quoting is
66573# there to prevent editors from complaining about space-tab.
66574# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66575# splitting by setting IFS to empty value.)
66576IFS=" ""	$as_nl"
66577
66578# Find who we are.  Look in the path if we contain no directory separator.
66579as_myself=
66580case $0 in #((
66581  *[\\/]* ) as_myself=$0 ;;
66582  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66583for as_dir in $PATH
66584do
66585  IFS=$as_save_IFS
66586  test -z "$as_dir" && as_dir=.
66587    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66588  done
66589IFS=$as_save_IFS
66590
66591     ;;
66592esac
66593# We did not find ourselves, most probably we were run as `sh COMMAND'
66594# in which case we are not to be found in the path.
66595if test "x$as_myself" = x; then
66596  as_myself=$0
66597fi
66598if test ! -f "$as_myself"; then
66599  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66600  exit 1
66601fi
66602
66603# Unset variables that we do not need and which cause bugs (e.g. in
66604# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66605# suppresses any "Segmentation fault" message there.  '((' could
66606# trigger a bug in pdksh 5.2.14.
66607for as_var in BASH_ENV ENV MAIL MAILPATH
66608do eval test x\${$as_var+set} = xset \
66609  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66610done
66611PS1='$ '
66612PS2='> '
66613PS4='+ '
66614
66615# NLS nuisances.
66616LC_ALL=C
66617export LC_ALL
66618LANGUAGE=C
66619export LANGUAGE
66620
66621# CDPATH.
66622(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66623
66624
66625# as_fn_error STATUS ERROR [LINENO LOG_FD]
66626# ----------------------------------------
66627# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66628# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66629# script with STATUS, using 1 if that was 0.
66630as_fn_error ()
66631{
66632  as_status=$1; test $as_status -eq 0 && as_status=1
66633  if test "$4"; then
66634    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66635    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66636  fi
66637  $as_echo "$as_me: error: $2" >&2
66638  as_fn_exit $as_status
66639} # as_fn_error
66640
66641
66642# as_fn_set_status STATUS
66643# -----------------------
66644# Set $? to STATUS, without forking.
66645as_fn_set_status ()
66646{
66647  return $1
66648} # as_fn_set_status
66649
66650# as_fn_exit STATUS
66651# -----------------
66652# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66653as_fn_exit ()
66654{
66655  set +e
66656  as_fn_set_status $1
66657  exit $1
66658} # as_fn_exit
66659
66660# as_fn_unset VAR
66661# ---------------
66662# Portably unset VAR.
66663as_fn_unset ()
66664{
66665  { eval $1=; unset $1;}
66666}
66667as_unset=as_fn_unset
66668# as_fn_append VAR VALUE
66669# ----------------------
66670# Append the text in VALUE to the end of the definition contained in VAR. Take
66671# advantage of any shell optimizations that allow amortized linear growth over
66672# repeated appends, instead of the typical quadratic growth present in naive
66673# implementations.
66674if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66675  eval 'as_fn_append ()
66676  {
66677    eval $1+=\$2
66678  }'
66679else
66680  as_fn_append ()
66681  {
66682    eval $1=\$$1\$2
66683  }
66684fi # as_fn_append
66685
66686# as_fn_arith ARG...
66687# ------------------
66688# Perform arithmetic evaluation on the ARGs, and store the result in the
66689# global $as_val. Take advantage of shells that can avoid forks. The arguments
66690# must be portable across $(()) and expr.
66691if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66692  eval 'as_fn_arith ()
66693  {
66694    as_val=$(( $* ))
66695  }'
66696else
66697  as_fn_arith ()
66698  {
66699    as_val=`expr "$@" || test $? -eq 1`
66700  }
66701fi # as_fn_arith
66702
66703
66704if expr a : '\(a\)' >/dev/null 2>&1 &&
66705   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66706  as_expr=expr
66707else
66708  as_expr=false
66709fi
66710
66711if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66712  as_basename=basename
66713else
66714  as_basename=false
66715fi
66716
66717if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66718  as_dirname=dirname
66719else
66720  as_dirname=false
66721fi
66722
66723as_me=`$as_basename -- "$0" ||
66724$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66725	 X"$0" : 'X\(//\)$' \| \
66726	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66727$as_echo X/"$0" |
66728    sed '/^.*\/\([^/][^/]*\)\/*$/{
66729	    s//\1/
66730	    q
66731	  }
66732	  /^X\/\(\/\/\)$/{
66733	    s//\1/
66734	    q
66735	  }
66736	  /^X\/\(\/\).*/{
66737	    s//\1/
66738	    q
66739	  }
66740	  s/.*/./; q'`
66741
66742# Avoid depending upon Character Ranges.
66743as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66744as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66745as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66746as_cr_digits='0123456789'
66747as_cr_alnum=$as_cr_Letters$as_cr_digits
66748
66749ECHO_C= ECHO_N= ECHO_T=
66750case `echo -n x` in #(((((
66751-n*)
66752  case `echo 'xy\c'` in
66753  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66754  xy)  ECHO_C='\c';;
66755  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66756       ECHO_T='	';;
66757  esac;;
66758*)
66759  ECHO_N='-n';;
66760esac
66761
66762rm -f conf$$ conf$$.exe conf$$.file
66763if test -d conf$$.dir; then
66764  rm -f conf$$.dir/conf$$.file
66765else
66766  rm -f conf$$.dir
66767  mkdir conf$$.dir 2>/dev/null
66768fi
66769if (echo >conf$$.file) 2>/dev/null; then
66770  if ln -s conf$$.file conf$$ 2>/dev/null; then
66771    as_ln_s='ln -s'
66772    # ... but there are two gotchas:
66773    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66774    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66775    # In both cases, we have to default to `cp -pR'.
66776    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66777      as_ln_s='cp -pR'
66778  elif ln conf$$.file conf$$ 2>/dev/null; then
66779    as_ln_s=ln
66780  else
66781    as_ln_s='cp -pR'
66782  fi
66783else
66784  as_ln_s='cp -pR'
66785fi
66786rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66787rmdir conf$$.dir 2>/dev/null
66788
66789
66790# as_fn_mkdir_p
66791# -------------
66792# Create "$as_dir" as a directory, including parents if necessary.
66793as_fn_mkdir_p ()
66794{
66795
66796  case $as_dir in #(
66797  -*) as_dir=./$as_dir;;
66798  esac
66799  test -d "$as_dir" || eval $as_mkdir_p || {
66800    as_dirs=
66801    while :; do
66802      case $as_dir in #(
66803      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66804      *) as_qdir=$as_dir;;
66805      esac
66806      as_dirs="'$as_qdir' $as_dirs"
66807      as_dir=`$as_dirname -- "$as_dir" ||
66808$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66809	 X"$as_dir" : 'X\(//\)[^/]' \| \
66810	 X"$as_dir" : 'X\(//\)$' \| \
66811	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66812$as_echo X"$as_dir" |
66813    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66814	    s//\1/
66815	    q
66816	  }
66817	  /^X\(\/\/\)[^/].*/{
66818	    s//\1/
66819	    q
66820	  }
66821	  /^X\(\/\/\)$/{
66822	    s//\1/
66823	    q
66824	  }
66825	  /^X\(\/\).*/{
66826	    s//\1/
66827	    q
66828	  }
66829	  s/.*/./; q'`
66830      test -d "$as_dir" && break
66831    done
66832    test -z "$as_dirs" || eval "mkdir $as_dirs"
66833  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66834
66835
66836} # as_fn_mkdir_p
66837if mkdir -p . 2>/dev/null; then
66838  as_mkdir_p='mkdir -p "$as_dir"'
66839else
66840  test -d ./-p && rmdir ./-p
66841  as_mkdir_p=false
66842fi
66843
66844
66845# as_fn_executable_p FILE
66846# -----------------------
66847# Test if FILE is an executable regular file.
66848as_fn_executable_p ()
66849{
66850  test -f "$1" && test -x "$1"
66851} # as_fn_executable_p
66852as_test_x='test -x'
66853as_executable_p=as_fn_executable_p
66854
66855# Sed expression to map a string onto a valid CPP name.
66856as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66857
66858# Sed expression to map a string onto a valid variable name.
66859as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66860
66861
66862exec 6>&1
66863## ----------------------------------- ##
66864## Main body of $CONFIG_STATUS script. ##
66865## ----------------------------------- ##
66866_ASEOF
66867test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66868
66869cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66870# Save the log message, to keep $0 and so on meaningful, and to
66871# report actual input values of CONFIG_FILES etc. instead of their
66872# values after options handling.
66873ac_log="
66874This file was extended by OpenJDK $as_me jdk9, which was
66875generated by GNU Autoconf 2.69.  Invocation command line was
66876
66877  CONFIG_FILES    = $CONFIG_FILES
66878  CONFIG_HEADERS  = $CONFIG_HEADERS
66879  CONFIG_LINKS    = $CONFIG_LINKS
66880  CONFIG_COMMANDS = $CONFIG_COMMANDS
66881  $ $0 $@
66882
66883on `(hostname || uname -n) 2>/dev/null | sed 1q`
66884"
66885
66886_ACEOF
66887
66888case $ac_config_files in *"
66889"*) set x $ac_config_files; shift; ac_config_files=$*;;
66890esac
66891
66892
66893
66894cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66895# Files that config.status was made for.
66896config_files="$ac_config_files"
66897
66898_ACEOF
66899
66900cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66901ac_cs_usage="\
66902\`$as_me' instantiates files and other configuration actions
66903from templates according to the current configuration.  Unless the files
66904and actions are specified as TAGs, all are instantiated by default.
66905
66906Usage: $0 [OPTION]... [TAG]...
66907
66908  -h, --help       print this help, then exit
66909  -V, --version    print version number and configuration settings, then exit
66910      --config     print configuration, then exit
66911  -q, --quiet, --silent
66912                   do not print progress messages
66913  -d, --debug      don't remove temporary files
66914      --recheck    update $as_me by reconfiguring in the same conditions
66915      --file=FILE[:TEMPLATE]
66916                   instantiate the configuration file FILE
66917
66918Configuration files:
66919$config_files
66920
66921Report bugs to <build-dev@openjdk.java.net>.
66922OpenJDK home page: <http://openjdk.java.net>."
66923
66924_ACEOF
66925cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66926ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66927ac_cs_version="\\
66928OpenJDK config.status jdk9
66929configured by $0, generated by GNU Autoconf 2.69,
66930  with options \\"\$ac_cs_config\\"
66931
66932Copyright (C) 2012 Free Software Foundation, Inc.
66933This config.status script is free software; the Free Software Foundation
66934gives unlimited permission to copy, distribute and modify it."
66935
66936ac_pwd='$ac_pwd'
66937srcdir='$srcdir'
66938AWK='$AWK'
66939test -n "\$AWK" || AWK=awk
66940_ACEOF
66941
66942cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66943# The default lists apply if the user does not specify any file.
66944ac_need_defaults=:
66945while test $# != 0
66946do
66947  case $1 in
66948  --*=?*)
66949    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66950    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66951    ac_shift=:
66952    ;;
66953  --*=)
66954    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66955    ac_optarg=
66956    ac_shift=:
66957    ;;
66958  *)
66959    ac_option=$1
66960    ac_optarg=$2
66961    ac_shift=shift
66962    ;;
66963  esac
66964
66965  case $ac_option in
66966  # Handling of the options.
66967  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66968    ac_cs_recheck=: ;;
66969  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66970    $as_echo "$ac_cs_version"; exit ;;
66971  --config | --confi | --conf | --con | --co | --c )
66972    $as_echo "$ac_cs_config"; exit ;;
66973  --debug | --debu | --deb | --de | --d | -d )
66974    debug=: ;;
66975  --file | --fil | --fi | --f )
66976    $ac_shift
66977    case $ac_optarg in
66978    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66979    '') as_fn_error $? "missing file argument" ;;
66980    esac
66981    as_fn_append CONFIG_FILES " '$ac_optarg'"
66982    ac_need_defaults=false;;
66983  --he | --h |  --help | --hel | -h )
66984    $as_echo "$ac_cs_usage"; exit ;;
66985  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66986  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66987    ac_cs_silent=: ;;
66988
66989  # This is an error.
66990  -*) as_fn_error $? "unrecognized option: \`$1'
66991Try \`$0 --help' for more information." ;;
66992
66993  *) as_fn_append ac_config_targets " $1"
66994     ac_need_defaults=false ;;
66995
66996  esac
66997  shift
66998done
66999
67000ac_configure_extra_args=
67001
67002if $ac_cs_silent; then
67003  exec 6>/dev/null
67004  ac_configure_extra_args="$ac_configure_extra_args --silent"
67005fi
67006
67007_ACEOF
67008cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67009if \$ac_cs_recheck; then
67010  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67011  shift
67012  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67013  CONFIG_SHELL='$SHELL'
67014  export CONFIG_SHELL
67015  exec "\$@"
67016fi
67017
67018_ACEOF
67019cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67020exec 5>>config.log
67021{
67022  echo
67023  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67024## Running $as_me. ##
67025_ASBOX
67026  $as_echo "$ac_log"
67027} >&5
67028
67029_ACEOF
67030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67031_ACEOF
67032
67033cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67034
67035# Handling of arguments.
67036for ac_config_target in $ac_config_targets
67037do
67038  case $ac_config_target in
67039    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67040    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67041    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67042    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67043    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67044
67045  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67046  esac
67047done
67048
67049
67050# If the user did not use the arguments to specify the items to instantiate,
67051# then the envvar interface is used.  Set only those that are not.
67052# We use the long form for the default assignment because of an extremely
67053# bizarre bug on SunOS 4.1.3.
67054if $ac_need_defaults; then
67055  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67056fi
67057
67058# Have a temporary directory for convenience.  Make it in the build tree
67059# simply because there is no reason against having it here, and in addition,
67060# creating and moving files from /tmp can sometimes cause problems.
67061# Hook for its removal unless debugging.
67062# Note that there is a small window in which the directory will not be cleaned:
67063# after its creation but before its name has been assigned to `$tmp'.
67064$debug ||
67065{
67066  tmp= ac_tmp=
67067  trap 'exit_status=$?
67068  : "${ac_tmp:=$tmp}"
67069  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67070' 0
67071  trap 'as_fn_exit 1' 1 2 13 15
67072}
67073# Create a (secure) tmp directory for tmp files.
67074
67075{
67076  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67077  test -d "$tmp"
67078}  ||
67079{
67080  tmp=./conf$$-$RANDOM
67081  (umask 077 && mkdir "$tmp")
67082} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67083ac_tmp=$tmp
67084
67085# Set up the scripts for CONFIG_FILES section.
67086# No need to generate them if there are no CONFIG_FILES.
67087# This happens for instance with `./config.status config.h'.
67088if test -n "$CONFIG_FILES"; then
67089
67090
67091ac_cr=`echo X | tr X '\015'`
67092# On cygwin, bash can eat \r inside `` if the user requested igncr.
67093# But we know of no other shell where ac_cr would be empty at this
67094# point, so we can use a bashism as a fallback.
67095if test "x$ac_cr" = x; then
67096  eval ac_cr=\$\'\\r\'
67097fi
67098ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67099if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67100  ac_cs_awk_cr='\\r'
67101else
67102  ac_cs_awk_cr=$ac_cr
67103fi
67104
67105echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67106_ACEOF
67107
67108
67109{
67110  echo "cat >conf$$subs.awk <<_ACEOF" &&
67111  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67112  echo "_ACEOF"
67113} >conf$$subs.sh ||
67114  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67115ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67116ac_delim='%!_!# '
67117for ac_last_try in false false false false false :; do
67118  . ./conf$$subs.sh ||
67119    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67120
67121  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67122  if test $ac_delim_n = $ac_delim_num; then
67123    break
67124  elif $ac_last_try; then
67125    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67126  else
67127    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67128  fi
67129done
67130rm -f conf$$subs.sh
67131
67132cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67133cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67134_ACEOF
67135sed -n '
67136h
67137s/^/S["/; s/!.*/"]=/
67138p
67139g
67140s/^[^!]*!//
67141:repl
67142t repl
67143s/'"$ac_delim"'$//
67144t delim
67145:nl
67146h
67147s/\(.\{148\}\)..*/\1/
67148t more1
67149s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67150p
67151n
67152b repl
67153:more1
67154s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67155p
67156g
67157s/.\{148\}//
67158t nl
67159:delim
67160h
67161s/\(.\{148\}\)..*/\1/
67162t more2
67163s/["\\]/\\&/g; s/^/"/; s/$/"/
67164p
67165b
67166:more2
67167s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67168p
67169g
67170s/.\{148\}//
67171t delim
67172' <conf$$subs.awk | sed '
67173/^[^""]/{
67174  N
67175  s/\n//
67176}
67177' >>$CONFIG_STATUS || ac_write_fail=1
67178rm -f conf$$subs.awk
67179cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67180_ACAWK
67181cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67182  for (key in S) S_is_set[key] = 1
67183  FS = ""
67184
67185}
67186{
67187  line = $ 0
67188  nfields = split(line, field, "@")
67189  substed = 0
67190  len = length(field[1])
67191  for (i = 2; i < nfields; i++) {
67192    key = field[i]
67193    keylen = length(key)
67194    if (S_is_set[key]) {
67195      value = S[key]
67196      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67197      len += length(value) + length(field[++i])
67198      substed = 1
67199    } else
67200      len += 1 + keylen
67201  }
67202
67203  print line
67204}
67205
67206_ACAWK
67207_ACEOF
67208cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67209if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67210  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67211else
67212  cat
67213fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67214  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67215_ACEOF
67216
67217# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67218# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67219# trailing colons and then remove the whole line if VPATH becomes empty
67220# (actually we leave an empty line to preserve line numbers).
67221if test "x$srcdir" = x.; then
67222  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67223h
67224s///
67225s/^/:/
67226s/[	 ]*$/:/
67227s/:\$(srcdir):/:/g
67228s/:\${srcdir}:/:/g
67229s/:@srcdir@:/:/g
67230s/^:*//
67231s/:*$//
67232x
67233s/\(=[	 ]*\).*/\1/
67234G
67235s/\n//
67236s/^[^=]*=[	 ]*$//
67237}'
67238fi
67239
67240cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67241fi # test -n "$CONFIG_FILES"
67242
67243
67244eval set X "  :F $CONFIG_FILES      "
67245shift
67246for ac_tag
67247do
67248  case $ac_tag in
67249  :[FHLC]) ac_mode=$ac_tag; continue;;
67250  esac
67251  case $ac_mode$ac_tag in
67252  :[FHL]*:*);;
67253  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67254  :[FH]-) ac_tag=-:-;;
67255  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67256  esac
67257  ac_save_IFS=$IFS
67258  IFS=:
67259  set x $ac_tag
67260  IFS=$ac_save_IFS
67261  shift
67262  ac_file=$1
67263  shift
67264
67265  case $ac_mode in
67266  :L) ac_source=$1;;
67267  :[FH])
67268    ac_file_inputs=
67269    for ac_f
67270    do
67271      case $ac_f in
67272      -) ac_f="$ac_tmp/stdin";;
67273      *) # Look for the file first in the build tree, then in the source tree
67274	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67275	 # because $ac_f cannot contain `:'.
67276	 test -f "$ac_f" ||
67277	   case $ac_f in
67278	   [\\/$]*) false;;
67279	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67280	   esac ||
67281	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67282      esac
67283      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67284      as_fn_append ac_file_inputs " '$ac_f'"
67285    done
67286
67287    # Let's still pretend it is `configure' which instantiates (i.e., don't
67288    # use $as_me), people would be surprised to read:
67289    #    /* config.h.  Generated by config.status.  */
67290    configure_input='Generated from '`
67291	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67292	`' by configure.'
67293    if test x"$ac_file" != x-; then
67294      configure_input="$ac_file.  $configure_input"
67295      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67296$as_echo "$as_me: creating $ac_file" >&6;}
67297    fi
67298    # Neutralize special characters interpreted by sed in replacement strings.
67299    case $configure_input in #(
67300    *\&* | *\|* | *\\* )
67301       ac_sed_conf_input=`$as_echo "$configure_input" |
67302       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67303    *) ac_sed_conf_input=$configure_input;;
67304    esac
67305
67306    case $ac_tag in
67307    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67308      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67309    esac
67310    ;;
67311  esac
67312
67313  ac_dir=`$as_dirname -- "$ac_file" ||
67314$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67315	 X"$ac_file" : 'X\(//\)[^/]' \| \
67316	 X"$ac_file" : 'X\(//\)$' \| \
67317	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67318$as_echo X"$ac_file" |
67319    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67320	    s//\1/
67321	    q
67322	  }
67323	  /^X\(\/\/\)[^/].*/{
67324	    s//\1/
67325	    q
67326	  }
67327	  /^X\(\/\/\)$/{
67328	    s//\1/
67329	    q
67330	  }
67331	  /^X\(\/\).*/{
67332	    s//\1/
67333	    q
67334	  }
67335	  s/.*/./; q'`
67336  as_dir="$ac_dir"; as_fn_mkdir_p
67337  ac_builddir=.
67338
67339case "$ac_dir" in
67340.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67341*)
67342  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67343  # A ".." for each directory in $ac_dir_suffix.
67344  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67345  case $ac_top_builddir_sub in
67346  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67347  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67348  esac ;;
67349esac
67350ac_abs_top_builddir=$ac_pwd
67351ac_abs_builddir=$ac_pwd$ac_dir_suffix
67352# for backward compatibility:
67353ac_top_builddir=$ac_top_build_prefix
67354
67355case $srcdir in
67356  .)  # We are building in place.
67357    ac_srcdir=.
67358    ac_top_srcdir=$ac_top_builddir_sub
67359    ac_abs_top_srcdir=$ac_pwd ;;
67360  [\\/]* | ?:[\\/]* )  # Absolute name.
67361    ac_srcdir=$srcdir$ac_dir_suffix;
67362    ac_top_srcdir=$srcdir
67363    ac_abs_top_srcdir=$srcdir ;;
67364  *) # Relative name.
67365    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67366    ac_top_srcdir=$ac_top_build_prefix$srcdir
67367    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67368esac
67369ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67370
67371
67372  case $ac_mode in
67373  :F)
67374  #
67375  # CONFIG_FILE
67376  #
67377
67378_ACEOF
67379
67380cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67381# If the template does not know about datarootdir, expand it.
67382# FIXME: This hack should be removed a few years after 2.60.
67383ac_datarootdir_hack=; ac_datarootdir_seen=
67384ac_sed_dataroot='
67385/datarootdir/ {
67386  p
67387  q
67388}
67389/@datadir@/p
67390/@docdir@/p
67391/@infodir@/p
67392/@localedir@/p
67393/@mandir@/p'
67394case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67395*datarootdir*) ac_datarootdir_seen=yes;;
67396*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67397  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67398$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67399_ACEOF
67400cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67401  ac_datarootdir_hack='
67402  s&@datadir@&$datadir&g
67403  s&@docdir@&$docdir&g
67404  s&@infodir@&$infodir&g
67405  s&@localedir@&$localedir&g
67406  s&@mandir@&$mandir&g
67407  s&\\\${datarootdir}&$datarootdir&g' ;;
67408esac
67409_ACEOF
67410
67411# Neutralize VPATH when `$srcdir' = `.'.
67412# Shell code in configure.ac might set extrasub.
67413# FIXME: do we really want to maintain this feature?
67414cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67415ac_sed_extra="$ac_vpsub
67416$extrasub
67417_ACEOF
67418cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67419:t
67420/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67421s|@configure_input@|$ac_sed_conf_input|;t t
67422s&@top_builddir@&$ac_top_builddir_sub&;t t
67423s&@top_build_prefix@&$ac_top_build_prefix&;t t
67424s&@srcdir@&$ac_srcdir&;t t
67425s&@abs_srcdir@&$ac_abs_srcdir&;t t
67426s&@top_srcdir@&$ac_top_srcdir&;t t
67427s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67428s&@builddir@&$ac_builddir&;t t
67429s&@abs_builddir@&$ac_abs_builddir&;t t
67430s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67431$ac_datarootdir_hack
67432"
67433eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67434  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67435
67436test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67437  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67438  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67439      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67440  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67441which seems to be undefined.  Please make sure it is defined" >&5
67442$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67443which seems to be undefined.  Please make sure it is defined" >&2;}
67444
67445  rm -f "$ac_tmp/stdin"
67446  case $ac_file in
67447  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67448  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67449  esac \
67450  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67451 ;;
67452
67453
67454
67455  esac
67456
67457done # for ac_tag
67458
67459
67460as_fn_exit 0
67461_ACEOF
67462ac_clean_files=$ac_clean_files_save
67463
67464test $ac_write_fail = 0 ||
67465  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67466
67467
67468# configure is writing to config.log, and then calls config.status.
67469# config.status does its own redirection, appending to config.log.
67470# Unfortunately, on DOS this fails, as config.log is still kept open
67471# by configure, so config.status won't be able to write to it; its
67472# output is simply discarded.  So we exec the FD to /dev/null,
67473# effectively closing config.log, so it can be properly (re)opened and
67474# appended to by config.status.  When coming back to configure, we
67475# need to make the FD available again.
67476if test "$no_create" != yes; then
67477  ac_cs_success=:
67478  ac_config_status_args=
67479  test "$silent" = yes &&
67480    ac_config_status_args="$ac_config_status_args --quiet"
67481  exec 5>/dev/null
67482  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67483  exec 5>>config.log
67484  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67485  # would make configure fail if this is the last instruction.
67486  $ac_cs_success || as_fn_exit 1
67487fi
67488if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67489  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67490$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67491fi
67492
67493
67494# After AC_OUTPUT, we need to do final work
67495
67496
67497  # Try to move config.log (generated by autoconf) to the configure-support directory.
67498  if test -e ./config.log; then
67499    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67500  fi
67501
67502  # Rotate our log file (configure.log)
67503  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67504    $RM -f "$OUTPUT_ROOT/configure.log.old"
67505  fi
67506  if test -e "$OUTPUT_ROOT/configure.log"; then
67507    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67508  fi
67509
67510  # Move configure.log from current directory to the build output root
67511  if test -e ./configure.log; then
67512    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67513  fi
67514
67515  # Make the compare script executable
67516  $CHMOD +x $OUTPUT_ROOT/compare.sh
67517
67518
67519# Finally output some useful information to the user
67520
67521  # Finally output some useful information to the user
67522
67523  printf "\n"
67524  printf "====================================================\n"
67525  if test "x$no_create" != "xyes"; then
67526    if test "x$IS_RECONFIGURE" != "xyes"; then
67527      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67528    else
67529      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67530    fi
67531  else
67532    if test "x$IS_RECONFIGURE" != "xyes"; then
67533      printf "A configuration has been successfully checked but not created\n"
67534    else
67535      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67536    fi
67537  fi
67538  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67539    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67540  else
67541    printf "using default settings.\n"
67542  fi
67543
67544  printf "\n"
67545  printf "Configuration summary:\n"
67546  printf "* Debug level:    $DEBUG_LEVEL\n"
67547  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67548  printf "* JDK variant:    $JDK_VARIANT\n"
67549  printf "* JVM variants:   $JVM_VARIANTS\n"
67550  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67551  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67552
67553  printf "\n"
67554  printf "Tools summary:\n"
67555  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67556    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67557  fi
67558  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67559  if test "x$TOOLCHAIN_VERSION" != "x"; then
67560    print_version=" $TOOLCHAIN_VERSION"
67561  fi
67562  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67563  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67564  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67565
67566  printf "\n"
67567  printf "Build performance summary:\n"
67568  printf "* Cores to use:   $JOBS\n"
67569  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67570  if test "x$CCACHE_STATUS" != "x"; then
67571    printf "* ccache status:  $CCACHE_STATUS\n"
67572  fi
67573  printf "\n"
67574
67575  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67576    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67577    printf "will result in longer build times.\n"
67578    printf "\n"
67579  fi
67580
67581  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67582    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67583    printf "These are not respected, and will be ignored. It is recommended\n"
67584    printf "that you clean your environment. The following variables are set:\n"
67585    printf "$FOUND_ALT_VARIABLES\n"
67586    printf "\n"
67587  fi
67588
67589  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67590    printf "WARNING: Your build output directory is not on a local disk.\n"
67591    printf "This will severely degrade build performance!\n"
67592    printf "It is recommended that you create an output directory on a local disk,\n"
67593    printf "and run the configure script again from that directory.\n"
67594    printf "\n"
67595  fi
67596
67597  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67598    printf "WARNING: The result of this configuration has overridden an older\n"
67599    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67600    printf "proper build. Failure to do so might result in strange build problems.\n"
67601    printf "\n"
67602  fi
67603
67604  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67605    printf "WARNING: The result of this configuration was not saved.\n"
67606    printf "You should run without '--no-create | -n' to create the configuration.\n"
67607    printf "\n"
67608  fi
67609
67610
67611
67612  # Locate config.log.
67613  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67614    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67615  elif test -e "./config.log"; then
67616    CONFIG_LOG_PATH="."
67617  fi
67618
67619  if test -e "$CONFIG_LOG_PATH/config.log"; then
67620    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67621    if test $? -eq 0; then
67622      printf "The following warnings were produced. Repeated here for convenience:\n"
67623      # We must quote sed expression (using []) to stop m4 from eating the [].
67624      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67625      printf "\n"
67626    fi
67627  fi
67628
67629