generated-configure.sh revision 2469:192d08d80725
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=1486131554
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  # Test if bash supports pipefail.
24096  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24097$as_echo_n "checking if bash supports pipefail... " >&6; }
24098  if ${BASH} -c 'set -o pipefail'; then
24099    BASH_ARGS="$BASH_ARGS -o pipefail"
24100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24101$as_echo "yes" >&6; }
24102  else
24103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24104$as_echo "no" >&6; }
24105  fi
24106
24107  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24108$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24109  if ${BASH} -e -c 'true'; then
24110    BASH_ARGS="$BASH_ARGS -e"
24111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24112$as_echo "yes" >&6; }
24113  else
24114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24115$as_echo "no" >&6; }
24116  fi
24117
24118
24119
24120
24121# Check if pkg-config is available.
24122
24123
24124if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24125	if test -n "$ac_tool_prefix"; then
24126  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24127set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24129$as_echo_n "checking for $ac_word... " >&6; }
24130if ${ac_cv_path_PKG_CONFIG+:} false; then :
24131  $as_echo_n "(cached) " >&6
24132else
24133  case $PKG_CONFIG in
24134  [\\/]* | ?:[\\/]*)
24135  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24136  ;;
24137  *)
24138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24139for as_dir in $PATH
24140do
24141  IFS=$as_save_IFS
24142  test -z "$as_dir" && as_dir=.
24143    for ac_exec_ext in '' $ac_executable_extensions; do
24144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24145    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24147    break 2
24148  fi
24149done
24150  done
24151IFS=$as_save_IFS
24152
24153  ;;
24154esac
24155fi
24156PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24157if test -n "$PKG_CONFIG"; then
24158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24159$as_echo "$PKG_CONFIG" >&6; }
24160else
24161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24162$as_echo "no" >&6; }
24163fi
24164
24165
24166fi
24167if test -z "$ac_cv_path_PKG_CONFIG"; then
24168  ac_pt_PKG_CONFIG=$PKG_CONFIG
24169  # Extract the first word of "pkg-config", so it can be a program name with args.
24170set dummy pkg-config; ac_word=$2
24171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24172$as_echo_n "checking for $ac_word... " >&6; }
24173if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24174  $as_echo_n "(cached) " >&6
24175else
24176  case $ac_pt_PKG_CONFIG in
24177  [\\/]* | ?:[\\/]*)
24178  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24179  ;;
24180  *)
24181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24182for as_dir in $PATH
24183do
24184  IFS=$as_save_IFS
24185  test -z "$as_dir" && as_dir=.
24186    for ac_exec_ext in '' $ac_executable_extensions; do
24187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24188    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24190    break 2
24191  fi
24192done
24193  done
24194IFS=$as_save_IFS
24195
24196  ;;
24197esac
24198fi
24199ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24200if test -n "$ac_pt_PKG_CONFIG"; then
24201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24202$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24203else
24204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24205$as_echo "no" >&6; }
24206fi
24207
24208  if test "x$ac_pt_PKG_CONFIG" = x; then
24209    PKG_CONFIG=""
24210  else
24211    case $cross_compiling:$ac_tool_warned in
24212yes:)
24213{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24214$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24215ac_tool_warned=yes ;;
24216esac
24217    PKG_CONFIG=$ac_pt_PKG_CONFIG
24218  fi
24219else
24220  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24221fi
24222
24223fi
24224if test -n "$PKG_CONFIG"; then
24225	_pkg_min_version=0.9.0
24226	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24227$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24228	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24229		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24230$as_echo "yes" >&6; }
24231	else
24232		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24233$as_echo "no" >&6; }
24234		PKG_CONFIG=""
24235	fi
24236
24237fi
24238
24239# After basic tools have been setup, we can check build os specific details.
24240
24241  ###############################################################################
24242
24243  # Note that this is the build platform OS version!
24244
24245  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24246  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24247  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24248  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24249
24250
24251
24252
24253
24254# Misc basic settings
24255
24256
24257# Check whether --with-default-make-target was given.
24258if test "${with_default_make_target+set}" = set; then :
24259  withval=$with_default_make_target;
24260fi
24261
24262  if test "x$with_default_make_target" = "x" \
24263      || test "x$with_default_make_target" = "xyes"; then
24264    DEFAULT_MAKE_TARGET="exploded-image"
24265  elif test "x$with_default_make_target" = "xno"; then
24266    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24267  else
24268    DEFAULT_MAKE_TARGET="$with_default_make_target"
24269  fi
24270
24271
24272
24273
24274###############################################################################
24275#
24276# Determine OpenJDK variants, options and version numbers.
24277#
24278###############################################################################
24279
24280# We need build & target for this.
24281
24282  # Should we build a JDK without a graphical UI?
24283  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24284$as_echo_n "checking headless only... " >&6; }
24285  # Check whether --enable-headless-only was given.
24286if test "${enable_headless_only+set}" = set; then :
24287  enableval=$enable_headless_only;
24288fi
24289
24290
24291  if test "x$enable_headless_only" = "xyes"; then
24292    ENABLE_HEADLESS_ONLY="true"
24293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24294$as_echo "yes" >&6; }
24295  elif test "x$enable_headless_only" = "xno"; then
24296    ENABLE_HEADLESS_ONLY="false"
24297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24298$as_echo "no" >&6; }
24299  elif test "x$enable_headless_only" = "x"; then
24300    ENABLE_HEADLESS_ONLY="false"
24301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24302$as_echo "no" >&6; }
24303  else
24304    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24305  fi
24306
24307
24308
24309  # Choose cacerts source file
24310
24311# Check whether --with-cacerts-file was given.
24312if test "${with_cacerts_file+set}" = set; then :
24313  withval=$with_cacerts_file;
24314fi
24315
24316  if test "x$with_cacerts_file" != x; then
24317    CACERTS_FILE=$with_cacerts_file
24318  fi
24319
24320
24321  # Enable or disable unlimited crypto
24322  # Check whether --enable-unlimited-crypto was given.
24323if test "${enable_unlimited_crypto+set}" = set; then :
24324  enableval=$enable_unlimited_crypto;
24325else
24326  enable_unlimited_crypto=yes
24327fi
24328
24329  if test "x$enable_unlimited_crypto" = "xyes"; then
24330    UNLIMITED_CRYPTO=true
24331  else
24332    UNLIMITED_CRYPTO=false
24333  fi
24334
24335
24336  # Should we build the serviceability agent (SA)?
24337  INCLUDE_SA=true
24338  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24339    INCLUDE_SA=false
24340  fi
24341  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24342    INCLUDE_SA=false
24343  fi
24344
24345
24346  # Compress jars
24347  COMPRESS_JARS=false
24348
24349
24350
24351  # Setup default copyright year. Mostly overridden when building close to a new year.
24352
24353# Check whether --with-copyright-year was given.
24354if test "${with_copyright_year+set}" = set; then :
24355  withval=$with_copyright_year;
24356fi
24357
24358  if test "x$with_copyright_year" = xyes; then
24359    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24360  elif test "x$with_copyright_year" != x; then
24361    COPYRIGHT_YEAR="$with_copyright_year"
24362  else
24363    COPYRIGHT_YEAR=`$DATE +'%Y'`
24364  fi
24365
24366
24367
24368  # Check whether --enable-keep-packaged-modules was given.
24369if test "${enable_keep_packaged_modules+set}" = set; then :
24370  enableval=$enable_keep_packaged_modules;
24371fi
24372
24373
24374  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24375$as_echo_n "checking if packaged modules are kept... " >&6; }
24376  if test "x$enable_keep_packaged_modules" = "xyes"; then
24377    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24378$as_echo "yes" >&6; }
24379    JLINK_KEEP_PACKAGED_MODULES=true
24380  elif test "x$enable_keep_packaged_modules" = "xno"; then
24381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24382$as_echo "no" >&6; }
24383    JLINK_KEEP_PACKAGED_MODULES=false
24384  elif test "x$enable_keep_packaged_modules" = "x"; then
24385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24386$as_echo "yes (default)" >&6; }
24387    JLINK_KEEP_PACKAGED_MODULES=true
24388  else
24389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24390$as_echo "error" >&6; }
24391    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24392  fi
24393
24394
24395
24396
24397  # Warn user that old version arguments are deprecated.
24398
24399
24400# Check whether --with-milestone was given.
24401if test "${with_milestone+set}" = set; then :
24402  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24403$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24404fi
24405
24406
24407
24408
24409# Check whether --with-update-version was given.
24410if test "${with_update_version+set}" = set; then :
24411  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24412$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24413fi
24414
24415
24416
24417
24418# Check whether --with-user-release-suffix was given.
24419if test "${with_user_release_suffix+set}" = set; then :
24420  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
24421$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24422fi
24423
24424
24425
24426
24427# Check whether --with-build-number was given.
24428if test "${with_build_number+set}" = set; then :
24429  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24430$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24431fi
24432
24433
24434
24435  # Source the version numbers file
24436  . $AUTOCONF_DIR/version-numbers
24437
24438  # Some non-version number information is set in that file
24439
24440
24441
24442
24443
24444
24445
24446
24447
24448  # Override version from arguments
24449
24450  # If --with-version-string is set, process it first. It is possible to
24451  # override parts with more specific flags, since these are processed later.
24452
24453# Check whether --with-version-string was given.
24454if test "${with_version_string+set}" = set; then :
24455  withval=$with_version_string;
24456fi
24457
24458  if test "x$with_version_string" = xyes; then
24459    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24460  elif test "x$with_version_string" != x; then
24461    # Additional [] needed to keep m4 from mangling shell constructs.
24462    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24463      VERSION_MAJOR=${BASH_REMATCH[1]}
24464      VERSION_MINOR=${BASH_REMATCH[3]}
24465      VERSION_SECURITY=${BASH_REMATCH[5]}
24466      VERSION_PATCH=${BASH_REMATCH[7]}
24467      VERSION_PRE=${BASH_REMATCH[9]}
24468      version_plus_separator=${BASH_REMATCH[11]}
24469      VERSION_BUILD=${BASH_REMATCH[12]}
24470      VERSION_OPT=${BASH_REMATCH[14]}
24471      # Unspecified numerical fields are interpreted as 0.
24472      if test "x$VERSION_MINOR" = x; then
24473        VERSION_MINOR=0
24474      fi
24475      if test "x$VERSION_SECURITY" = x; then
24476        VERSION_SECURITY=0
24477      fi
24478      if test "x$VERSION_PATCH" = x; then
24479        VERSION_PATCH=0
24480      fi
24481      if test "x$version_plus_separator" != x \
24482          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24483        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24484      fi
24485      # Stop the version part process from setting default values.
24486      # We still allow them to explicitly override though.
24487      NO_DEFAULT_VERSION_PARTS=true
24488    else
24489      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24490    fi
24491  fi
24492
24493
24494# Check whether --with-version-pre was given.
24495if test "${with_version_pre+set}" = set; then :
24496  withval=$with_version_pre; with_version_pre_present=true
24497else
24498  with_version_pre_present=false
24499fi
24500
24501
24502  if test "x$with_version_pre_present" = xtrue; then
24503    if test "x$with_version_pre" = xyes; then
24504      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24505    elif test "x$with_version_pre" = xno; then
24506      # Interpret --without-* as empty string instead of the literal "no"
24507      VERSION_PRE=
24508    else
24509      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24510       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24511      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24512        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24513$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24514      fi
24515    fi
24516  else
24517    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24518      # Default is to use "internal" as pre
24519      VERSION_PRE="internal"
24520    fi
24521  fi
24522
24523
24524# Check whether --with-version-opt was given.
24525if test "${with_version_opt+set}" = set; then :
24526  withval=$with_version_opt; with_version_opt_present=true
24527else
24528  with_version_opt_present=false
24529fi
24530
24531
24532  if test "x$with_version_opt_present" = xtrue; then
24533    if test "x$with_version_opt" = xyes; then
24534      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24535    elif test "x$with_version_opt" = xno; then
24536      # Interpret --without-* as empty string instead of the literal "no"
24537      VERSION_OPT=
24538    else
24539      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24540       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24541      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24542        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24543$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24544      fi
24545    fi
24546  else
24547    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24548      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24549      # Outer [ ] to quote m4.
24550       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24551      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24552    fi
24553  fi
24554
24555
24556# Check whether --with-version-build was given.
24557if test "${with_version_build+set}" = set; then :
24558  withval=$with_version_build; with_version_build_present=true
24559else
24560  with_version_build_present=false
24561fi
24562
24563
24564  if test "x$with_version_build_present" = xtrue; then
24565    if test "x$with_version_build" = xyes; then
24566      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24567    elif test "x$with_version_build" = xno; then
24568      # Interpret --without-* as empty string instead of the literal "no"
24569      VERSION_BUILD=
24570    elif test "x$with_version_build" = x; then
24571      VERSION_BUILD=
24572    else
24573
24574  # Additional [] needed to keep m4 from mangling shell constructs.
24575  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24576    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24577  fi
24578  # Extract the version number without leading zeros.
24579  cleaned_value=${BASH_REMATCH[1]}
24580  if test "x$cleaned_value" = x; then
24581    # Special case for zero
24582    cleaned_value=${BASH_REMATCH[2]}
24583  fi
24584
24585  if test $cleaned_value -gt 255; then
24586    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24587  fi
24588  if test "x$cleaned_value" != "x$with_version_build"; then
24589    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24590$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24591  fi
24592  VERSION_BUILD=$cleaned_value
24593
24594    fi
24595  else
24596    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24597      # Default is to not have a build number.
24598      VERSION_BUILD=""
24599      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24600      VERSION_BUILD=0
24601    fi
24602  fi
24603
24604
24605# Check whether --with-version-major was given.
24606if test "${with_version_major+set}" = set; then :
24607  withval=$with_version_major; with_version_major_present=true
24608else
24609  with_version_major_present=false
24610fi
24611
24612
24613  if test "x$with_version_major_present" = xtrue; then
24614    if test "x$with_version_major" = xyes; then
24615      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24616    else
24617
24618  # Additional [] needed to keep m4 from mangling shell constructs.
24619  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24620    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24621  fi
24622  # Extract the version number without leading zeros.
24623  cleaned_value=${BASH_REMATCH[1]}
24624  if test "x$cleaned_value" = x; then
24625    # Special case for zero
24626    cleaned_value=${BASH_REMATCH[2]}
24627  fi
24628
24629  if test $cleaned_value -gt 255; then
24630    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24631  fi
24632  if test "x$cleaned_value" != "x$with_version_major"; then
24633    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24634$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24635  fi
24636  VERSION_MAJOR=$cleaned_value
24637
24638    fi
24639  else
24640    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24641      # Default is to get value from version-numbers
24642      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24643    fi
24644  fi
24645
24646
24647# Check whether --with-version-minor was given.
24648if test "${with_version_minor+set}" = set; then :
24649  withval=$with_version_minor; with_version_minor_present=true
24650else
24651  with_version_minor_present=false
24652fi
24653
24654
24655  if test "x$with_version_minor_present" = xtrue; then
24656    if test "x$with_version_minor" = xyes; then
24657      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24658    elif test "x$with_version_minor" = xno; then
24659      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24660      VERSION_MINOR=0
24661    elif test "x$with_version_minor" = x; then
24662      VERSION_MINOR=0
24663    else
24664
24665  # Additional [] needed to keep m4 from mangling shell constructs.
24666  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24667    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24668  fi
24669  # Extract the version number without leading zeros.
24670  cleaned_value=${BASH_REMATCH[1]}
24671  if test "x$cleaned_value" = x; then
24672    # Special case for zero
24673    cleaned_value=${BASH_REMATCH[2]}
24674  fi
24675
24676  if test $cleaned_value -gt 255; then
24677    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24678  fi
24679  if test "x$cleaned_value" != "x$with_version_minor"; then
24680    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24681$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24682  fi
24683  VERSION_MINOR=$cleaned_value
24684
24685    fi
24686  else
24687    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24688      # Default is 0, if unspecified
24689      VERSION_MINOR=$DEFAULT_VERSION_MINOR
24690    fi
24691  fi
24692
24693
24694# Check whether --with-version-security was given.
24695if test "${with_version_security+set}" = set; then :
24696  withval=$with_version_security; with_version_security_present=true
24697else
24698  with_version_security_present=false
24699fi
24700
24701
24702  if test "x$with_version_security_present" = xtrue; then
24703    if test "x$with_version_security" = xyes; then
24704      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24705    elif test "x$with_version_security" = xno; then
24706      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24707      VERSION_SECURITY=0
24708    elif test "x$with_version_security" = x; then
24709      VERSION_SECURITY=0
24710    else
24711
24712  # Additional [] needed to keep m4 from mangling shell constructs.
24713  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24714    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24715  fi
24716  # Extract the version number without leading zeros.
24717  cleaned_value=${BASH_REMATCH[1]}
24718  if test "x$cleaned_value" = x; then
24719    # Special case for zero
24720    cleaned_value=${BASH_REMATCH[2]}
24721  fi
24722
24723  if test $cleaned_value -gt 255; then
24724    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24725  fi
24726  if test "x$cleaned_value" != "x$with_version_security"; then
24727    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24728$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24729  fi
24730  VERSION_SECURITY=$cleaned_value
24731
24732    fi
24733  else
24734    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24735      # Default is 0, if unspecified
24736      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
24737    fi
24738  fi
24739
24740
24741# Check whether --with-version-patch was given.
24742if test "${with_version_patch+set}" = set; then :
24743  withval=$with_version_patch; with_version_patch_present=true
24744else
24745  with_version_patch_present=false
24746fi
24747
24748
24749  if test "x$with_version_patch_present" = xtrue; then
24750    if test "x$with_version_patch" = xyes; then
24751      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24752    elif test "x$with_version_patch" = xno; then
24753      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24754      VERSION_PATCH=0
24755    elif test "x$with_version_patch" = x; then
24756      VERSION_PATCH=0
24757    else
24758
24759  # Additional [] needed to keep m4 from mangling shell constructs.
24760  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24761    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24762  fi
24763  # Extract the version number without leading zeros.
24764  cleaned_value=${BASH_REMATCH[1]}
24765  if test "x$cleaned_value" = x; then
24766    # Special case for zero
24767    cleaned_value=${BASH_REMATCH[2]}
24768  fi
24769
24770  if test $cleaned_value -gt 255; then
24771    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24772  fi
24773  if test "x$cleaned_value" != "x$with_version_patch"; then
24774    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24775$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24776  fi
24777  VERSION_PATCH=$cleaned_value
24778
24779    fi
24780  else
24781    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24782      # Default is 0, if unspecified
24783      VERSION_PATCH=$DEFAULT_VERSION_PATCH
24784    fi
24785  fi
24786
24787  # Calculate derived version properties
24788
24789  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24790  if test "x$VERSION_PRE" = x; then
24791    VERSION_IS_GA=true
24792  else
24793    VERSION_IS_GA=false
24794  fi
24795
24796  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24797  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24798
24799  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24800  # Strip trailing zeroes from stripped_version_number
24801  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24802  VERSION_NUMBER=$stripped_version_number
24803
24804  # The complete version string, with additional build information
24805  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24806    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24807  else
24808    # If either build or opt is set, we need a + separator
24809    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24810  fi
24811
24812  # The short version string, just VERSION_NUMBER and PRE, if present.
24813  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24814
24815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24816$as_echo_n "checking for version string... " >&6; }
24817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24818$as_echo "$VERSION_STRING" >&6; }
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834###############################################################################
24835#
24836# Setup BootJDK, used to bootstrap the build.
24837#
24838###############################################################################
24839
24840
24841  BOOT_JDK_FOUND=no
24842
24843# Check whether --with-boot-jdk was given.
24844if test "${with_boot_jdk+set}" = set; then :
24845  withval=$with_boot_jdk;
24846fi
24847
24848
24849  # We look for the Boot JDK through various means, going from more certain to
24850  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24851  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24852  # must check if this is indeed valid; otherwise we'll continue looking.
24853
24854  # Test: Is bootjdk explicitly set by command line arguments?
24855
24856  if test "x$BOOT_JDK_FOUND" = xno; then
24857    # Now execute the test
24858
24859  if test "x$with_boot_jdk" != x; then
24860    BOOT_JDK=$with_boot_jdk
24861    BOOT_JDK_FOUND=maybe
24862    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24863$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24864  fi
24865
24866
24867    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24868    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24869      # Do we have a bin/java?
24870      if test ! -x "$BOOT_JDK/bin/java"; then
24871        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24872$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24873        BOOT_JDK_FOUND=no
24874      else
24875        # Do we have a bin/javac?
24876        if test ! -x "$BOOT_JDK/bin/javac"; then
24877          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24879          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24880$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24881          BOOT_JDK_FOUND=no
24882        else
24883          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24884          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24885
24886          # Extra M4 quote needed to protect [] in grep expression.
24887          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24888          if test "x$FOUND_CORRECT_VERSION" = x; then
24889            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24890$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24891            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24892$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24893            BOOT_JDK_FOUND=no
24894          else
24895            # We're done! :-)
24896            BOOT_JDK_FOUND=yes
24897
24898  # Only process if variable expands to non-empty
24899
24900  if test "x$BOOT_JDK" != x; then
24901    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24902
24903  # Input might be given as Windows format, start by converting to
24904  # unix format.
24905  path="$BOOT_JDK"
24906  new_path=`$CYGPATH -u "$path"`
24907
24908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24911  # "foo.exe" is OK but "foo" is an error.
24912  #
24913  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24914  # It is also a way to make sure we got the proper file name for the real test later on.
24915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24916  if test "x$test_shortpath" = x; then
24917    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24918$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24919    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24920  fi
24921
24922  # Call helper function which possibly converts this using DOS-style short mode.
24923  # If so, the updated path is stored in $new_path.
24924
24925  input_path="$new_path"
24926  # Check if we need to convert this using DOS-style short mode. If the path
24927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24928  # take no chances and rewrite it.
24929  # Note: m4 eats our [], so we need to use [ and ] instead.
24930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24931  if test "x$has_forbidden_chars" != x; then
24932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24933    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24934    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24935    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24936      # Going to short mode and back again did indeed matter. Since short mode is
24937      # case insensitive, let's make it lowercase to improve readability.
24938      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24939      # Now convert it back to Unix-style (cygpath)
24940      input_path=`$CYGPATH -u "$shortmode_path"`
24941      new_path="$input_path"
24942    fi
24943  fi
24944
24945  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24946  if test "x$test_cygdrive_prefix" = x; then
24947    # As a simple fix, exclude /usr/bin since it's not a real path.
24948    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24949      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24950      # a path prefixed by /cygdrive for fixpath to work.
24951      new_path="$CYGWIN_ROOT_PATH$input_path"
24952    fi
24953  fi
24954
24955
24956  if test "x$path" != "x$new_path"; then
24957    BOOT_JDK="$new_path"
24958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24959$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24960  fi
24961
24962    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24963
24964  path="$BOOT_JDK"
24965  has_colon=`$ECHO $path | $GREP ^.:`
24966  new_path="$path"
24967  if test "x$has_colon" = x; then
24968    # Not in mixed or Windows style, start by that.
24969    new_path=`cmd //c echo $path`
24970  fi
24971
24972
24973  input_path="$new_path"
24974  # Check if we need to convert this using DOS-style short mode. If the path
24975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24976  # take no chances and rewrite it.
24977  # Note: m4 eats our [], so we need to use [ and ] instead.
24978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24979  if test "x$has_forbidden_chars" != x; then
24980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24982  fi
24983
24984
24985  windows_path="$new_path"
24986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24987    unix_path=`$CYGPATH -u "$windows_path"`
24988    new_path="$unix_path"
24989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24991    new_path="$unix_path"
24992  fi
24993
24994  if test "x$path" != "x$new_path"; then
24995    BOOT_JDK="$new_path"
24996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24997$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24998  fi
24999
25000  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25001  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25002
25003    else
25004      # We're on a unix platform. Hooray! :)
25005      path="$BOOT_JDK"
25006      has_space=`$ECHO "$path" | $GREP " "`
25007      if test "x$has_space" != x; then
25008        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25009$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25010        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25011      fi
25012
25013      # Use eval to expand a potential ~
25014      eval path="$path"
25015      if test ! -f "$path" && test ! -d "$path"; then
25016        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25017      fi
25018
25019      if test -d "$path"; then
25020        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25021      else
25022        dir="`$DIRNAME "$path"`"
25023        base="`$BASENAME "$path"`"
25024        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25025      fi
25026    fi
25027  fi
25028
25029            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25030$as_echo_n "checking for Boot JDK... " >&6; }
25031            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25032$as_echo "$BOOT_JDK" >&6; }
25033            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25034$as_echo_n "checking Boot JDK version... " >&6; }
25035            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25036            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25037$as_echo "$BOOT_JDK_VERSION" >&6; }
25038          fi # end check jdk version
25039        fi # end check javac
25040      fi # end check java
25041    fi # end check boot jdk found
25042  fi
25043
25044  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25045    # Having specified an argument which is incorrect will produce an instant failure;
25046    # we should not go on looking
25047    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25048  fi
25049
25050  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25051
25052  if test "x$BOOT_JDK_FOUND" = xno; then
25053    # Now execute the test
25054
25055  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25056    # First check at user selected default
25057
25058  if test "x$BOOT_JDK_FOUND" = xno; then
25059    # Now execute the test
25060
25061  if test -x /usr/libexec/java_home; then
25062    BOOT_JDK=`/usr/libexec/java_home `
25063    BOOT_JDK_FOUND=maybe
25064    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25065$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25066  fi
25067
25068
25069    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25070    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25071      # Do we have a bin/java?
25072      if test ! -x "$BOOT_JDK/bin/java"; then
25073        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25075        BOOT_JDK_FOUND=no
25076      else
25077        # Do we have a bin/javac?
25078        if test ! -x "$BOOT_JDK/bin/javac"; then
25079          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25081          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25082$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25083          BOOT_JDK_FOUND=no
25084        else
25085          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25086          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25087
25088          # Extra M4 quote needed to protect [] in grep expression.
25089          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25090          if test "x$FOUND_CORRECT_VERSION" = x; then
25091            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25093            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25094$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25095            BOOT_JDK_FOUND=no
25096          else
25097            # We're done! :-)
25098            BOOT_JDK_FOUND=yes
25099
25100  # Only process if variable expands to non-empty
25101
25102  if test "x$BOOT_JDK" != x; then
25103    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25104
25105  # Input might be given as Windows format, start by converting to
25106  # unix format.
25107  path="$BOOT_JDK"
25108  new_path=`$CYGPATH -u "$path"`
25109
25110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25113  # "foo.exe" is OK but "foo" is an error.
25114  #
25115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25116  # It is also a way to make sure we got the proper file name for the real test later on.
25117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25118  if test "x$test_shortpath" = x; then
25119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25121    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25122  fi
25123
25124  # Call helper function which possibly converts this using DOS-style short mode.
25125  # If so, the updated path is stored in $new_path.
25126
25127  input_path="$new_path"
25128  # Check if we need to convert this using DOS-style short mode. If the path
25129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25130  # take no chances and rewrite it.
25131  # Note: m4 eats our [], so we need to use [ and ] instead.
25132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25133  if test "x$has_forbidden_chars" != x; then
25134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25138      # Going to short mode and back again did indeed matter. Since short mode is
25139      # case insensitive, let's make it lowercase to improve readability.
25140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25141      # Now convert it back to Unix-style (cygpath)
25142      input_path=`$CYGPATH -u "$shortmode_path"`
25143      new_path="$input_path"
25144    fi
25145  fi
25146
25147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25148  if test "x$test_cygdrive_prefix" = x; then
25149    # As a simple fix, exclude /usr/bin since it's not a real path.
25150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25152      # a path prefixed by /cygdrive for fixpath to work.
25153      new_path="$CYGWIN_ROOT_PATH$input_path"
25154    fi
25155  fi
25156
25157
25158  if test "x$path" != "x$new_path"; then
25159    BOOT_JDK="$new_path"
25160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25162  fi
25163
25164    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25165
25166  path="$BOOT_JDK"
25167  has_colon=`$ECHO $path | $GREP ^.:`
25168  new_path="$path"
25169  if test "x$has_colon" = x; then
25170    # Not in mixed or Windows style, start by that.
25171    new_path=`cmd //c echo $path`
25172  fi
25173
25174
25175  input_path="$new_path"
25176  # Check if we need to convert this using DOS-style short mode. If the path
25177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25178  # take no chances and rewrite it.
25179  # Note: m4 eats our [], so we need to use [ and ] instead.
25180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25181  if test "x$has_forbidden_chars" != x; then
25182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25184  fi
25185
25186
25187  windows_path="$new_path"
25188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25189    unix_path=`$CYGPATH -u "$windows_path"`
25190    new_path="$unix_path"
25191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25193    new_path="$unix_path"
25194  fi
25195
25196  if test "x$path" != "x$new_path"; then
25197    BOOT_JDK="$new_path"
25198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25199$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25200  fi
25201
25202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25204
25205    else
25206      # We're on a unix platform. Hooray! :)
25207      path="$BOOT_JDK"
25208      has_space=`$ECHO "$path" | $GREP " "`
25209      if test "x$has_space" != x; then
25210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25211$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25212        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25213      fi
25214
25215      # Use eval to expand a potential ~
25216      eval path="$path"
25217      if test ! -f "$path" && test ! -d "$path"; then
25218        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25219      fi
25220
25221      if test -d "$path"; then
25222        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25223      else
25224        dir="`$DIRNAME "$path"`"
25225        base="`$BASENAME "$path"`"
25226        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25227      fi
25228    fi
25229  fi
25230
25231            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25232$as_echo_n "checking for Boot JDK... " >&6; }
25233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25234$as_echo "$BOOT_JDK" >&6; }
25235            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25236$as_echo_n "checking Boot JDK version... " >&6; }
25237            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25239$as_echo "$BOOT_JDK_VERSION" >&6; }
25240          fi # end check jdk version
25241        fi # end check javac
25242      fi # end check java
25243    fi # end check boot jdk found
25244  fi
25245
25246    # If that did not work out (e.g. too old), try explicit versions instead
25247
25248  if test "x$BOOT_JDK_FOUND" = xno; then
25249    # Now execute the test
25250
25251  if test -x /usr/libexec/java_home; then
25252    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25253    BOOT_JDK_FOUND=maybe
25254    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25255$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25256  fi
25257
25258
25259    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25260    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25261      # Do we have a bin/java?
25262      if test ! -x "$BOOT_JDK/bin/java"; then
25263        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25265        BOOT_JDK_FOUND=no
25266      else
25267        # Do we have a bin/javac?
25268        if test ! -x "$BOOT_JDK/bin/javac"; then
25269          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25271          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25272$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25273          BOOT_JDK_FOUND=no
25274        else
25275          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25276          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25277
25278          # Extra M4 quote needed to protect [] in grep expression.
25279          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25280          if test "x$FOUND_CORRECT_VERSION" = x; then
25281            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25283            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25284$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25285            BOOT_JDK_FOUND=no
25286          else
25287            # We're done! :-)
25288            BOOT_JDK_FOUND=yes
25289
25290  # Only process if variable expands to non-empty
25291
25292  if test "x$BOOT_JDK" != x; then
25293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25294
25295  # Input might be given as Windows format, start by converting to
25296  # unix format.
25297  path="$BOOT_JDK"
25298  new_path=`$CYGPATH -u "$path"`
25299
25300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25303  # "foo.exe" is OK but "foo" is an error.
25304  #
25305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25306  # It is also a way to make sure we got the proper file name for the real test later on.
25307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25308  if test "x$test_shortpath" = x; then
25309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25310$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25311    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25312  fi
25313
25314  # Call helper function which possibly converts this using DOS-style short mode.
25315  # If so, the updated path is stored in $new_path.
25316
25317  input_path="$new_path"
25318  # Check if we need to convert this using DOS-style short mode. If the path
25319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25320  # take no chances and rewrite it.
25321  # Note: m4 eats our [], so we need to use [ and ] instead.
25322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25323  if test "x$has_forbidden_chars" != x; then
25324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25328      # Going to short mode and back again did indeed matter. Since short mode is
25329      # case insensitive, let's make it lowercase to improve readability.
25330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25331      # Now convert it back to Unix-style (cygpath)
25332      input_path=`$CYGPATH -u "$shortmode_path"`
25333      new_path="$input_path"
25334    fi
25335  fi
25336
25337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25338  if test "x$test_cygdrive_prefix" = x; then
25339    # As a simple fix, exclude /usr/bin since it's not a real path.
25340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25342      # a path prefixed by /cygdrive for fixpath to work.
25343      new_path="$CYGWIN_ROOT_PATH$input_path"
25344    fi
25345  fi
25346
25347
25348  if test "x$path" != "x$new_path"; then
25349    BOOT_JDK="$new_path"
25350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25351$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25352  fi
25353
25354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25355
25356  path="$BOOT_JDK"
25357  has_colon=`$ECHO $path | $GREP ^.:`
25358  new_path="$path"
25359  if test "x$has_colon" = x; then
25360    # Not in mixed or Windows style, start by that.
25361    new_path=`cmd //c echo $path`
25362  fi
25363
25364
25365  input_path="$new_path"
25366  # Check if we need to convert this using DOS-style short mode. If the path
25367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25368  # take no chances and rewrite it.
25369  # Note: m4 eats our [], so we need to use [ and ] instead.
25370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25371  if test "x$has_forbidden_chars" != x; then
25372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25374  fi
25375
25376
25377  windows_path="$new_path"
25378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25379    unix_path=`$CYGPATH -u "$windows_path"`
25380    new_path="$unix_path"
25381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25383    new_path="$unix_path"
25384  fi
25385
25386  if test "x$path" != "x$new_path"; then
25387    BOOT_JDK="$new_path"
25388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25389$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25390  fi
25391
25392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25394
25395    else
25396      # We're on a unix platform. Hooray! :)
25397      path="$BOOT_JDK"
25398      has_space=`$ECHO "$path" | $GREP " "`
25399      if test "x$has_space" != x; then
25400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25401$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25402        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25403      fi
25404
25405      # Use eval to expand a potential ~
25406      eval path="$path"
25407      if test ! -f "$path" && test ! -d "$path"; then
25408        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25409      fi
25410
25411      if test -d "$path"; then
25412        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25413      else
25414        dir="`$DIRNAME "$path"`"
25415        base="`$BASENAME "$path"`"
25416        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25417      fi
25418    fi
25419  fi
25420
25421            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25422$as_echo_n "checking for Boot JDK... " >&6; }
25423            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25424$as_echo "$BOOT_JDK" >&6; }
25425            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25426$as_echo_n "checking Boot JDK version... " >&6; }
25427            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25428            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25429$as_echo "$BOOT_JDK_VERSION" >&6; }
25430          fi # end check jdk version
25431        fi # end check javac
25432      fi # end check java
25433    fi # end check boot jdk found
25434  fi
25435
25436
25437  if test "x$BOOT_JDK_FOUND" = xno; then
25438    # Now execute the test
25439
25440  if test -x /usr/libexec/java_home; then
25441    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25442    BOOT_JDK_FOUND=maybe
25443    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25444$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25445  fi
25446
25447
25448    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25449    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25450      # Do we have a bin/java?
25451      if test ! -x "$BOOT_JDK/bin/java"; then
25452        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25453$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25454        BOOT_JDK_FOUND=no
25455      else
25456        # Do we have a bin/javac?
25457        if test ! -x "$BOOT_JDK/bin/javac"; then
25458          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25459$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25460          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25461$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25462          BOOT_JDK_FOUND=no
25463        else
25464          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25465          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25466
25467          # Extra M4 quote needed to protect [] in grep expression.
25468          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25469          if test "x$FOUND_CORRECT_VERSION" = x; then
25470            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25471$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25472            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25473$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25474            BOOT_JDK_FOUND=no
25475          else
25476            # We're done! :-)
25477            BOOT_JDK_FOUND=yes
25478
25479  # Only process if variable expands to non-empty
25480
25481  if test "x$BOOT_JDK" != x; then
25482    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25483
25484  # Input might be given as Windows format, start by converting to
25485  # unix format.
25486  path="$BOOT_JDK"
25487  new_path=`$CYGPATH -u "$path"`
25488
25489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25492  # "foo.exe" is OK but "foo" is an error.
25493  #
25494  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25495  # It is also a way to make sure we got the proper file name for the real test later on.
25496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25497  if test "x$test_shortpath" = x; then
25498    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25499$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25500    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25501  fi
25502
25503  # Call helper function which possibly converts this using DOS-style short mode.
25504  # If so, the updated path is stored in $new_path.
25505
25506  input_path="$new_path"
25507  # Check if we need to convert this using DOS-style short mode. If the path
25508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25509  # take no chances and rewrite it.
25510  # Note: m4 eats our [], so we need to use [ and ] instead.
25511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25512  if test "x$has_forbidden_chars" != x; then
25513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25517      # Going to short mode and back again did indeed matter. Since short mode is
25518      # case insensitive, let's make it lowercase to improve readability.
25519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25520      # Now convert it back to Unix-style (cygpath)
25521      input_path=`$CYGPATH -u "$shortmode_path"`
25522      new_path="$input_path"
25523    fi
25524  fi
25525
25526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25527  if test "x$test_cygdrive_prefix" = x; then
25528    # As a simple fix, exclude /usr/bin since it's not a real path.
25529    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25531      # a path prefixed by /cygdrive for fixpath to work.
25532      new_path="$CYGWIN_ROOT_PATH$input_path"
25533    fi
25534  fi
25535
25536
25537  if test "x$path" != "x$new_path"; then
25538    BOOT_JDK="$new_path"
25539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25540$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25541  fi
25542
25543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25544
25545  path="$BOOT_JDK"
25546  has_colon=`$ECHO $path | $GREP ^.:`
25547  new_path="$path"
25548  if test "x$has_colon" = x; then
25549    # Not in mixed or Windows style, start by that.
25550    new_path=`cmd //c echo $path`
25551  fi
25552
25553
25554  input_path="$new_path"
25555  # Check if we need to convert this using DOS-style short mode. If the path
25556  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25557  # take no chances and rewrite it.
25558  # Note: m4 eats our [], so we need to use [ and ] instead.
25559  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25560  if test "x$has_forbidden_chars" != x; then
25561    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25562    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25563  fi
25564
25565
25566  windows_path="$new_path"
25567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25568    unix_path=`$CYGPATH -u "$windows_path"`
25569    new_path="$unix_path"
25570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25572    new_path="$unix_path"
25573  fi
25574
25575  if test "x$path" != "x$new_path"; then
25576    BOOT_JDK="$new_path"
25577    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25578$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25579  fi
25580
25581  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25582  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25583
25584    else
25585      # We're on a unix platform. Hooray! :)
25586      path="$BOOT_JDK"
25587      has_space=`$ECHO "$path" | $GREP " "`
25588      if test "x$has_space" != x; then
25589        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25590$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25591        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25592      fi
25593
25594      # Use eval to expand a potential ~
25595      eval path="$path"
25596      if test ! -f "$path" && test ! -d "$path"; then
25597        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25598      fi
25599
25600      if test -d "$path"; then
25601        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25602      else
25603        dir="`$DIRNAME "$path"`"
25604        base="`$BASENAME "$path"`"
25605        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25606      fi
25607    fi
25608  fi
25609
25610            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25611$as_echo_n "checking for Boot JDK... " >&6; }
25612            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25613$as_echo "$BOOT_JDK" >&6; }
25614            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25615$as_echo_n "checking Boot JDK version... " >&6; }
25616            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25617            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25618$as_echo "$BOOT_JDK_VERSION" >&6; }
25619          fi # end check jdk version
25620        fi # end check javac
25621      fi # end check java
25622    fi # end check boot jdk found
25623  fi
25624
25625
25626  if test "x$BOOT_JDK_FOUND" = xno; then
25627    # Now execute the test
25628
25629  if test -x /usr/libexec/java_home; then
25630    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25631    BOOT_JDK_FOUND=maybe
25632    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25633$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25634  fi
25635
25636
25637    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25638    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25639      # Do we have a bin/java?
25640      if test ! -x "$BOOT_JDK/bin/java"; then
25641        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25642$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25643        BOOT_JDK_FOUND=no
25644      else
25645        # Do we have a bin/javac?
25646        if test ! -x "$BOOT_JDK/bin/javac"; then
25647          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25648$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25649          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25650$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25651          BOOT_JDK_FOUND=no
25652        else
25653          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25654          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25655
25656          # Extra M4 quote needed to protect [] in grep expression.
25657          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25658          if test "x$FOUND_CORRECT_VERSION" = x; then
25659            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25660$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25661            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25662$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25663            BOOT_JDK_FOUND=no
25664          else
25665            # We're done! :-)
25666            BOOT_JDK_FOUND=yes
25667
25668  # Only process if variable expands to non-empty
25669
25670  if test "x$BOOT_JDK" != x; then
25671    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25672
25673  # Input might be given as Windows format, start by converting to
25674  # unix format.
25675  path="$BOOT_JDK"
25676  new_path=`$CYGPATH -u "$path"`
25677
25678  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25679  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25680  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25681  # "foo.exe" is OK but "foo" is an error.
25682  #
25683  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25684  # It is also a way to make sure we got the proper file name for the real test later on.
25685  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25686  if test "x$test_shortpath" = x; then
25687    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25689    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25690  fi
25691
25692  # Call helper function which possibly converts this using DOS-style short mode.
25693  # If so, the updated path is stored in $new_path.
25694
25695  input_path="$new_path"
25696  # Check if we need to convert this using DOS-style short mode. If the path
25697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25698  # take no chances and rewrite it.
25699  # Note: m4 eats our [], so we need to use [ and ] instead.
25700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25701  if test "x$has_forbidden_chars" != x; then
25702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25703    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25704    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25705    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25706      # Going to short mode and back again did indeed matter. Since short mode is
25707      # case insensitive, let's make it lowercase to improve readability.
25708      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25709      # Now convert it back to Unix-style (cygpath)
25710      input_path=`$CYGPATH -u "$shortmode_path"`
25711      new_path="$input_path"
25712    fi
25713  fi
25714
25715  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25716  if test "x$test_cygdrive_prefix" = x; then
25717    # As a simple fix, exclude /usr/bin since it's not a real path.
25718    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25719      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25720      # a path prefixed by /cygdrive for fixpath to work.
25721      new_path="$CYGWIN_ROOT_PATH$input_path"
25722    fi
25723  fi
25724
25725
25726  if test "x$path" != "x$new_path"; then
25727    BOOT_JDK="$new_path"
25728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25729$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25730  fi
25731
25732    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25733
25734  path="$BOOT_JDK"
25735  has_colon=`$ECHO $path | $GREP ^.:`
25736  new_path="$path"
25737  if test "x$has_colon" = x; then
25738    # Not in mixed or Windows style, start by that.
25739    new_path=`cmd //c echo $path`
25740  fi
25741
25742
25743  input_path="$new_path"
25744  # Check if we need to convert this using DOS-style short mode. If the path
25745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25746  # take no chances and rewrite it.
25747  # Note: m4 eats our [], so we need to use [ and ] instead.
25748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25749  if test "x$has_forbidden_chars" != x; then
25750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25752  fi
25753
25754
25755  windows_path="$new_path"
25756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25757    unix_path=`$CYGPATH -u "$windows_path"`
25758    new_path="$unix_path"
25759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25761    new_path="$unix_path"
25762  fi
25763
25764  if test "x$path" != "x$new_path"; then
25765    BOOT_JDK="$new_path"
25766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25767$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25768  fi
25769
25770  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25771  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25772
25773    else
25774      # We're on a unix platform. Hooray! :)
25775      path="$BOOT_JDK"
25776      has_space=`$ECHO "$path" | $GREP " "`
25777      if test "x$has_space" != x; then
25778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25779$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25780        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25781      fi
25782
25783      # Use eval to expand a potential ~
25784      eval path="$path"
25785      if test ! -f "$path" && test ! -d "$path"; then
25786        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25787      fi
25788
25789      if test -d "$path"; then
25790        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25791      else
25792        dir="`$DIRNAME "$path"`"
25793        base="`$BASENAME "$path"`"
25794        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25795      fi
25796    fi
25797  fi
25798
25799            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25800$as_echo_n "checking for Boot JDK... " >&6; }
25801            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25802$as_echo "$BOOT_JDK" >&6; }
25803            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25804$as_echo_n "checking Boot JDK version... " >&6; }
25805            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25806            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25807$as_echo "$BOOT_JDK_VERSION" >&6; }
25808          fi # end check jdk version
25809        fi # end check javac
25810      fi # end check java
25811    fi # end check boot jdk found
25812  fi
25813
25814  fi
25815
25816
25817    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25818    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25819      # Do we have a bin/java?
25820      if test ! -x "$BOOT_JDK/bin/java"; then
25821        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25823        BOOT_JDK_FOUND=no
25824      else
25825        # Do we have a bin/javac?
25826        if test ! -x "$BOOT_JDK/bin/javac"; then
25827          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25829          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25830$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25831          BOOT_JDK_FOUND=no
25832        else
25833          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25834          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25835
25836          # Extra M4 quote needed to protect [] in grep expression.
25837          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25838          if test "x$FOUND_CORRECT_VERSION" = x; then
25839            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25840$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25841            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25842$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25843            BOOT_JDK_FOUND=no
25844          else
25845            # We're done! :-)
25846            BOOT_JDK_FOUND=yes
25847
25848  # Only process if variable expands to non-empty
25849
25850  if test "x$BOOT_JDK" != x; then
25851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25852
25853  # Input might be given as Windows format, start by converting to
25854  # unix format.
25855  path="$BOOT_JDK"
25856  new_path=`$CYGPATH -u "$path"`
25857
25858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25861  # "foo.exe" is OK but "foo" is an error.
25862  #
25863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25864  # It is also a way to make sure we got the proper file name for the real test later on.
25865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25866  if test "x$test_shortpath" = x; then
25867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25868$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25869    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25870  fi
25871
25872  # Call helper function which possibly converts this using DOS-style short mode.
25873  # If so, the updated path is stored in $new_path.
25874
25875  input_path="$new_path"
25876  # Check if we need to convert this using DOS-style short mode. If the path
25877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25878  # take no chances and rewrite it.
25879  # Note: m4 eats our [], so we need to use [ and ] instead.
25880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25881  if test "x$has_forbidden_chars" != x; then
25882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25886      # Going to short mode and back again did indeed matter. Since short mode is
25887      # case insensitive, let's make it lowercase to improve readability.
25888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25889      # Now convert it back to Unix-style (cygpath)
25890      input_path=`$CYGPATH -u "$shortmode_path"`
25891      new_path="$input_path"
25892    fi
25893  fi
25894
25895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25896  if test "x$test_cygdrive_prefix" = x; then
25897    # As a simple fix, exclude /usr/bin since it's not a real path.
25898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25900      # a path prefixed by /cygdrive for fixpath to work.
25901      new_path="$CYGWIN_ROOT_PATH$input_path"
25902    fi
25903  fi
25904
25905
25906  if test "x$path" != "x$new_path"; then
25907    BOOT_JDK="$new_path"
25908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25909$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25910  fi
25911
25912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25913
25914  path="$BOOT_JDK"
25915  has_colon=`$ECHO $path | $GREP ^.:`
25916  new_path="$path"
25917  if test "x$has_colon" = x; then
25918    # Not in mixed or Windows style, start by that.
25919    new_path=`cmd //c echo $path`
25920  fi
25921
25922
25923  input_path="$new_path"
25924  # Check if we need to convert this using DOS-style short mode. If the path
25925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25926  # take no chances and rewrite it.
25927  # Note: m4 eats our [], so we need to use [ and ] instead.
25928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25929  if test "x$has_forbidden_chars" != x; then
25930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25932  fi
25933
25934
25935  windows_path="$new_path"
25936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25937    unix_path=`$CYGPATH -u "$windows_path"`
25938    new_path="$unix_path"
25939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25941    new_path="$unix_path"
25942  fi
25943
25944  if test "x$path" != "x$new_path"; then
25945    BOOT_JDK="$new_path"
25946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25947$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25948  fi
25949
25950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25952
25953    else
25954      # We're on a unix platform. Hooray! :)
25955      path="$BOOT_JDK"
25956      has_space=`$ECHO "$path" | $GREP " "`
25957      if test "x$has_space" != x; then
25958        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25959$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25960        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25961      fi
25962
25963      # Use eval to expand a potential ~
25964      eval path="$path"
25965      if test ! -f "$path" && test ! -d "$path"; then
25966        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25967      fi
25968
25969      if test -d "$path"; then
25970        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25971      else
25972        dir="`$DIRNAME "$path"`"
25973        base="`$BASENAME "$path"`"
25974        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25975      fi
25976    fi
25977  fi
25978
25979            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25980$as_echo_n "checking for Boot JDK... " >&6; }
25981            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25982$as_echo "$BOOT_JDK" >&6; }
25983            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25984$as_echo_n "checking Boot JDK version... " >&6; }
25985            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25986            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25987$as_echo "$BOOT_JDK_VERSION" >&6; }
25988          fi # end check jdk version
25989        fi # end check javac
25990      fi # end check java
25991    fi # end check boot jdk found
25992  fi
25993
25994
25995  # Test: Is $JAVA_HOME set?
25996
25997  if test "x$BOOT_JDK_FOUND" = xno; then
25998    # Now execute the test
25999
26000  if test "x$JAVA_HOME" != x; then
26001    JAVA_HOME_PROCESSED="$JAVA_HOME"
26002
26003  # Only process if variable expands to non-empty
26004
26005  if test "x$JAVA_HOME_PROCESSED" != x; then
26006    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26007
26008  # Input might be given as Windows format, start by converting to
26009  # unix format.
26010  path="$JAVA_HOME_PROCESSED"
26011  new_path=`$CYGPATH -u "$path"`
26012
26013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26016  # "foo.exe" is OK but "foo" is an error.
26017  #
26018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26019  # It is also a way to make sure we got the proper file name for the real test later on.
26020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26021  if test "x$test_shortpath" = x; then
26022    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26023$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26024    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26025  fi
26026
26027  # Call helper function which possibly converts this using DOS-style short mode.
26028  # If so, the updated path is stored in $new_path.
26029
26030  input_path="$new_path"
26031  # Check if we need to convert this using DOS-style short mode. If the path
26032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26033  # take no chances and rewrite it.
26034  # Note: m4 eats our [], so we need to use [ and ] instead.
26035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26036  if test "x$has_forbidden_chars" != x; then
26037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26041      # Going to short mode and back again did indeed matter. Since short mode is
26042      # case insensitive, let's make it lowercase to improve readability.
26043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26044      # Now convert it back to Unix-style (cygpath)
26045      input_path=`$CYGPATH -u "$shortmode_path"`
26046      new_path="$input_path"
26047    fi
26048  fi
26049
26050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26051  if test "x$test_cygdrive_prefix" = x; then
26052    # As a simple fix, exclude /usr/bin since it's not a real path.
26053    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26055      # a path prefixed by /cygdrive for fixpath to work.
26056      new_path="$CYGWIN_ROOT_PATH$input_path"
26057    fi
26058  fi
26059
26060
26061  if test "x$path" != "x$new_path"; then
26062    JAVA_HOME_PROCESSED="$new_path"
26063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26064$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26065  fi
26066
26067    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26068
26069  path="$JAVA_HOME_PROCESSED"
26070  has_colon=`$ECHO $path | $GREP ^.:`
26071  new_path="$path"
26072  if test "x$has_colon" = x; then
26073    # Not in mixed or Windows style, start by that.
26074    new_path=`cmd //c echo $path`
26075  fi
26076
26077
26078  input_path="$new_path"
26079  # Check if we need to convert this using DOS-style short mode. If the path
26080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26081  # take no chances and rewrite it.
26082  # Note: m4 eats our [], so we need to use [ and ] instead.
26083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26084  if test "x$has_forbidden_chars" != x; then
26085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26087  fi
26088
26089
26090  windows_path="$new_path"
26091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26092    unix_path=`$CYGPATH -u "$windows_path"`
26093    new_path="$unix_path"
26094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26096    new_path="$unix_path"
26097  fi
26098
26099  if test "x$path" != "x$new_path"; then
26100    JAVA_HOME_PROCESSED="$new_path"
26101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26102$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26103  fi
26104
26105  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26106  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26107
26108    else
26109      # We're on a unix platform. Hooray! :)
26110      path="$JAVA_HOME_PROCESSED"
26111      has_space=`$ECHO "$path" | $GREP " "`
26112      if test "x$has_space" != x; then
26113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26114$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26115        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26116      fi
26117
26118      # Use eval to expand a potential ~
26119      eval path="$path"
26120      if test ! -f "$path" && test ! -d "$path"; then
26121        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26122      fi
26123
26124      if test -d "$path"; then
26125        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26126      else
26127        dir="`$DIRNAME "$path"`"
26128        base="`$BASENAME "$path"`"
26129        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26130      fi
26131    fi
26132  fi
26133
26134    if test ! -d "$JAVA_HOME_PROCESSED"; then
26135      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26136$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26137    else
26138      # Aha, the user has set a JAVA_HOME
26139      # let us use that as the Boot JDK.
26140      BOOT_JDK="$JAVA_HOME_PROCESSED"
26141      BOOT_JDK_FOUND=maybe
26142      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26143$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26144    fi
26145  fi
26146
26147
26148    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26149    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26150      # Do we have a bin/java?
26151      if test ! -x "$BOOT_JDK/bin/java"; then
26152        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26154        BOOT_JDK_FOUND=no
26155      else
26156        # Do we have a bin/javac?
26157        if test ! -x "$BOOT_JDK/bin/javac"; then
26158          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26159$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26160          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26161$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26162          BOOT_JDK_FOUND=no
26163        else
26164          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26165          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26166
26167          # Extra M4 quote needed to protect [] in grep expression.
26168          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26169          if test "x$FOUND_CORRECT_VERSION" = x; then
26170            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26172            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26173$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26174            BOOT_JDK_FOUND=no
26175          else
26176            # We're done! :-)
26177            BOOT_JDK_FOUND=yes
26178
26179  # Only process if variable expands to non-empty
26180
26181  if test "x$BOOT_JDK" != x; then
26182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26183
26184  # Input might be given as Windows format, start by converting to
26185  # unix format.
26186  path="$BOOT_JDK"
26187  new_path=`$CYGPATH -u "$path"`
26188
26189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26192  # "foo.exe" is OK but "foo" is an error.
26193  #
26194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26195  # It is also a way to make sure we got the proper file name for the real test later on.
26196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26197  if test "x$test_shortpath" = x; then
26198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26199$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26200    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26201  fi
26202
26203  # Call helper function which possibly converts this using DOS-style short mode.
26204  # If so, the updated path is stored in $new_path.
26205
26206  input_path="$new_path"
26207  # Check if we need to convert this using DOS-style short mode. If the path
26208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26209  # take no chances and rewrite it.
26210  # Note: m4 eats our [], so we need to use [ and ] instead.
26211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26212  if test "x$has_forbidden_chars" != x; then
26213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26217      # Going to short mode and back again did indeed matter. Since short mode is
26218      # case insensitive, let's make it lowercase to improve readability.
26219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26220      # Now convert it back to Unix-style (cygpath)
26221      input_path=`$CYGPATH -u "$shortmode_path"`
26222      new_path="$input_path"
26223    fi
26224  fi
26225
26226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26227  if test "x$test_cygdrive_prefix" = x; then
26228    # As a simple fix, exclude /usr/bin since it's not a real path.
26229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26231      # a path prefixed by /cygdrive for fixpath to work.
26232      new_path="$CYGWIN_ROOT_PATH$input_path"
26233    fi
26234  fi
26235
26236
26237  if test "x$path" != "x$new_path"; then
26238    BOOT_JDK="$new_path"
26239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26240$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26241  fi
26242
26243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26244
26245  path="$BOOT_JDK"
26246  has_colon=`$ECHO $path | $GREP ^.:`
26247  new_path="$path"
26248  if test "x$has_colon" = x; then
26249    # Not in mixed or Windows style, start by that.
26250    new_path=`cmd //c echo $path`
26251  fi
26252
26253
26254  input_path="$new_path"
26255  # Check if we need to convert this using DOS-style short mode. If the path
26256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26257  # take no chances and rewrite it.
26258  # Note: m4 eats our [], so we need to use [ and ] instead.
26259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26260  if test "x$has_forbidden_chars" != x; then
26261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26263  fi
26264
26265
26266  windows_path="$new_path"
26267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26268    unix_path=`$CYGPATH -u "$windows_path"`
26269    new_path="$unix_path"
26270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26272    new_path="$unix_path"
26273  fi
26274
26275  if test "x$path" != "x$new_path"; then
26276    BOOT_JDK="$new_path"
26277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26278$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26279  fi
26280
26281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26283
26284    else
26285      # We're on a unix platform. Hooray! :)
26286      path="$BOOT_JDK"
26287      has_space=`$ECHO "$path" | $GREP " "`
26288      if test "x$has_space" != x; then
26289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26290$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26291        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26292      fi
26293
26294      # Use eval to expand a potential ~
26295      eval path="$path"
26296      if test ! -f "$path" && test ! -d "$path"; then
26297        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26298      fi
26299
26300      if test -d "$path"; then
26301        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26302      else
26303        dir="`$DIRNAME "$path"`"
26304        base="`$BASENAME "$path"`"
26305        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26306      fi
26307    fi
26308  fi
26309
26310            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26311$as_echo_n "checking for Boot JDK... " >&6; }
26312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26313$as_echo "$BOOT_JDK" >&6; }
26314            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26315$as_echo_n "checking Boot JDK version... " >&6; }
26316            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26318$as_echo "$BOOT_JDK_VERSION" >&6; }
26319          fi # end check jdk version
26320        fi # end check javac
26321      fi # end check java
26322    fi # end check boot jdk found
26323  fi
26324
26325
26326  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26327
26328  if test "x$BOOT_JDK_FOUND" = xno; then
26329    # Now execute the test
26330
26331  # Extract the first word of "javac", so it can be a program name with args.
26332set dummy javac; ac_word=$2
26333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26334$as_echo_n "checking for $ac_word... " >&6; }
26335if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26336  $as_echo_n "(cached) " >&6
26337else
26338  case $JAVAC_CHECK in
26339  [\\/]* | ?:[\\/]*)
26340  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26341  ;;
26342  *)
26343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26344for as_dir in $PATH
26345do
26346  IFS=$as_save_IFS
26347  test -z "$as_dir" && as_dir=.
26348    for ac_exec_ext in '' $ac_executable_extensions; do
26349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26350    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26352    break 2
26353  fi
26354done
26355  done
26356IFS=$as_save_IFS
26357
26358  ;;
26359esac
26360fi
26361JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26362if test -n "$JAVAC_CHECK"; then
26363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26364$as_echo "$JAVAC_CHECK" >&6; }
26365else
26366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26367$as_echo "no" >&6; }
26368fi
26369
26370
26371  # Extract the first word of "java", so it can be a program name with args.
26372set dummy java; ac_word=$2
26373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26374$as_echo_n "checking for $ac_word... " >&6; }
26375if ${ac_cv_path_JAVA_CHECK+:} false; then :
26376  $as_echo_n "(cached) " >&6
26377else
26378  case $JAVA_CHECK in
26379  [\\/]* | ?:[\\/]*)
26380  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26381  ;;
26382  *)
26383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26384for as_dir in $PATH
26385do
26386  IFS=$as_save_IFS
26387  test -z "$as_dir" && as_dir=.
26388    for ac_exec_ext in '' $ac_executable_extensions; do
26389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26390    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26392    break 2
26393  fi
26394done
26395  done
26396IFS=$as_save_IFS
26397
26398  ;;
26399esac
26400fi
26401JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26402if test -n "$JAVA_CHECK"; then
26403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26404$as_echo "$JAVA_CHECK" >&6; }
26405else
26406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26407$as_echo "no" >&6; }
26408fi
26409
26410
26411  BINARY="$JAVAC_CHECK"
26412  if test "x$JAVAC_CHECK" = x; then
26413    BINARY="$JAVA_CHECK"
26414  fi
26415  if test "x$BINARY" != x; then
26416    # So there is a java(c) binary, it might be part of a JDK.
26417    # Lets find the JDK/JRE directory by following symbolic links.
26418    # Linux/GNU systems often have links from /usr/bin/java to
26419    # /etc/alternatives/java to the real JDK binary.
26420
26421  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26422    # Follow a chain of symbolic links. Use readlink
26423    # where it exists, else fall back to horribly
26424    # complicated shell code.
26425    if test "x$READLINK_TESTED" != yes; then
26426      # On MacOSX there is a readlink tool with a different
26427      # purpose than the GNU readlink tool. Check the found readlink.
26428      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26429      if test "x$ISGNU" = x; then
26430        # A readlink that we do not know how to use.
26431        # Are there other non-GNU readlinks out there?
26432        READLINK_TESTED=yes
26433        READLINK=
26434      fi
26435    fi
26436
26437    if test "x$READLINK" != x; then
26438      BINARY=`$READLINK -f $BINARY`
26439    else
26440      # Save the current directory for restoring afterwards
26441      STARTDIR=$PWD
26442      COUNTER=0
26443      sym_link_dir=`$DIRNAME $BINARY`
26444      sym_link_file=`$BASENAME $BINARY`
26445      cd $sym_link_dir
26446      # Use -P flag to resolve symlinks in directories.
26447      cd `$THEPWDCMD -P`
26448      sym_link_dir=`$THEPWDCMD -P`
26449      # Resolve file symlinks
26450      while test $COUNTER -lt 20; do
26451        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26452        if test "x$ISLINK" == x; then
26453          # This is not a symbolic link! We are done!
26454          break
26455        fi
26456        # Again resolve directory symlinks since the target of the just found
26457        # link could be in a different directory
26458        cd `$DIRNAME $ISLINK`
26459        sym_link_dir=`$THEPWDCMD -P`
26460        sym_link_file=`$BASENAME $ISLINK`
26461        let COUNTER=COUNTER+1
26462      done
26463      cd $STARTDIR
26464      BINARY=$sym_link_dir/$sym_link_file
26465    fi
26466  fi
26467
26468    BOOT_JDK=`dirname "$BINARY"`
26469    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26470    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26471      # Looks like we found ourselves an JDK
26472      BOOT_JDK_FOUND=maybe
26473      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26474$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26475    fi
26476  fi
26477
26478
26479    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26480    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26481      # Do we have a bin/java?
26482      if test ! -x "$BOOT_JDK/bin/java"; then
26483        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26485        BOOT_JDK_FOUND=no
26486      else
26487        # Do we have a bin/javac?
26488        if test ! -x "$BOOT_JDK/bin/javac"; then
26489          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26491          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26492$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26493          BOOT_JDK_FOUND=no
26494        else
26495          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26496          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26497
26498          # Extra M4 quote needed to protect [] in grep expression.
26499          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26500          if test "x$FOUND_CORRECT_VERSION" = x; then
26501            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26503            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26504$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26505            BOOT_JDK_FOUND=no
26506          else
26507            # We're done! :-)
26508            BOOT_JDK_FOUND=yes
26509
26510  # Only process if variable expands to non-empty
26511
26512  if test "x$BOOT_JDK" != x; then
26513    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26514
26515  # Input might be given as Windows format, start by converting to
26516  # unix format.
26517  path="$BOOT_JDK"
26518  new_path=`$CYGPATH -u "$path"`
26519
26520  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26521  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26522  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26523  # "foo.exe" is OK but "foo" is an error.
26524  #
26525  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26526  # It is also a way to make sure we got the proper file name for the real test later on.
26527  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26528  if test "x$test_shortpath" = x; then
26529    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26530$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26531    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26532  fi
26533
26534  # Call helper function which possibly converts this using DOS-style short mode.
26535  # If so, the updated path is stored in $new_path.
26536
26537  input_path="$new_path"
26538  # Check if we need to convert this using DOS-style short mode. If the path
26539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26540  # take no chances and rewrite it.
26541  # Note: m4 eats our [], so we need to use [ and ] instead.
26542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26543  if test "x$has_forbidden_chars" != x; then
26544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26545    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26546    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26547    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26548      # Going to short mode and back again did indeed matter. Since short mode is
26549      # case insensitive, let's make it lowercase to improve readability.
26550      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26551      # Now convert it back to Unix-style (cygpath)
26552      input_path=`$CYGPATH -u "$shortmode_path"`
26553      new_path="$input_path"
26554    fi
26555  fi
26556
26557  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26558  if test "x$test_cygdrive_prefix" = x; then
26559    # As a simple fix, exclude /usr/bin since it's not a real path.
26560    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26561      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26562      # a path prefixed by /cygdrive for fixpath to work.
26563      new_path="$CYGWIN_ROOT_PATH$input_path"
26564    fi
26565  fi
26566
26567
26568  if test "x$path" != "x$new_path"; then
26569    BOOT_JDK="$new_path"
26570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26571$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26572  fi
26573
26574    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26575
26576  path="$BOOT_JDK"
26577  has_colon=`$ECHO $path | $GREP ^.:`
26578  new_path="$path"
26579  if test "x$has_colon" = x; then
26580    # Not in mixed or Windows style, start by that.
26581    new_path=`cmd //c echo $path`
26582  fi
26583
26584
26585  input_path="$new_path"
26586  # Check if we need to convert this using DOS-style short mode. If the path
26587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26588  # take no chances and rewrite it.
26589  # Note: m4 eats our [], so we need to use [ and ] instead.
26590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26591  if test "x$has_forbidden_chars" != x; then
26592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26593    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26594  fi
26595
26596
26597  windows_path="$new_path"
26598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26599    unix_path=`$CYGPATH -u "$windows_path"`
26600    new_path="$unix_path"
26601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26603    new_path="$unix_path"
26604  fi
26605
26606  if test "x$path" != "x$new_path"; then
26607    BOOT_JDK="$new_path"
26608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26610  fi
26611
26612  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26613  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26614
26615    else
26616      # We're on a unix platform. Hooray! :)
26617      path="$BOOT_JDK"
26618      has_space=`$ECHO "$path" | $GREP " "`
26619      if test "x$has_space" != x; then
26620        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26621$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26622        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26623      fi
26624
26625      # Use eval to expand a potential ~
26626      eval path="$path"
26627      if test ! -f "$path" && test ! -d "$path"; then
26628        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26629      fi
26630
26631      if test -d "$path"; then
26632        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26633      else
26634        dir="`$DIRNAME "$path"`"
26635        base="`$BASENAME "$path"`"
26636        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26637      fi
26638    fi
26639  fi
26640
26641            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26642$as_echo_n "checking for Boot JDK... " >&6; }
26643            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26644$as_echo "$BOOT_JDK" >&6; }
26645            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26646$as_echo_n "checking Boot JDK version... " >&6; }
26647            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26648            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26649$as_echo "$BOOT_JDK_VERSION" >&6; }
26650          fi # end check jdk version
26651        fi # end check javac
26652      fi # end check java
26653    fi # end check boot jdk found
26654  fi
26655
26656
26657  # Test: Is there a JDK installed in default, well-known locations?
26658
26659  if test "x$BOOT_JDK_FOUND" = xno; then
26660    # Now execute the test
26661
26662  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26663
26664  if test "x$BOOT_JDK_FOUND" = xno; then
26665    # Now execute the test
26666
26667  if test "x$ProgramW6432" != x; then
26668    VIRTUAL_DIR="$ProgramW6432/Java"
26669
26670  windows_path="$VIRTUAL_DIR"
26671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26672    unix_path=`$CYGPATH -u "$windows_path"`
26673    VIRTUAL_DIR="$unix_path"
26674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26676    VIRTUAL_DIR="$unix_path"
26677  fi
26678
26679
26680  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26681  BOOT_JDK_SUFFIX=""
26682  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26683  if test "x$ALL_JDKS_FOUND" != x; then
26684    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26685
26686  if test "x$BOOT_JDK_FOUND" = xno; then
26687    # Now execute the test
26688
26689        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26690        if test -d "$BOOT_JDK"; then
26691          BOOT_JDK_FOUND=maybe
26692          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26693$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26694        fi
26695
26696
26697    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26698    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26699      # Do we have a bin/java?
26700      if test ! -x "$BOOT_JDK/bin/java"; then
26701        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26702$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26703        BOOT_JDK_FOUND=no
26704      else
26705        # Do we have a bin/javac?
26706        if test ! -x "$BOOT_JDK/bin/javac"; then
26707          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26709          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26710$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26711          BOOT_JDK_FOUND=no
26712        else
26713          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26714          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26715
26716          # Extra M4 quote needed to protect [] in grep expression.
26717          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26718          if test "x$FOUND_CORRECT_VERSION" = x; then
26719            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26721            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26722$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26723            BOOT_JDK_FOUND=no
26724          else
26725            # We're done! :-)
26726            BOOT_JDK_FOUND=yes
26727
26728  # Only process if variable expands to non-empty
26729
26730  if test "x$BOOT_JDK" != x; then
26731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26732
26733  # Input might be given as Windows format, start by converting to
26734  # unix format.
26735  path="$BOOT_JDK"
26736  new_path=`$CYGPATH -u "$path"`
26737
26738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26741  # "foo.exe" is OK but "foo" is an error.
26742  #
26743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26744  # It is also a way to make sure we got the proper file name for the real test later on.
26745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26746  if test "x$test_shortpath" = x; then
26747    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26749    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26750  fi
26751
26752  # Call helper function which possibly converts this using DOS-style short mode.
26753  # If so, the updated path is stored in $new_path.
26754
26755  input_path="$new_path"
26756  # Check if we need to convert this using DOS-style short mode. If the path
26757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26758  # take no chances and rewrite it.
26759  # Note: m4 eats our [], so we need to use [ and ] instead.
26760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26761  if test "x$has_forbidden_chars" != x; then
26762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26766      # Going to short mode and back again did indeed matter. Since short mode is
26767      # case insensitive, let's make it lowercase to improve readability.
26768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26769      # Now convert it back to Unix-style (cygpath)
26770      input_path=`$CYGPATH -u "$shortmode_path"`
26771      new_path="$input_path"
26772    fi
26773  fi
26774
26775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26776  if test "x$test_cygdrive_prefix" = x; then
26777    # As a simple fix, exclude /usr/bin since it's not a real path.
26778    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26780      # a path prefixed by /cygdrive for fixpath to work.
26781      new_path="$CYGWIN_ROOT_PATH$input_path"
26782    fi
26783  fi
26784
26785
26786  if test "x$path" != "x$new_path"; then
26787    BOOT_JDK="$new_path"
26788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26789$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26790  fi
26791
26792    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26793
26794  path="$BOOT_JDK"
26795  has_colon=`$ECHO $path | $GREP ^.:`
26796  new_path="$path"
26797  if test "x$has_colon" = x; then
26798    # Not in mixed or Windows style, start by that.
26799    new_path=`cmd //c echo $path`
26800  fi
26801
26802
26803  input_path="$new_path"
26804  # Check if we need to convert this using DOS-style short mode. If the path
26805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26806  # take no chances and rewrite it.
26807  # Note: m4 eats our [], so we need to use [ and ] instead.
26808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26809  if test "x$has_forbidden_chars" != x; then
26810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26812  fi
26813
26814
26815  windows_path="$new_path"
26816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26817    unix_path=`$CYGPATH -u "$windows_path"`
26818    new_path="$unix_path"
26819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26821    new_path="$unix_path"
26822  fi
26823
26824  if test "x$path" != "x$new_path"; then
26825    BOOT_JDK="$new_path"
26826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26827$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26828  fi
26829
26830  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26831  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26832
26833    else
26834      # We're on a unix platform. Hooray! :)
26835      path="$BOOT_JDK"
26836      has_space=`$ECHO "$path" | $GREP " "`
26837      if test "x$has_space" != x; then
26838        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26839$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26840        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26841      fi
26842
26843      # Use eval to expand a potential ~
26844      eval path="$path"
26845      if test ! -f "$path" && test ! -d "$path"; then
26846        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26847      fi
26848
26849      if test -d "$path"; then
26850        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26851      else
26852        dir="`$DIRNAME "$path"`"
26853        base="`$BASENAME "$path"`"
26854        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26855      fi
26856    fi
26857  fi
26858
26859            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26860$as_echo_n "checking for Boot JDK... " >&6; }
26861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26862$as_echo "$BOOT_JDK" >&6; }
26863            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26864$as_echo_n "checking Boot JDK version... " >&6; }
26865            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26866            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26867$as_echo "$BOOT_JDK_VERSION" >&6; }
26868          fi # end check jdk version
26869        fi # end check javac
26870      fi # end check java
26871    fi # end check boot jdk found
26872  fi
26873
26874    done
26875  fi
26876
26877  fi
26878
26879
26880    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26881    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26882      # Do we have a bin/java?
26883      if test ! -x "$BOOT_JDK/bin/java"; then
26884        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26886        BOOT_JDK_FOUND=no
26887      else
26888        # Do we have a bin/javac?
26889        if test ! -x "$BOOT_JDK/bin/javac"; then
26890          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26891$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26892          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26893$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26894          BOOT_JDK_FOUND=no
26895        else
26896          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26897          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26898
26899          # Extra M4 quote needed to protect [] in grep expression.
26900          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26901          if test "x$FOUND_CORRECT_VERSION" = x; then
26902            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26904            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26905$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26906            BOOT_JDK_FOUND=no
26907          else
26908            # We're done! :-)
26909            BOOT_JDK_FOUND=yes
26910
26911  # Only process if variable expands to non-empty
26912
26913  if test "x$BOOT_JDK" != x; then
26914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26915
26916  # Input might be given as Windows format, start by converting to
26917  # unix format.
26918  path="$BOOT_JDK"
26919  new_path=`$CYGPATH -u "$path"`
26920
26921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26924  # "foo.exe" is OK but "foo" is an error.
26925  #
26926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26927  # It is also a way to make sure we got the proper file name for the real test later on.
26928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26929  if test "x$test_shortpath" = x; then
26930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26931$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26932    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26933  fi
26934
26935  # Call helper function which possibly converts this using DOS-style short mode.
26936  # If so, the updated path is stored in $new_path.
26937
26938  input_path="$new_path"
26939  # Check if we need to convert this using DOS-style short mode. If the path
26940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26941  # take no chances and rewrite it.
26942  # Note: m4 eats our [], so we need to use [ and ] instead.
26943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26944  if test "x$has_forbidden_chars" != x; then
26945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26949      # Going to short mode and back again did indeed matter. Since short mode is
26950      # case insensitive, let's make it lowercase to improve readability.
26951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26952      # Now convert it back to Unix-style (cygpath)
26953      input_path=`$CYGPATH -u "$shortmode_path"`
26954      new_path="$input_path"
26955    fi
26956  fi
26957
26958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26959  if test "x$test_cygdrive_prefix" = x; then
26960    # As a simple fix, exclude /usr/bin since it's not a real path.
26961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26963      # a path prefixed by /cygdrive for fixpath to work.
26964      new_path="$CYGWIN_ROOT_PATH$input_path"
26965    fi
26966  fi
26967
26968
26969  if test "x$path" != "x$new_path"; then
26970    BOOT_JDK="$new_path"
26971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26972$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26973  fi
26974
26975    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26976
26977  path="$BOOT_JDK"
26978  has_colon=`$ECHO $path | $GREP ^.:`
26979  new_path="$path"
26980  if test "x$has_colon" = x; then
26981    # Not in mixed or Windows style, start by that.
26982    new_path=`cmd //c echo $path`
26983  fi
26984
26985
26986  input_path="$new_path"
26987  # Check if we need to convert this using DOS-style short mode. If the path
26988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26989  # take no chances and rewrite it.
26990  # Note: m4 eats our [], so we need to use [ and ] instead.
26991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26992  if test "x$has_forbidden_chars" != x; then
26993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26995  fi
26996
26997
26998  windows_path="$new_path"
26999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27000    unix_path=`$CYGPATH -u "$windows_path"`
27001    new_path="$unix_path"
27002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27004    new_path="$unix_path"
27005  fi
27006
27007  if test "x$path" != "x$new_path"; then
27008    BOOT_JDK="$new_path"
27009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27010$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27011  fi
27012
27013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27015
27016    else
27017      # We're on a unix platform. Hooray! :)
27018      path="$BOOT_JDK"
27019      has_space=`$ECHO "$path" | $GREP " "`
27020      if test "x$has_space" != x; then
27021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27022$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27023        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27024      fi
27025
27026      # Use eval to expand a potential ~
27027      eval path="$path"
27028      if test ! -f "$path" && test ! -d "$path"; then
27029        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27030      fi
27031
27032      if test -d "$path"; then
27033        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27034      else
27035        dir="`$DIRNAME "$path"`"
27036        base="`$BASENAME "$path"`"
27037        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27038      fi
27039    fi
27040  fi
27041
27042            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27043$as_echo_n "checking for Boot JDK... " >&6; }
27044            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27045$as_echo "$BOOT_JDK" >&6; }
27046            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27047$as_echo_n "checking Boot JDK version... " >&6; }
27048            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27050$as_echo "$BOOT_JDK_VERSION" >&6; }
27051          fi # end check jdk version
27052        fi # end check javac
27053      fi # end check java
27054    fi # end check boot jdk found
27055  fi
27056
27057
27058  if test "x$BOOT_JDK_FOUND" = xno; then
27059    # Now execute the test
27060
27061  if test "x$PROGRAMW6432" != x; then
27062    VIRTUAL_DIR="$PROGRAMW6432/Java"
27063
27064  windows_path="$VIRTUAL_DIR"
27065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27066    unix_path=`$CYGPATH -u "$windows_path"`
27067    VIRTUAL_DIR="$unix_path"
27068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27070    VIRTUAL_DIR="$unix_path"
27071  fi
27072
27073
27074  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27075  BOOT_JDK_SUFFIX=""
27076  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27077  if test "x$ALL_JDKS_FOUND" != x; then
27078    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27079
27080  if test "x$BOOT_JDK_FOUND" = xno; then
27081    # Now execute the test
27082
27083        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27084        if test -d "$BOOT_JDK"; then
27085          BOOT_JDK_FOUND=maybe
27086          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27087$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27088        fi
27089
27090
27091    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27092    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27093      # Do we have a bin/java?
27094      if test ! -x "$BOOT_JDK/bin/java"; then
27095        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27097        BOOT_JDK_FOUND=no
27098      else
27099        # Do we have a bin/javac?
27100        if test ! -x "$BOOT_JDK/bin/javac"; then
27101          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27102$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27103          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27104$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27105          BOOT_JDK_FOUND=no
27106        else
27107          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27108          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27109
27110          # Extra M4 quote needed to protect [] in grep expression.
27111          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27112          if test "x$FOUND_CORRECT_VERSION" = x; then
27113            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27115            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27116$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27117            BOOT_JDK_FOUND=no
27118          else
27119            # We're done! :-)
27120            BOOT_JDK_FOUND=yes
27121
27122  # Only process if variable expands to non-empty
27123
27124  if test "x$BOOT_JDK" != x; then
27125    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27126
27127  # Input might be given as Windows format, start by converting to
27128  # unix format.
27129  path="$BOOT_JDK"
27130  new_path=`$CYGPATH -u "$path"`
27131
27132  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27133  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27134  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27135  # "foo.exe" is OK but "foo" is an error.
27136  #
27137  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27138  # It is also a way to make sure we got the proper file name for the real test later on.
27139  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27140  if test "x$test_shortpath" = x; then
27141    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27142$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27143    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27144  fi
27145
27146  # Call helper function which possibly converts this using DOS-style short mode.
27147  # If so, the updated path is stored in $new_path.
27148
27149  input_path="$new_path"
27150  # Check if we need to convert this using DOS-style short mode. If the path
27151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27152  # take no chances and rewrite it.
27153  # Note: m4 eats our [], so we need to use [ and ] instead.
27154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27155  if test "x$has_forbidden_chars" != x; then
27156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27160      # Going to short mode and back again did indeed matter. Since short mode is
27161      # case insensitive, let's make it lowercase to improve readability.
27162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27163      # Now convert it back to Unix-style (cygpath)
27164      input_path=`$CYGPATH -u "$shortmode_path"`
27165      new_path="$input_path"
27166    fi
27167  fi
27168
27169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27170  if test "x$test_cygdrive_prefix" = x; then
27171    # As a simple fix, exclude /usr/bin since it's not a real path.
27172    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27174      # a path prefixed by /cygdrive for fixpath to work.
27175      new_path="$CYGWIN_ROOT_PATH$input_path"
27176    fi
27177  fi
27178
27179
27180  if test "x$path" != "x$new_path"; then
27181    BOOT_JDK="$new_path"
27182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27183$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27184  fi
27185
27186    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27187
27188  path="$BOOT_JDK"
27189  has_colon=`$ECHO $path | $GREP ^.:`
27190  new_path="$path"
27191  if test "x$has_colon" = x; then
27192    # Not in mixed or Windows style, start by that.
27193    new_path=`cmd //c echo $path`
27194  fi
27195
27196
27197  input_path="$new_path"
27198  # Check if we need to convert this using DOS-style short mode. If the path
27199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27200  # take no chances and rewrite it.
27201  # Note: m4 eats our [], so we need to use [ and ] instead.
27202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27203  if test "x$has_forbidden_chars" != x; then
27204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27206  fi
27207
27208
27209  windows_path="$new_path"
27210  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27211    unix_path=`$CYGPATH -u "$windows_path"`
27212    new_path="$unix_path"
27213  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27214    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27215    new_path="$unix_path"
27216  fi
27217
27218  if test "x$path" != "x$new_path"; then
27219    BOOT_JDK="$new_path"
27220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27221$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27222  fi
27223
27224  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27225  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27226
27227    else
27228      # We're on a unix platform. Hooray! :)
27229      path="$BOOT_JDK"
27230      has_space=`$ECHO "$path" | $GREP " "`
27231      if test "x$has_space" != x; then
27232        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27233$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27234        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27235      fi
27236
27237      # Use eval to expand a potential ~
27238      eval path="$path"
27239      if test ! -f "$path" && test ! -d "$path"; then
27240        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27241      fi
27242
27243      if test -d "$path"; then
27244        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27245      else
27246        dir="`$DIRNAME "$path"`"
27247        base="`$BASENAME "$path"`"
27248        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27249      fi
27250    fi
27251  fi
27252
27253            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27254$as_echo_n "checking for Boot JDK... " >&6; }
27255            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27256$as_echo "$BOOT_JDK" >&6; }
27257            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27258$as_echo_n "checking Boot JDK version... " >&6; }
27259            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27260            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27261$as_echo "$BOOT_JDK_VERSION" >&6; }
27262          fi # end check jdk version
27263        fi # end check javac
27264      fi # end check java
27265    fi # end check boot jdk found
27266  fi
27267
27268    done
27269  fi
27270
27271  fi
27272
27273
27274    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27275    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27276      # Do we have a bin/java?
27277      if test ! -x "$BOOT_JDK/bin/java"; then
27278        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27280        BOOT_JDK_FOUND=no
27281      else
27282        # Do we have a bin/javac?
27283        if test ! -x "$BOOT_JDK/bin/javac"; then
27284          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27286          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27287$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27288          BOOT_JDK_FOUND=no
27289        else
27290          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27291          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27292
27293          # Extra M4 quote needed to protect [] in grep expression.
27294          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27295          if test "x$FOUND_CORRECT_VERSION" = x; then
27296            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27298            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27299$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27300            BOOT_JDK_FOUND=no
27301          else
27302            # We're done! :-)
27303            BOOT_JDK_FOUND=yes
27304
27305  # Only process if variable expands to non-empty
27306
27307  if test "x$BOOT_JDK" != x; then
27308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27309
27310  # Input might be given as Windows format, start by converting to
27311  # unix format.
27312  path="$BOOT_JDK"
27313  new_path=`$CYGPATH -u "$path"`
27314
27315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27318  # "foo.exe" is OK but "foo" is an error.
27319  #
27320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27321  # It is also a way to make sure we got the proper file name for the real test later on.
27322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27323  if test "x$test_shortpath" = x; then
27324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27325$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27326    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27327  fi
27328
27329  # Call helper function which possibly converts this using DOS-style short mode.
27330  # If so, the updated path is stored in $new_path.
27331
27332  input_path="$new_path"
27333  # Check if we need to convert this using DOS-style short mode. If the path
27334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27335  # take no chances and rewrite it.
27336  # Note: m4 eats our [], so we need to use [ and ] instead.
27337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27338  if test "x$has_forbidden_chars" != x; then
27339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27343      # Going to short mode and back again did indeed matter. Since short mode is
27344      # case insensitive, let's make it lowercase to improve readability.
27345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27346      # Now convert it back to Unix-style (cygpath)
27347      input_path=`$CYGPATH -u "$shortmode_path"`
27348      new_path="$input_path"
27349    fi
27350  fi
27351
27352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27353  if test "x$test_cygdrive_prefix" = x; then
27354    # As a simple fix, exclude /usr/bin since it's not a real path.
27355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27357      # a path prefixed by /cygdrive for fixpath to work.
27358      new_path="$CYGWIN_ROOT_PATH$input_path"
27359    fi
27360  fi
27361
27362
27363  if test "x$path" != "x$new_path"; then
27364    BOOT_JDK="$new_path"
27365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27366$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27367  fi
27368
27369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27370
27371  path="$BOOT_JDK"
27372  has_colon=`$ECHO $path | $GREP ^.:`
27373  new_path="$path"
27374  if test "x$has_colon" = x; then
27375    # Not in mixed or Windows style, start by that.
27376    new_path=`cmd //c echo $path`
27377  fi
27378
27379
27380  input_path="$new_path"
27381  # Check if we need to convert this using DOS-style short mode. If the path
27382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27383  # take no chances and rewrite it.
27384  # Note: m4 eats our [], so we need to use [ and ] instead.
27385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27386  if test "x$has_forbidden_chars" != x; then
27387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27389  fi
27390
27391
27392  windows_path="$new_path"
27393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27394    unix_path=`$CYGPATH -u "$windows_path"`
27395    new_path="$unix_path"
27396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27398    new_path="$unix_path"
27399  fi
27400
27401  if test "x$path" != "x$new_path"; then
27402    BOOT_JDK="$new_path"
27403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27405  fi
27406
27407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27409
27410    else
27411      # We're on a unix platform. Hooray! :)
27412      path="$BOOT_JDK"
27413      has_space=`$ECHO "$path" | $GREP " "`
27414      if test "x$has_space" != x; then
27415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27416$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27418      fi
27419
27420      # Use eval to expand a potential ~
27421      eval path="$path"
27422      if test ! -f "$path" && test ! -d "$path"; then
27423        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27424      fi
27425
27426      if test -d "$path"; then
27427        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27428      else
27429        dir="`$DIRNAME "$path"`"
27430        base="`$BASENAME "$path"`"
27431        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27432      fi
27433    fi
27434  fi
27435
27436            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27437$as_echo_n "checking for Boot JDK... " >&6; }
27438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27439$as_echo "$BOOT_JDK" >&6; }
27440            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27441$as_echo_n "checking Boot JDK version... " >&6; }
27442            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27444$as_echo "$BOOT_JDK_VERSION" >&6; }
27445          fi # end check jdk version
27446        fi # end check javac
27447      fi # end check java
27448    fi # end check boot jdk found
27449  fi
27450
27451
27452  if test "x$BOOT_JDK_FOUND" = xno; then
27453    # Now execute the test
27454
27455  if test "x$PROGRAMFILES" != x; then
27456    VIRTUAL_DIR="$PROGRAMFILES/Java"
27457
27458  windows_path="$VIRTUAL_DIR"
27459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27460    unix_path=`$CYGPATH -u "$windows_path"`
27461    VIRTUAL_DIR="$unix_path"
27462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27464    VIRTUAL_DIR="$unix_path"
27465  fi
27466
27467
27468  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27469  BOOT_JDK_SUFFIX=""
27470  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27471  if test "x$ALL_JDKS_FOUND" != x; then
27472    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27473
27474  if test "x$BOOT_JDK_FOUND" = xno; then
27475    # Now execute the test
27476
27477        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27478        if test -d "$BOOT_JDK"; then
27479          BOOT_JDK_FOUND=maybe
27480          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27481$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27482        fi
27483
27484
27485    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27486    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27487      # Do we have a bin/java?
27488      if test ! -x "$BOOT_JDK/bin/java"; then
27489        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27491        BOOT_JDK_FOUND=no
27492      else
27493        # Do we have a bin/javac?
27494        if test ! -x "$BOOT_JDK/bin/javac"; then
27495          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27496$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27497          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27498$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27499          BOOT_JDK_FOUND=no
27500        else
27501          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27502          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27503
27504          # Extra M4 quote needed to protect [] in grep expression.
27505          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27506          if test "x$FOUND_CORRECT_VERSION" = x; then
27507            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27508$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27509            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27510$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27511            BOOT_JDK_FOUND=no
27512          else
27513            # We're done! :-)
27514            BOOT_JDK_FOUND=yes
27515
27516  # Only process if variable expands to non-empty
27517
27518  if test "x$BOOT_JDK" != x; then
27519    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27520
27521  # Input might be given as Windows format, start by converting to
27522  # unix format.
27523  path="$BOOT_JDK"
27524  new_path=`$CYGPATH -u "$path"`
27525
27526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27529  # "foo.exe" is OK but "foo" is an error.
27530  #
27531  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27532  # It is also a way to make sure we got the proper file name for the real test later on.
27533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27534  if test "x$test_shortpath" = x; then
27535    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27536$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27537    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27538  fi
27539
27540  # Call helper function which possibly converts this using DOS-style short mode.
27541  # If so, the updated path is stored in $new_path.
27542
27543  input_path="$new_path"
27544  # Check if we need to convert this using DOS-style short mode. If the path
27545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27546  # take no chances and rewrite it.
27547  # Note: m4 eats our [], so we need to use [ and ] instead.
27548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27549  if test "x$has_forbidden_chars" != x; then
27550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27554      # Going to short mode and back again did indeed matter. Since short mode is
27555      # case insensitive, let's make it lowercase to improve readability.
27556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27557      # Now convert it back to Unix-style (cygpath)
27558      input_path=`$CYGPATH -u "$shortmode_path"`
27559      new_path="$input_path"
27560    fi
27561  fi
27562
27563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27564  if test "x$test_cygdrive_prefix" = x; then
27565    # As a simple fix, exclude /usr/bin since it's not a real path.
27566    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27568      # a path prefixed by /cygdrive for fixpath to work.
27569      new_path="$CYGWIN_ROOT_PATH$input_path"
27570    fi
27571  fi
27572
27573
27574  if test "x$path" != "x$new_path"; then
27575    BOOT_JDK="$new_path"
27576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27577$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27578  fi
27579
27580    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27581
27582  path="$BOOT_JDK"
27583  has_colon=`$ECHO $path | $GREP ^.:`
27584  new_path="$path"
27585  if test "x$has_colon" = x; then
27586    # Not in mixed or Windows style, start by that.
27587    new_path=`cmd //c echo $path`
27588  fi
27589
27590
27591  input_path="$new_path"
27592  # Check if we need to convert this using DOS-style short mode. If the path
27593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27594  # take no chances and rewrite it.
27595  # Note: m4 eats our [], so we need to use [ and ] instead.
27596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27597  if test "x$has_forbidden_chars" != x; then
27598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27600  fi
27601
27602
27603  windows_path="$new_path"
27604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27605    unix_path=`$CYGPATH -u "$windows_path"`
27606    new_path="$unix_path"
27607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27609    new_path="$unix_path"
27610  fi
27611
27612  if test "x$path" != "x$new_path"; then
27613    BOOT_JDK="$new_path"
27614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27615$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27616  fi
27617
27618  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27619  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27620
27621    else
27622      # We're on a unix platform. Hooray! :)
27623      path="$BOOT_JDK"
27624      has_space=`$ECHO "$path" | $GREP " "`
27625      if test "x$has_space" != x; then
27626        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27627$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27628        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27629      fi
27630
27631      # Use eval to expand a potential ~
27632      eval path="$path"
27633      if test ! -f "$path" && test ! -d "$path"; then
27634        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27635      fi
27636
27637      if test -d "$path"; then
27638        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27639      else
27640        dir="`$DIRNAME "$path"`"
27641        base="`$BASENAME "$path"`"
27642        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27643      fi
27644    fi
27645  fi
27646
27647            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27648$as_echo_n "checking for Boot JDK... " >&6; }
27649            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27650$as_echo "$BOOT_JDK" >&6; }
27651            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27652$as_echo_n "checking Boot JDK version... " >&6; }
27653            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27654            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27655$as_echo "$BOOT_JDK_VERSION" >&6; }
27656          fi # end check jdk version
27657        fi # end check javac
27658      fi # end check java
27659    fi # end check boot jdk found
27660  fi
27661
27662    done
27663  fi
27664
27665  fi
27666
27667
27668    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27669    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27670      # Do we have a bin/java?
27671      if test ! -x "$BOOT_JDK/bin/java"; then
27672        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27674        BOOT_JDK_FOUND=no
27675      else
27676        # Do we have a bin/javac?
27677        if test ! -x "$BOOT_JDK/bin/javac"; then
27678          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27680          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27681$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27682          BOOT_JDK_FOUND=no
27683        else
27684          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27685          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27686
27687          # Extra M4 quote needed to protect [] in grep expression.
27688          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27689          if test "x$FOUND_CORRECT_VERSION" = x; then
27690            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27691$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27692            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27693$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27694            BOOT_JDK_FOUND=no
27695          else
27696            # We're done! :-)
27697            BOOT_JDK_FOUND=yes
27698
27699  # Only process if variable expands to non-empty
27700
27701  if test "x$BOOT_JDK" != x; then
27702    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27703
27704  # Input might be given as Windows format, start by converting to
27705  # unix format.
27706  path="$BOOT_JDK"
27707  new_path=`$CYGPATH -u "$path"`
27708
27709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27712  # "foo.exe" is OK but "foo" is an error.
27713  #
27714  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27715  # It is also a way to make sure we got the proper file name for the real test later on.
27716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27717  if test "x$test_shortpath" = x; then
27718    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27719$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27720    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27721  fi
27722
27723  # Call helper function which possibly converts this using DOS-style short mode.
27724  # If so, the updated path is stored in $new_path.
27725
27726  input_path="$new_path"
27727  # Check if we need to convert this using DOS-style short mode. If the path
27728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27729  # take no chances and rewrite it.
27730  # Note: m4 eats our [], so we need to use [ and ] instead.
27731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27732  if test "x$has_forbidden_chars" != x; then
27733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27737      # Going to short mode and back again did indeed matter. Since short mode is
27738      # case insensitive, let's make it lowercase to improve readability.
27739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27740      # Now convert it back to Unix-style (cygpath)
27741      input_path=`$CYGPATH -u "$shortmode_path"`
27742      new_path="$input_path"
27743    fi
27744  fi
27745
27746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27747  if test "x$test_cygdrive_prefix" = x; then
27748    # As a simple fix, exclude /usr/bin since it's not a real path.
27749    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27751      # a path prefixed by /cygdrive for fixpath to work.
27752      new_path="$CYGWIN_ROOT_PATH$input_path"
27753    fi
27754  fi
27755
27756
27757  if test "x$path" != "x$new_path"; then
27758    BOOT_JDK="$new_path"
27759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27760$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27761  fi
27762
27763    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27764
27765  path="$BOOT_JDK"
27766  has_colon=`$ECHO $path | $GREP ^.:`
27767  new_path="$path"
27768  if test "x$has_colon" = x; then
27769    # Not in mixed or Windows style, start by that.
27770    new_path=`cmd //c echo $path`
27771  fi
27772
27773
27774  input_path="$new_path"
27775  # Check if we need to convert this using DOS-style short mode. If the path
27776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27777  # take no chances and rewrite it.
27778  # Note: m4 eats our [], so we need to use [ and ] instead.
27779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27780  if test "x$has_forbidden_chars" != x; then
27781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27783  fi
27784
27785
27786  windows_path="$new_path"
27787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27788    unix_path=`$CYGPATH -u "$windows_path"`
27789    new_path="$unix_path"
27790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27792    new_path="$unix_path"
27793  fi
27794
27795  if test "x$path" != "x$new_path"; then
27796    BOOT_JDK="$new_path"
27797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27798$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27799  fi
27800
27801  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27802  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27803
27804    else
27805      # We're on a unix platform. Hooray! :)
27806      path="$BOOT_JDK"
27807      has_space=`$ECHO "$path" | $GREP " "`
27808      if test "x$has_space" != x; then
27809        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27810$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27811        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27812      fi
27813
27814      # Use eval to expand a potential ~
27815      eval path="$path"
27816      if test ! -f "$path" && test ! -d "$path"; then
27817        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27818      fi
27819
27820      if test -d "$path"; then
27821        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27822      else
27823        dir="`$DIRNAME "$path"`"
27824        base="`$BASENAME "$path"`"
27825        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27826      fi
27827    fi
27828  fi
27829
27830            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27831$as_echo_n "checking for Boot JDK... " >&6; }
27832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27833$as_echo "$BOOT_JDK" >&6; }
27834            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27835$as_echo_n "checking Boot JDK version... " >&6; }
27836            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27837            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27838$as_echo "$BOOT_JDK_VERSION" >&6; }
27839          fi # end check jdk version
27840        fi # end check javac
27841      fi # end check java
27842    fi # end check boot jdk found
27843  fi
27844
27845
27846  if test "x$BOOT_JDK_FOUND" = xno; then
27847    # Now execute the test
27848
27849  if test "x$ProgramFiles" != x; then
27850    VIRTUAL_DIR="$ProgramFiles/Java"
27851
27852  windows_path="$VIRTUAL_DIR"
27853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27854    unix_path=`$CYGPATH -u "$windows_path"`
27855    VIRTUAL_DIR="$unix_path"
27856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27858    VIRTUAL_DIR="$unix_path"
27859  fi
27860
27861
27862  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27863  BOOT_JDK_SUFFIX=""
27864  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27865  if test "x$ALL_JDKS_FOUND" != x; then
27866    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27867
27868  if test "x$BOOT_JDK_FOUND" = xno; then
27869    # Now execute the test
27870
27871        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27872        if test -d "$BOOT_JDK"; then
27873          BOOT_JDK_FOUND=maybe
27874          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27875$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27876        fi
27877
27878
27879    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27880    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27881      # Do we have a bin/java?
27882      if test ! -x "$BOOT_JDK/bin/java"; then
27883        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27885        BOOT_JDK_FOUND=no
27886      else
27887        # Do we have a bin/javac?
27888        if test ! -x "$BOOT_JDK/bin/javac"; then
27889          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27890$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27891          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27892$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27893          BOOT_JDK_FOUND=no
27894        else
27895          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27896          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27897
27898          # Extra M4 quote needed to protect [] in grep expression.
27899          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27900          if test "x$FOUND_CORRECT_VERSION" = x; then
27901            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27903            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27904$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27905            BOOT_JDK_FOUND=no
27906          else
27907            # We're done! :-)
27908            BOOT_JDK_FOUND=yes
27909
27910  # Only process if variable expands to non-empty
27911
27912  if test "x$BOOT_JDK" != x; then
27913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27914
27915  # Input might be given as Windows format, start by converting to
27916  # unix format.
27917  path="$BOOT_JDK"
27918  new_path=`$CYGPATH -u "$path"`
27919
27920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27923  # "foo.exe" is OK but "foo" is an error.
27924  #
27925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27926  # It is also a way to make sure we got the proper file name for the real test later on.
27927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27928  if test "x$test_shortpath" = x; then
27929    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27930$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27931    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27932  fi
27933
27934  # Call helper function which possibly converts this using DOS-style short mode.
27935  # If so, the updated path is stored in $new_path.
27936
27937  input_path="$new_path"
27938  # Check if we need to convert this using DOS-style short mode. If the path
27939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27940  # take no chances and rewrite it.
27941  # Note: m4 eats our [], so we need to use [ and ] instead.
27942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27943  if test "x$has_forbidden_chars" != x; then
27944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27948      # Going to short mode and back again did indeed matter. Since short mode is
27949      # case insensitive, let's make it lowercase to improve readability.
27950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27951      # Now convert it back to Unix-style (cygpath)
27952      input_path=`$CYGPATH -u "$shortmode_path"`
27953      new_path="$input_path"
27954    fi
27955  fi
27956
27957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27958  if test "x$test_cygdrive_prefix" = x; then
27959    # As a simple fix, exclude /usr/bin since it's not a real path.
27960    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27962      # a path prefixed by /cygdrive for fixpath to work.
27963      new_path="$CYGWIN_ROOT_PATH$input_path"
27964    fi
27965  fi
27966
27967
27968  if test "x$path" != "x$new_path"; then
27969    BOOT_JDK="$new_path"
27970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27971$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27972  fi
27973
27974    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27975
27976  path="$BOOT_JDK"
27977  has_colon=`$ECHO $path | $GREP ^.:`
27978  new_path="$path"
27979  if test "x$has_colon" = x; then
27980    # Not in mixed or Windows style, start by that.
27981    new_path=`cmd //c echo $path`
27982  fi
27983
27984
27985  input_path="$new_path"
27986  # Check if we need to convert this using DOS-style short mode. If the path
27987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27988  # take no chances and rewrite it.
27989  # Note: m4 eats our [], so we need to use [ and ] instead.
27990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27991  if test "x$has_forbidden_chars" != x; then
27992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27994  fi
27995
27996
27997  windows_path="$new_path"
27998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27999    unix_path=`$CYGPATH -u "$windows_path"`
28000    new_path="$unix_path"
28001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28003    new_path="$unix_path"
28004  fi
28005
28006  if test "x$path" != "x$new_path"; then
28007    BOOT_JDK="$new_path"
28008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28009$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28010  fi
28011
28012  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28013  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28014
28015    else
28016      # We're on a unix platform. Hooray! :)
28017      path="$BOOT_JDK"
28018      has_space=`$ECHO "$path" | $GREP " "`
28019      if test "x$has_space" != x; then
28020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28021$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28022        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28023      fi
28024
28025      # Use eval to expand a potential ~
28026      eval path="$path"
28027      if test ! -f "$path" && test ! -d "$path"; then
28028        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28029      fi
28030
28031      if test -d "$path"; then
28032        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28033      else
28034        dir="`$DIRNAME "$path"`"
28035        base="`$BASENAME "$path"`"
28036        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28037      fi
28038    fi
28039  fi
28040
28041            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28042$as_echo_n "checking for Boot JDK... " >&6; }
28043            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28044$as_echo "$BOOT_JDK" >&6; }
28045            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28046$as_echo_n "checking Boot JDK version... " >&6; }
28047            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28048            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28049$as_echo "$BOOT_JDK_VERSION" >&6; }
28050          fi # end check jdk version
28051        fi # end check javac
28052      fi # end check java
28053    fi # end check boot jdk found
28054  fi
28055
28056    done
28057  fi
28058
28059  fi
28060
28061
28062    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28063    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28064      # Do we have a bin/java?
28065      if test ! -x "$BOOT_JDK/bin/java"; then
28066        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28068        BOOT_JDK_FOUND=no
28069      else
28070        # Do we have a bin/javac?
28071        if test ! -x "$BOOT_JDK/bin/javac"; then
28072          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28074          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28075$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28076          BOOT_JDK_FOUND=no
28077        else
28078          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28079          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28080
28081          # Extra M4 quote needed to protect [] in grep expression.
28082          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28083          if test "x$FOUND_CORRECT_VERSION" = x; then
28084            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28085$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28086            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28087$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28088            BOOT_JDK_FOUND=no
28089          else
28090            # We're done! :-)
28091            BOOT_JDK_FOUND=yes
28092
28093  # Only process if variable expands to non-empty
28094
28095  if test "x$BOOT_JDK" != x; then
28096    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28097
28098  # Input might be given as Windows format, start by converting to
28099  # unix format.
28100  path="$BOOT_JDK"
28101  new_path=`$CYGPATH -u "$path"`
28102
28103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28106  # "foo.exe" is OK but "foo" is an error.
28107  #
28108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28109  # It is also a way to make sure we got the proper file name for the real test later on.
28110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28111  if test "x$test_shortpath" = x; then
28112    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28113$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28114    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28115  fi
28116
28117  # Call helper function which possibly converts this using DOS-style short mode.
28118  # If so, the updated path is stored in $new_path.
28119
28120  input_path="$new_path"
28121  # Check if we need to convert this using DOS-style short mode. If the path
28122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28123  # take no chances and rewrite it.
28124  # Note: m4 eats our [], so we need to use [ and ] instead.
28125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28126  if test "x$has_forbidden_chars" != x; then
28127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28131      # Going to short mode and back again did indeed matter. Since short mode is
28132      # case insensitive, let's make it lowercase to improve readability.
28133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28134      # Now convert it back to Unix-style (cygpath)
28135      input_path=`$CYGPATH -u "$shortmode_path"`
28136      new_path="$input_path"
28137    fi
28138  fi
28139
28140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28141  if test "x$test_cygdrive_prefix" = x; then
28142    # As a simple fix, exclude /usr/bin since it's not a real path.
28143    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28145      # a path prefixed by /cygdrive for fixpath to work.
28146      new_path="$CYGWIN_ROOT_PATH$input_path"
28147    fi
28148  fi
28149
28150
28151  if test "x$path" != "x$new_path"; then
28152    BOOT_JDK="$new_path"
28153    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28154$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28155  fi
28156
28157    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28158
28159  path="$BOOT_JDK"
28160  has_colon=`$ECHO $path | $GREP ^.:`
28161  new_path="$path"
28162  if test "x$has_colon" = x; then
28163    # Not in mixed or Windows style, start by that.
28164    new_path=`cmd //c echo $path`
28165  fi
28166
28167
28168  input_path="$new_path"
28169  # Check if we need to convert this using DOS-style short mode. If the path
28170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28171  # take no chances and rewrite it.
28172  # Note: m4 eats our [], so we need to use [ and ] instead.
28173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28174  if test "x$has_forbidden_chars" != x; then
28175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28177  fi
28178
28179
28180  windows_path="$new_path"
28181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28182    unix_path=`$CYGPATH -u "$windows_path"`
28183    new_path="$unix_path"
28184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28186    new_path="$unix_path"
28187  fi
28188
28189  if test "x$path" != "x$new_path"; then
28190    BOOT_JDK="$new_path"
28191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28192$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28193  fi
28194
28195  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28196  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28197
28198    else
28199      # We're on a unix platform. Hooray! :)
28200      path="$BOOT_JDK"
28201      has_space=`$ECHO "$path" | $GREP " "`
28202      if test "x$has_space" != x; then
28203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28204$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28205        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28206      fi
28207
28208      # Use eval to expand a potential ~
28209      eval path="$path"
28210      if test ! -f "$path" && test ! -d "$path"; then
28211        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28212      fi
28213
28214      if test -d "$path"; then
28215        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28216      else
28217        dir="`$DIRNAME "$path"`"
28218        base="`$BASENAME "$path"`"
28219        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28220      fi
28221    fi
28222  fi
28223
28224            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28225$as_echo_n "checking for Boot JDK... " >&6; }
28226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28227$as_echo "$BOOT_JDK" >&6; }
28228            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28229$as_echo_n "checking Boot JDK version... " >&6; }
28230            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28231            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28232$as_echo "$BOOT_JDK_VERSION" >&6; }
28233          fi # end check jdk version
28234        fi # end check javac
28235      fi # end check java
28236    fi # end check boot jdk found
28237  fi
28238
28239
28240  if test "x$BOOT_JDK_FOUND" = xno; then
28241    # Now execute the test
28242
28243  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28244  BOOT_JDK_SUFFIX=""
28245  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28246  if test "x$ALL_JDKS_FOUND" != x; then
28247    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28248
28249  if test "x$BOOT_JDK_FOUND" = xno; then
28250    # Now execute the test
28251
28252        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28253        if test -d "$BOOT_JDK"; then
28254          BOOT_JDK_FOUND=maybe
28255          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28256$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28257        fi
28258
28259
28260    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28261    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28262      # Do we have a bin/java?
28263      if test ! -x "$BOOT_JDK/bin/java"; then
28264        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28266        BOOT_JDK_FOUND=no
28267      else
28268        # Do we have a bin/javac?
28269        if test ! -x "$BOOT_JDK/bin/javac"; then
28270          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28271$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28272          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28273$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28274          BOOT_JDK_FOUND=no
28275        else
28276          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28277          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28278
28279          # Extra M4 quote needed to protect [] in grep expression.
28280          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28281          if test "x$FOUND_CORRECT_VERSION" = x; then
28282            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28284            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28285$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28286            BOOT_JDK_FOUND=no
28287          else
28288            # We're done! :-)
28289            BOOT_JDK_FOUND=yes
28290
28291  # Only process if variable expands to non-empty
28292
28293  if test "x$BOOT_JDK" != x; then
28294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28295
28296  # Input might be given as Windows format, start by converting to
28297  # unix format.
28298  path="$BOOT_JDK"
28299  new_path=`$CYGPATH -u "$path"`
28300
28301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28304  # "foo.exe" is OK but "foo" is an error.
28305  #
28306  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28307  # It is also a way to make sure we got the proper file name for the real test later on.
28308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28309  if test "x$test_shortpath" = x; then
28310    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28311$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28312    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28313  fi
28314
28315  # Call helper function which possibly converts this using DOS-style short mode.
28316  # If so, the updated path is stored in $new_path.
28317
28318  input_path="$new_path"
28319  # Check if we need to convert this using DOS-style short mode. If the path
28320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28321  # take no chances and rewrite it.
28322  # Note: m4 eats our [], so we need to use [ and ] instead.
28323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28324  if test "x$has_forbidden_chars" != x; then
28325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28329      # Going to short mode and back again did indeed matter. Since short mode is
28330      # case insensitive, let's make it lowercase to improve readability.
28331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28332      # Now convert it back to Unix-style (cygpath)
28333      input_path=`$CYGPATH -u "$shortmode_path"`
28334      new_path="$input_path"
28335    fi
28336  fi
28337
28338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28339  if test "x$test_cygdrive_prefix" = x; then
28340    # As a simple fix, exclude /usr/bin since it's not a real path.
28341    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28343      # a path prefixed by /cygdrive for fixpath to work.
28344      new_path="$CYGWIN_ROOT_PATH$input_path"
28345    fi
28346  fi
28347
28348
28349  if test "x$path" != "x$new_path"; then
28350    BOOT_JDK="$new_path"
28351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28352$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28353  fi
28354
28355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28356
28357  path="$BOOT_JDK"
28358  has_colon=`$ECHO $path | $GREP ^.:`
28359  new_path="$path"
28360  if test "x$has_colon" = x; then
28361    # Not in mixed or Windows style, start by that.
28362    new_path=`cmd //c echo $path`
28363  fi
28364
28365
28366  input_path="$new_path"
28367  # Check if we need to convert this using DOS-style short mode. If the path
28368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28369  # take no chances and rewrite it.
28370  # Note: m4 eats our [], so we need to use [ and ] instead.
28371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28372  if test "x$has_forbidden_chars" != x; then
28373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28374    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28375  fi
28376
28377
28378  windows_path="$new_path"
28379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28380    unix_path=`$CYGPATH -u "$windows_path"`
28381    new_path="$unix_path"
28382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28384    new_path="$unix_path"
28385  fi
28386
28387  if test "x$path" != "x$new_path"; then
28388    BOOT_JDK="$new_path"
28389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28390$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28391  fi
28392
28393  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28394  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28395
28396    else
28397      # We're on a unix platform. Hooray! :)
28398      path="$BOOT_JDK"
28399      has_space=`$ECHO "$path" | $GREP " "`
28400      if test "x$has_space" != x; then
28401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28402$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28403        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28404      fi
28405
28406      # Use eval to expand a potential ~
28407      eval path="$path"
28408      if test ! -f "$path" && test ! -d "$path"; then
28409        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28410      fi
28411
28412      if test -d "$path"; then
28413        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28414      else
28415        dir="`$DIRNAME "$path"`"
28416        base="`$BASENAME "$path"`"
28417        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28418      fi
28419    fi
28420  fi
28421
28422            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28423$as_echo_n "checking for Boot JDK... " >&6; }
28424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28425$as_echo "$BOOT_JDK" >&6; }
28426            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28427$as_echo_n "checking Boot JDK version... " >&6; }
28428            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28430$as_echo "$BOOT_JDK_VERSION" >&6; }
28431          fi # end check jdk version
28432        fi # end check javac
28433      fi # end check java
28434    fi # end check boot jdk found
28435  fi
28436
28437    done
28438  fi
28439
28440
28441    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28442    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28443      # Do we have a bin/java?
28444      if test ! -x "$BOOT_JDK/bin/java"; then
28445        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28447        BOOT_JDK_FOUND=no
28448      else
28449        # Do we have a bin/javac?
28450        if test ! -x "$BOOT_JDK/bin/javac"; then
28451          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28453          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28454$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28455          BOOT_JDK_FOUND=no
28456        else
28457          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28458          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28459
28460          # Extra M4 quote needed to protect [] in grep expression.
28461          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28462          if test "x$FOUND_CORRECT_VERSION" = x; then
28463            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28464$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28465            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28466$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28467            BOOT_JDK_FOUND=no
28468          else
28469            # We're done! :-)
28470            BOOT_JDK_FOUND=yes
28471
28472  # Only process if variable expands to non-empty
28473
28474  if test "x$BOOT_JDK" != x; then
28475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28476
28477  # Input might be given as Windows format, start by converting to
28478  # unix format.
28479  path="$BOOT_JDK"
28480  new_path=`$CYGPATH -u "$path"`
28481
28482  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28483  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28484  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28485  # "foo.exe" is OK but "foo" is an error.
28486  #
28487  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28488  # It is also a way to make sure we got the proper file name for the real test later on.
28489  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28490  if test "x$test_shortpath" = x; then
28491    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28492$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28493    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28494  fi
28495
28496  # Call helper function which possibly converts this using DOS-style short mode.
28497  # If so, the updated path is stored in $new_path.
28498
28499  input_path="$new_path"
28500  # Check if we need to convert this using DOS-style short mode. If the path
28501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28502  # take no chances and rewrite it.
28503  # Note: m4 eats our [], so we need to use [ and ] instead.
28504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28505  if test "x$has_forbidden_chars" != x; then
28506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28507    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28508    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28509    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28510      # Going to short mode and back again did indeed matter. Since short mode is
28511      # case insensitive, let's make it lowercase to improve readability.
28512      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28513      # Now convert it back to Unix-style (cygpath)
28514      input_path=`$CYGPATH -u "$shortmode_path"`
28515      new_path="$input_path"
28516    fi
28517  fi
28518
28519  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28520  if test "x$test_cygdrive_prefix" = x; then
28521    # As a simple fix, exclude /usr/bin since it's not a real path.
28522    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28523      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28524      # a path prefixed by /cygdrive for fixpath to work.
28525      new_path="$CYGWIN_ROOT_PATH$input_path"
28526    fi
28527  fi
28528
28529
28530  if test "x$path" != "x$new_path"; then
28531    BOOT_JDK="$new_path"
28532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28533$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28534  fi
28535
28536    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28537
28538  path="$BOOT_JDK"
28539  has_colon=`$ECHO $path | $GREP ^.:`
28540  new_path="$path"
28541  if test "x$has_colon" = x; then
28542    # Not in mixed or Windows style, start by that.
28543    new_path=`cmd //c echo $path`
28544  fi
28545
28546
28547  input_path="$new_path"
28548  # Check if we need to convert this using DOS-style short mode. If the path
28549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28550  # take no chances and rewrite it.
28551  # Note: m4 eats our [], so we need to use [ and ] instead.
28552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28553  if test "x$has_forbidden_chars" != x; then
28554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28555    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28556  fi
28557
28558
28559  windows_path="$new_path"
28560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28561    unix_path=`$CYGPATH -u "$windows_path"`
28562    new_path="$unix_path"
28563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28565    new_path="$unix_path"
28566  fi
28567
28568  if test "x$path" != "x$new_path"; then
28569    BOOT_JDK="$new_path"
28570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28571$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28572  fi
28573
28574  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28575  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28576
28577    else
28578      # We're on a unix platform. Hooray! :)
28579      path="$BOOT_JDK"
28580      has_space=`$ECHO "$path" | $GREP " "`
28581      if test "x$has_space" != x; then
28582        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28583$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28584        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28585      fi
28586
28587      # Use eval to expand a potential ~
28588      eval path="$path"
28589      if test ! -f "$path" && test ! -d "$path"; then
28590        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28591      fi
28592
28593      if test -d "$path"; then
28594        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28595      else
28596        dir="`$DIRNAME "$path"`"
28597        base="`$BASENAME "$path"`"
28598        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28599      fi
28600    fi
28601  fi
28602
28603            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28604$as_echo_n "checking for Boot JDK... " >&6; }
28605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28606$as_echo "$BOOT_JDK" >&6; }
28607            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28608$as_echo_n "checking Boot JDK version... " >&6; }
28609            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28610            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28611$as_echo "$BOOT_JDK_VERSION" >&6; }
28612          fi # end check jdk version
28613        fi # end check javac
28614      fi # end check java
28615    fi # end check boot jdk found
28616  fi
28617
28618  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28619
28620  if test "x$BOOT_JDK_FOUND" = xno; then
28621    # Now execute the test
28622
28623  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28624  BOOT_JDK_SUFFIX="/Contents/Home"
28625  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28626  if test "x$ALL_JDKS_FOUND" != x; then
28627    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28628
28629  if test "x$BOOT_JDK_FOUND" = xno; then
28630    # Now execute the test
28631
28632        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28633        if test -d "$BOOT_JDK"; then
28634          BOOT_JDK_FOUND=maybe
28635          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28636$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28637        fi
28638
28639
28640    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28641    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28642      # Do we have a bin/java?
28643      if test ! -x "$BOOT_JDK/bin/java"; then
28644        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28646        BOOT_JDK_FOUND=no
28647      else
28648        # Do we have a bin/javac?
28649        if test ! -x "$BOOT_JDK/bin/javac"; then
28650          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28652          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28653$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28654          BOOT_JDK_FOUND=no
28655        else
28656          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28657          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28658
28659          # Extra M4 quote needed to protect [] in grep expression.
28660          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28661          if test "x$FOUND_CORRECT_VERSION" = x; then
28662            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28664            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28665$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28666            BOOT_JDK_FOUND=no
28667          else
28668            # We're done! :-)
28669            BOOT_JDK_FOUND=yes
28670
28671  # Only process if variable expands to non-empty
28672
28673  if test "x$BOOT_JDK" != x; then
28674    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28675
28676  # Input might be given as Windows format, start by converting to
28677  # unix format.
28678  path="$BOOT_JDK"
28679  new_path=`$CYGPATH -u "$path"`
28680
28681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28684  # "foo.exe" is OK but "foo" is an error.
28685  #
28686  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28687  # It is also a way to make sure we got the proper file name for the real test later on.
28688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28689  if test "x$test_shortpath" = x; then
28690    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28691$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28692    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28693  fi
28694
28695  # Call helper function which possibly converts this using DOS-style short mode.
28696  # If so, the updated path is stored in $new_path.
28697
28698  input_path="$new_path"
28699  # Check if we need to convert this using DOS-style short mode. If the path
28700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28701  # take no chances and rewrite it.
28702  # Note: m4 eats our [], so we need to use [ and ] instead.
28703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28704  if test "x$has_forbidden_chars" != x; then
28705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28706    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28707    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28708    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28709      # Going to short mode and back again did indeed matter. Since short mode is
28710      # case insensitive, let's make it lowercase to improve readability.
28711      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28712      # Now convert it back to Unix-style (cygpath)
28713      input_path=`$CYGPATH -u "$shortmode_path"`
28714      new_path="$input_path"
28715    fi
28716  fi
28717
28718  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28719  if test "x$test_cygdrive_prefix" = x; then
28720    # As a simple fix, exclude /usr/bin since it's not a real path.
28721    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28722      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28723      # a path prefixed by /cygdrive for fixpath to work.
28724      new_path="$CYGWIN_ROOT_PATH$input_path"
28725    fi
28726  fi
28727
28728
28729  if test "x$path" != "x$new_path"; then
28730    BOOT_JDK="$new_path"
28731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28732$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28733  fi
28734
28735    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28736
28737  path="$BOOT_JDK"
28738  has_colon=`$ECHO $path | $GREP ^.:`
28739  new_path="$path"
28740  if test "x$has_colon" = x; then
28741    # Not in mixed or Windows style, start by that.
28742    new_path=`cmd //c echo $path`
28743  fi
28744
28745
28746  input_path="$new_path"
28747  # Check if we need to convert this using DOS-style short mode. If the path
28748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28749  # take no chances and rewrite it.
28750  # Note: m4 eats our [], so we need to use [ and ] instead.
28751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28752  if test "x$has_forbidden_chars" != x; then
28753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28754    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28755  fi
28756
28757
28758  windows_path="$new_path"
28759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28760    unix_path=`$CYGPATH -u "$windows_path"`
28761    new_path="$unix_path"
28762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28764    new_path="$unix_path"
28765  fi
28766
28767  if test "x$path" != "x$new_path"; then
28768    BOOT_JDK="$new_path"
28769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28770$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28771  fi
28772
28773  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28774  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28775
28776    else
28777      # We're on a unix platform. Hooray! :)
28778      path="$BOOT_JDK"
28779      has_space=`$ECHO "$path" | $GREP " "`
28780      if test "x$has_space" != x; then
28781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28782$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28783        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28784      fi
28785
28786      # Use eval to expand a potential ~
28787      eval path="$path"
28788      if test ! -f "$path" && test ! -d "$path"; then
28789        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28790      fi
28791
28792      if test -d "$path"; then
28793        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28794      else
28795        dir="`$DIRNAME "$path"`"
28796        base="`$BASENAME "$path"`"
28797        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28798      fi
28799    fi
28800  fi
28801
28802            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28803$as_echo_n "checking for Boot JDK... " >&6; }
28804            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28805$as_echo "$BOOT_JDK" >&6; }
28806            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28807$as_echo_n "checking Boot JDK version... " >&6; }
28808            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28809            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28810$as_echo "$BOOT_JDK_VERSION" >&6; }
28811          fi # end check jdk version
28812        fi # end check javac
28813      fi # end check java
28814    fi # end check boot jdk found
28815  fi
28816
28817    done
28818  fi
28819
28820
28821    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28822    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28823      # Do we have a bin/java?
28824      if test ! -x "$BOOT_JDK/bin/java"; then
28825        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28826$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28827        BOOT_JDK_FOUND=no
28828      else
28829        # Do we have a bin/javac?
28830        if test ! -x "$BOOT_JDK/bin/javac"; then
28831          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28832$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28833          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28834$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28835          BOOT_JDK_FOUND=no
28836        else
28837          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28838          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28839
28840          # Extra M4 quote needed to protect [] in grep expression.
28841          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28842          if test "x$FOUND_CORRECT_VERSION" = x; then
28843            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28844$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28845            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28846$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28847            BOOT_JDK_FOUND=no
28848          else
28849            # We're done! :-)
28850            BOOT_JDK_FOUND=yes
28851
28852  # Only process if variable expands to non-empty
28853
28854  if test "x$BOOT_JDK" != x; then
28855    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28856
28857  # Input might be given as Windows format, start by converting to
28858  # unix format.
28859  path="$BOOT_JDK"
28860  new_path=`$CYGPATH -u "$path"`
28861
28862  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28863  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28864  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28865  # "foo.exe" is OK but "foo" is an error.
28866  #
28867  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28868  # It is also a way to make sure we got the proper file name for the real test later on.
28869  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28870  if test "x$test_shortpath" = x; then
28871    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28872$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28873    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28874  fi
28875
28876  # Call helper function which possibly converts this using DOS-style short mode.
28877  # If so, the updated path is stored in $new_path.
28878
28879  input_path="$new_path"
28880  # Check if we need to convert this using DOS-style short mode. If the path
28881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28882  # take no chances and rewrite it.
28883  # Note: m4 eats our [], so we need to use [ and ] instead.
28884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28885  if test "x$has_forbidden_chars" != x; then
28886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28890      # Going to short mode and back again did indeed matter. Since short mode is
28891      # case insensitive, let's make it lowercase to improve readability.
28892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28893      # Now convert it back to Unix-style (cygpath)
28894      input_path=`$CYGPATH -u "$shortmode_path"`
28895      new_path="$input_path"
28896    fi
28897  fi
28898
28899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28900  if test "x$test_cygdrive_prefix" = x; then
28901    # As a simple fix, exclude /usr/bin since it's not a real path.
28902    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28904      # a path prefixed by /cygdrive for fixpath to work.
28905      new_path="$CYGWIN_ROOT_PATH$input_path"
28906    fi
28907  fi
28908
28909
28910  if test "x$path" != "x$new_path"; then
28911    BOOT_JDK="$new_path"
28912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28913$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28914  fi
28915
28916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28917
28918  path="$BOOT_JDK"
28919  has_colon=`$ECHO $path | $GREP ^.:`
28920  new_path="$path"
28921  if test "x$has_colon" = x; then
28922    # Not in mixed or Windows style, start by that.
28923    new_path=`cmd //c echo $path`
28924  fi
28925
28926
28927  input_path="$new_path"
28928  # Check if we need to convert this using DOS-style short mode. If the path
28929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28930  # take no chances and rewrite it.
28931  # Note: m4 eats our [], so we need to use [ and ] instead.
28932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28933  if test "x$has_forbidden_chars" != x; then
28934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28936  fi
28937
28938
28939  windows_path="$new_path"
28940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28941    unix_path=`$CYGPATH -u "$windows_path"`
28942    new_path="$unix_path"
28943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28945    new_path="$unix_path"
28946  fi
28947
28948  if test "x$path" != "x$new_path"; then
28949    BOOT_JDK="$new_path"
28950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28951$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28952  fi
28953
28954  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28955  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28956
28957    else
28958      # We're on a unix platform. Hooray! :)
28959      path="$BOOT_JDK"
28960      has_space=`$ECHO "$path" | $GREP " "`
28961      if test "x$has_space" != x; then
28962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28963$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28964        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28965      fi
28966
28967      # Use eval to expand a potential ~
28968      eval path="$path"
28969      if test ! -f "$path" && test ! -d "$path"; then
28970        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28971      fi
28972
28973      if test -d "$path"; then
28974        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28975      else
28976        dir="`$DIRNAME "$path"`"
28977        base="`$BASENAME "$path"`"
28978        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28979      fi
28980    fi
28981  fi
28982
28983            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28984$as_echo_n "checking for Boot JDK... " >&6; }
28985            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28986$as_echo "$BOOT_JDK" >&6; }
28987            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28988$as_echo_n "checking Boot JDK version... " >&6; }
28989            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28990            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28991$as_echo "$BOOT_JDK_VERSION" >&6; }
28992          fi # end check jdk version
28993        fi # end check javac
28994      fi # end check java
28995    fi # end check boot jdk found
28996  fi
28997
28998
28999  if test "x$BOOT_JDK_FOUND" = xno; then
29000    # Now execute the test
29001
29002  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29003  BOOT_JDK_SUFFIX="/Contents/Home"
29004  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29005  if test "x$ALL_JDKS_FOUND" != x; then
29006    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29007
29008  if test "x$BOOT_JDK_FOUND" = xno; then
29009    # Now execute the test
29010
29011        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29012        if test -d "$BOOT_JDK"; then
29013          BOOT_JDK_FOUND=maybe
29014          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29015$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29016        fi
29017
29018
29019    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29020    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29021      # Do we have a bin/java?
29022      if test ! -x "$BOOT_JDK/bin/java"; then
29023        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29025        BOOT_JDK_FOUND=no
29026      else
29027        # Do we have a bin/javac?
29028        if test ! -x "$BOOT_JDK/bin/javac"; then
29029          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29031          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29032$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29033          BOOT_JDK_FOUND=no
29034        else
29035          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29036          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29037
29038          # Extra M4 quote needed to protect [] in grep expression.
29039          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29040          if test "x$FOUND_CORRECT_VERSION" = x; then
29041            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29043            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29044$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29045            BOOT_JDK_FOUND=no
29046          else
29047            # We're done! :-)
29048            BOOT_JDK_FOUND=yes
29049
29050  # Only process if variable expands to non-empty
29051
29052  if test "x$BOOT_JDK" != x; then
29053    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29054
29055  # Input might be given as Windows format, start by converting to
29056  # unix format.
29057  path="$BOOT_JDK"
29058  new_path=`$CYGPATH -u "$path"`
29059
29060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29063  # "foo.exe" is OK but "foo" is an error.
29064  #
29065  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29066  # It is also a way to make sure we got the proper file name for the real test later on.
29067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29068  if test "x$test_shortpath" = x; then
29069    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29070$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29071    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29072  fi
29073
29074  # Call helper function which possibly converts this using DOS-style short mode.
29075  # If so, the updated path is stored in $new_path.
29076
29077  input_path="$new_path"
29078  # Check if we need to convert this using DOS-style short mode. If the path
29079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29080  # take no chances and rewrite it.
29081  # Note: m4 eats our [], so we need to use [ and ] instead.
29082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29083  if test "x$has_forbidden_chars" != x; then
29084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29088      # Going to short mode and back again did indeed matter. Since short mode is
29089      # case insensitive, let's make it lowercase to improve readability.
29090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29091      # Now convert it back to Unix-style (cygpath)
29092      input_path=`$CYGPATH -u "$shortmode_path"`
29093      new_path="$input_path"
29094    fi
29095  fi
29096
29097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29098  if test "x$test_cygdrive_prefix" = x; then
29099    # As a simple fix, exclude /usr/bin since it's not a real path.
29100    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29102      # a path prefixed by /cygdrive for fixpath to work.
29103      new_path="$CYGWIN_ROOT_PATH$input_path"
29104    fi
29105  fi
29106
29107
29108  if test "x$path" != "x$new_path"; then
29109    BOOT_JDK="$new_path"
29110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29111$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29112  fi
29113
29114    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29115
29116  path="$BOOT_JDK"
29117  has_colon=`$ECHO $path | $GREP ^.:`
29118  new_path="$path"
29119  if test "x$has_colon" = x; then
29120    # Not in mixed or Windows style, start by that.
29121    new_path=`cmd //c echo $path`
29122  fi
29123
29124
29125  input_path="$new_path"
29126  # Check if we need to convert this using DOS-style short mode. If the path
29127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29128  # take no chances and rewrite it.
29129  # Note: m4 eats our [], so we need to use [ and ] instead.
29130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29131  if test "x$has_forbidden_chars" != x; then
29132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29134  fi
29135
29136
29137  windows_path="$new_path"
29138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29139    unix_path=`$CYGPATH -u "$windows_path"`
29140    new_path="$unix_path"
29141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29143    new_path="$unix_path"
29144  fi
29145
29146  if test "x$path" != "x$new_path"; then
29147    BOOT_JDK="$new_path"
29148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29149$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29150  fi
29151
29152  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29153  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29154
29155    else
29156      # We're on a unix platform. Hooray! :)
29157      path="$BOOT_JDK"
29158      has_space=`$ECHO "$path" | $GREP " "`
29159      if test "x$has_space" != x; then
29160        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29161$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29162        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29163      fi
29164
29165      # Use eval to expand a potential ~
29166      eval path="$path"
29167      if test ! -f "$path" && test ! -d "$path"; then
29168        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29169      fi
29170
29171      if test -d "$path"; then
29172        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29173      else
29174        dir="`$DIRNAME "$path"`"
29175        base="`$BASENAME "$path"`"
29176        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29177      fi
29178    fi
29179  fi
29180
29181            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29182$as_echo_n "checking for Boot JDK... " >&6; }
29183            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29184$as_echo "$BOOT_JDK" >&6; }
29185            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29186$as_echo_n "checking Boot JDK version... " >&6; }
29187            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29188            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29189$as_echo "$BOOT_JDK_VERSION" >&6; }
29190          fi # end check jdk version
29191        fi # end check javac
29192      fi # end check java
29193    fi # end check boot jdk found
29194  fi
29195
29196    done
29197  fi
29198
29199
29200    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29201    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29202      # Do we have a bin/java?
29203      if test ! -x "$BOOT_JDK/bin/java"; then
29204        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29206        BOOT_JDK_FOUND=no
29207      else
29208        # Do we have a bin/javac?
29209        if test ! -x "$BOOT_JDK/bin/javac"; then
29210          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29212          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29213$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29214          BOOT_JDK_FOUND=no
29215        else
29216          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29217          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29218
29219          # Extra M4 quote needed to protect [] in grep expression.
29220          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29221          if test "x$FOUND_CORRECT_VERSION" = x; then
29222            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29224            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29225$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29226            BOOT_JDK_FOUND=no
29227          else
29228            # We're done! :-)
29229            BOOT_JDK_FOUND=yes
29230
29231  # Only process if variable expands to non-empty
29232
29233  if test "x$BOOT_JDK" != x; then
29234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29235
29236  # Input might be given as Windows format, start by converting to
29237  # unix format.
29238  path="$BOOT_JDK"
29239  new_path=`$CYGPATH -u "$path"`
29240
29241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29244  # "foo.exe" is OK but "foo" is an error.
29245  #
29246  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29247  # It is also a way to make sure we got the proper file name for the real test later on.
29248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29249  if test "x$test_shortpath" = x; then
29250    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29251$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29252    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29253  fi
29254
29255  # Call helper function which possibly converts this using DOS-style short mode.
29256  # If so, the updated path is stored in $new_path.
29257
29258  input_path="$new_path"
29259  # Check if we need to convert this using DOS-style short mode. If the path
29260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29261  # take no chances and rewrite it.
29262  # Note: m4 eats our [], so we need to use [ and ] instead.
29263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29264  if test "x$has_forbidden_chars" != x; then
29265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29269      # Going to short mode and back again did indeed matter. Since short mode is
29270      # case insensitive, let's make it lowercase to improve readability.
29271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29272      # Now convert it back to Unix-style (cygpath)
29273      input_path=`$CYGPATH -u "$shortmode_path"`
29274      new_path="$input_path"
29275    fi
29276  fi
29277
29278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29279  if test "x$test_cygdrive_prefix" = x; then
29280    # As a simple fix, exclude /usr/bin since it's not a real path.
29281    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29283      # a path prefixed by /cygdrive for fixpath to work.
29284      new_path="$CYGWIN_ROOT_PATH$input_path"
29285    fi
29286  fi
29287
29288
29289  if test "x$path" != "x$new_path"; then
29290    BOOT_JDK="$new_path"
29291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29292$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29293  fi
29294
29295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29296
29297  path="$BOOT_JDK"
29298  has_colon=`$ECHO $path | $GREP ^.:`
29299  new_path="$path"
29300  if test "x$has_colon" = x; then
29301    # Not in mixed or Windows style, start by that.
29302    new_path=`cmd //c echo $path`
29303  fi
29304
29305
29306  input_path="$new_path"
29307  # Check if we need to convert this using DOS-style short mode. If the path
29308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29309  # take no chances and rewrite it.
29310  # Note: m4 eats our [], so we need to use [ and ] instead.
29311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29312  if test "x$has_forbidden_chars" != x; then
29313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29314    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29315  fi
29316
29317
29318  windows_path="$new_path"
29319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29320    unix_path=`$CYGPATH -u "$windows_path"`
29321    new_path="$unix_path"
29322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29324    new_path="$unix_path"
29325  fi
29326
29327  if test "x$path" != "x$new_path"; then
29328    BOOT_JDK="$new_path"
29329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29330$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29331  fi
29332
29333  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29334  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29335
29336    else
29337      # We're on a unix platform. Hooray! :)
29338      path="$BOOT_JDK"
29339      has_space=`$ECHO "$path" | $GREP " "`
29340      if test "x$has_space" != x; then
29341        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29342$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29343        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29344      fi
29345
29346      # Use eval to expand a potential ~
29347      eval path="$path"
29348      if test ! -f "$path" && test ! -d "$path"; then
29349        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29350      fi
29351
29352      if test -d "$path"; then
29353        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29354      else
29355        dir="`$DIRNAME "$path"`"
29356        base="`$BASENAME "$path"`"
29357        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29358      fi
29359    fi
29360  fi
29361
29362            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29363$as_echo_n "checking for Boot JDK... " >&6; }
29364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29365$as_echo "$BOOT_JDK" >&6; }
29366            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29367$as_echo_n "checking Boot JDK version... " >&6; }
29368            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29370$as_echo "$BOOT_JDK_VERSION" >&6; }
29371          fi # end check jdk version
29372        fi # end check javac
29373      fi # end check java
29374    fi # end check boot jdk found
29375  fi
29376
29377  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29378
29379  if test "x$BOOT_JDK_FOUND" = xno; then
29380    # Now execute the test
29381
29382  BOOT_JDK_PREFIX="/usr/lib/jvm"
29383  BOOT_JDK_SUFFIX=""
29384  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29385  if test "x$ALL_JDKS_FOUND" != x; then
29386    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29387
29388  if test "x$BOOT_JDK_FOUND" = xno; then
29389    # Now execute the test
29390
29391        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29392        if test -d "$BOOT_JDK"; then
29393          BOOT_JDK_FOUND=maybe
29394          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29395$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29396        fi
29397
29398
29399    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29400    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29401      # Do we have a bin/java?
29402      if test ! -x "$BOOT_JDK/bin/java"; then
29403        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29404$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29405        BOOT_JDK_FOUND=no
29406      else
29407        # Do we have a bin/javac?
29408        if test ! -x "$BOOT_JDK/bin/javac"; then
29409          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29411          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29412$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29413          BOOT_JDK_FOUND=no
29414        else
29415          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29416          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29417
29418          # Extra M4 quote needed to protect [] in grep expression.
29419          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29420          if test "x$FOUND_CORRECT_VERSION" = x; then
29421            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29423            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29424$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29425            BOOT_JDK_FOUND=no
29426          else
29427            # We're done! :-)
29428            BOOT_JDK_FOUND=yes
29429
29430  # Only process if variable expands to non-empty
29431
29432  if test "x$BOOT_JDK" != x; then
29433    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29434
29435  # Input might be given as Windows format, start by converting to
29436  # unix format.
29437  path="$BOOT_JDK"
29438  new_path=`$CYGPATH -u "$path"`
29439
29440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29443  # "foo.exe" is OK but "foo" is an error.
29444  #
29445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29446  # It is also a way to make sure we got the proper file name for the real test later on.
29447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29448  if test "x$test_shortpath" = x; then
29449    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29450$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29451    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29452  fi
29453
29454  # Call helper function which possibly converts this using DOS-style short mode.
29455  # If so, the updated path is stored in $new_path.
29456
29457  input_path="$new_path"
29458  # Check if we need to convert this using DOS-style short mode. If the path
29459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29460  # take no chances and rewrite it.
29461  # Note: m4 eats our [], so we need to use [ and ] instead.
29462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29463  if test "x$has_forbidden_chars" != x; then
29464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29468      # Going to short mode and back again did indeed matter. Since short mode is
29469      # case insensitive, let's make it lowercase to improve readability.
29470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29471      # Now convert it back to Unix-style (cygpath)
29472      input_path=`$CYGPATH -u "$shortmode_path"`
29473      new_path="$input_path"
29474    fi
29475  fi
29476
29477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29478  if test "x$test_cygdrive_prefix" = x; then
29479    # As a simple fix, exclude /usr/bin since it's not a real path.
29480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29482      # a path prefixed by /cygdrive for fixpath to work.
29483      new_path="$CYGWIN_ROOT_PATH$input_path"
29484    fi
29485  fi
29486
29487
29488  if test "x$path" != "x$new_path"; then
29489    BOOT_JDK="$new_path"
29490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29492  fi
29493
29494    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29495
29496  path="$BOOT_JDK"
29497  has_colon=`$ECHO $path | $GREP ^.:`
29498  new_path="$path"
29499  if test "x$has_colon" = x; then
29500    # Not in mixed or Windows style, start by that.
29501    new_path=`cmd //c echo $path`
29502  fi
29503
29504
29505  input_path="$new_path"
29506  # Check if we need to convert this using DOS-style short mode. If the path
29507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29508  # take no chances and rewrite it.
29509  # Note: m4 eats our [], so we need to use [ and ] instead.
29510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29511  if test "x$has_forbidden_chars" != x; then
29512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29514  fi
29515
29516
29517  windows_path="$new_path"
29518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29519    unix_path=`$CYGPATH -u "$windows_path"`
29520    new_path="$unix_path"
29521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29523    new_path="$unix_path"
29524  fi
29525
29526  if test "x$path" != "x$new_path"; then
29527    BOOT_JDK="$new_path"
29528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29529$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29530  fi
29531
29532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29534
29535    else
29536      # We're on a unix platform. Hooray! :)
29537      path="$BOOT_JDK"
29538      has_space=`$ECHO "$path" | $GREP " "`
29539      if test "x$has_space" != x; then
29540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29541$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29542        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29543      fi
29544
29545      # Use eval to expand a potential ~
29546      eval path="$path"
29547      if test ! -f "$path" && test ! -d "$path"; then
29548        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29549      fi
29550
29551      if test -d "$path"; then
29552        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29553      else
29554        dir="`$DIRNAME "$path"`"
29555        base="`$BASENAME "$path"`"
29556        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29557      fi
29558    fi
29559  fi
29560
29561            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29562$as_echo_n "checking for Boot JDK... " >&6; }
29563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29564$as_echo "$BOOT_JDK" >&6; }
29565            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29566$as_echo_n "checking Boot JDK version... " >&6; }
29567            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29569$as_echo "$BOOT_JDK_VERSION" >&6; }
29570          fi # end check jdk version
29571        fi # end check javac
29572      fi # end check java
29573    fi # end check boot jdk found
29574  fi
29575
29576    done
29577  fi
29578
29579
29580    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29581    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29582      # Do we have a bin/java?
29583      if test ! -x "$BOOT_JDK/bin/java"; then
29584        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29585$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29586        BOOT_JDK_FOUND=no
29587      else
29588        # Do we have a bin/javac?
29589        if test ! -x "$BOOT_JDK/bin/javac"; then
29590          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29592          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29593$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29594          BOOT_JDK_FOUND=no
29595        else
29596          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29597          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29598
29599          # Extra M4 quote needed to protect [] in grep expression.
29600          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29601          if test "x$FOUND_CORRECT_VERSION" = x; then
29602            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29604            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29605$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29606            BOOT_JDK_FOUND=no
29607          else
29608            # We're done! :-)
29609            BOOT_JDK_FOUND=yes
29610
29611  # Only process if variable expands to non-empty
29612
29613  if test "x$BOOT_JDK" != x; then
29614    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29615
29616  # Input might be given as Windows format, start by converting to
29617  # unix format.
29618  path="$BOOT_JDK"
29619  new_path=`$CYGPATH -u "$path"`
29620
29621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29624  # "foo.exe" is OK but "foo" is an error.
29625  #
29626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29627  # It is also a way to make sure we got the proper file name for the real test later on.
29628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29629  if test "x$test_shortpath" = x; then
29630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29632    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29633  fi
29634
29635  # Call helper function which possibly converts this using DOS-style short mode.
29636  # If so, the updated path is stored in $new_path.
29637
29638  input_path="$new_path"
29639  # Check if we need to convert this using DOS-style short mode. If the path
29640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29641  # take no chances and rewrite it.
29642  # Note: m4 eats our [], so we need to use [ and ] instead.
29643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29644  if test "x$has_forbidden_chars" != x; then
29645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29649      # Going to short mode and back again did indeed matter. Since short mode is
29650      # case insensitive, let's make it lowercase to improve readability.
29651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29652      # Now convert it back to Unix-style (cygpath)
29653      input_path=`$CYGPATH -u "$shortmode_path"`
29654      new_path="$input_path"
29655    fi
29656  fi
29657
29658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29659  if test "x$test_cygdrive_prefix" = x; then
29660    # As a simple fix, exclude /usr/bin since it's not a real path.
29661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29663      # a path prefixed by /cygdrive for fixpath to work.
29664      new_path="$CYGWIN_ROOT_PATH$input_path"
29665    fi
29666  fi
29667
29668
29669  if test "x$path" != "x$new_path"; then
29670    BOOT_JDK="$new_path"
29671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29672$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29673  fi
29674
29675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29676
29677  path="$BOOT_JDK"
29678  has_colon=`$ECHO $path | $GREP ^.:`
29679  new_path="$path"
29680  if test "x$has_colon" = x; then
29681    # Not in mixed or Windows style, start by that.
29682    new_path=`cmd //c echo $path`
29683  fi
29684
29685
29686  input_path="$new_path"
29687  # Check if we need to convert this using DOS-style short mode. If the path
29688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29689  # take no chances and rewrite it.
29690  # Note: m4 eats our [], so we need to use [ and ] instead.
29691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29692  if test "x$has_forbidden_chars" != x; then
29693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29695  fi
29696
29697
29698  windows_path="$new_path"
29699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29700    unix_path=`$CYGPATH -u "$windows_path"`
29701    new_path="$unix_path"
29702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29704    new_path="$unix_path"
29705  fi
29706
29707  if test "x$path" != "x$new_path"; then
29708    BOOT_JDK="$new_path"
29709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29710$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29711  fi
29712
29713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29715
29716    else
29717      # We're on a unix platform. Hooray! :)
29718      path="$BOOT_JDK"
29719      has_space=`$ECHO "$path" | $GREP " "`
29720      if test "x$has_space" != x; then
29721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29722$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29723        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29724      fi
29725
29726      # Use eval to expand a potential ~
29727      eval path="$path"
29728      if test ! -f "$path" && test ! -d "$path"; then
29729        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29730      fi
29731
29732      if test -d "$path"; then
29733        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29734      else
29735        dir="`$DIRNAME "$path"`"
29736        base="`$BASENAME "$path"`"
29737        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29738      fi
29739    fi
29740  fi
29741
29742            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29743$as_echo_n "checking for Boot JDK... " >&6; }
29744            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29745$as_echo "$BOOT_JDK" >&6; }
29746            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29747$as_echo_n "checking Boot JDK version... " >&6; }
29748            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29750$as_echo "$BOOT_JDK_VERSION" >&6; }
29751          fi # end check jdk version
29752        fi # end check javac
29753      fi # end check java
29754    fi # end check boot jdk found
29755  fi
29756
29757  fi
29758
29759
29760    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29761    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29762      # Do we have a bin/java?
29763      if test ! -x "$BOOT_JDK/bin/java"; then
29764        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29765$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29766        BOOT_JDK_FOUND=no
29767      else
29768        # Do we have a bin/javac?
29769        if test ! -x "$BOOT_JDK/bin/javac"; then
29770          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29771$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29772          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29773$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29774          BOOT_JDK_FOUND=no
29775        else
29776          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29777          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29778
29779          # Extra M4 quote needed to protect [] in grep expression.
29780          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29781          if test "x$FOUND_CORRECT_VERSION" = x; then
29782            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29784            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29785$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29786            BOOT_JDK_FOUND=no
29787          else
29788            # We're done! :-)
29789            BOOT_JDK_FOUND=yes
29790
29791  # Only process if variable expands to non-empty
29792
29793  if test "x$BOOT_JDK" != x; then
29794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29795
29796  # Input might be given as Windows format, start by converting to
29797  # unix format.
29798  path="$BOOT_JDK"
29799  new_path=`$CYGPATH -u "$path"`
29800
29801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29804  # "foo.exe" is OK but "foo" is an error.
29805  #
29806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29807  # It is also a way to make sure we got the proper file name for the real test later on.
29808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29809  if test "x$test_shortpath" = x; then
29810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29811$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29812    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29813  fi
29814
29815  # Call helper function which possibly converts this using DOS-style short mode.
29816  # If so, the updated path is stored in $new_path.
29817
29818  input_path="$new_path"
29819  # Check if we need to convert this using DOS-style short mode. If the path
29820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29821  # take no chances and rewrite it.
29822  # Note: m4 eats our [], so we need to use [ and ] instead.
29823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29824  if test "x$has_forbidden_chars" != x; then
29825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29829      # Going to short mode and back again did indeed matter. Since short mode is
29830      # case insensitive, let's make it lowercase to improve readability.
29831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29832      # Now convert it back to Unix-style (cygpath)
29833      input_path=`$CYGPATH -u "$shortmode_path"`
29834      new_path="$input_path"
29835    fi
29836  fi
29837
29838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29839  if test "x$test_cygdrive_prefix" = x; then
29840    # As a simple fix, exclude /usr/bin since it's not a real path.
29841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29843      # a path prefixed by /cygdrive for fixpath to work.
29844      new_path="$CYGWIN_ROOT_PATH$input_path"
29845    fi
29846  fi
29847
29848
29849  if test "x$path" != "x$new_path"; then
29850    BOOT_JDK="$new_path"
29851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29852$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29853  fi
29854
29855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29856
29857  path="$BOOT_JDK"
29858  has_colon=`$ECHO $path | $GREP ^.:`
29859  new_path="$path"
29860  if test "x$has_colon" = x; then
29861    # Not in mixed or Windows style, start by that.
29862    new_path=`cmd //c echo $path`
29863  fi
29864
29865
29866  input_path="$new_path"
29867  # Check if we need to convert this using DOS-style short mode. If the path
29868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29869  # take no chances and rewrite it.
29870  # Note: m4 eats our [], so we need to use [ and ] instead.
29871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29872  if test "x$has_forbidden_chars" != x; then
29873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29875  fi
29876
29877
29878  windows_path="$new_path"
29879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29880    unix_path=`$CYGPATH -u "$windows_path"`
29881    new_path="$unix_path"
29882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29884    new_path="$unix_path"
29885  fi
29886
29887  if test "x$path" != "x$new_path"; then
29888    BOOT_JDK="$new_path"
29889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29891  fi
29892
29893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29895
29896    else
29897      # We're on a unix platform. Hooray! :)
29898      path="$BOOT_JDK"
29899      has_space=`$ECHO "$path" | $GREP " "`
29900      if test "x$has_space" != x; then
29901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29902$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29904      fi
29905
29906      # Use eval to expand a potential ~
29907      eval path="$path"
29908      if test ! -f "$path" && test ! -d "$path"; then
29909        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29910      fi
29911
29912      if test -d "$path"; then
29913        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29914      else
29915        dir="`$DIRNAME "$path"`"
29916        base="`$BASENAME "$path"`"
29917        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29918      fi
29919    fi
29920  fi
29921
29922            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29923$as_echo_n "checking for Boot JDK... " >&6; }
29924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29925$as_echo "$BOOT_JDK" >&6; }
29926            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29927$as_echo_n "checking Boot JDK version... " >&6; }
29928            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29930$as_echo "$BOOT_JDK_VERSION" >&6; }
29931          fi # end check jdk version
29932        fi # end check javac
29933      fi # end check java
29934    fi # end check boot jdk found
29935  fi
29936
29937
29938  # If we haven't found anything yet, we've truly lost. Give up.
29939  if test "x$BOOT_JDK_FOUND" = xno; then
29940
29941  # Print a helpful message on how to acquire the necessary build dependency.
29942  # openjdk is the help tag: freetype, cups, alsa etc
29943  MISSING_DEPENDENCY=openjdk
29944
29945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29946    cygwin_help $MISSING_DEPENDENCY
29947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29948    msys_help $MISSING_DEPENDENCY
29949  else
29950    PKGHANDLER_COMMAND=
29951
29952    case $PKGHANDLER in
29953      apt-get)
29954        apt_help     $MISSING_DEPENDENCY ;;
29955      yum)
29956        yum_help     $MISSING_DEPENDENCY ;;
29957      brew)
29958        brew_help    $MISSING_DEPENDENCY ;;
29959      port)
29960        port_help    $MISSING_DEPENDENCY ;;
29961      pkgutil)
29962        pkgutil_help $MISSING_DEPENDENCY ;;
29963      pkgadd)
29964        pkgadd_help  $MISSING_DEPENDENCY ;;
29965    esac
29966
29967    if test "x$PKGHANDLER_COMMAND" != x; then
29968      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29969    fi
29970  fi
29971
29972    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29973$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29974    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29975$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29976    as_fn_error $? "Cannot continue" "$LINENO" 5
29977  fi
29978
29979
29980
29981  # Setup tools from the Boot JDK.
29982
29983  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29984
29985  # Publish this variable in the help.
29986
29987
29988  if [ -z "${JAVA+x}" ]; then
29989    # The variable is not set by user, try to locate tool using the code snippet
29990
29991      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29992$as_echo_n "checking for java in Boot JDK... " >&6; }
29993      JAVA=$BOOT_JDK/bin/java
29994      if test ! -x $JAVA; then
29995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29996$as_echo "not found" >&6; }
29997        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
29998$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29999        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30000      fi
30001      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30002$as_echo "ok" >&6; }
30003
30004
30005  else
30006    # The variable is set, but is it from the command line or the environment?
30007
30008    # Try to remove the string !JAVA! from our list.
30009    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30010    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30011      # If it failed, the variable was not from the command line. Ignore it,
30012      # but warn the user (except for BASH, which is always set by the calling BASH).
30013      if test "xJAVA" != xBASH; then
30014        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30015$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30016      fi
30017      # Try to locate tool using the code snippet
30018
30019      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30020$as_echo_n "checking for java in Boot JDK... " >&6; }
30021      JAVA=$BOOT_JDK/bin/java
30022      if test ! -x $JAVA; then
30023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30024$as_echo "not found" >&6; }
30025        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30026$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30027        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30028      fi
30029      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30030$as_echo "ok" >&6; }
30031
30032
30033    else
30034      # If it succeeded, then it was overridden by the user. We will use it
30035      # for the tool.
30036
30037      # First remove it from the list of overridden variables, so we can test
30038      # for unknown variables in the end.
30039      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30040
30041      # Check if we try to supply an empty value
30042      if test "x$JAVA" = x; then
30043        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30044$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30045        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30046$as_echo_n "checking for JAVA... " >&6; }
30047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30048$as_echo "disabled" >&6; }
30049      else
30050        # Check if the provided tool contains a complete path.
30051        tool_specified="$JAVA"
30052        tool_basename="${tool_specified##*/}"
30053        if test "x$tool_basename" = "x$tool_specified"; then
30054          # A command without a complete path is provided, search $PATH.
30055          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30056$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30057          # Extract the first word of "$tool_basename", so it can be a program name with args.
30058set dummy $tool_basename; ac_word=$2
30059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30060$as_echo_n "checking for $ac_word... " >&6; }
30061if ${ac_cv_path_JAVA+:} false; then :
30062  $as_echo_n "(cached) " >&6
30063else
30064  case $JAVA in
30065  [\\/]* | ?:[\\/]*)
30066  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30067  ;;
30068  *)
30069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30070for as_dir in $PATH
30071do
30072  IFS=$as_save_IFS
30073  test -z "$as_dir" && as_dir=.
30074    for ac_exec_ext in '' $ac_executable_extensions; do
30075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30076    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30078    break 2
30079  fi
30080done
30081  done
30082IFS=$as_save_IFS
30083
30084  ;;
30085esac
30086fi
30087JAVA=$ac_cv_path_JAVA
30088if test -n "$JAVA"; then
30089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30090$as_echo "$JAVA" >&6; }
30091else
30092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30093$as_echo "no" >&6; }
30094fi
30095
30096
30097          if test "x$JAVA" = x; then
30098            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30099          fi
30100        else
30101          # Otherwise we believe it is a complete path. Use it as it is.
30102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30103$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30104          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30105$as_echo_n "checking for JAVA... " >&6; }
30106          if test ! -x "$tool_specified"; then
30107            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30108$as_echo "not found" >&6; }
30109            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30110          fi
30111          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30112$as_echo "$tool_specified" >&6; }
30113        fi
30114      fi
30115    fi
30116
30117  fi
30118
30119
30120
30121  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30122
30123  # Publish this variable in the help.
30124
30125
30126  if [ -z "${JAVAC+x}" ]; then
30127    # The variable is not set by user, try to locate tool using the code snippet
30128
30129      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30130$as_echo_n "checking for javac in Boot JDK... " >&6; }
30131      JAVAC=$BOOT_JDK/bin/javac
30132      if test ! -x $JAVAC; then
30133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30134$as_echo "not found" >&6; }
30135        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30136$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30137        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30138      fi
30139      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30140$as_echo "ok" >&6; }
30141
30142
30143  else
30144    # The variable is set, but is it from the command line or the environment?
30145
30146    # Try to remove the string !JAVAC! from our list.
30147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30149      # If it failed, the variable was not from the command line. Ignore it,
30150      # but warn the user (except for BASH, which is always set by the calling BASH).
30151      if test "xJAVAC" != xBASH; then
30152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30153$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30154      fi
30155      # Try to locate tool using the code snippet
30156
30157      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30158$as_echo_n "checking for javac in Boot JDK... " >&6; }
30159      JAVAC=$BOOT_JDK/bin/javac
30160      if test ! -x $JAVAC; then
30161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30162$as_echo "not found" >&6; }
30163        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30164$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30165        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30166      fi
30167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30168$as_echo "ok" >&6; }
30169
30170
30171    else
30172      # If it succeeded, then it was overridden by the user. We will use it
30173      # for the tool.
30174
30175      # First remove it from the list of overridden variables, so we can test
30176      # for unknown variables in the end.
30177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30178
30179      # Check if we try to supply an empty value
30180      if test "x$JAVAC" = x; then
30181        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30182$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30183        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30184$as_echo_n "checking for JAVAC... " >&6; }
30185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30186$as_echo "disabled" >&6; }
30187      else
30188        # Check if the provided tool contains a complete path.
30189        tool_specified="$JAVAC"
30190        tool_basename="${tool_specified##*/}"
30191        if test "x$tool_basename" = "x$tool_specified"; then
30192          # A command without a complete path is provided, search $PATH.
30193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30194$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30195          # Extract the first word of "$tool_basename", so it can be a program name with args.
30196set dummy $tool_basename; ac_word=$2
30197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30198$as_echo_n "checking for $ac_word... " >&6; }
30199if ${ac_cv_path_JAVAC+:} false; then :
30200  $as_echo_n "(cached) " >&6
30201else
30202  case $JAVAC in
30203  [\\/]* | ?:[\\/]*)
30204  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30205  ;;
30206  *)
30207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30208for as_dir in $PATH
30209do
30210  IFS=$as_save_IFS
30211  test -z "$as_dir" && as_dir=.
30212    for ac_exec_ext in '' $ac_executable_extensions; do
30213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30214    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30216    break 2
30217  fi
30218done
30219  done
30220IFS=$as_save_IFS
30221
30222  ;;
30223esac
30224fi
30225JAVAC=$ac_cv_path_JAVAC
30226if test -n "$JAVAC"; then
30227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30228$as_echo "$JAVAC" >&6; }
30229else
30230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30231$as_echo "no" >&6; }
30232fi
30233
30234
30235          if test "x$JAVAC" = x; then
30236            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30237          fi
30238        else
30239          # Otherwise we believe it is a complete path. Use it as it is.
30240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30241$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30242          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30243$as_echo_n "checking for JAVAC... " >&6; }
30244          if test ! -x "$tool_specified"; then
30245            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30246$as_echo "not found" >&6; }
30247            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30248          fi
30249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30250$as_echo "$tool_specified" >&6; }
30251        fi
30252      fi
30253    fi
30254
30255  fi
30256
30257
30258
30259  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30260
30261  # Publish this variable in the help.
30262
30263
30264  if [ -z "${JAVAH+x}" ]; then
30265    # The variable is not set by user, try to locate tool using the code snippet
30266
30267      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30268$as_echo_n "checking for javah in Boot JDK... " >&6; }
30269      JAVAH=$BOOT_JDK/bin/javah
30270      if test ! -x $JAVAH; then
30271        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30272$as_echo "not found" >&6; }
30273        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30274$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30275        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30276      fi
30277      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30278$as_echo "ok" >&6; }
30279
30280
30281  else
30282    # The variable is set, but is it from the command line or the environment?
30283
30284    # Try to remove the string !JAVAH! from our list.
30285    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30286    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30287      # If it failed, the variable was not from the command line. Ignore it,
30288      # but warn the user (except for BASH, which is always set by the calling BASH).
30289      if test "xJAVAH" != xBASH; then
30290        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30291$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30292      fi
30293      # Try to locate tool using the code snippet
30294
30295      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30296$as_echo_n "checking for javah in Boot JDK... " >&6; }
30297      JAVAH=$BOOT_JDK/bin/javah
30298      if test ! -x $JAVAH; then
30299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30300$as_echo "not found" >&6; }
30301        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30302$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30303        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30304      fi
30305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30306$as_echo "ok" >&6; }
30307
30308
30309    else
30310      # If it succeeded, then it was overridden by the user. We will use it
30311      # for the tool.
30312
30313      # First remove it from the list of overridden variables, so we can test
30314      # for unknown variables in the end.
30315      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30316
30317      # Check if we try to supply an empty value
30318      if test "x$JAVAH" = x; then
30319        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30320$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30321        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30322$as_echo_n "checking for JAVAH... " >&6; }
30323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30324$as_echo "disabled" >&6; }
30325      else
30326        # Check if the provided tool contains a complete path.
30327        tool_specified="$JAVAH"
30328        tool_basename="${tool_specified##*/}"
30329        if test "x$tool_basename" = "x$tool_specified"; then
30330          # A command without a complete path is provided, search $PATH.
30331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30332$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30333          # Extract the first word of "$tool_basename", so it can be a program name with args.
30334set dummy $tool_basename; ac_word=$2
30335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30336$as_echo_n "checking for $ac_word... " >&6; }
30337if ${ac_cv_path_JAVAH+:} false; then :
30338  $as_echo_n "(cached) " >&6
30339else
30340  case $JAVAH in
30341  [\\/]* | ?:[\\/]*)
30342  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30343  ;;
30344  *)
30345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30346for as_dir in $PATH
30347do
30348  IFS=$as_save_IFS
30349  test -z "$as_dir" && as_dir=.
30350    for ac_exec_ext in '' $ac_executable_extensions; do
30351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30352    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30354    break 2
30355  fi
30356done
30357  done
30358IFS=$as_save_IFS
30359
30360  ;;
30361esac
30362fi
30363JAVAH=$ac_cv_path_JAVAH
30364if test -n "$JAVAH"; then
30365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30366$as_echo "$JAVAH" >&6; }
30367else
30368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30369$as_echo "no" >&6; }
30370fi
30371
30372
30373          if test "x$JAVAH" = x; then
30374            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30375          fi
30376        else
30377          # Otherwise we believe it is a complete path. Use it as it is.
30378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30379$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30380          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30381$as_echo_n "checking for JAVAH... " >&6; }
30382          if test ! -x "$tool_specified"; then
30383            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30384$as_echo "not found" >&6; }
30385            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30386          fi
30387          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30388$as_echo "$tool_specified" >&6; }
30389        fi
30390      fi
30391    fi
30392
30393  fi
30394
30395
30396
30397  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30398
30399  # Publish this variable in the help.
30400
30401
30402  if [ -z "${JAR+x}" ]; then
30403    # The variable is not set by user, try to locate tool using the code snippet
30404
30405      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30406$as_echo_n "checking for jar in Boot JDK... " >&6; }
30407      JAR=$BOOT_JDK/bin/jar
30408      if test ! -x $JAR; then
30409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30410$as_echo "not found" >&6; }
30411        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30412$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30413        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30414      fi
30415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30416$as_echo "ok" >&6; }
30417
30418
30419  else
30420    # The variable is set, but is it from the command line or the environment?
30421
30422    # Try to remove the string !JAR! from our list.
30423    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30424    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30425      # If it failed, the variable was not from the command line. Ignore it,
30426      # but warn the user (except for BASH, which is always set by the calling BASH).
30427      if test "xJAR" != xBASH; then
30428        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30429$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30430      fi
30431      # Try to locate tool using the code snippet
30432
30433      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30434$as_echo_n "checking for jar in Boot JDK... " >&6; }
30435      JAR=$BOOT_JDK/bin/jar
30436      if test ! -x $JAR; then
30437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30438$as_echo "not found" >&6; }
30439        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30440$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30441        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30442      fi
30443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30444$as_echo "ok" >&6; }
30445
30446
30447    else
30448      # If it succeeded, then it was overridden by the user. We will use it
30449      # for the tool.
30450
30451      # First remove it from the list of overridden variables, so we can test
30452      # for unknown variables in the end.
30453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30454
30455      # Check if we try to supply an empty value
30456      if test "x$JAR" = x; then
30457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30458$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30460$as_echo_n "checking for JAR... " >&6; }
30461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30462$as_echo "disabled" >&6; }
30463      else
30464        # Check if the provided tool contains a complete path.
30465        tool_specified="$JAR"
30466        tool_basename="${tool_specified##*/}"
30467        if test "x$tool_basename" = "x$tool_specified"; then
30468          # A command without a complete path is provided, search $PATH.
30469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30470$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30471          # Extract the first word of "$tool_basename", so it can be a program name with args.
30472set dummy $tool_basename; ac_word=$2
30473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30474$as_echo_n "checking for $ac_word... " >&6; }
30475if ${ac_cv_path_JAR+:} false; then :
30476  $as_echo_n "(cached) " >&6
30477else
30478  case $JAR in
30479  [\\/]* | ?:[\\/]*)
30480  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30481  ;;
30482  *)
30483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30484for as_dir in $PATH
30485do
30486  IFS=$as_save_IFS
30487  test -z "$as_dir" && as_dir=.
30488    for ac_exec_ext in '' $ac_executable_extensions; do
30489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30490    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30492    break 2
30493  fi
30494done
30495  done
30496IFS=$as_save_IFS
30497
30498  ;;
30499esac
30500fi
30501JAR=$ac_cv_path_JAR
30502if test -n "$JAR"; then
30503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30504$as_echo "$JAR" >&6; }
30505else
30506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30507$as_echo "no" >&6; }
30508fi
30509
30510
30511          if test "x$JAR" = x; then
30512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30513          fi
30514        else
30515          # Otherwise we believe it is a complete path. Use it as it is.
30516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30517$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30519$as_echo_n "checking for JAR... " >&6; }
30520          if test ! -x "$tool_specified"; then
30521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30522$as_echo "not found" >&6; }
30523            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30524          fi
30525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30526$as_echo "$tool_specified" >&6; }
30527        fi
30528      fi
30529    fi
30530
30531  fi
30532
30533
30534
30535  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30536
30537  # Publish this variable in the help.
30538
30539
30540  if [ -z "${JARSIGNER+x}" ]; then
30541    # The variable is not set by user, try to locate tool using the code snippet
30542
30543      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30544$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30545      JARSIGNER=$BOOT_JDK/bin/jarsigner
30546      if test ! -x $JARSIGNER; then
30547        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30548$as_echo "not found" >&6; }
30549        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30550$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30551        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30552      fi
30553      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30554$as_echo "ok" >&6; }
30555
30556
30557  else
30558    # The variable is set, but is it from the command line or the environment?
30559
30560    # Try to remove the string !JARSIGNER! from our list.
30561    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30562    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30563      # If it failed, the variable was not from the command line. Ignore it,
30564      # but warn the user (except for BASH, which is always set by the calling BASH).
30565      if test "xJARSIGNER" != xBASH; then
30566        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30567$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30568      fi
30569      # Try to locate tool using the code snippet
30570
30571      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30572$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30573      JARSIGNER=$BOOT_JDK/bin/jarsigner
30574      if test ! -x $JARSIGNER; then
30575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30576$as_echo "not found" >&6; }
30577        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30578$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30579        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30580      fi
30581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30582$as_echo "ok" >&6; }
30583
30584
30585    else
30586      # If it succeeded, then it was overridden by the user. We will use it
30587      # for the tool.
30588
30589      # First remove it from the list of overridden variables, so we can test
30590      # for unknown variables in the end.
30591      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30592
30593      # Check if we try to supply an empty value
30594      if test "x$JARSIGNER" = x; then
30595        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30596$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30597        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30598$as_echo_n "checking for JARSIGNER... " >&6; }
30599        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30600$as_echo "disabled" >&6; }
30601      else
30602        # Check if the provided tool contains a complete path.
30603        tool_specified="$JARSIGNER"
30604        tool_basename="${tool_specified##*/}"
30605        if test "x$tool_basename" = "x$tool_specified"; then
30606          # A command without a complete path is provided, search $PATH.
30607          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30608$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30609          # Extract the first word of "$tool_basename", so it can be a program name with args.
30610set dummy $tool_basename; ac_word=$2
30611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30612$as_echo_n "checking for $ac_word... " >&6; }
30613if ${ac_cv_path_JARSIGNER+:} false; then :
30614  $as_echo_n "(cached) " >&6
30615else
30616  case $JARSIGNER in
30617  [\\/]* | ?:[\\/]*)
30618  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30619  ;;
30620  *)
30621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30622for as_dir in $PATH
30623do
30624  IFS=$as_save_IFS
30625  test -z "$as_dir" && as_dir=.
30626    for ac_exec_ext in '' $ac_executable_extensions; do
30627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30628    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30630    break 2
30631  fi
30632done
30633  done
30634IFS=$as_save_IFS
30635
30636  ;;
30637esac
30638fi
30639JARSIGNER=$ac_cv_path_JARSIGNER
30640if test -n "$JARSIGNER"; then
30641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30642$as_echo "$JARSIGNER" >&6; }
30643else
30644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30645$as_echo "no" >&6; }
30646fi
30647
30648
30649          if test "x$JARSIGNER" = x; then
30650            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30651          fi
30652        else
30653          # Otherwise we believe it is a complete path. Use it as it is.
30654          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30655$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30656          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30657$as_echo_n "checking for JARSIGNER... " >&6; }
30658          if test ! -x "$tool_specified"; then
30659            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30660$as_echo "not found" >&6; }
30661            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30662          fi
30663          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30664$as_echo "$tool_specified" >&6; }
30665        fi
30666      fi
30667    fi
30668
30669  fi
30670
30671
30672
30673  # Finally, set some other options...
30674
30675  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30676  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30677
30678
30679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30680$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30681  if "$JAVA" --list-modules > /dev/null 2>&1; then
30682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30683$as_echo "yes" >&6; }
30684    BOOT_JDK_MODULAR="true"
30685  else
30686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30687$as_echo "no" >&6; }
30688    BOOT_JDK_MODULAR="false"
30689  fi
30690
30691
30692
30693
30694  # Check if the boot jdk is 32 or 64 bit
30695  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30696    BOOT_JDK_BITS="64"
30697  else
30698    BOOT_JDK_BITS="32"
30699  fi
30700  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30701$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30703$as_echo "$BOOT_JDK_BITS" >&6; }
30704
30705
30706
30707# Check whether --with-build-jdk was given.
30708if test "${with_build_jdk+set}" = set; then :
30709  withval=$with_build_jdk;
30710fi
30711
30712
30713  CREATE_BUILDJDK=false
30714  EXTERNAL_BUILDJDK=false
30715  BUILD_JDK_FOUND="no"
30716  if test "x$with_build_jdk" != "x"; then
30717
30718  if test "x$BUILD_JDK_FOUND" = xno; then
30719    # Execute the test
30720
30721       if test "x$with_build_jdk" != x; then
30722         BUILD_JDK=$with_build_jdk
30723         BUILD_JDK_FOUND=maybe
30724         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30725$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30726       fi
30727
30728    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30729    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30730      # Do we have a bin/java?
30731      if test ! -x "$BUILD_JDK/bin/java"; then
30732        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30733$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30734        BUILD_JDK_FOUND=no
30735      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30736        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30737$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30738        BUILD_JDK_FOUND=no
30739      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30740        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30741$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30742        BUILD_JDK_FOUND=no
30743      elif test ! -x "$BUILD_JDK/bin/javac"; then
30744        # Do we have a bin/javac?
30745        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30746$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30747        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30748$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30749        BUILD_JDK_FOUND=no
30750      else
30751        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30752        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30753
30754        # Extra M4 quote needed to protect [] in grep expression.
30755        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30756        if test "x$FOUND_CORRECT_VERSION" = x; then
30757          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30758$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30759          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30760$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30761          BUILD_JDK_FOUND=no
30762        else
30763          # We're done!
30764          BUILD_JDK_FOUND=yes
30765
30766  # Only process if variable expands to non-empty
30767
30768  if test "x$BUILD_JDK" != x; then
30769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30770
30771  # Input might be given as Windows format, start by converting to
30772  # unix format.
30773  path="$BUILD_JDK"
30774  new_path=`$CYGPATH -u "$path"`
30775
30776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30779  # "foo.exe" is OK but "foo" is an error.
30780  #
30781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30782  # It is also a way to make sure we got the proper file name for the real test later on.
30783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30784  if test "x$test_shortpath" = x; then
30785    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30786$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30787    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30788  fi
30789
30790  # Call helper function which possibly converts this using DOS-style short mode.
30791  # If so, the updated path is stored in $new_path.
30792
30793  input_path="$new_path"
30794  # Check if we need to convert this using DOS-style short mode. If the path
30795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30796  # take no chances and rewrite it.
30797  # Note: m4 eats our [], so we need to use [ and ] instead.
30798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30799  if test "x$has_forbidden_chars" != x; then
30800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30804      # Going to short mode and back again did indeed matter. Since short mode is
30805      # case insensitive, let's make it lowercase to improve readability.
30806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30807      # Now convert it back to Unix-style (cygpath)
30808      input_path=`$CYGPATH -u "$shortmode_path"`
30809      new_path="$input_path"
30810    fi
30811  fi
30812
30813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30814  if test "x$test_cygdrive_prefix" = x; then
30815    # As a simple fix, exclude /usr/bin since it's not a real path.
30816    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30818      # a path prefixed by /cygdrive for fixpath to work.
30819      new_path="$CYGWIN_ROOT_PATH$input_path"
30820    fi
30821  fi
30822
30823
30824  if test "x$path" != "x$new_path"; then
30825    BUILD_JDK="$new_path"
30826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30827$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30828  fi
30829
30830    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30831
30832  path="$BUILD_JDK"
30833  has_colon=`$ECHO $path | $GREP ^.:`
30834  new_path="$path"
30835  if test "x$has_colon" = x; then
30836    # Not in mixed or Windows style, start by that.
30837    new_path=`cmd //c echo $path`
30838  fi
30839
30840
30841  input_path="$new_path"
30842  # Check if we need to convert this using DOS-style short mode. If the path
30843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30844  # take no chances and rewrite it.
30845  # Note: m4 eats our [], so we need to use [ and ] instead.
30846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30847  if test "x$has_forbidden_chars" != x; then
30848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30850  fi
30851
30852
30853  windows_path="$new_path"
30854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30855    unix_path=`$CYGPATH -u "$windows_path"`
30856    new_path="$unix_path"
30857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30859    new_path="$unix_path"
30860  fi
30861
30862  if test "x$path" != "x$new_path"; then
30863    BUILD_JDK="$new_path"
30864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30865$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30866  fi
30867
30868  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30869  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30870
30871    else
30872      # We're on a unix platform. Hooray! :)
30873      path="$BUILD_JDK"
30874      has_space=`$ECHO "$path" | $GREP " "`
30875      if test "x$has_space" != x; then
30876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30877$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30878        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30879      fi
30880
30881      # Use eval to expand a potential ~
30882      eval path="$path"
30883      if test ! -f "$path" && test ! -d "$path"; then
30884        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30885      fi
30886
30887      if test -d "$path"; then
30888        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30889      else
30890        dir="`$DIRNAME "$path"`"
30891        base="`$BASENAME "$path"`"
30892        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30893      fi
30894    fi
30895  fi
30896
30897          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30898$as_echo_n "checking for Build JDK... " >&6; }
30899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30900$as_echo "$BUILD_JDK" >&6; }
30901          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30902$as_echo_n "checking Build JDK version... " >&6; }
30903          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30905$as_echo "$BUILD_JDK_VERSION" >&6; }
30906        fi # end check jdk version
30907      fi # end check java
30908    fi # end check build jdk found
30909  fi
30910
30911    EXTERNAL_BUILDJDK=true
30912  else
30913    if test "x$COMPILE_TYPE" = "xcross"; then
30914      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30915      BUILD_JDK_FOUND=yes
30916      CREATE_BUILDJDK=true
30917      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30918$as_echo_n "checking for Build JDK... " >&6; }
30919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30920$as_echo "yes, will build it for the host platform" >&6; }
30921    else
30922      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30923      BUILD_JDK_FOUND=yes
30924      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30925$as_echo_n "checking for Build JDK... " >&6; }
30926      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30927$as_echo "yes, will use output dir" >&6; }
30928    fi
30929  fi
30930
30931  JMOD="$BUILD_JDK/bin/jmod"
30932  JLINK="$BUILD_JDK/bin/jlink"
30933
30934
30935
30936  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30937    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30938$as_echo_n "checking for Build JDK... " >&6; }
30939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30940$as_echo "no" >&6; }
30941    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30942  fi
30943
30944
30945
30946
30947
30948
30949###############################################################################
30950#
30951# Configure the sources to use. We can add or override individual directories.
30952#
30953###############################################################################
30954
30955
30956  # Where are the sources.
30957  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30958  CORBA_TOPDIR="$SRC_ROOT/corba"
30959  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30960  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30961  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30962  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30963  JDK_TOPDIR="$SRC_ROOT/jdk"
30964
30965
30966
30967
30968
30969
30970
30971
30972
30973  # This feature is no longer supported.
30974
30975
30976
30977# Check whether --with-add-source-root was given.
30978if test "${with_add_source_root+set}" = set; then :
30979  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
30980$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30981fi
30982
30983
30984
30985
30986# Check whether --with-override-source-root was given.
30987if test "${with_override_source_root+set}" = set; then :
30988  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
30989$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30990fi
30991
30992
30993
30994
30995# Check whether --with-adds-and-overrides was given.
30996if test "${with_adds_and_overrides+set}" = set; then :
30997  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
30998$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30999fi
31000
31001
31002
31003
31004# Check whether --with-override-langtools was given.
31005if test "${with_override_langtools+set}" = set; then :
31006  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31007$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31008fi
31009
31010
31011
31012
31013# Check whether --with-override-corba was given.
31014if test "${with_override_corba+set}" = set; then :
31015  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31016$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31017fi
31018
31019
31020
31021
31022# Check whether --with-override-jaxp was given.
31023if test "${with_override_jaxp+set}" = set; then :
31024  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31025$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31026fi
31027
31028
31029
31030
31031# Check whether --with-override-jaxws was given.
31032if test "${with_override_jaxws+set}" = set; then :
31033  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31034$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31035fi
31036
31037
31038
31039
31040# Check whether --with-override-hotspot was given.
31041if test "${with_override_hotspot+set}" = set; then :
31042  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31043$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31044fi
31045
31046
31047
31048
31049# Check whether --with-override-nashorn was given.
31050if test "${with_override_nashorn+set}" = set; then :
31051  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31052$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31053fi
31054
31055
31056
31057
31058# Check whether --with-override-jdk was given.
31059if test "${with_override_jdk+set}" = set; then :
31060  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31061$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31062fi
31063
31064
31065
31066
31067  BUILD_OUTPUT="$OUTPUT_ROOT"
31068
31069  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31070
31071
31072
31073# Check whether --with-import_hotspot was given.
31074if test "${with_import_hotspot+set}" = set; then :
31075  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31076$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31077fi
31078
31079
31080
31081
31082
31083
31084# Check whether --with-import-modules was given.
31085if test "${with_import_modules+set}" = set; then :
31086  withval=$with_import_modules;
31087fi
31088
31089
31090  if test "x$with_import_modules" != x \
31091      && test "x$with_import_modules" != "xno"; then
31092    if test -d "$with_import_modules"; then
31093      IMPORT_MODULES_TOPDIR="$with_import_modules"
31094
31095  # Only process if variable expands to non-empty
31096
31097  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31098    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31099
31100  # Input might be given as Windows format, start by converting to
31101  # unix format.
31102  path="$IMPORT_MODULES_TOPDIR"
31103  new_path=`$CYGPATH -u "$path"`
31104
31105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31108  # "foo.exe" is OK but "foo" is an error.
31109  #
31110  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31111  # It is also a way to make sure we got the proper file name for the real test later on.
31112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31113  if test "x$test_shortpath" = x; then
31114    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31115$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31116    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31117  fi
31118
31119  # Call helper function which possibly converts this using DOS-style short mode.
31120  # If so, the updated path is stored in $new_path.
31121
31122  input_path="$new_path"
31123  # Check if we need to convert this using DOS-style short mode. If the path
31124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31125  # take no chances and rewrite it.
31126  # Note: m4 eats our [], so we need to use [ and ] instead.
31127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31128  if test "x$has_forbidden_chars" != x; then
31129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31133      # Going to short mode and back again did indeed matter. Since short mode is
31134      # case insensitive, let's make it lowercase to improve readability.
31135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31136      # Now convert it back to Unix-style (cygpath)
31137      input_path=`$CYGPATH -u "$shortmode_path"`
31138      new_path="$input_path"
31139    fi
31140  fi
31141
31142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31143  if test "x$test_cygdrive_prefix" = x; then
31144    # As a simple fix, exclude /usr/bin since it's not a real path.
31145    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31147      # a path prefixed by /cygdrive for fixpath to work.
31148      new_path="$CYGWIN_ROOT_PATH$input_path"
31149    fi
31150  fi
31151
31152
31153  if test "x$path" != "x$new_path"; then
31154    IMPORT_MODULES_TOPDIR="$new_path"
31155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31156$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31157  fi
31158
31159    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31160
31161  path="$IMPORT_MODULES_TOPDIR"
31162  has_colon=`$ECHO $path | $GREP ^.:`
31163  new_path="$path"
31164  if test "x$has_colon" = x; then
31165    # Not in mixed or Windows style, start by that.
31166    new_path=`cmd //c echo $path`
31167  fi
31168
31169
31170  input_path="$new_path"
31171  # Check if we need to convert this using DOS-style short mode. If the path
31172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31173  # take no chances and rewrite it.
31174  # Note: m4 eats our [], so we need to use [ and ] instead.
31175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31176  if test "x$has_forbidden_chars" != x; then
31177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31178    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31179  fi
31180
31181
31182  windows_path="$new_path"
31183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31184    unix_path=`$CYGPATH -u "$windows_path"`
31185    new_path="$unix_path"
31186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31188    new_path="$unix_path"
31189  fi
31190
31191  if test "x$path" != "x$new_path"; then
31192    IMPORT_MODULES_TOPDIR="$new_path"
31193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31194$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31195  fi
31196
31197  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31198  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31199
31200    else
31201      # We're on a unix platform. Hooray! :)
31202      path="$IMPORT_MODULES_TOPDIR"
31203      has_space=`$ECHO "$path" | $GREP " "`
31204      if test "x$has_space" != x; then
31205        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31206$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31207        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31208      fi
31209
31210      # Use eval to expand a potential ~
31211      eval path="$path"
31212      if test ! -f "$path" && test ! -d "$path"; then
31213        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31214      fi
31215
31216      if test -d "$path"; then
31217        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31218      else
31219        dir="`$DIRNAME "$path"`"
31220        base="`$BASENAME "$path"`"
31221        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31222      fi
31223    fi
31224  fi
31225
31226    elif test -e "$with_import_modules"; then
31227      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31228      $RM -rf "$IMPORT_MODULES_TOPDIR"
31229      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31230      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31231        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31232      fi
31233    else
31234      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31235    fi
31236  fi
31237
31238  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31239    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31240  fi
31241  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31242    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31243  fi
31244  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31245    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31246  fi
31247  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31248    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31249  fi
31250  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31251    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31252  fi
31253  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31254    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31255  fi
31256  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31257    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31258  fi
31259  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31260    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31261  fi
31262
31263
31264
31265
31266
31267
31268
31269
31270
31271
31272
31273###############################################################################
31274#
31275# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31276# native code.
31277#
31278###############################################################################
31279
31280# See if we are doing a complete static build or not
31281
31282  # Check whether --enable-static-build was given.
31283if test "${enable_static_build+set}" = set; then :
31284  enableval=$enable_static_build;
31285fi
31286
31287  STATIC_BUILD=false
31288  if test "x$enable_static_build" = "xyes"; then
31289    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31290$as_echo_n "checking if static build is enabled... " >&6; }
31291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31292$as_echo "yes" >&6; }
31293    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31294      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31295    fi
31296    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31297    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31298    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31299    STATIC_BUILD=true
31300  elif test "x$enable_static_build" = "xno"; then
31301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31302$as_echo_n "checking if static build is enabled... " >&6; }
31303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31304$as_echo "no" >&6; }
31305  elif test "x$enable_static_build" != "x"; then
31306    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31307  fi
31308
31309
31310
31311
31312# First determine the toolchain type (compiler family)
31313
31314
31315# Check whether --with-toolchain-type was given.
31316if test "${with_toolchain_type+set}" = set; then :
31317  withval=$with_toolchain_type;
31318fi
31319
31320
31321  # Use indirect variable referencing
31322  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31323  VALID_TOOLCHAINS=${!toolchain_var_name}
31324
31325  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31326    if test -n "$XCODEBUILD"; then
31327      # On Mac OS X, default toolchain to clang after Xcode 5
31328      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31329      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31330      if test $? -ne 0; then
31331        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31332      fi
31333      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31334          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31335          $CUT -f 1 -d .`
31336      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31337$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31338      if test $XCODE_MAJOR_VERSION -ge 5; then
31339          DEFAULT_TOOLCHAIN="clang"
31340      else
31341          DEFAULT_TOOLCHAIN="gcc"
31342      fi
31343    else
31344      # If Xcode is not installed, but the command line tools are
31345      # then we can't run xcodebuild. On these systems we should
31346      # default to clang
31347      DEFAULT_TOOLCHAIN="clang"
31348    fi
31349  else
31350    # First toolchain type in the list is the default
31351    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31352  fi
31353
31354  if test "x$with_toolchain_type" = xlist; then
31355    # List all toolchains
31356    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31357$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31358    for toolchain in $VALID_TOOLCHAINS; do
31359      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31360      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31361      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31362    done
31363
31364    exit 0
31365  elif test "x$with_toolchain_type" != x; then
31366    # User override; check that it is valid
31367    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31368      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31369$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31370      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31371$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31372      as_fn_error $? "Cannot continue." "$LINENO" 5
31373    fi
31374    TOOLCHAIN_TYPE=$with_toolchain_type
31375  else
31376    # No flag given, use default
31377    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31378  fi
31379
31380
31381  TOOLCHAIN_CC_BINARY_clang="clang"
31382  TOOLCHAIN_CC_BINARY_gcc="gcc"
31383  TOOLCHAIN_CC_BINARY_microsoft="cl"
31384  TOOLCHAIN_CC_BINARY_solstudio="cc"
31385  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31386
31387  TOOLCHAIN_CXX_BINARY_clang="clang++"
31388  TOOLCHAIN_CXX_BINARY_gcc="g++"
31389  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31390  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31391  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31392
31393  # Use indirect variable referencing
31394  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31395  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31396  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31397  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31398  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31399  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31400  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31401  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31402
31403
31404  # Define filename patterns
31405  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31406    LIBRARY_PREFIX=
31407    SHARED_LIBRARY_SUFFIX='.dll'
31408    STATIC_LIBRARY_SUFFIX='.lib'
31409    SHARED_LIBRARY='$1.dll'
31410    STATIC_LIBRARY='$1.lib'
31411    OBJ_SUFFIX='.obj'
31412    EXE_SUFFIX='.exe'
31413  else
31414    LIBRARY_PREFIX=lib
31415    SHARED_LIBRARY_SUFFIX='.so'
31416    STATIC_LIBRARY_SUFFIX='.a'
31417    SHARED_LIBRARY='lib$1.so'
31418    STATIC_LIBRARY='lib$1.a'
31419    OBJ_SUFFIX='.o'
31420    EXE_SUFFIX=''
31421    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31422      # For full static builds, we're overloading the SHARED_LIBRARY
31423      # variables in order to limit the amount of changes required.
31424      # It would be better to remove SHARED and just use LIBRARY and
31425      # LIBRARY_SUFFIX for libraries that can be built either
31426      # shared or static and use STATIC_* for libraries that are
31427      # always built statically.
31428      if test "x$STATIC_BUILD" = xtrue; then
31429        SHARED_LIBRARY='lib$1.a'
31430        SHARED_LIBRARY_SUFFIX='.a'
31431      else
31432        SHARED_LIBRARY='lib$1.dylib'
31433        SHARED_LIBRARY_SUFFIX='.dylib'
31434      fi
31435    fi
31436  fi
31437
31438
31439
31440
31441
31442
31443
31444
31445
31446
31447  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31448    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31449$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31450  else
31451    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31452$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31453  fi
31454
31455
31456# User supplied flags should be used when configure detects compilers
31457
31458  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31459    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31460$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31461  fi
31462
31463  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31464    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31465$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31466  fi
31467
31468  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31469    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31470$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31471  fi
31472
31473
31474# Check whether --with-extra-cflags was given.
31475if test "${with_extra_cflags+set}" = set; then :
31476  withval=$with_extra_cflags;
31477fi
31478
31479
31480
31481# Check whether --with-extra-cxxflags was given.
31482if test "${with_extra_cxxflags+set}" = set; then :
31483  withval=$with_extra_cxxflags;
31484fi
31485
31486
31487
31488# Check whether --with-extra-ldflags was given.
31489if test "${with_extra_ldflags+set}" = set; then :
31490  withval=$with_extra_ldflags;
31491fi
31492
31493
31494  EXTRA_CFLAGS="$with_extra_cflags"
31495  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31496  EXTRA_LDFLAGS="$with_extra_ldflags"
31497
31498
31499
31500
31501
31502  # The global CFLAGS and LDLAGS variables are used by configure tests and
31503  # should include the extra parameters
31504  CFLAGS="$EXTRA_CFLAGS"
31505  CXXFLAGS="$EXTRA_CXXFLAGS"
31506  LDFLAGS="$EXTRA_LDFLAGS"
31507  CPPFLAGS=""
31508
31509# The sysroot cflags are needed for configure to be able to run the compilers
31510
31511  if test "x$SYSROOT" != "x"; then
31512    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31513      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31514        # Solaris Studio does not have a concept of sysroot. Instead we must
31515        # make sure the default include and lib dirs are appended to each
31516        # compile and link command line. Must also add -I-xbuiltin to enable
31517        # inlining of system functions and intrinsics.
31518        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31519        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31520            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31521      fi
31522    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31523      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31524      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31525    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31526      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31527      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31528    fi
31529    # The global CFLAGS and LDFLAGS variables need these for configure to function
31530    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31531    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31532    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31533    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31534  fi
31535
31536  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31537    # We also need -iframework<path>/System/Library/Frameworks
31538    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31539    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31540    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31541    # set this here so it doesn't have to be peppered throughout the forest
31542    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31543    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31544  fi
31545
31546
31547
31548
31549
31550# Then detect the actual binaries needed
31551
31552  # FIXME: Is this needed?
31553  ac_ext=cpp
31554ac_cpp='$CXXCPP $CPPFLAGS'
31555ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31556ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31557ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31558
31559
31560  # Store the CFLAGS etc passed to the configure script.
31561  ORG_CFLAGS="$CFLAGS"
31562  ORG_CXXFLAGS="$CXXFLAGS"
31563
31564  # autoconf magic only relies on PATH, so update it if tools dir is specified
31565  OLD_PATH="$PATH"
31566
31567  # On Windows, we need to detect the visual studio installation first.
31568  # This will change the PATH, but we need to keep that new PATH even
31569  # after toolchain detection is done, since the compiler (on x86) uses
31570  # it for DLL resolution in runtime.
31571  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31572      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31573
31574  # Store path to cygwin link.exe to help excluding it when searching for
31575  # VS linker. This must be done before changing the PATH when looking for VS.
31576  # Extract the first word of "link", so it can be a program name with args.
31577set dummy link; ac_word=$2
31578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31579$as_echo_n "checking for $ac_word... " >&6; }
31580if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31581  $as_echo_n "(cached) " >&6
31582else
31583  case $CYGWIN_LINK in
31584  [\\/]* | ?:[\\/]*)
31585  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31586  ;;
31587  *)
31588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31589for as_dir in $PATH
31590do
31591  IFS=$as_save_IFS
31592  test -z "$as_dir" && as_dir=.
31593    for ac_exec_ext in '' $ac_executable_extensions; do
31594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31595    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31597    break 2
31598  fi
31599done
31600  done
31601IFS=$as_save_IFS
31602
31603  ;;
31604esac
31605fi
31606CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31607if test -n "$CYGWIN_LINK"; then
31608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31609$as_echo "$CYGWIN_LINK" >&6; }
31610else
31611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31612$as_echo "no" >&6; }
31613fi
31614
31615
31616  if test "x$CYGWIN_LINK" != x; then
31617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31618$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31619    "$CYGWIN_LINK" --version > /dev/null
31620    if test $? -eq 0 ; then
31621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31622$as_echo "yes" >&6; }
31623    else
31624      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31625$as_echo "no" >&6; }
31626      # This might be the VS linker. Don't exclude it later on.
31627      CYGWIN_LINK=""
31628    fi
31629  fi
31630
31631  # First-hand choice is to locate and run the vsvars bat file.
31632
31633
31634# Check whether --with-toolchain-version was given.
31635if test "${with_toolchain_version+set}" = set; then :
31636  withval=$with_toolchain_version;
31637fi
31638
31639
31640  if test "x$with_toolchain_version" = xlist; then
31641    # List all toolchains
31642    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31643$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31644    for version in $VALID_VS_VERSIONS; do
31645      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31646      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31647    done
31648
31649    exit 0
31650  elif test "x$DEVKIT_VS_VERSION" != x; then
31651    VS_VERSION=$DEVKIT_VS_VERSION
31652    TOOLCHAIN_VERSION=$VS_VERSION
31653    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31654    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31655    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31656    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31657    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31658    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31659
31660    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31661    # can still be exported as INCLUDE for compiler invocations without
31662    # SYSROOT_CFLAGS
31663    OLDIFS="$IFS"
31664    IFS=";"
31665    for i in $DEVKIT_VS_INCLUDE; do
31666      ipath=$i
31667
31668  unix_path="$ipath"
31669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31670    windows_path=`$CYGPATH -m "$unix_path"`
31671    ipath="$windows_path"
31672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31673    windows_path=`cmd //c echo $unix_path`
31674    ipath="$windows_path"
31675  fi
31676
31677      VS_INCLUDE="$VS_INCLUDE;$ipath"
31678    done
31679    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31680    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31681    for i in $DEVKIT_VS_LIB; do
31682      libpath=$i
31683
31684  unix_path="$libpath"
31685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31686    windows_path=`$CYGPATH -m "$unix_path"`
31687    libpath="$windows_path"
31688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31689    windows_path=`cmd //c echo $unix_path`
31690    libpath="$windows_path"
31691  fi
31692
31693      VS_LIB="$VS_LIB;$libpath"
31694    done
31695    IFS="$OLDIFS"
31696
31697    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31698$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31699
31700  elif test "x$with_toolchain_version" != x; then
31701    # User override; check that it is valid
31702    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31703      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31704$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31705      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31706$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31707      as_fn_error $? "Cannot continue." "$LINENO" 5
31708    fi
31709    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31710  else
31711    # No flag given, use default
31712    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31713  fi
31714
31715  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31716
31717  VS_VERSION="$VS_VERSION"
31718  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31719  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31720  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31721  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31722
31723  # When using --with-tools-dir, assume it points to the correct and default
31724  # version of Visual Studio or that --with-toolchain-version was also set.
31725  if test "x$with_tools_dir" != x; then
31726
31727  if test "x$VS_ENV_CMD" = x; then
31728    VS_VERSION="${VS_VERSION}"
31729    VS_BASE="$with_tools_dir/../.."
31730    METHOD="--with-tools-dir"
31731
31732    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31733      VCVARSFILE="vc/bin/vcvars32.bat"
31734    else
31735      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31736    fi
31737
31738
31739  windows_path="$VS_BASE"
31740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31741    unix_path=`$CYGPATH -u "$windows_path"`
31742    VS_BASE="$unix_path"
31743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31745    VS_BASE="$unix_path"
31746  fi
31747
31748    if test -d "$VS_BASE"; then
31749      if test -f "$VS_BASE/$VCVARSFILE"; then
31750        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31751$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31752        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31753        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31754        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31755        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31756      else
31757        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31758$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31759        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31760$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31761      fi
31762    fi
31763  fi
31764
31765
31766  if test "x$VS_ENV_CMD" = x; then
31767    VS_VERSION="${VS_VERSION}"
31768    VS_BASE="$with_tools_dir/../../.."
31769    METHOD="--with-tools-dir"
31770
31771    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31772      VCVARSFILE="vc/bin/vcvars32.bat"
31773    else
31774      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31775    fi
31776
31777
31778  windows_path="$VS_BASE"
31779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31780    unix_path=`$CYGPATH -u "$windows_path"`
31781    VS_BASE="$unix_path"
31782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31784    VS_BASE="$unix_path"
31785  fi
31786
31787    if test -d "$VS_BASE"; then
31788      if test -f "$VS_BASE/$VCVARSFILE"; then
31789        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31790$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31791        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31792        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31793        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31794        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31795      else
31796        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31797$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31798        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31799$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31800      fi
31801    fi
31802  fi
31803
31804    if test "x$VS_ENV_CMD" = x; then
31805      # Having specified an argument which is incorrect will produce an instant failure;
31806      # we should not go on looking
31807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31808$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31809      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31810$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31811      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31812$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31813      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31814    fi
31815  fi
31816
31817  VS_ENV_CMD=""
31818  VS_ENV_ARGS=""
31819
31820  if test "x$VS_COMNTOOLS" != x; then
31821
31822  if test "x$VS_ENV_CMD" = x; then
31823    VS_VERSION="${VS_VERSION}"
31824    VS_BASE="$VS_COMNTOOLS/../.."
31825    METHOD="$VS_COMNTOOLS_VAR variable"
31826
31827    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31828      VCVARSFILE="vc/bin/vcvars32.bat"
31829    else
31830      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31831    fi
31832
31833
31834  windows_path="$VS_BASE"
31835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31836    unix_path=`$CYGPATH -u "$windows_path"`
31837    VS_BASE="$unix_path"
31838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31840    VS_BASE="$unix_path"
31841  fi
31842
31843    if test -d "$VS_BASE"; then
31844      if test -f "$VS_BASE/$VCVARSFILE"; then
31845        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31846$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31847        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31848        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31849        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31850        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31851      else
31852        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31853$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31854        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31855$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31856      fi
31857    fi
31858  fi
31859
31860  fi
31861  if test "x$PROGRAMFILES" != x; then
31862
31863  if test "x$VS_ENV_CMD" = x; then
31864    VS_VERSION="${VS_VERSION}"
31865    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31866    METHOD="well-known name"
31867
31868    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31869      VCVARSFILE="vc/bin/vcvars32.bat"
31870    else
31871      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31872    fi
31873
31874
31875  windows_path="$VS_BASE"
31876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31877    unix_path=`$CYGPATH -u "$windows_path"`
31878    VS_BASE="$unix_path"
31879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31881    VS_BASE="$unix_path"
31882  fi
31883
31884    if test -d "$VS_BASE"; then
31885      if test -f "$VS_BASE/$VCVARSFILE"; then
31886        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31887$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31888        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31889        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31890        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31891        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31892      else
31893        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31894$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31895        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31896$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31897      fi
31898    fi
31899  fi
31900
31901  fi
31902  # Work around the insanely named ProgramFiles(x86) env variable
31903  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31904  if test "x$PROGRAMFILES_X86" != x; then
31905
31906  if test "x$VS_ENV_CMD" = x; then
31907    VS_VERSION="${VS_VERSION}"
31908    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31909    METHOD="well-known name"
31910
31911    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31912      VCVARSFILE="vc/bin/vcvars32.bat"
31913    else
31914      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31915    fi
31916
31917
31918  windows_path="$VS_BASE"
31919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31920    unix_path=`$CYGPATH -u "$windows_path"`
31921    VS_BASE="$unix_path"
31922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31924    VS_BASE="$unix_path"
31925  fi
31926
31927    if test -d "$VS_BASE"; then
31928      if test -f "$VS_BASE/$VCVARSFILE"; then
31929        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31930$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31931        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31932        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31933        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31934        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31935      else
31936        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31937$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31938        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31939$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31940      fi
31941    fi
31942  fi
31943
31944  fi
31945
31946  if test "x$VS_ENV_CMD" = x; then
31947    VS_VERSION="${VS_VERSION}"
31948    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31949    METHOD="well-known name"
31950
31951    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31952      VCVARSFILE="vc/bin/vcvars32.bat"
31953    else
31954      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31955    fi
31956
31957
31958  windows_path="$VS_BASE"
31959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31960    unix_path=`$CYGPATH -u "$windows_path"`
31961    VS_BASE="$unix_path"
31962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31964    VS_BASE="$unix_path"
31965  fi
31966
31967    if test -d "$VS_BASE"; then
31968      if test -f "$VS_BASE/$VCVARSFILE"; then
31969        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31970$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31971        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31972        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31973        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31974        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31975      else
31976        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31977$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31978        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31979$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31980      fi
31981    fi
31982  fi
31983
31984
31985  if test "x$VS_ENV_CMD" = x; then
31986    VS_VERSION="${VS_VERSION}"
31987    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31988    METHOD="well-known name"
31989
31990    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31991      VCVARSFILE="vc/bin/vcvars32.bat"
31992    else
31993      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31994    fi
31995
31996
31997  windows_path="$VS_BASE"
31998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31999    unix_path=`$CYGPATH -u "$windows_path"`
32000    VS_BASE="$unix_path"
32001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32003    VS_BASE="$unix_path"
32004  fi
32005
32006    if test -d "$VS_BASE"; then
32007      if test -f "$VS_BASE/$VCVARSFILE"; then
32008        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32009$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32010        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32011        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32012        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32013        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32014      else
32015        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32016$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32017        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32018$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32019      fi
32020    fi
32021  fi
32022
32023
32024  if test "x$SDK_INSTALL_DIR" != x; then
32025    if test "x$ProgramW6432" != x; then
32026
32027  if test "x$VS_ENV_CMD" = x; then
32028    VS_VERSION="${VS_VERSION}"
32029    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32030    METHOD="well-known name"
32031
32032  windows_path="$WIN_SDK_BASE"
32033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32034    unix_path=`$CYGPATH -u "$windows_path"`
32035    WIN_SDK_BASE="$unix_path"
32036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32038    WIN_SDK_BASE="$unix_path"
32039  fi
32040
32041    if test -d "$WIN_SDK_BASE"; then
32042      # There have been cases of partial or broken SDK installations. A missing
32043      # lib dir is not going to work.
32044      if test ! -d "$WIN_SDK_BASE/lib"; then
32045        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32046$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32047        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32048$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32049      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32050        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32051$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32052        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32053        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32054          VS_ENV_ARGS="/x86"
32055        else
32056          VS_ENV_ARGS="/x64"
32057        fi
32058        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32059        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32060        # TODO: improve detection for other versions of SDK
32061        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32062      else
32063        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32064$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32065        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32066$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32067      fi
32068    fi
32069  fi
32070
32071    fi
32072    if test "x$PROGRAMW6432" != x; then
32073
32074  if test "x$VS_ENV_CMD" = x; then
32075    VS_VERSION="${VS_VERSION}"
32076    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32077    METHOD="well-known name"
32078
32079  windows_path="$WIN_SDK_BASE"
32080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32081    unix_path=`$CYGPATH -u "$windows_path"`
32082    WIN_SDK_BASE="$unix_path"
32083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32085    WIN_SDK_BASE="$unix_path"
32086  fi
32087
32088    if test -d "$WIN_SDK_BASE"; then
32089      # There have been cases of partial or broken SDK installations. A missing
32090      # lib dir is not going to work.
32091      if test ! -d "$WIN_SDK_BASE/lib"; then
32092        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32093$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32094        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32095$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32096      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32097        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32098$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32099        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32100        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32101          VS_ENV_ARGS="/x86"
32102        else
32103          VS_ENV_ARGS="/x64"
32104        fi
32105        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32106        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32107        # TODO: improve detection for other versions of SDK
32108        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32109      else
32110        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32111$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32112        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32113$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32114      fi
32115    fi
32116  fi
32117
32118    fi
32119    if test "x$PROGRAMFILES" != x; then
32120
32121  if test "x$VS_ENV_CMD" = x; then
32122    VS_VERSION="${VS_VERSION}"
32123    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32124    METHOD="well-known name"
32125
32126  windows_path="$WIN_SDK_BASE"
32127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32128    unix_path=`$CYGPATH -u "$windows_path"`
32129    WIN_SDK_BASE="$unix_path"
32130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32132    WIN_SDK_BASE="$unix_path"
32133  fi
32134
32135    if test -d "$WIN_SDK_BASE"; then
32136      # There have been cases of partial or broken SDK installations. A missing
32137      # lib dir is not going to work.
32138      if test ! -d "$WIN_SDK_BASE/lib"; then
32139        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32140$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32141        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32142$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32143      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32144        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32145$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32146        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32147        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32148          VS_ENV_ARGS="/x86"
32149        else
32150          VS_ENV_ARGS="/x64"
32151        fi
32152        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32153        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32154        # TODO: improve detection for other versions of SDK
32155        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32156      else
32157        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32158$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32159        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32160$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32161      fi
32162    fi
32163  fi
32164
32165    fi
32166
32167  if test "x$VS_ENV_CMD" = x; then
32168    VS_VERSION="${VS_VERSION}"
32169    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32170    METHOD="well-known name"
32171
32172  windows_path="$WIN_SDK_BASE"
32173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32174    unix_path=`$CYGPATH -u "$windows_path"`
32175    WIN_SDK_BASE="$unix_path"
32176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32178    WIN_SDK_BASE="$unix_path"
32179  fi
32180
32181    if test -d "$WIN_SDK_BASE"; then
32182      # There have been cases of partial or broken SDK installations. A missing
32183      # lib dir is not going to work.
32184      if test ! -d "$WIN_SDK_BASE/lib"; then
32185        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32186$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32187        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32188$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32189      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32190        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32191$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32192        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32193        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32194          VS_ENV_ARGS="/x86"
32195        else
32196          VS_ENV_ARGS="/x64"
32197        fi
32198        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32199        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32200        # TODO: improve detection for other versions of SDK
32201        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32202      else
32203        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32204$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32205        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32206$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32207      fi
32208    fi
32209  fi
32210
32211
32212  if test "x$VS_ENV_CMD" = x; then
32213    VS_VERSION="${VS_VERSION}"
32214    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32215    METHOD="well-known name"
32216
32217  windows_path="$WIN_SDK_BASE"
32218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32219    unix_path=`$CYGPATH -u "$windows_path"`
32220    WIN_SDK_BASE="$unix_path"
32221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32223    WIN_SDK_BASE="$unix_path"
32224  fi
32225
32226    if test -d "$WIN_SDK_BASE"; then
32227      # There have been cases of partial or broken SDK installations. A missing
32228      # lib dir is not going to work.
32229      if test ! -d "$WIN_SDK_BASE/lib"; then
32230        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32231$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32232        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32233$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32234      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32235        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32236$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32237        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32238        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32239          VS_ENV_ARGS="/x86"
32240        else
32241          VS_ENV_ARGS="/x64"
32242        fi
32243        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32244        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32245        # TODO: improve detection for other versions of SDK
32246        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32247      else
32248        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32249$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32250        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32251$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32252      fi
32253    fi
32254  fi
32255
32256  fi
32257
32258    if test "x$VS_ENV_CMD" != x; then
32259      TOOLCHAIN_VERSION=$VS_VERSION
32260      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32261      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32262      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32263      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32264      # The rest of the variables are already evaled while probing
32265      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32266$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32267      break
32268    fi
32269  done
32270
32271
32272  # If we have a devkit, skip all of the below.
32273  if test "x$DEVKIT_VS_VERSION" = x; then
32274    if test "x$VS_ENV_CMD" != x; then
32275      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32276
32277  # Only process if variable expands to non-empty
32278
32279  if test "x$VS_ENV_CMD" != x; then
32280    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32281
32282  # First separate the path from the arguments. This will split at the first
32283  # space.
32284  complete="$VS_ENV_CMD"
32285  path="${complete%% *}"
32286  tmp="$complete EOL"
32287  arguments="${tmp#* }"
32288
32289  # Input might be given as Windows format, start by converting to
32290  # unix format.
32291  new_path=`$CYGPATH -u "$path"`
32292
32293  # Now try to locate executable using which
32294  new_path=`$WHICH "$new_path" 2> /dev/null`
32295  # bat and cmd files are not always considered executable in cygwin causing which
32296  # to not find them
32297  if test "x$new_path" = x \
32298      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32299      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32300    new_path=`$CYGPATH -u "$path"`
32301  fi
32302  if test "x$new_path" = x; then
32303    # Oops. Which didn't find the executable.
32304    # The splitting of arguments from the executable at a space might have been incorrect,
32305    # since paths with space are more likely in Windows. Give it another try with the whole
32306    # argument.
32307    path="$complete"
32308    arguments="EOL"
32309    new_path=`$CYGPATH -u "$path"`
32310    new_path=`$WHICH "$new_path" 2> /dev/null`
32311    # bat and cmd files are not always considered executable in cygwin causing which
32312    # to not find them
32313    if test "x$new_path" = x \
32314        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32315        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32316      new_path=`$CYGPATH -u "$path"`
32317    fi
32318    if test "x$new_path" = x; then
32319      # It's still not found. Now this is an unrecoverable error.
32320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32321$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32322      has_space=`$ECHO "$complete" | $GREP " "`
32323      if test "x$has_space" != x; then
32324        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32325$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32326      fi
32327      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32328    fi
32329  fi
32330
32331  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32332  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32333  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32334  # "foo.exe" is OK but "foo" is an error.
32335  #
32336  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32337  # It is also a way to make sure we got the proper file name for the real test later on.
32338  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32339  if test "x$test_shortpath" = x; then
32340    # Short path failed, file does not exist as specified.
32341    # Try adding .exe or .cmd
32342    if test -f "${new_path}.exe"; then
32343      input_to_shortpath="${new_path}.exe"
32344    elif test -f "${new_path}.cmd"; then
32345      input_to_shortpath="${new_path}.cmd"
32346    else
32347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32348$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32349      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32350$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32351      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32352    fi
32353  else
32354    input_to_shortpath="$new_path"
32355  fi
32356
32357  # Call helper function which possibly converts this using DOS-style short mode.
32358  # If so, the updated path is stored in $new_path.
32359  new_path="$input_to_shortpath"
32360
32361  input_path="$input_to_shortpath"
32362  # Check if we need to convert this using DOS-style short mode. If the path
32363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32364  # take no chances and rewrite it.
32365  # Note: m4 eats our [], so we need to use [ and ] instead.
32366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32367  if test "x$has_forbidden_chars" != x; then
32368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32372      # Going to short mode and back again did indeed matter. Since short mode is
32373      # case insensitive, let's make it lowercase to improve readability.
32374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32375      # Now convert it back to Unix-style (cygpath)
32376      input_path=`$CYGPATH -u "$shortmode_path"`
32377      new_path="$input_path"
32378    fi
32379  fi
32380
32381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32382  if test "x$test_cygdrive_prefix" = x; then
32383    # As a simple fix, exclude /usr/bin since it's not a real path.
32384    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32386      # a path prefixed by /cygdrive for fixpath to work.
32387      new_path="$CYGWIN_ROOT_PATH$input_path"
32388    fi
32389  fi
32390
32391  # remove trailing .exe if any
32392  new_path="${new_path/%.exe/}"
32393
32394    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32395
32396  # First separate the path from the arguments. This will split at the first
32397  # space.
32398  complete="$VS_ENV_CMD"
32399  path="${complete%% *}"
32400  tmp="$complete EOL"
32401  arguments="${tmp#* }"
32402
32403  # Input might be given as Windows format, start by converting to
32404  # unix format.
32405  new_path="$path"
32406
32407  windows_path="$new_path"
32408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32409    unix_path=`$CYGPATH -u "$windows_path"`
32410    new_path="$unix_path"
32411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32413    new_path="$unix_path"
32414  fi
32415
32416
32417  # Now try to locate executable using which
32418  new_path=`$WHICH "$new_path" 2> /dev/null`
32419
32420  if test "x$new_path" = x; then
32421    # Oops. Which didn't find the executable.
32422    # The splitting of arguments from the executable at a space might have been incorrect,
32423    # since paths with space are more likely in Windows. Give it another try with the whole
32424    # argument.
32425    path="$complete"
32426    arguments="EOL"
32427    new_path="$path"
32428
32429  windows_path="$new_path"
32430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32431    unix_path=`$CYGPATH -u "$windows_path"`
32432    new_path="$unix_path"
32433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32435    new_path="$unix_path"
32436  fi
32437
32438
32439    new_path=`$WHICH "$new_path" 2> /dev/null`
32440    # bat and cmd files are not always considered executable in MSYS causing which
32441    # to not find them
32442    if test "x$new_path" = x \
32443        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32444        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32445      new_path="$path"
32446
32447  windows_path="$new_path"
32448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32449    unix_path=`$CYGPATH -u "$windows_path"`
32450    new_path="$unix_path"
32451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32453    new_path="$unix_path"
32454  fi
32455
32456    fi
32457
32458    if test "x$new_path" = x; then
32459      # It's still not found. Now this is an unrecoverable error.
32460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32461$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32462      has_space=`$ECHO "$complete" | $GREP " "`
32463      if test "x$has_space" != x; then
32464        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32465$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32466      fi
32467      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32468    fi
32469  fi
32470
32471  # Now new_path has a complete unix path to the binary
32472  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32473    # Keep paths in /bin as-is, but remove trailing .exe if any
32474    new_path="${new_path/%.exe/}"
32475    # Do not save /bin paths to all_fixpath_prefixes!
32476  else
32477    # Not in mixed or Windows style, start by that.
32478    new_path=`cmd //c echo $new_path`
32479
32480  input_path="$new_path"
32481  # Check if we need to convert this using DOS-style short mode. If the path
32482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32483  # take no chances and rewrite it.
32484  # Note: m4 eats our [], so we need to use [ and ] instead.
32485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32486  if test "x$has_forbidden_chars" != x; then
32487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32489  fi
32490
32491    # Output is in $new_path
32492
32493  windows_path="$new_path"
32494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32495    unix_path=`$CYGPATH -u "$windows_path"`
32496    new_path="$unix_path"
32497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32499    new_path="$unix_path"
32500  fi
32501
32502    # remove trailing .exe if any
32503    new_path="${new_path/%.exe/}"
32504
32505    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32506    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32507  fi
32508
32509    else
32510      # We're on a unix platform. Hooray! :)
32511      # First separate the path from the arguments. This will split at the first
32512      # space.
32513      complete="$VS_ENV_CMD"
32514      path="${complete%% *}"
32515      tmp="$complete EOL"
32516      arguments="${tmp#* }"
32517
32518      # Cannot rely on the command "which" here since it doesn't always work.
32519      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32520      if test -z "$is_absolute_path"; then
32521        # Path to executable is not absolute. Find it.
32522        IFS_save="$IFS"
32523        IFS=:
32524        for p in $PATH; do
32525          if test -f "$p/$path" && test -x "$p/$path"; then
32526            new_path="$p/$path"
32527            break
32528          fi
32529        done
32530        IFS="$IFS_save"
32531      else
32532        # This is an absolute path, we can use it without further modifications.
32533        new_path="$path"
32534      fi
32535
32536      if test "x$new_path" = x; then
32537        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32538$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32539        has_space=`$ECHO "$complete" | $GREP " "`
32540        if test "x$has_space" != x; then
32541          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32542$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32543        fi
32544        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32545      fi
32546    fi
32547
32548    # Now join together the path and the arguments once again
32549    if test "x$arguments" != xEOL; then
32550      new_complete="$new_path ${arguments% *}"
32551    else
32552      new_complete="$new_path"
32553    fi
32554
32555    if test "x$complete" != "x$new_complete"; then
32556      VS_ENV_CMD="$new_complete"
32557      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32558$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32559    fi
32560  fi
32561
32562
32563      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32564      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32565$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32566
32567      # We need to create a couple of temporary files.
32568      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32569      $MKDIR -p $VS_ENV_TMP_DIR
32570
32571      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32572      # Instead create a shell script which will set the relevant variables when run.
32573      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32574
32575  unix_path="$WINPATH_VS_ENV_CMD"
32576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32577    windows_path=`$CYGPATH -m "$unix_path"`
32578    WINPATH_VS_ENV_CMD="$windows_path"
32579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32580    windows_path=`cmd //c echo $unix_path`
32581    WINPATH_VS_ENV_CMD="$windows_path"
32582  fi
32583
32584      WINPATH_BASH="$BASH"
32585
32586  unix_path="$WINPATH_BASH"
32587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32588    windows_path=`$CYGPATH -m "$unix_path"`
32589    WINPATH_BASH="$windows_path"
32590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32591    windows_path=`cmd //c echo $unix_path`
32592    WINPATH_BASH="$windows_path"
32593  fi
32594
32595
32596      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32597      # script (executable by bash) that will setup the important variables.
32598      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32599      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32600      # This will end up something like:
32601      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32602      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32603      # These will end up something like:
32604      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32605      # The trailing space for everyone except PATH is no typo, but is needed due
32606      # to trailing \ in the Windows paths. These will be stripped later.
32607      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32608          >> $EXTRACT_VC_ENV_BAT_FILE
32609      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32610          >> $EXTRACT_VC_ENV_BAT_FILE
32611      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32612          >> $EXTRACT_VC_ENV_BAT_FILE
32613      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32614          >> $EXTRACT_VC_ENV_BAT_FILE
32615      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32616          >> $EXTRACT_VC_ENV_BAT_FILE
32617      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32618          >> $EXTRACT_VC_ENV_BAT_FILE
32619
32620      # Now execute the newly created bat file.
32621      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32622      # Change directory so we don't need to mess with Windows paths in redirects.
32623      cd $VS_ENV_TMP_DIR
32624      cmd /c extract-vs-env.bat | $CAT
32625      cd $CURDIR
32626
32627      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32628        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32629$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32630        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32631$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32632        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32633$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32634        as_fn_error $? "Cannot continue" "$LINENO" 5
32635      fi
32636
32637      # Now set all paths and other env variables. This will allow the rest of
32638      # the configure script to find and run the compiler in the proper way.
32639      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32640$as_echo "$as_me: Setting extracted environment variables" >&6;}
32641      . $VS_ENV_TMP_DIR/set-vs-env.sh
32642      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32643      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32644    else
32645      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32646      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32647$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32648    fi
32649  fi
32650
32651  # At this point, we should have correct variables in the environment, or we can't continue.
32652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32653$as_echo_n "checking for Visual Studio variables... " >&6; }
32654
32655  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32656      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32657    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32658      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32659$as_echo "present but broken" >&6; }
32660      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32661    else
32662      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32663$as_echo "ok" >&6; }
32664      # Remove any trailing "\" ";" and " " from the variables.
32665      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32666      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32667      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32668      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32669      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32670      # Remove any paths containing # (typically F#) as that messes up make. This
32671      # is needed if visual studio was installed with F# support.
32672      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32673
32674
32675
32676
32677
32678      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32679      OLDIFS="$IFS"
32680      IFS=";"
32681      for i in $VS_INCLUDE; do
32682        ipath=$i
32683        # Only process non-empty elements
32684        if test "x$ipath" != x; then
32685          IFS="$OLDIFS"
32686          # Check that directory exists before calling fixup_path
32687          testpath=$ipath
32688
32689  windows_path="$testpath"
32690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32691    unix_path=`$CYGPATH -u "$windows_path"`
32692    testpath="$unix_path"
32693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32695    testpath="$unix_path"
32696  fi
32697
32698          if test -d "$testpath"; then
32699
32700  # Only process if variable expands to non-empty
32701
32702  if test "x$ipath" != x; then
32703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32704
32705  # Input might be given as Windows format, start by converting to
32706  # unix format.
32707  path="$ipath"
32708  new_path=`$CYGPATH -u "$path"`
32709
32710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32713  # "foo.exe" is OK but "foo" is an error.
32714  #
32715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32716  # It is also a way to make sure we got the proper file name for the real test later on.
32717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32718  if test "x$test_shortpath" = x; then
32719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32720$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32721    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32722  fi
32723
32724  # Call helper function which possibly converts this using DOS-style short mode.
32725  # If so, the updated path is stored in $new_path.
32726
32727  input_path="$new_path"
32728  # Check if we need to convert this using DOS-style short mode. If the path
32729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32730  # take no chances and rewrite it.
32731  # Note: m4 eats our [], so we need to use [ and ] instead.
32732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32733  if test "x$has_forbidden_chars" != x; then
32734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32738      # Going to short mode and back again did indeed matter. Since short mode is
32739      # case insensitive, let's make it lowercase to improve readability.
32740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32741      # Now convert it back to Unix-style (cygpath)
32742      input_path=`$CYGPATH -u "$shortmode_path"`
32743      new_path="$input_path"
32744    fi
32745  fi
32746
32747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32748  if test "x$test_cygdrive_prefix" = x; then
32749    # As a simple fix, exclude /usr/bin since it's not a real path.
32750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32752      # a path prefixed by /cygdrive for fixpath to work.
32753      new_path="$CYGWIN_ROOT_PATH$input_path"
32754    fi
32755  fi
32756
32757
32758  if test "x$path" != "x$new_path"; then
32759    ipath="$new_path"
32760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32761$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32762  fi
32763
32764    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32765
32766  path="$ipath"
32767  has_colon=`$ECHO $path | $GREP ^.:`
32768  new_path="$path"
32769  if test "x$has_colon" = x; then
32770    # Not in mixed or Windows style, start by that.
32771    new_path=`cmd //c echo $path`
32772  fi
32773
32774
32775  input_path="$new_path"
32776  # Check if we need to convert this using DOS-style short mode. If the path
32777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32778  # take no chances and rewrite it.
32779  # Note: m4 eats our [], so we need to use [ and ] instead.
32780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32781  if test "x$has_forbidden_chars" != x; then
32782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32784  fi
32785
32786
32787  windows_path="$new_path"
32788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32789    unix_path=`$CYGPATH -u "$windows_path"`
32790    new_path="$unix_path"
32791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32793    new_path="$unix_path"
32794  fi
32795
32796  if test "x$path" != "x$new_path"; then
32797    ipath="$new_path"
32798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32799$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32800  fi
32801
32802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32804
32805    else
32806      # We're on a unix platform. Hooray! :)
32807      path="$ipath"
32808      has_space=`$ECHO "$path" | $GREP " "`
32809      if test "x$has_space" != x; then
32810        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32811$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32812        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32813      fi
32814
32815      # Use eval to expand a potential ~
32816      eval path="$path"
32817      if test ! -f "$path" && test ! -d "$path"; then
32818        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32819      fi
32820
32821      if test -d "$path"; then
32822        ipath="`cd "$path"; $THEPWDCMD -L`"
32823      else
32824        dir="`$DIRNAME "$path"`"
32825        base="`$BASENAME "$path"`"
32826        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32827      fi
32828    fi
32829  fi
32830
32831            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32832          fi
32833          IFS=";"
32834        fi
32835      done
32836      # Convert VS_LIB into SYSROOT_LDFLAGS
32837      for i in $VS_LIB; do
32838        libpath=$i
32839        # Only process non-empty elements
32840        if test "x$libpath" != x; then
32841          IFS="$OLDIFS"
32842          # Check that directory exists before calling fixup_path
32843          testpath=$libpath
32844
32845  windows_path="$testpath"
32846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32847    unix_path=`$CYGPATH -u "$windows_path"`
32848    testpath="$unix_path"
32849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32851    testpath="$unix_path"
32852  fi
32853
32854          if test -d "$testpath"; then
32855
32856  # Only process if variable expands to non-empty
32857
32858  if test "x$libpath" != x; then
32859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32860
32861  # Input might be given as Windows format, start by converting to
32862  # unix format.
32863  path="$libpath"
32864  new_path=`$CYGPATH -u "$path"`
32865
32866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32869  # "foo.exe" is OK but "foo" is an error.
32870  #
32871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32872  # It is also a way to make sure we got the proper file name for the real test later on.
32873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32874  if test "x$test_shortpath" = x; then
32875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32876$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32877    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32878  fi
32879
32880  # Call helper function which possibly converts this using DOS-style short mode.
32881  # If so, the updated path is stored in $new_path.
32882
32883  input_path="$new_path"
32884  # Check if we need to convert this using DOS-style short mode. If the path
32885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32886  # take no chances and rewrite it.
32887  # Note: m4 eats our [], so we need to use [ and ] instead.
32888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32889  if test "x$has_forbidden_chars" != x; then
32890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32894      # Going to short mode and back again did indeed matter. Since short mode is
32895      # case insensitive, let's make it lowercase to improve readability.
32896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32897      # Now convert it back to Unix-style (cygpath)
32898      input_path=`$CYGPATH -u "$shortmode_path"`
32899      new_path="$input_path"
32900    fi
32901  fi
32902
32903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32904  if test "x$test_cygdrive_prefix" = x; then
32905    # As a simple fix, exclude /usr/bin since it's not a real path.
32906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32908      # a path prefixed by /cygdrive for fixpath to work.
32909      new_path="$CYGWIN_ROOT_PATH$input_path"
32910    fi
32911  fi
32912
32913
32914  if test "x$path" != "x$new_path"; then
32915    libpath="$new_path"
32916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32917$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32918  fi
32919
32920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32921
32922  path="$libpath"
32923  has_colon=`$ECHO $path | $GREP ^.:`
32924  new_path="$path"
32925  if test "x$has_colon" = x; then
32926    # Not in mixed or Windows style, start by that.
32927    new_path=`cmd //c echo $path`
32928  fi
32929
32930
32931  input_path="$new_path"
32932  # Check if we need to convert this using DOS-style short mode. If the path
32933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32934  # take no chances and rewrite it.
32935  # Note: m4 eats our [], so we need to use [ and ] instead.
32936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32937  if test "x$has_forbidden_chars" != x; then
32938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32940  fi
32941
32942
32943  windows_path="$new_path"
32944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32945    unix_path=`$CYGPATH -u "$windows_path"`
32946    new_path="$unix_path"
32947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32949    new_path="$unix_path"
32950  fi
32951
32952  if test "x$path" != "x$new_path"; then
32953    libpath="$new_path"
32954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32955$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32956  fi
32957
32958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32960
32961    else
32962      # We're on a unix platform. Hooray! :)
32963      path="$libpath"
32964      has_space=`$ECHO "$path" | $GREP " "`
32965      if test "x$has_space" != x; then
32966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32967$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32968        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32969      fi
32970
32971      # Use eval to expand a potential ~
32972      eval path="$path"
32973      if test ! -f "$path" && test ! -d "$path"; then
32974        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32975      fi
32976
32977      if test -d "$path"; then
32978        libpath="`cd "$path"; $THEPWDCMD -L`"
32979      else
32980        dir="`$DIRNAME "$path"`"
32981        base="`$BASENAME "$path"`"
32982        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32983      fi
32984    fi
32985  fi
32986
32987            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32988          fi
32989          IFS=";"
32990        fi
32991      done
32992      IFS="$OLDIFS"
32993    fi
32994  else
32995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32996$as_echo "not found" >&6; }
32997
32998    if test "x$VS_ENV_CMD" = x; then
32999      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33000$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33001      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33002$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33003    else
33004      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33005$as_echo "$as_me: Running the extraction script failed." >&6;}
33006    fi
33007    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33008$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33009    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33010$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33011    as_fn_error $? "Cannot continue" "$LINENO" 5
33012  fi
33013
33014    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33015    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33016    PATH="$VS_PATH"
33017    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33018    export INCLUDE="$VS_INCLUDE"
33019    export LIB="$VS_LIB"
33020  else
33021    if test "x$XCODE_VERSION_OUTPUT" != x; then
33022      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33023      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33024      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33025    else
33026      # Currently we do not define this for other toolchains. This might change as the need arise.
33027      TOOLCHAIN_VERSION=
33028    fi
33029  fi
33030
33031
33032  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33033  # override all other locations.
33034  if test "x$TOOLCHAIN_PATH" != x; then
33035    PATH=$TOOLCHAIN_PATH:$PATH
33036  fi
33037
33038
33039  #
33040  # Setup the compilers (CC and CXX)
33041  #
33042
33043  COMPILER_NAME=C
33044  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33045
33046  if test "x$CC" != x; then
33047    # User has supplied compiler name already, always let that override.
33048    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33049$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33050    if test "x`basename $CC`" = "x$CC"; then
33051      # A command without a complete path is provided, search $PATH.
33052
33053      for ac_prog in $CC
33054do
33055  # Extract the first word of "$ac_prog", so it can be a program name with args.
33056set dummy $ac_prog; ac_word=$2
33057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33058$as_echo_n "checking for $ac_word... " >&6; }
33059if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33060  $as_echo_n "(cached) " >&6
33061else
33062  case $POTENTIAL_CC in
33063  [\\/]* | ?:[\\/]*)
33064  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33065  ;;
33066  *)
33067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33068for as_dir in $PATH
33069do
33070  IFS=$as_save_IFS
33071  test -z "$as_dir" && as_dir=.
33072    for ac_exec_ext in '' $ac_executable_extensions; do
33073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33074    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33076    break 2
33077  fi
33078done
33079  done
33080IFS=$as_save_IFS
33081
33082  ;;
33083esac
33084fi
33085POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33086if test -n "$POTENTIAL_CC"; then
33087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33088$as_echo "$POTENTIAL_CC" >&6; }
33089else
33090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33091$as_echo "no" >&6; }
33092fi
33093
33094
33095  test -n "$POTENTIAL_CC" && break
33096done
33097
33098      if test "x$POTENTIAL_CC" != x; then
33099        CC=$POTENTIAL_CC
33100      else
33101        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33102      fi
33103    else
33104      # Otherwise it might already be a complete path
33105      if test ! -x "$CC"; then
33106        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33107      fi
33108    fi
33109  else
33110    # No user supplied value. Locate compiler ourselves.
33111
33112    # If we are cross compiling, assume cross compilation tools follows the
33113    # cross compilation standard where they are prefixed with the autoconf
33114    # standard name for the target. For example the binary
33115    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33116    # If we are not cross compiling, then the default compiler name will be
33117    # used.
33118
33119    CC=
33120    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33121    # before checking the rest of the PATH.
33122    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33123    # step, this should not be necessary.
33124    if test -n "$TOOLCHAIN_PATH"; then
33125      PATH_save="$PATH"
33126      PATH="$TOOLCHAIN_PATH"
33127      for ac_prog in $SEARCH_LIST
33128do
33129  # Extract the first word of "$ac_prog", so it can be a program name with args.
33130set dummy $ac_prog; ac_word=$2
33131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33132$as_echo_n "checking for $ac_word... " >&6; }
33133if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33134  $as_echo_n "(cached) " >&6
33135else
33136  case $TOOLCHAIN_PATH_CC in
33137  [\\/]* | ?:[\\/]*)
33138  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33139  ;;
33140  *)
33141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33142for as_dir in $PATH
33143do
33144  IFS=$as_save_IFS
33145  test -z "$as_dir" && as_dir=.
33146    for ac_exec_ext in '' $ac_executable_extensions; do
33147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33148    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33150    break 2
33151  fi
33152done
33153  done
33154IFS=$as_save_IFS
33155
33156  ;;
33157esac
33158fi
33159TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33160if test -n "$TOOLCHAIN_PATH_CC"; then
33161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33162$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33163else
33164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33165$as_echo "no" >&6; }
33166fi
33167
33168
33169  test -n "$TOOLCHAIN_PATH_CC" && break
33170done
33171
33172      CC=$TOOLCHAIN_PATH_CC
33173      PATH="$PATH_save"
33174    fi
33175
33176    # AC_PATH_PROGS can't be run multiple times with the same variable,
33177    # so create a new name for this run.
33178    if test "x$CC" = x; then
33179      for ac_prog in $SEARCH_LIST
33180do
33181  # Extract the first word of "$ac_prog", so it can be a program name with args.
33182set dummy $ac_prog; ac_word=$2
33183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33184$as_echo_n "checking for $ac_word... " >&6; }
33185if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33186  $as_echo_n "(cached) " >&6
33187else
33188  case $POTENTIAL_CC in
33189  [\\/]* | ?:[\\/]*)
33190  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33191  ;;
33192  *)
33193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33194for as_dir in $PATH
33195do
33196  IFS=$as_save_IFS
33197  test -z "$as_dir" && as_dir=.
33198    for ac_exec_ext in '' $ac_executable_extensions; do
33199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33200    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33202    break 2
33203  fi
33204done
33205  done
33206IFS=$as_save_IFS
33207
33208  ;;
33209esac
33210fi
33211POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33212if test -n "$POTENTIAL_CC"; then
33213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33214$as_echo "$POTENTIAL_CC" >&6; }
33215else
33216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33217$as_echo "no" >&6; }
33218fi
33219
33220
33221  test -n "$POTENTIAL_CC" && break
33222done
33223
33224      CC=$POTENTIAL_CC
33225    fi
33226
33227    if test "x$CC" = x; then
33228
33229  # Print a helpful message on how to acquire the necessary build dependency.
33230  # devkit is the help tag: freetype, cups, alsa etc
33231  MISSING_DEPENDENCY=devkit
33232
33233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33234    cygwin_help $MISSING_DEPENDENCY
33235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33236    msys_help $MISSING_DEPENDENCY
33237  else
33238    PKGHANDLER_COMMAND=
33239
33240    case $PKGHANDLER in
33241      apt-get)
33242        apt_help     $MISSING_DEPENDENCY ;;
33243      yum)
33244        yum_help     $MISSING_DEPENDENCY ;;
33245      brew)
33246        brew_help    $MISSING_DEPENDENCY ;;
33247      port)
33248        port_help    $MISSING_DEPENDENCY ;;
33249      pkgutil)
33250        pkgutil_help $MISSING_DEPENDENCY ;;
33251      pkgadd)
33252        pkgadd_help  $MISSING_DEPENDENCY ;;
33253    esac
33254
33255    if test "x$PKGHANDLER_COMMAND" != x; then
33256      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33257    fi
33258  fi
33259
33260      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33261    fi
33262  fi
33263
33264  # Now we have a compiler binary in CC. Make sure it's okay.
33265
33266  # Only process if variable expands to non-empty
33267
33268  if test "x$CC" != x; then
33269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33270
33271  # First separate the path from the arguments. This will split at the first
33272  # space.
33273  complete="$CC"
33274  path="${complete%% *}"
33275  tmp="$complete EOL"
33276  arguments="${tmp#* }"
33277
33278  # Input might be given as Windows format, start by converting to
33279  # unix format.
33280  new_path=`$CYGPATH -u "$path"`
33281
33282  # Now try to locate executable using which
33283  new_path=`$WHICH "$new_path" 2> /dev/null`
33284  # bat and cmd files are not always considered executable in cygwin causing which
33285  # to not find them
33286  if test "x$new_path" = x \
33287      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33288      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33289    new_path=`$CYGPATH -u "$path"`
33290  fi
33291  if test "x$new_path" = x; then
33292    # Oops. Which didn't find the executable.
33293    # The splitting of arguments from the executable at a space might have been incorrect,
33294    # since paths with space are more likely in Windows. Give it another try with the whole
33295    # argument.
33296    path="$complete"
33297    arguments="EOL"
33298    new_path=`$CYGPATH -u "$path"`
33299    new_path=`$WHICH "$new_path" 2> /dev/null`
33300    # bat and cmd files are not always considered executable in cygwin causing which
33301    # to not find them
33302    if test "x$new_path" = x \
33303        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33304        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33305      new_path=`$CYGPATH -u "$path"`
33306    fi
33307    if test "x$new_path" = x; then
33308      # It's still not found. Now this is an unrecoverable error.
33309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33310$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33311      has_space=`$ECHO "$complete" | $GREP " "`
33312      if test "x$has_space" != x; then
33313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33315      fi
33316      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33317    fi
33318  fi
33319
33320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33323  # "foo.exe" is OK but "foo" is an error.
33324  #
33325  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33326  # It is also a way to make sure we got the proper file name for the real test later on.
33327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33328  if test "x$test_shortpath" = x; then
33329    # Short path failed, file does not exist as specified.
33330    # Try adding .exe or .cmd
33331    if test -f "${new_path}.exe"; then
33332      input_to_shortpath="${new_path}.exe"
33333    elif test -f "${new_path}.cmd"; then
33334      input_to_shortpath="${new_path}.cmd"
33335    else
33336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33337$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33338      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33339$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33340      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33341    fi
33342  else
33343    input_to_shortpath="$new_path"
33344  fi
33345
33346  # Call helper function which possibly converts this using DOS-style short mode.
33347  # If so, the updated path is stored in $new_path.
33348  new_path="$input_to_shortpath"
33349
33350  input_path="$input_to_shortpath"
33351  # Check if we need to convert this using DOS-style short mode. If the path
33352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33353  # take no chances and rewrite it.
33354  # Note: m4 eats our [], so we need to use [ and ] instead.
33355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33356  if test "x$has_forbidden_chars" != x; then
33357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33361      # Going to short mode and back again did indeed matter. Since short mode is
33362      # case insensitive, let's make it lowercase to improve readability.
33363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33364      # Now convert it back to Unix-style (cygpath)
33365      input_path=`$CYGPATH -u "$shortmode_path"`
33366      new_path="$input_path"
33367    fi
33368  fi
33369
33370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33371  if test "x$test_cygdrive_prefix" = x; then
33372    # As a simple fix, exclude /usr/bin since it's not a real path.
33373    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33375      # a path prefixed by /cygdrive for fixpath to work.
33376      new_path="$CYGWIN_ROOT_PATH$input_path"
33377    fi
33378  fi
33379
33380  # remove trailing .exe if any
33381  new_path="${new_path/%.exe/}"
33382
33383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33384
33385  # First separate the path from the arguments. This will split at the first
33386  # space.
33387  complete="$CC"
33388  path="${complete%% *}"
33389  tmp="$complete EOL"
33390  arguments="${tmp#* }"
33391
33392  # Input might be given as Windows format, start by converting to
33393  # unix format.
33394  new_path="$path"
33395
33396  windows_path="$new_path"
33397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33398    unix_path=`$CYGPATH -u "$windows_path"`
33399    new_path="$unix_path"
33400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33402    new_path="$unix_path"
33403  fi
33404
33405
33406  # Now try to locate executable using which
33407  new_path=`$WHICH "$new_path" 2> /dev/null`
33408
33409  if test "x$new_path" = x; then
33410    # Oops. Which didn't find the executable.
33411    # The splitting of arguments from the executable at a space might have been incorrect,
33412    # since paths with space are more likely in Windows. Give it another try with the whole
33413    # argument.
33414    path="$complete"
33415    arguments="EOL"
33416    new_path="$path"
33417
33418  windows_path="$new_path"
33419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33420    unix_path=`$CYGPATH -u "$windows_path"`
33421    new_path="$unix_path"
33422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33424    new_path="$unix_path"
33425  fi
33426
33427
33428    new_path=`$WHICH "$new_path" 2> /dev/null`
33429    # bat and cmd files are not always considered executable in MSYS causing which
33430    # to not find them
33431    if test "x$new_path" = x \
33432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33434      new_path="$path"
33435
33436  windows_path="$new_path"
33437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33438    unix_path=`$CYGPATH -u "$windows_path"`
33439    new_path="$unix_path"
33440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33442    new_path="$unix_path"
33443  fi
33444
33445    fi
33446
33447    if test "x$new_path" = x; then
33448      # It's still not found. Now this is an unrecoverable error.
33449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33450$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33451      has_space=`$ECHO "$complete" | $GREP " "`
33452      if test "x$has_space" != x; then
33453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33455      fi
33456      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33457    fi
33458  fi
33459
33460  # Now new_path has a complete unix path to the binary
33461  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33462    # Keep paths in /bin as-is, but remove trailing .exe if any
33463    new_path="${new_path/%.exe/}"
33464    # Do not save /bin paths to all_fixpath_prefixes!
33465  else
33466    # Not in mixed or Windows style, start by that.
33467    new_path=`cmd //c echo $new_path`
33468
33469  input_path="$new_path"
33470  # Check if we need to convert this using DOS-style short mode. If the path
33471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33472  # take no chances and rewrite it.
33473  # Note: m4 eats our [], so we need to use [ and ] instead.
33474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33475  if test "x$has_forbidden_chars" != x; then
33476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33478  fi
33479
33480    # Output is in $new_path
33481
33482  windows_path="$new_path"
33483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33484    unix_path=`$CYGPATH -u "$windows_path"`
33485    new_path="$unix_path"
33486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33488    new_path="$unix_path"
33489  fi
33490
33491    # remove trailing .exe if any
33492    new_path="${new_path/%.exe/}"
33493
33494    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33495    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33496  fi
33497
33498    else
33499      # We're on a unix platform. Hooray! :)
33500      # First separate the path from the arguments. This will split at the first
33501      # space.
33502      complete="$CC"
33503      path="${complete%% *}"
33504      tmp="$complete EOL"
33505      arguments="${tmp#* }"
33506
33507      # Cannot rely on the command "which" here since it doesn't always work.
33508      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33509      if test -z "$is_absolute_path"; then
33510        # Path to executable is not absolute. Find it.
33511        IFS_save="$IFS"
33512        IFS=:
33513        for p in $PATH; do
33514          if test -f "$p/$path" && test -x "$p/$path"; then
33515            new_path="$p/$path"
33516            break
33517          fi
33518        done
33519        IFS="$IFS_save"
33520      else
33521        # This is an absolute path, we can use it without further modifications.
33522        new_path="$path"
33523      fi
33524
33525      if test "x$new_path" = x; then
33526        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33527$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33528        has_space=`$ECHO "$complete" | $GREP " "`
33529        if test "x$has_space" != x; then
33530          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33531$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33532        fi
33533        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33534      fi
33535    fi
33536
33537    # Now join together the path and the arguments once again
33538    if test "x$arguments" != xEOL; then
33539      new_complete="$new_path ${arguments% *}"
33540    else
33541      new_complete="$new_path"
33542    fi
33543
33544    if test "x$complete" != "x$new_complete"; then
33545      CC="$new_complete"
33546      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33547$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33548    fi
33549  fi
33550
33551  TEST_COMPILER="$CC"
33552
33553  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33554$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33555  SYMLINK_ORIGINAL="$TEST_COMPILER"
33556
33557  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33558    # Follow a chain of symbolic links. Use readlink
33559    # where it exists, else fall back to horribly
33560    # complicated shell code.
33561    if test "x$READLINK_TESTED" != yes; then
33562      # On MacOSX there is a readlink tool with a different
33563      # purpose than the GNU readlink tool. Check the found readlink.
33564      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33565      if test "x$ISGNU" = x; then
33566        # A readlink that we do not know how to use.
33567        # Are there other non-GNU readlinks out there?
33568        READLINK_TESTED=yes
33569        READLINK=
33570      fi
33571    fi
33572
33573    if test "x$READLINK" != x; then
33574      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33575    else
33576      # Save the current directory for restoring afterwards
33577      STARTDIR=$PWD
33578      COUNTER=0
33579      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33580      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33581      cd $sym_link_dir
33582      # Use -P flag to resolve symlinks in directories.
33583      cd `$THEPWDCMD -P`
33584      sym_link_dir=`$THEPWDCMD -P`
33585      # Resolve file symlinks
33586      while test $COUNTER -lt 20; do
33587        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33588        if test "x$ISLINK" == x; then
33589          # This is not a symbolic link! We are done!
33590          break
33591        fi
33592        # Again resolve directory symlinks since the target of the just found
33593        # link could be in a different directory
33594        cd `$DIRNAME $ISLINK`
33595        sym_link_dir=`$THEPWDCMD -P`
33596        sym_link_file=`$BASENAME $ISLINK`
33597        let COUNTER=COUNTER+1
33598      done
33599      cd $STARTDIR
33600      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33601    fi
33602  fi
33603
33604  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33606$as_echo "no symlink" >&6; }
33607  else
33608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33609$as_echo "$SYMLINK_ORIGINAL" >&6; }
33610
33611    # We can't handle ccache by gcc wrappers, since we need to know if we're
33612    # using ccache. Instead ccache usage must be controlled by a configure option.
33613    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33614    if test "x$COMPILER_BASENAME" = "xccache"; then
33615      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33616$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33617      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33618    fi
33619  fi
33620
33621
33622  COMPILER=$CC
33623  COMPILER_NAME=$COMPILER_NAME
33624
33625  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33626    # cc -V output typically looks like
33627    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33628    # or
33629    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33630    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33631    # Check that this is likely to be the Solaris Studio cc.
33632    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33633    if test $? -ne 0; then
33634      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33635      { $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
33636$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33637      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33638$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33639      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33640$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33641      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33642    fi
33643    # Remove usage instructions (if present), and
33644    # collapse compiler output into a single line
33645    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33646        $SED -e 's/ *[Uu]sage:.*//'`
33647    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33648        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33649  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33650    # xlc -qversion output typically looks like
33651    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33652    #     Version: 11.01.0000.0015
33653    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33654    # Check that this is likely to be the IBM XL C compiler.
33655    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33656    if test $? -ne 0; then
33657      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33658      { $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
33659$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33660      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33661$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33662      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33663$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33664      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33665    fi
33666    # Collapse compiler output into a single line
33667    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33668    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33669        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33670  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33671    # There is no specific version flag, but all output starts with a version string.
33672    # First line typically looks something like:
33673    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33674    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33675    # Check that this is likely to be Microsoft CL.EXE.
33676    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33677    if test $? -ne 0; then
33678      { $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
33679$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33680      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33681$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33682      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33683    fi
33684    # Collapse compiler output into a single line
33685    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33686    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33687        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33688  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33689    # gcc --version output typically looks like
33690    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33691    #     Copyright (C) 2013 Free Software Foundation, Inc.
33692    #     This is free software; see the source for copying conditions.  There is NO
33693    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33694    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33695    # Check that this is likely to be GCC.
33696    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33697    if test $? -ne 0; then
33698      { $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
33699$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33700      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33701$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33702      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33703    fi
33704    # Remove Copyright and legalese from version string, and
33705    # collapse into a single line
33706    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33707        $SED -e 's/ *Copyright .*//'`
33708    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33709        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33710  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33711    # clang --version output typically looks like
33712    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33713    #    clang version 3.3 (tags/RELEASE_33/final)
33714    # or
33715    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33716    #    Target: x86_64-pc-linux-gnu
33717    #    Thread model: posix
33718    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33719    # Check that this is likely to be clang
33720    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33721    if test $? -ne 0; then
33722      { $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
33723$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33724      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33725$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33726      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33727    fi
33728    # Collapse compiler output into a single line
33729    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33730    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33731        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33732  else
33733      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33734  fi
33735  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33736  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33737  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33738  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33739
33740  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33741$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33742
33743
33744  # Now that we have resolved CC ourself, let autoconf have its go at it
33745  ac_ext=c
33746ac_cpp='$CPP $CPPFLAGS'
33747ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33748ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33749ac_compiler_gnu=$ac_cv_c_compiler_gnu
33750if test -n "$ac_tool_prefix"; then
33751  for ac_prog in $CC
33752  do
33753    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33754set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33756$as_echo_n "checking for $ac_word... " >&6; }
33757if ${ac_cv_prog_CC+:} false; then :
33758  $as_echo_n "(cached) " >&6
33759else
33760  if test -n "$CC"; then
33761  ac_cv_prog_CC="$CC" # Let the user override the test.
33762else
33763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33764for as_dir in $PATH
33765do
33766  IFS=$as_save_IFS
33767  test -z "$as_dir" && as_dir=.
33768    for ac_exec_ext in '' $ac_executable_extensions; do
33769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33770    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33772    break 2
33773  fi
33774done
33775  done
33776IFS=$as_save_IFS
33777
33778fi
33779fi
33780CC=$ac_cv_prog_CC
33781if test -n "$CC"; then
33782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33783$as_echo "$CC" >&6; }
33784else
33785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33786$as_echo "no" >&6; }
33787fi
33788
33789
33790    test -n "$CC" && break
33791  done
33792fi
33793if test -z "$CC"; then
33794  ac_ct_CC=$CC
33795  for ac_prog in $CC
33796do
33797  # Extract the first word of "$ac_prog", so it can be a program name with args.
33798set dummy $ac_prog; ac_word=$2
33799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33800$as_echo_n "checking for $ac_word... " >&6; }
33801if ${ac_cv_prog_ac_ct_CC+:} false; then :
33802  $as_echo_n "(cached) " >&6
33803else
33804  if test -n "$ac_ct_CC"; then
33805  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33806else
33807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33808for as_dir in $PATH
33809do
33810  IFS=$as_save_IFS
33811  test -z "$as_dir" && as_dir=.
33812    for ac_exec_ext in '' $ac_executable_extensions; do
33813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33814    ac_cv_prog_ac_ct_CC="$ac_prog"
33815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33816    break 2
33817  fi
33818done
33819  done
33820IFS=$as_save_IFS
33821
33822fi
33823fi
33824ac_ct_CC=$ac_cv_prog_ac_ct_CC
33825if test -n "$ac_ct_CC"; then
33826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33827$as_echo "$ac_ct_CC" >&6; }
33828else
33829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33830$as_echo "no" >&6; }
33831fi
33832
33833
33834  test -n "$ac_ct_CC" && break
33835done
33836
33837  if test "x$ac_ct_CC" = x; then
33838    CC=""
33839  else
33840    case $cross_compiling:$ac_tool_warned in
33841yes:)
33842{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33843$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33844ac_tool_warned=yes ;;
33845esac
33846    CC=$ac_ct_CC
33847  fi
33848fi
33849
33850
33851test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33852$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33853as_fn_error $? "no acceptable C compiler found in \$PATH
33854See \`config.log' for more details" "$LINENO" 5; }
33855
33856# Provide some information about the compiler.
33857$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33858set X $ac_compile
33859ac_compiler=$2
33860for ac_option in --version -v -V -qversion; do
33861  { { ac_try="$ac_compiler $ac_option >&5"
33862case "(($ac_try" in
33863  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33864  *) ac_try_echo=$ac_try;;
33865esac
33866eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33867$as_echo "$ac_try_echo"; } >&5
33868  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33869  ac_status=$?
33870  if test -s conftest.err; then
33871    sed '10a\
33872... rest of stderr output deleted ...
33873         10q' conftest.err >conftest.er1
33874    cat conftest.er1 >&5
33875  fi
33876  rm -f conftest.er1 conftest.err
33877  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33878  test $ac_status = 0; }
33879done
33880
33881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33882/* end confdefs.h.  */
33883
33884int
33885main ()
33886{
33887
33888  ;
33889  return 0;
33890}
33891_ACEOF
33892ac_clean_files_save=$ac_clean_files
33893ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33894# Try to create an executable without -o first, disregard a.out.
33895# It will help us diagnose broken compilers, and finding out an intuition
33896# of exeext.
33897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33898$as_echo_n "checking whether the C compiler works... " >&6; }
33899ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33900
33901# The possible output files:
33902ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33903
33904ac_rmfiles=
33905for ac_file in $ac_files
33906do
33907  case $ac_file in
33908    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33909    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33910  esac
33911done
33912rm -f $ac_rmfiles
33913
33914if { { ac_try="$ac_link_default"
33915case "(($ac_try" in
33916  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33917  *) ac_try_echo=$ac_try;;
33918esac
33919eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33920$as_echo "$ac_try_echo"; } >&5
33921  (eval "$ac_link_default") 2>&5
33922  ac_status=$?
33923  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33924  test $ac_status = 0; }; then :
33925  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33926# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33927# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33928# so that the user can short-circuit this test for compilers unknown to
33929# Autoconf.
33930for ac_file in $ac_files ''
33931do
33932  test -f "$ac_file" || continue
33933  case $ac_file in
33934    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33935	;;
33936    [ab].out )
33937	# We found the default executable, but exeext='' is most
33938	# certainly right.
33939	break;;
33940    *.* )
33941	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33942	then :; else
33943	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33944	fi
33945	# We set ac_cv_exeext here because the later test for it is not
33946	# safe: cross compilers may not add the suffix if given an `-o'
33947	# argument, so we may need to know it at that point already.
33948	# Even if this section looks crufty: it has the advantage of
33949	# actually working.
33950	break;;
33951    * )
33952	break;;
33953  esac
33954done
33955test "$ac_cv_exeext" = no && ac_cv_exeext=
33956
33957else
33958  ac_file=''
33959fi
33960if test -z "$ac_file"; then :
33961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33962$as_echo "no" >&6; }
33963$as_echo "$as_me: failed program was:" >&5
33964sed 's/^/| /' conftest.$ac_ext >&5
33965
33966{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33968as_fn_error 77 "C compiler cannot create executables
33969See \`config.log' for more details" "$LINENO" 5; }
33970else
33971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33972$as_echo "yes" >&6; }
33973fi
33974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33975$as_echo_n "checking for C compiler default output file name... " >&6; }
33976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33977$as_echo "$ac_file" >&6; }
33978ac_exeext=$ac_cv_exeext
33979
33980rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33981ac_clean_files=$ac_clean_files_save
33982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33983$as_echo_n "checking for suffix of executables... " >&6; }
33984if { { ac_try="$ac_link"
33985case "(($ac_try" in
33986  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33987  *) ac_try_echo=$ac_try;;
33988esac
33989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33990$as_echo "$ac_try_echo"; } >&5
33991  (eval "$ac_link") 2>&5
33992  ac_status=$?
33993  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33994  test $ac_status = 0; }; then :
33995  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33996# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33997# work properly (i.e., refer to `conftest.exe'), while it won't with
33998# `rm'.
33999for ac_file in conftest.exe conftest conftest.*; do
34000  test -f "$ac_file" || continue
34001  case $ac_file in
34002    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34003    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34004	  break;;
34005    * ) break;;
34006  esac
34007done
34008else
34009  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34011as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34012See \`config.log' for more details" "$LINENO" 5; }
34013fi
34014rm -f conftest conftest$ac_cv_exeext
34015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34016$as_echo "$ac_cv_exeext" >&6; }
34017
34018rm -f conftest.$ac_ext
34019EXEEXT=$ac_cv_exeext
34020ac_exeext=$EXEEXT
34021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34022/* end confdefs.h.  */
34023#include <stdio.h>
34024int
34025main ()
34026{
34027FILE *f = fopen ("conftest.out", "w");
34028 return ferror (f) || fclose (f) != 0;
34029
34030  ;
34031  return 0;
34032}
34033_ACEOF
34034ac_clean_files="$ac_clean_files conftest.out"
34035# Check that the compiler produces executables we can run.  If not, either
34036# the compiler is broken, or we cross compile.
34037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34038$as_echo_n "checking whether we are cross compiling... " >&6; }
34039if test "$cross_compiling" != yes; then
34040  { { ac_try="$ac_link"
34041case "(($ac_try" in
34042  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34043  *) ac_try_echo=$ac_try;;
34044esac
34045eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34046$as_echo "$ac_try_echo"; } >&5
34047  (eval "$ac_link") 2>&5
34048  ac_status=$?
34049  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34050  test $ac_status = 0; }
34051  if { ac_try='./conftest$ac_cv_exeext'
34052  { { case "(($ac_try" in
34053  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34054  *) ac_try_echo=$ac_try;;
34055esac
34056eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34057$as_echo "$ac_try_echo"; } >&5
34058  (eval "$ac_try") 2>&5
34059  ac_status=$?
34060  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34061  test $ac_status = 0; }; }; then
34062    cross_compiling=no
34063  else
34064    if test "$cross_compiling" = maybe; then
34065	cross_compiling=yes
34066    else
34067	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34068$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34069as_fn_error $? "cannot run C compiled programs.
34070If you meant to cross compile, use \`--host'.
34071See \`config.log' for more details" "$LINENO" 5; }
34072    fi
34073  fi
34074fi
34075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34076$as_echo "$cross_compiling" >&6; }
34077
34078rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34079ac_clean_files=$ac_clean_files_save
34080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34081$as_echo_n "checking for suffix of object files... " >&6; }
34082if ${ac_cv_objext+:} false; then :
34083  $as_echo_n "(cached) " >&6
34084else
34085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34086/* end confdefs.h.  */
34087
34088int
34089main ()
34090{
34091
34092  ;
34093  return 0;
34094}
34095_ACEOF
34096rm -f conftest.o conftest.obj
34097if { { ac_try="$ac_compile"
34098case "(($ac_try" in
34099  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34100  *) ac_try_echo=$ac_try;;
34101esac
34102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34103$as_echo "$ac_try_echo"; } >&5
34104  (eval "$ac_compile") 2>&5
34105  ac_status=$?
34106  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34107  test $ac_status = 0; }; then :
34108  for ac_file in conftest.o conftest.obj conftest.*; do
34109  test -f "$ac_file" || continue;
34110  case $ac_file in
34111    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34112    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34113       break;;
34114  esac
34115done
34116else
34117  $as_echo "$as_me: failed program was:" >&5
34118sed 's/^/| /' conftest.$ac_ext >&5
34119
34120{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34121$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34122as_fn_error $? "cannot compute suffix of object files: cannot compile
34123See \`config.log' for more details" "$LINENO" 5; }
34124fi
34125rm -f conftest.$ac_cv_objext conftest.$ac_ext
34126fi
34127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34128$as_echo "$ac_cv_objext" >&6; }
34129OBJEXT=$ac_cv_objext
34130ac_objext=$OBJEXT
34131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34132$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34133if ${ac_cv_c_compiler_gnu+:} false; then :
34134  $as_echo_n "(cached) " >&6
34135else
34136  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34137/* end confdefs.h.  */
34138
34139int
34140main ()
34141{
34142#ifndef __GNUC__
34143       choke me
34144#endif
34145
34146  ;
34147  return 0;
34148}
34149_ACEOF
34150if ac_fn_c_try_compile "$LINENO"; then :
34151  ac_compiler_gnu=yes
34152else
34153  ac_compiler_gnu=no
34154fi
34155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34156ac_cv_c_compiler_gnu=$ac_compiler_gnu
34157
34158fi
34159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34160$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34161if test $ac_compiler_gnu = yes; then
34162  GCC=yes
34163else
34164  GCC=
34165fi
34166ac_test_CFLAGS=${CFLAGS+set}
34167ac_save_CFLAGS=$CFLAGS
34168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34169$as_echo_n "checking whether $CC accepts -g... " >&6; }
34170if ${ac_cv_prog_cc_g+:} false; then :
34171  $as_echo_n "(cached) " >&6
34172else
34173  ac_save_c_werror_flag=$ac_c_werror_flag
34174   ac_c_werror_flag=yes
34175   ac_cv_prog_cc_g=no
34176   CFLAGS="-g"
34177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34178/* end confdefs.h.  */
34179
34180int
34181main ()
34182{
34183
34184  ;
34185  return 0;
34186}
34187_ACEOF
34188if ac_fn_c_try_compile "$LINENO"; then :
34189  ac_cv_prog_cc_g=yes
34190else
34191  CFLAGS=""
34192      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34193/* end confdefs.h.  */
34194
34195int
34196main ()
34197{
34198
34199  ;
34200  return 0;
34201}
34202_ACEOF
34203if ac_fn_c_try_compile "$LINENO"; then :
34204
34205else
34206  ac_c_werror_flag=$ac_save_c_werror_flag
34207	 CFLAGS="-g"
34208	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34209/* end confdefs.h.  */
34210
34211int
34212main ()
34213{
34214
34215  ;
34216  return 0;
34217}
34218_ACEOF
34219if ac_fn_c_try_compile "$LINENO"; then :
34220  ac_cv_prog_cc_g=yes
34221fi
34222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34223fi
34224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34225fi
34226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34227   ac_c_werror_flag=$ac_save_c_werror_flag
34228fi
34229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34230$as_echo "$ac_cv_prog_cc_g" >&6; }
34231if test "$ac_test_CFLAGS" = set; then
34232  CFLAGS=$ac_save_CFLAGS
34233elif test $ac_cv_prog_cc_g = yes; then
34234  if test "$GCC" = yes; then
34235    CFLAGS="-g -O2"
34236  else
34237    CFLAGS="-g"
34238  fi
34239else
34240  if test "$GCC" = yes; then
34241    CFLAGS="-O2"
34242  else
34243    CFLAGS=
34244  fi
34245fi
34246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34247$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34248if ${ac_cv_prog_cc_c89+:} false; then :
34249  $as_echo_n "(cached) " >&6
34250else
34251  ac_cv_prog_cc_c89=no
34252ac_save_CC=$CC
34253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34254/* end confdefs.h.  */
34255#include <stdarg.h>
34256#include <stdio.h>
34257struct stat;
34258/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34259struct buf { int x; };
34260FILE * (*rcsopen) (struct buf *, struct stat *, int);
34261static char *e (p, i)
34262     char **p;
34263     int i;
34264{
34265  return p[i];
34266}
34267static char *f (char * (*g) (char **, int), char **p, ...)
34268{
34269  char *s;
34270  va_list v;
34271  va_start (v,p);
34272  s = g (p, va_arg (v,int));
34273  va_end (v);
34274  return s;
34275}
34276
34277/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34278   function prototypes and stuff, but not '\xHH' hex character constants.
34279   These don't provoke an error unfortunately, instead are silently treated
34280   as 'x'.  The following induces an error, until -std is added to get
34281   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34282   array size at least.  It's necessary to write '\x00'==0 to get something
34283   that's true only with -std.  */
34284int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34285
34286/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34287   inside strings and character constants.  */
34288#define FOO(x) 'x'
34289int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34290
34291int test (int i, double x);
34292struct s1 {int (*f) (int a);};
34293struct s2 {int (*f) (double a);};
34294int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34295int argc;
34296char **argv;
34297int
34298main ()
34299{
34300return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34301  ;
34302  return 0;
34303}
34304_ACEOF
34305for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34306	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34307do
34308  CC="$ac_save_CC $ac_arg"
34309  if ac_fn_c_try_compile "$LINENO"; then :
34310  ac_cv_prog_cc_c89=$ac_arg
34311fi
34312rm -f core conftest.err conftest.$ac_objext
34313  test "x$ac_cv_prog_cc_c89" != "xno" && break
34314done
34315rm -f conftest.$ac_ext
34316CC=$ac_save_CC
34317
34318fi
34319# AC_CACHE_VAL
34320case "x$ac_cv_prog_cc_c89" in
34321  x)
34322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34323$as_echo "none needed" >&6; } ;;
34324  xno)
34325    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34326$as_echo "unsupported" >&6; } ;;
34327  *)
34328    CC="$CC $ac_cv_prog_cc_c89"
34329    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34330$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34331esac
34332if test "x$ac_cv_prog_cc_c89" != xno; then :
34333
34334fi
34335
34336ac_ext=cpp
34337ac_cpp='$CXXCPP $CPPFLAGS'
34338ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34339ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34340ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34341
34342
34343
34344  COMPILER_NAME=C++
34345  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34346
34347  if test "x$CXX" != x; then
34348    # User has supplied compiler name already, always let that override.
34349    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34350$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34351    if test "x`basename $CXX`" = "x$CXX"; then
34352      # A command without a complete path is provided, search $PATH.
34353
34354      for ac_prog in $CXX
34355do
34356  # Extract the first word of "$ac_prog", so it can be a program name with args.
34357set dummy $ac_prog; ac_word=$2
34358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34359$as_echo_n "checking for $ac_word... " >&6; }
34360if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34361  $as_echo_n "(cached) " >&6
34362else
34363  case $POTENTIAL_CXX in
34364  [\\/]* | ?:[\\/]*)
34365  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34366  ;;
34367  *)
34368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34369for as_dir in $PATH
34370do
34371  IFS=$as_save_IFS
34372  test -z "$as_dir" && as_dir=.
34373    for ac_exec_ext in '' $ac_executable_extensions; do
34374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34375    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34377    break 2
34378  fi
34379done
34380  done
34381IFS=$as_save_IFS
34382
34383  ;;
34384esac
34385fi
34386POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34387if test -n "$POTENTIAL_CXX"; then
34388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34389$as_echo "$POTENTIAL_CXX" >&6; }
34390else
34391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34392$as_echo "no" >&6; }
34393fi
34394
34395
34396  test -n "$POTENTIAL_CXX" && break
34397done
34398
34399      if test "x$POTENTIAL_CXX" != x; then
34400        CXX=$POTENTIAL_CXX
34401      else
34402        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34403      fi
34404    else
34405      # Otherwise it might already be a complete path
34406      if test ! -x "$CXX"; then
34407        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34408      fi
34409    fi
34410  else
34411    # No user supplied value. Locate compiler ourselves.
34412
34413    # If we are cross compiling, assume cross compilation tools follows the
34414    # cross compilation standard where they are prefixed with the autoconf
34415    # standard name for the target. For example the binary
34416    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34417    # If we are not cross compiling, then the default compiler name will be
34418    # used.
34419
34420    CXX=
34421    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34422    # before checking the rest of the PATH.
34423    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34424    # step, this should not be necessary.
34425    if test -n "$TOOLCHAIN_PATH"; then
34426      PATH_save="$PATH"
34427      PATH="$TOOLCHAIN_PATH"
34428      for ac_prog in $SEARCH_LIST
34429do
34430  # Extract the first word of "$ac_prog", so it can be a program name with args.
34431set dummy $ac_prog; ac_word=$2
34432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34433$as_echo_n "checking for $ac_word... " >&6; }
34434if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34435  $as_echo_n "(cached) " >&6
34436else
34437  case $TOOLCHAIN_PATH_CXX in
34438  [\\/]* | ?:[\\/]*)
34439  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34440  ;;
34441  *)
34442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34443for as_dir in $PATH
34444do
34445  IFS=$as_save_IFS
34446  test -z "$as_dir" && as_dir=.
34447    for ac_exec_ext in '' $ac_executable_extensions; do
34448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34449    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34451    break 2
34452  fi
34453done
34454  done
34455IFS=$as_save_IFS
34456
34457  ;;
34458esac
34459fi
34460TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34461if test -n "$TOOLCHAIN_PATH_CXX"; then
34462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34463$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34464else
34465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34466$as_echo "no" >&6; }
34467fi
34468
34469
34470  test -n "$TOOLCHAIN_PATH_CXX" && break
34471done
34472
34473      CXX=$TOOLCHAIN_PATH_CXX
34474      PATH="$PATH_save"
34475    fi
34476
34477    # AC_PATH_PROGS can't be run multiple times with the same variable,
34478    # so create a new name for this run.
34479    if test "x$CXX" = x; then
34480      for ac_prog in $SEARCH_LIST
34481do
34482  # Extract the first word of "$ac_prog", so it can be a program name with args.
34483set dummy $ac_prog; ac_word=$2
34484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34485$as_echo_n "checking for $ac_word... " >&6; }
34486if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34487  $as_echo_n "(cached) " >&6
34488else
34489  case $POTENTIAL_CXX in
34490  [\\/]* | ?:[\\/]*)
34491  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34492  ;;
34493  *)
34494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34495for as_dir in $PATH
34496do
34497  IFS=$as_save_IFS
34498  test -z "$as_dir" && as_dir=.
34499    for ac_exec_ext in '' $ac_executable_extensions; do
34500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34501    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34503    break 2
34504  fi
34505done
34506  done
34507IFS=$as_save_IFS
34508
34509  ;;
34510esac
34511fi
34512POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34513if test -n "$POTENTIAL_CXX"; then
34514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34515$as_echo "$POTENTIAL_CXX" >&6; }
34516else
34517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34518$as_echo "no" >&6; }
34519fi
34520
34521
34522  test -n "$POTENTIAL_CXX" && break
34523done
34524
34525      CXX=$POTENTIAL_CXX
34526    fi
34527
34528    if test "x$CXX" = x; then
34529
34530  # Print a helpful message on how to acquire the necessary build dependency.
34531  # devkit is the help tag: freetype, cups, alsa etc
34532  MISSING_DEPENDENCY=devkit
34533
34534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34535    cygwin_help $MISSING_DEPENDENCY
34536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34537    msys_help $MISSING_DEPENDENCY
34538  else
34539    PKGHANDLER_COMMAND=
34540
34541    case $PKGHANDLER in
34542      apt-get)
34543        apt_help     $MISSING_DEPENDENCY ;;
34544      yum)
34545        yum_help     $MISSING_DEPENDENCY ;;
34546      brew)
34547        brew_help    $MISSING_DEPENDENCY ;;
34548      port)
34549        port_help    $MISSING_DEPENDENCY ;;
34550      pkgutil)
34551        pkgutil_help $MISSING_DEPENDENCY ;;
34552      pkgadd)
34553        pkgadd_help  $MISSING_DEPENDENCY ;;
34554    esac
34555
34556    if test "x$PKGHANDLER_COMMAND" != x; then
34557      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34558    fi
34559  fi
34560
34561      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34562    fi
34563  fi
34564
34565  # Now we have a compiler binary in CXX. Make sure it's okay.
34566
34567  # Only process if variable expands to non-empty
34568
34569  if test "x$CXX" != x; then
34570    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34571
34572  # First separate the path from the arguments. This will split at the first
34573  # space.
34574  complete="$CXX"
34575  path="${complete%% *}"
34576  tmp="$complete EOL"
34577  arguments="${tmp#* }"
34578
34579  # Input might be given as Windows format, start by converting to
34580  # unix format.
34581  new_path=`$CYGPATH -u "$path"`
34582
34583  # Now try to locate executable using which
34584  new_path=`$WHICH "$new_path" 2> /dev/null`
34585  # bat and cmd files are not always considered executable in cygwin causing which
34586  # to not find them
34587  if test "x$new_path" = x \
34588      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34589      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34590    new_path=`$CYGPATH -u "$path"`
34591  fi
34592  if test "x$new_path" = x; then
34593    # Oops. Which didn't find the executable.
34594    # The splitting of arguments from the executable at a space might have been incorrect,
34595    # since paths with space are more likely in Windows. Give it another try with the whole
34596    # argument.
34597    path="$complete"
34598    arguments="EOL"
34599    new_path=`$CYGPATH -u "$path"`
34600    new_path=`$WHICH "$new_path" 2> /dev/null`
34601    # bat and cmd files are not always considered executable in cygwin causing which
34602    # to not find them
34603    if test "x$new_path" = x \
34604        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34605        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34606      new_path=`$CYGPATH -u "$path"`
34607    fi
34608    if test "x$new_path" = x; then
34609      # It's still not found. Now this is an unrecoverable error.
34610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34611$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34612      has_space=`$ECHO "$complete" | $GREP " "`
34613      if test "x$has_space" != x; then
34614        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34615$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34616      fi
34617      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34618    fi
34619  fi
34620
34621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34624  # "foo.exe" is OK but "foo" is an error.
34625  #
34626  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34627  # It is also a way to make sure we got the proper file name for the real test later on.
34628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34629  if test "x$test_shortpath" = x; then
34630    # Short path failed, file does not exist as specified.
34631    # Try adding .exe or .cmd
34632    if test -f "${new_path}.exe"; then
34633      input_to_shortpath="${new_path}.exe"
34634    elif test -f "${new_path}.cmd"; then
34635      input_to_shortpath="${new_path}.cmd"
34636    else
34637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34638$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34639      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34640$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34641      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34642    fi
34643  else
34644    input_to_shortpath="$new_path"
34645  fi
34646
34647  # Call helper function which possibly converts this using DOS-style short mode.
34648  # If so, the updated path is stored in $new_path.
34649  new_path="$input_to_shortpath"
34650
34651  input_path="$input_to_shortpath"
34652  # Check if we need to convert this using DOS-style short mode. If the path
34653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34654  # take no chances and rewrite it.
34655  # Note: m4 eats our [], so we need to use [ and ] instead.
34656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34657  if test "x$has_forbidden_chars" != x; then
34658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34662      # Going to short mode and back again did indeed matter. Since short mode is
34663      # case insensitive, let's make it lowercase to improve readability.
34664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34665      # Now convert it back to Unix-style (cygpath)
34666      input_path=`$CYGPATH -u "$shortmode_path"`
34667      new_path="$input_path"
34668    fi
34669  fi
34670
34671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34672  if test "x$test_cygdrive_prefix" = x; then
34673    # As a simple fix, exclude /usr/bin since it's not a real path.
34674    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34676      # a path prefixed by /cygdrive for fixpath to work.
34677      new_path="$CYGWIN_ROOT_PATH$input_path"
34678    fi
34679  fi
34680
34681  # remove trailing .exe if any
34682  new_path="${new_path/%.exe/}"
34683
34684    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34685
34686  # First separate the path from the arguments. This will split at the first
34687  # space.
34688  complete="$CXX"
34689  path="${complete%% *}"
34690  tmp="$complete EOL"
34691  arguments="${tmp#* }"
34692
34693  # Input might be given as Windows format, start by converting to
34694  # unix format.
34695  new_path="$path"
34696
34697  windows_path="$new_path"
34698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34699    unix_path=`$CYGPATH -u "$windows_path"`
34700    new_path="$unix_path"
34701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34703    new_path="$unix_path"
34704  fi
34705
34706
34707  # Now try to locate executable using which
34708  new_path=`$WHICH "$new_path" 2> /dev/null`
34709
34710  if test "x$new_path" = x; then
34711    # Oops. Which didn't find the executable.
34712    # The splitting of arguments from the executable at a space might have been incorrect,
34713    # since paths with space are more likely in Windows. Give it another try with the whole
34714    # argument.
34715    path="$complete"
34716    arguments="EOL"
34717    new_path="$path"
34718
34719  windows_path="$new_path"
34720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34721    unix_path=`$CYGPATH -u "$windows_path"`
34722    new_path="$unix_path"
34723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34725    new_path="$unix_path"
34726  fi
34727
34728
34729    new_path=`$WHICH "$new_path" 2> /dev/null`
34730    # bat and cmd files are not always considered executable in MSYS causing which
34731    # to not find them
34732    if test "x$new_path" = x \
34733        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34734        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34735      new_path="$path"
34736
34737  windows_path="$new_path"
34738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34739    unix_path=`$CYGPATH -u "$windows_path"`
34740    new_path="$unix_path"
34741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34743    new_path="$unix_path"
34744  fi
34745
34746    fi
34747
34748    if test "x$new_path" = x; then
34749      # It's still not found. Now this is an unrecoverable error.
34750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34751$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34752      has_space=`$ECHO "$complete" | $GREP " "`
34753      if test "x$has_space" != x; then
34754        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34756      fi
34757      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34758    fi
34759  fi
34760
34761  # Now new_path has a complete unix path to the binary
34762  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34763    # Keep paths in /bin as-is, but remove trailing .exe if any
34764    new_path="${new_path/%.exe/}"
34765    # Do not save /bin paths to all_fixpath_prefixes!
34766  else
34767    # Not in mixed or Windows style, start by that.
34768    new_path=`cmd //c echo $new_path`
34769
34770  input_path="$new_path"
34771  # Check if we need to convert this using DOS-style short mode. If the path
34772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34773  # take no chances and rewrite it.
34774  # Note: m4 eats our [], so we need to use [ and ] instead.
34775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34776  if test "x$has_forbidden_chars" != x; then
34777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34778    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34779  fi
34780
34781    # Output is in $new_path
34782
34783  windows_path="$new_path"
34784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34785    unix_path=`$CYGPATH -u "$windows_path"`
34786    new_path="$unix_path"
34787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34789    new_path="$unix_path"
34790  fi
34791
34792    # remove trailing .exe if any
34793    new_path="${new_path/%.exe/}"
34794
34795    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34796    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34797  fi
34798
34799    else
34800      # We're on a unix platform. Hooray! :)
34801      # First separate the path from the arguments. This will split at the first
34802      # space.
34803      complete="$CXX"
34804      path="${complete%% *}"
34805      tmp="$complete EOL"
34806      arguments="${tmp#* }"
34807
34808      # Cannot rely on the command "which" here since it doesn't always work.
34809      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34810      if test -z "$is_absolute_path"; then
34811        # Path to executable is not absolute. Find it.
34812        IFS_save="$IFS"
34813        IFS=:
34814        for p in $PATH; do
34815          if test -f "$p/$path" && test -x "$p/$path"; then
34816            new_path="$p/$path"
34817            break
34818          fi
34819        done
34820        IFS="$IFS_save"
34821      else
34822        # This is an absolute path, we can use it without further modifications.
34823        new_path="$path"
34824      fi
34825
34826      if test "x$new_path" = x; then
34827        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34828$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34829        has_space=`$ECHO "$complete" | $GREP " "`
34830        if test "x$has_space" != x; then
34831          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34832$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34833        fi
34834        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34835      fi
34836    fi
34837
34838    # Now join together the path and the arguments once again
34839    if test "x$arguments" != xEOL; then
34840      new_complete="$new_path ${arguments% *}"
34841    else
34842      new_complete="$new_path"
34843    fi
34844
34845    if test "x$complete" != "x$new_complete"; then
34846      CXX="$new_complete"
34847      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34848$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34849    fi
34850  fi
34851
34852  TEST_COMPILER="$CXX"
34853
34854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34855$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34856  SYMLINK_ORIGINAL="$TEST_COMPILER"
34857
34858  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34859    # Follow a chain of symbolic links. Use readlink
34860    # where it exists, else fall back to horribly
34861    # complicated shell code.
34862    if test "x$READLINK_TESTED" != yes; then
34863      # On MacOSX there is a readlink tool with a different
34864      # purpose than the GNU readlink tool. Check the found readlink.
34865      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34866      if test "x$ISGNU" = x; then
34867        # A readlink that we do not know how to use.
34868        # Are there other non-GNU readlinks out there?
34869        READLINK_TESTED=yes
34870        READLINK=
34871      fi
34872    fi
34873
34874    if test "x$READLINK" != x; then
34875      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34876    else
34877      # Save the current directory for restoring afterwards
34878      STARTDIR=$PWD
34879      COUNTER=0
34880      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34881      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34882      cd $sym_link_dir
34883      # Use -P flag to resolve symlinks in directories.
34884      cd `$THEPWDCMD -P`
34885      sym_link_dir=`$THEPWDCMD -P`
34886      # Resolve file symlinks
34887      while test $COUNTER -lt 20; do
34888        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34889        if test "x$ISLINK" == x; then
34890          # This is not a symbolic link! We are done!
34891          break
34892        fi
34893        # Again resolve directory symlinks since the target of the just found
34894        # link could be in a different directory
34895        cd `$DIRNAME $ISLINK`
34896        sym_link_dir=`$THEPWDCMD -P`
34897        sym_link_file=`$BASENAME $ISLINK`
34898        let COUNTER=COUNTER+1
34899      done
34900      cd $STARTDIR
34901      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34902    fi
34903  fi
34904
34905  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34907$as_echo "no symlink" >&6; }
34908  else
34909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34910$as_echo "$SYMLINK_ORIGINAL" >&6; }
34911
34912    # We can't handle ccache by gcc wrappers, since we need to know if we're
34913    # using ccache. Instead ccache usage must be controlled by a configure option.
34914    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34915    if test "x$COMPILER_BASENAME" = "xccache"; then
34916      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34917$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34918      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34919    fi
34920  fi
34921
34922
34923  COMPILER=$CXX
34924  COMPILER_NAME=$COMPILER_NAME
34925
34926  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34927    # cc -V output typically looks like
34928    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34929    # or
34930    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34931    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34932    # Check that this is likely to be the Solaris Studio cc.
34933    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34934    if test $? -ne 0; then
34935      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34936      { $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
34937$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34938      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34939$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34940      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34941$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34942      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34943    fi
34944    # Remove usage instructions (if present), and
34945    # collapse compiler output into a single line
34946    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34947        $SED -e 's/ *[Uu]sage:.*//'`
34948    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34949        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34950  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34951    # xlc -qversion output typically looks like
34952    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34953    #     Version: 11.01.0000.0015
34954    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34955    # Check that this is likely to be the IBM XL C compiler.
34956    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34957    if test $? -ne 0; then
34958      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34959      { $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
34960$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34961      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34962$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34963      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34964$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34965      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34966    fi
34967    # Collapse compiler output into a single line
34968    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34969    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34970        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34971  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34972    # There is no specific version flag, but all output starts with a version string.
34973    # First line typically looks something like:
34974    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34975    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34976    # Check that this is likely to be Microsoft CL.EXE.
34977    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34978    if test $? -ne 0; then
34979      { $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
34980$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34981      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34982$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34983      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34984    fi
34985    # Collapse compiler output into a single line
34986    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34987    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34988        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34989  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34990    # gcc --version output typically looks like
34991    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34992    #     Copyright (C) 2013 Free Software Foundation, Inc.
34993    #     This is free software; see the source for copying conditions.  There is NO
34994    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34995    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34996    # Check that this is likely to be GCC.
34997    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34998    if test $? -ne 0; then
34999      { $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
35000$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35001      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35002$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35003      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35004    fi
35005    # Remove Copyright and legalese from version string, and
35006    # collapse into a single line
35007    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35008        $SED -e 's/ *Copyright .*//'`
35009    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35010        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35011  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35012    # clang --version output typically looks like
35013    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35014    #    clang version 3.3 (tags/RELEASE_33/final)
35015    # or
35016    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35017    #    Target: x86_64-pc-linux-gnu
35018    #    Thread model: posix
35019    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35020    # Check that this is likely to be clang
35021    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35022    if test $? -ne 0; then
35023      { $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
35024$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35025      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35026$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35027      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35028    fi
35029    # Collapse compiler output into a single line
35030    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35031    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35032        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35033  else
35034      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35035  fi
35036  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35037  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35038  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35039  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35040
35041  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35042$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35043
35044
35045  # Now that we have resolved CXX ourself, let autoconf have its go at it
35046  ac_ext=cpp
35047ac_cpp='$CXXCPP $CPPFLAGS'
35048ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35049ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35050ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35051if test -z "$CXX"; then
35052  if test -n "$CCC"; then
35053    CXX=$CCC
35054  else
35055    if test -n "$ac_tool_prefix"; then
35056  for ac_prog in $CXX
35057  do
35058    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35059set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35061$as_echo_n "checking for $ac_word... " >&6; }
35062if ${ac_cv_prog_CXX+:} false; then :
35063  $as_echo_n "(cached) " >&6
35064else
35065  if test -n "$CXX"; then
35066  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35067else
35068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35069for as_dir in $PATH
35070do
35071  IFS=$as_save_IFS
35072  test -z "$as_dir" && as_dir=.
35073    for ac_exec_ext in '' $ac_executable_extensions; do
35074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35075    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35077    break 2
35078  fi
35079done
35080  done
35081IFS=$as_save_IFS
35082
35083fi
35084fi
35085CXX=$ac_cv_prog_CXX
35086if test -n "$CXX"; then
35087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35088$as_echo "$CXX" >&6; }
35089else
35090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35091$as_echo "no" >&6; }
35092fi
35093
35094
35095    test -n "$CXX" && break
35096  done
35097fi
35098if test -z "$CXX"; then
35099  ac_ct_CXX=$CXX
35100  for ac_prog in $CXX
35101do
35102  # Extract the first word of "$ac_prog", so it can be a program name with args.
35103set dummy $ac_prog; ac_word=$2
35104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35105$as_echo_n "checking for $ac_word... " >&6; }
35106if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35107  $as_echo_n "(cached) " >&6
35108else
35109  if test -n "$ac_ct_CXX"; then
35110  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35111else
35112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35113for as_dir in $PATH
35114do
35115  IFS=$as_save_IFS
35116  test -z "$as_dir" && as_dir=.
35117    for ac_exec_ext in '' $ac_executable_extensions; do
35118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35119    ac_cv_prog_ac_ct_CXX="$ac_prog"
35120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35121    break 2
35122  fi
35123done
35124  done
35125IFS=$as_save_IFS
35126
35127fi
35128fi
35129ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35130if test -n "$ac_ct_CXX"; then
35131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35132$as_echo "$ac_ct_CXX" >&6; }
35133else
35134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35135$as_echo "no" >&6; }
35136fi
35137
35138
35139  test -n "$ac_ct_CXX" && break
35140done
35141
35142  if test "x$ac_ct_CXX" = x; then
35143    CXX="g++"
35144  else
35145    case $cross_compiling:$ac_tool_warned in
35146yes:)
35147{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35148$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35149ac_tool_warned=yes ;;
35150esac
35151    CXX=$ac_ct_CXX
35152  fi
35153fi
35154
35155  fi
35156fi
35157# Provide some information about the compiler.
35158$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35159set X $ac_compile
35160ac_compiler=$2
35161for ac_option in --version -v -V -qversion; do
35162  { { ac_try="$ac_compiler $ac_option >&5"
35163case "(($ac_try" in
35164  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35165  *) ac_try_echo=$ac_try;;
35166esac
35167eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35168$as_echo "$ac_try_echo"; } >&5
35169  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35170  ac_status=$?
35171  if test -s conftest.err; then
35172    sed '10a\
35173... rest of stderr output deleted ...
35174         10q' conftest.err >conftest.er1
35175    cat conftest.er1 >&5
35176  fi
35177  rm -f conftest.er1 conftest.err
35178  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35179  test $ac_status = 0; }
35180done
35181
35182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35183$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35184if ${ac_cv_cxx_compiler_gnu+:} false; then :
35185  $as_echo_n "(cached) " >&6
35186else
35187  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35188/* end confdefs.h.  */
35189
35190int
35191main ()
35192{
35193#ifndef __GNUC__
35194       choke me
35195#endif
35196
35197  ;
35198  return 0;
35199}
35200_ACEOF
35201if ac_fn_cxx_try_compile "$LINENO"; then :
35202  ac_compiler_gnu=yes
35203else
35204  ac_compiler_gnu=no
35205fi
35206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35207ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35208
35209fi
35210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35211$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35212if test $ac_compiler_gnu = yes; then
35213  GXX=yes
35214else
35215  GXX=
35216fi
35217ac_test_CXXFLAGS=${CXXFLAGS+set}
35218ac_save_CXXFLAGS=$CXXFLAGS
35219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35220$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35221if ${ac_cv_prog_cxx_g+:} false; then :
35222  $as_echo_n "(cached) " >&6
35223else
35224  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35225   ac_cxx_werror_flag=yes
35226   ac_cv_prog_cxx_g=no
35227   CXXFLAGS="-g"
35228   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35229/* end confdefs.h.  */
35230
35231int
35232main ()
35233{
35234
35235  ;
35236  return 0;
35237}
35238_ACEOF
35239if ac_fn_cxx_try_compile "$LINENO"; then :
35240  ac_cv_prog_cxx_g=yes
35241else
35242  CXXFLAGS=""
35243      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35244/* end confdefs.h.  */
35245
35246int
35247main ()
35248{
35249
35250  ;
35251  return 0;
35252}
35253_ACEOF
35254if ac_fn_cxx_try_compile "$LINENO"; then :
35255
35256else
35257  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35258	 CXXFLAGS="-g"
35259	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35260/* end confdefs.h.  */
35261
35262int
35263main ()
35264{
35265
35266  ;
35267  return 0;
35268}
35269_ACEOF
35270if ac_fn_cxx_try_compile "$LINENO"; then :
35271  ac_cv_prog_cxx_g=yes
35272fi
35273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35274fi
35275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35276fi
35277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35278   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35279fi
35280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35281$as_echo "$ac_cv_prog_cxx_g" >&6; }
35282if test "$ac_test_CXXFLAGS" = set; then
35283  CXXFLAGS=$ac_save_CXXFLAGS
35284elif test $ac_cv_prog_cxx_g = yes; then
35285  if test "$GXX" = yes; then
35286    CXXFLAGS="-g -O2"
35287  else
35288    CXXFLAGS="-g"
35289  fi
35290else
35291  if test "$GXX" = yes; then
35292    CXXFLAGS="-O2"
35293  else
35294    CXXFLAGS=
35295  fi
35296fi
35297ac_ext=cpp
35298ac_cpp='$CXXCPP $CPPFLAGS'
35299ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35300ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35301ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35302
35303
35304  # This is the compiler version number on the form X.Y[.Z]
35305
35306
35307
35308
35309  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35310    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35311$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35312    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35313$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35314  fi
35315
35316  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35317  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35318    { $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
35319$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;}
35320  fi
35321
35322  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35323    { $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
35324$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35325  fi
35326
35327  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35328
35329
35330  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35331
35332
35333
35334
35335
35336
35337
35338
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379
35380    # Execute function body
35381
35382  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35383  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35384
35385  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35386    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35387  fi
35388
35389  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35390    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35391  fi
35392
35393  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35394  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35395
35396  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35397    :
35398
35399  else
35400    :
35401
35402          { $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
35403$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35404
35405
35406  fi
35407
35408
35409
35410
35411
35412
35413
35414
35415
35416
35417
35418
35419
35420
35421  fi
35422
35423  #
35424  # Setup the preprocessor (CPP and CXXCPP)
35425  #
35426  ac_ext=c
35427ac_cpp='$CPP $CPPFLAGS'
35428ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35429ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35430ac_compiler_gnu=$ac_cv_c_compiler_gnu
35431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35432$as_echo_n "checking how to run the C preprocessor... " >&6; }
35433# On Suns, sometimes $CPP names a directory.
35434if test -n "$CPP" && test -d "$CPP"; then
35435  CPP=
35436fi
35437if test -z "$CPP"; then
35438  if ${ac_cv_prog_CPP+:} false; then :
35439  $as_echo_n "(cached) " >&6
35440else
35441      # Double quotes because CPP needs to be expanded
35442    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35443    do
35444      ac_preproc_ok=false
35445for ac_c_preproc_warn_flag in '' yes
35446do
35447  # Use a header file that comes with gcc, so configuring glibc
35448  # with a fresh cross-compiler works.
35449  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35450  # <limits.h> exists even on freestanding compilers.
35451  # On the NeXT, cc -E runs the code through the compiler's parser,
35452  # not just through cpp. "Syntax error" is here to catch this case.
35453  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35454/* end confdefs.h.  */
35455#ifdef __STDC__
35456# include <limits.h>
35457#else
35458# include <assert.h>
35459#endif
35460		     Syntax error
35461_ACEOF
35462if ac_fn_c_try_cpp "$LINENO"; then :
35463
35464else
35465  # Broken: fails on valid input.
35466continue
35467fi
35468rm -f conftest.err conftest.i conftest.$ac_ext
35469
35470  # OK, works on sane cases.  Now check whether nonexistent headers
35471  # can be detected and how.
35472  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35473/* end confdefs.h.  */
35474#include <ac_nonexistent.h>
35475_ACEOF
35476if ac_fn_c_try_cpp "$LINENO"; then :
35477  # Broken: success on invalid input.
35478continue
35479else
35480  # Passes both tests.
35481ac_preproc_ok=:
35482break
35483fi
35484rm -f conftest.err conftest.i conftest.$ac_ext
35485
35486done
35487# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35488rm -f conftest.i conftest.err conftest.$ac_ext
35489if $ac_preproc_ok; then :
35490  break
35491fi
35492
35493    done
35494    ac_cv_prog_CPP=$CPP
35495
35496fi
35497  CPP=$ac_cv_prog_CPP
35498else
35499  ac_cv_prog_CPP=$CPP
35500fi
35501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35502$as_echo "$CPP" >&6; }
35503ac_preproc_ok=false
35504for ac_c_preproc_warn_flag in '' yes
35505do
35506  # Use a header file that comes with gcc, so configuring glibc
35507  # with a fresh cross-compiler works.
35508  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35509  # <limits.h> exists even on freestanding compilers.
35510  # On the NeXT, cc -E runs the code through the compiler's parser,
35511  # not just through cpp. "Syntax error" is here to catch this case.
35512  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35513/* end confdefs.h.  */
35514#ifdef __STDC__
35515# include <limits.h>
35516#else
35517# include <assert.h>
35518#endif
35519		     Syntax error
35520_ACEOF
35521if ac_fn_c_try_cpp "$LINENO"; then :
35522
35523else
35524  # Broken: fails on valid input.
35525continue
35526fi
35527rm -f conftest.err conftest.i conftest.$ac_ext
35528
35529  # OK, works on sane cases.  Now check whether nonexistent headers
35530  # can be detected and how.
35531  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35532/* end confdefs.h.  */
35533#include <ac_nonexistent.h>
35534_ACEOF
35535if ac_fn_c_try_cpp "$LINENO"; then :
35536  # Broken: success on invalid input.
35537continue
35538else
35539  # Passes both tests.
35540ac_preproc_ok=:
35541break
35542fi
35543rm -f conftest.err conftest.i conftest.$ac_ext
35544
35545done
35546# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35547rm -f conftest.i conftest.err conftest.$ac_ext
35548if $ac_preproc_ok; then :
35549
35550else
35551  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35552$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35553as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35554See \`config.log' for more details" "$LINENO" 5; }
35555fi
35556
35557ac_ext=cpp
35558ac_cpp='$CXXCPP $CPPFLAGS'
35559ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35560ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35561ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35562
35563
35564  # Only process if variable expands to non-empty
35565
35566  if test "x$CPP" != x; then
35567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35568
35569  # First separate the path from the arguments. This will split at the first
35570  # space.
35571  complete="$CPP"
35572  path="${complete%% *}"
35573  tmp="$complete EOL"
35574  arguments="${tmp#* }"
35575
35576  # Input might be given as Windows format, start by converting to
35577  # unix format.
35578  new_path=`$CYGPATH -u "$path"`
35579
35580  # Now try to locate executable using which
35581  new_path=`$WHICH "$new_path" 2> /dev/null`
35582  # bat and cmd files are not always considered executable in cygwin causing which
35583  # to not find them
35584  if test "x$new_path" = x \
35585      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35586      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35587    new_path=`$CYGPATH -u "$path"`
35588  fi
35589  if test "x$new_path" = x; then
35590    # Oops. Which didn't find the executable.
35591    # The splitting of arguments from the executable at a space might have been incorrect,
35592    # since paths with space are more likely in Windows. Give it another try with the whole
35593    # argument.
35594    path="$complete"
35595    arguments="EOL"
35596    new_path=`$CYGPATH -u "$path"`
35597    new_path=`$WHICH "$new_path" 2> /dev/null`
35598    # bat and cmd files are not always considered executable in cygwin causing which
35599    # to not find them
35600    if test "x$new_path" = x \
35601        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35602        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35603      new_path=`$CYGPATH -u "$path"`
35604    fi
35605    if test "x$new_path" = x; then
35606      # It's still not found. Now this is an unrecoverable error.
35607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35608$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35609      has_space=`$ECHO "$complete" | $GREP " "`
35610      if test "x$has_space" != x; then
35611        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35612$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35613      fi
35614      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35615    fi
35616  fi
35617
35618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35621  # "foo.exe" is OK but "foo" is an error.
35622  #
35623  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35624  # It is also a way to make sure we got the proper file name for the real test later on.
35625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35626  if test "x$test_shortpath" = x; then
35627    # Short path failed, file does not exist as specified.
35628    # Try adding .exe or .cmd
35629    if test -f "${new_path}.exe"; then
35630      input_to_shortpath="${new_path}.exe"
35631    elif test -f "${new_path}.cmd"; then
35632      input_to_shortpath="${new_path}.cmd"
35633    else
35634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35635$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35636      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35637$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35638      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35639    fi
35640  else
35641    input_to_shortpath="$new_path"
35642  fi
35643
35644  # Call helper function which possibly converts this using DOS-style short mode.
35645  # If so, the updated path is stored in $new_path.
35646  new_path="$input_to_shortpath"
35647
35648  input_path="$input_to_shortpath"
35649  # Check if we need to convert this using DOS-style short mode. If the path
35650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35651  # take no chances and rewrite it.
35652  # Note: m4 eats our [], so we need to use [ and ] instead.
35653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35654  if test "x$has_forbidden_chars" != x; then
35655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35659      # Going to short mode and back again did indeed matter. Since short mode is
35660      # case insensitive, let's make it lowercase to improve readability.
35661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35662      # Now convert it back to Unix-style (cygpath)
35663      input_path=`$CYGPATH -u "$shortmode_path"`
35664      new_path="$input_path"
35665    fi
35666  fi
35667
35668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35669  if test "x$test_cygdrive_prefix" = x; then
35670    # As a simple fix, exclude /usr/bin since it's not a real path.
35671    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35673      # a path prefixed by /cygdrive for fixpath to work.
35674      new_path="$CYGWIN_ROOT_PATH$input_path"
35675    fi
35676  fi
35677
35678  # remove trailing .exe if any
35679  new_path="${new_path/%.exe/}"
35680
35681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35682
35683  # First separate the path from the arguments. This will split at the first
35684  # space.
35685  complete="$CPP"
35686  path="${complete%% *}"
35687  tmp="$complete EOL"
35688  arguments="${tmp#* }"
35689
35690  # Input might be given as Windows format, start by converting to
35691  # unix format.
35692  new_path="$path"
35693
35694  windows_path="$new_path"
35695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35696    unix_path=`$CYGPATH -u "$windows_path"`
35697    new_path="$unix_path"
35698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35700    new_path="$unix_path"
35701  fi
35702
35703
35704  # Now try to locate executable using which
35705  new_path=`$WHICH "$new_path" 2> /dev/null`
35706
35707  if test "x$new_path" = x; then
35708    # Oops. Which didn't find the executable.
35709    # The splitting of arguments from the executable at a space might have been incorrect,
35710    # since paths with space are more likely in Windows. Give it another try with the whole
35711    # argument.
35712    path="$complete"
35713    arguments="EOL"
35714    new_path="$path"
35715
35716  windows_path="$new_path"
35717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35718    unix_path=`$CYGPATH -u "$windows_path"`
35719    new_path="$unix_path"
35720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35722    new_path="$unix_path"
35723  fi
35724
35725
35726    new_path=`$WHICH "$new_path" 2> /dev/null`
35727    # bat and cmd files are not always considered executable in MSYS causing which
35728    # to not find them
35729    if test "x$new_path" = x \
35730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35732      new_path="$path"
35733
35734  windows_path="$new_path"
35735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35736    unix_path=`$CYGPATH -u "$windows_path"`
35737    new_path="$unix_path"
35738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35740    new_path="$unix_path"
35741  fi
35742
35743    fi
35744
35745    if test "x$new_path" = x; then
35746      # It's still not found. Now this is an unrecoverable error.
35747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35748$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35749      has_space=`$ECHO "$complete" | $GREP " "`
35750      if test "x$has_space" != x; then
35751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35753      fi
35754      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35755    fi
35756  fi
35757
35758  # Now new_path has a complete unix path to the binary
35759  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35760    # Keep paths in /bin as-is, but remove trailing .exe if any
35761    new_path="${new_path/%.exe/}"
35762    # Do not save /bin paths to all_fixpath_prefixes!
35763  else
35764    # Not in mixed or Windows style, start by that.
35765    new_path=`cmd //c echo $new_path`
35766
35767  input_path="$new_path"
35768  # Check if we need to convert this using DOS-style short mode. If the path
35769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35770  # take no chances and rewrite it.
35771  # Note: m4 eats our [], so we need to use [ and ] instead.
35772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35773  if test "x$has_forbidden_chars" != x; then
35774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35776  fi
35777
35778    # Output is in $new_path
35779
35780  windows_path="$new_path"
35781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35782    unix_path=`$CYGPATH -u "$windows_path"`
35783    new_path="$unix_path"
35784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35786    new_path="$unix_path"
35787  fi
35788
35789    # remove trailing .exe if any
35790    new_path="${new_path/%.exe/}"
35791
35792    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35793    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35794  fi
35795
35796    else
35797      # We're on a unix platform. Hooray! :)
35798      # First separate the path from the arguments. This will split at the first
35799      # space.
35800      complete="$CPP"
35801      path="${complete%% *}"
35802      tmp="$complete EOL"
35803      arguments="${tmp#* }"
35804
35805      # Cannot rely on the command "which" here since it doesn't always work.
35806      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35807      if test -z "$is_absolute_path"; then
35808        # Path to executable is not absolute. Find it.
35809        IFS_save="$IFS"
35810        IFS=:
35811        for p in $PATH; do
35812          if test -f "$p/$path" && test -x "$p/$path"; then
35813            new_path="$p/$path"
35814            break
35815          fi
35816        done
35817        IFS="$IFS_save"
35818      else
35819        # This is an absolute path, we can use it without further modifications.
35820        new_path="$path"
35821      fi
35822
35823      if test "x$new_path" = x; then
35824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35825$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35826        has_space=`$ECHO "$complete" | $GREP " "`
35827        if test "x$has_space" != x; then
35828          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35829$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35830        fi
35831        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35832      fi
35833    fi
35834
35835    # Now join together the path and the arguments once again
35836    if test "x$arguments" != xEOL; then
35837      new_complete="$new_path ${arguments% *}"
35838    else
35839      new_complete="$new_path"
35840    fi
35841
35842    if test "x$complete" != "x$new_complete"; then
35843      CPP="$new_complete"
35844      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35845$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35846    fi
35847  fi
35848
35849  ac_ext=cpp
35850ac_cpp='$CXXCPP $CPPFLAGS'
35851ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35852ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35853ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35855$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35856if test -z "$CXXCPP"; then
35857  if ${ac_cv_prog_CXXCPP+:} false; then :
35858  $as_echo_n "(cached) " >&6
35859else
35860      # Double quotes because CXXCPP needs to be expanded
35861    for CXXCPP in "$CXX -E" "/lib/cpp"
35862    do
35863      ac_preproc_ok=false
35864for ac_cxx_preproc_warn_flag in '' yes
35865do
35866  # Use a header file that comes with gcc, so configuring glibc
35867  # with a fresh cross-compiler works.
35868  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35869  # <limits.h> exists even on freestanding compilers.
35870  # On the NeXT, cc -E runs the code through the compiler's parser,
35871  # not just through cpp. "Syntax error" is here to catch this case.
35872  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35873/* end confdefs.h.  */
35874#ifdef __STDC__
35875# include <limits.h>
35876#else
35877# include <assert.h>
35878#endif
35879		     Syntax error
35880_ACEOF
35881if ac_fn_cxx_try_cpp "$LINENO"; then :
35882
35883else
35884  # Broken: fails on valid input.
35885continue
35886fi
35887rm -f conftest.err conftest.i conftest.$ac_ext
35888
35889  # OK, works on sane cases.  Now check whether nonexistent headers
35890  # can be detected and how.
35891  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35892/* end confdefs.h.  */
35893#include <ac_nonexistent.h>
35894_ACEOF
35895if ac_fn_cxx_try_cpp "$LINENO"; then :
35896  # Broken: success on invalid input.
35897continue
35898else
35899  # Passes both tests.
35900ac_preproc_ok=:
35901break
35902fi
35903rm -f conftest.err conftest.i conftest.$ac_ext
35904
35905done
35906# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35907rm -f conftest.i conftest.err conftest.$ac_ext
35908if $ac_preproc_ok; then :
35909  break
35910fi
35911
35912    done
35913    ac_cv_prog_CXXCPP=$CXXCPP
35914
35915fi
35916  CXXCPP=$ac_cv_prog_CXXCPP
35917else
35918  ac_cv_prog_CXXCPP=$CXXCPP
35919fi
35920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35921$as_echo "$CXXCPP" >&6; }
35922ac_preproc_ok=false
35923for ac_cxx_preproc_warn_flag in '' yes
35924do
35925  # Use a header file that comes with gcc, so configuring glibc
35926  # with a fresh cross-compiler works.
35927  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35928  # <limits.h> exists even on freestanding compilers.
35929  # On the NeXT, cc -E runs the code through the compiler's parser,
35930  # not just through cpp. "Syntax error" is here to catch this case.
35931  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35932/* end confdefs.h.  */
35933#ifdef __STDC__
35934# include <limits.h>
35935#else
35936# include <assert.h>
35937#endif
35938		     Syntax error
35939_ACEOF
35940if ac_fn_cxx_try_cpp "$LINENO"; then :
35941
35942else
35943  # Broken: fails on valid input.
35944continue
35945fi
35946rm -f conftest.err conftest.i conftest.$ac_ext
35947
35948  # OK, works on sane cases.  Now check whether nonexistent headers
35949  # can be detected and how.
35950  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35951/* end confdefs.h.  */
35952#include <ac_nonexistent.h>
35953_ACEOF
35954if ac_fn_cxx_try_cpp "$LINENO"; then :
35955  # Broken: success on invalid input.
35956continue
35957else
35958  # Passes both tests.
35959ac_preproc_ok=:
35960break
35961fi
35962rm -f conftest.err conftest.i conftest.$ac_ext
35963
35964done
35965# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35966rm -f conftest.i conftest.err conftest.$ac_ext
35967if $ac_preproc_ok; then :
35968
35969else
35970  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35971$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35972as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35973See \`config.log' for more details" "$LINENO" 5; }
35974fi
35975
35976ac_ext=cpp
35977ac_cpp='$CXXCPP $CPPFLAGS'
35978ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35979ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35980ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35981
35982
35983  # Only process if variable expands to non-empty
35984
35985  if test "x$CXXCPP" != x; then
35986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35987
35988  # First separate the path from the arguments. This will split at the first
35989  # space.
35990  complete="$CXXCPP"
35991  path="${complete%% *}"
35992  tmp="$complete EOL"
35993  arguments="${tmp#* }"
35994
35995  # Input might be given as Windows format, start by converting to
35996  # unix format.
35997  new_path=`$CYGPATH -u "$path"`
35998
35999  # Now try to locate executable using which
36000  new_path=`$WHICH "$new_path" 2> /dev/null`
36001  # bat and cmd files are not always considered executable in cygwin causing which
36002  # to not find them
36003  if test "x$new_path" = x \
36004      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36005      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36006    new_path=`$CYGPATH -u "$path"`
36007  fi
36008  if test "x$new_path" = x; then
36009    # Oops. Which didn't find the executable.
36010    # The splitting of arguments from the executable at a space might have been incorrect,
36011    # since paths with space are more likely in Windows. Give it another try with the whole
36012    # argument.
36013    path="$complete"
36014    arguments="EOL"
36015    new_path=`$CYGPATH -u "$path"`
36016    new_path=`$WHICH "$new_path" 2> /dev/null`
36017    # bat and cmd files are not always considered executable in cygwin causing which
36018    # to not find them
36019    if test "x$new_path" = x \
36020        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36021        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36022      new_path=`$CYGPATH -u "$path"`
36023    fi
36024    if test "x$new_path" = x; then
36025      # It's still not found. Now this is an unrecoverable error.
36026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36027$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36028      has_space=`$ECHO "$complete" | $GREP " "`
36029      if test "x$has_space" != x; then
36030        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36031$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36032      fi
36033      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36034    fi
36035  fi
36036
36037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36040  # "foo.exe" is OK but "foo" is an error.
36041  #
36042  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36043  # It is also a way to make sure we got the proper file name for the real test later on.
36044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36045  if test "x$test_shortpath" = x; then
36046    # Short path failed, file does not exist as specified.
36047    # Try adding .exe or .cmd
36048    if test -f "${new_path}.exe"; then
36049      input_to_shortpath="${new_path}.exe"
36050    elif test -f "${new_path}.cmd"; then
36051      input_to_shortpath="${new_path}.cmd"
36052    else
36053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36054$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36055      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36056$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36057      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36058    fi
36059  else
36060    input_to_shortpath="$new_path"
36061  fi
36062
36063  # Call helper function which possibly converts this using DOS-style short mode.
36064  # If so, the updated path is stored in $new_path.
36065  new_path="$input_to_shortpath"
36066
36067  input_path="$input_to_shortpath"
36068  # Check if we need to convert this using DOS-style short mode. If the path
36069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36070  # take no chances and rewrite it.
36071  # Note: m4 eats our [], so we need to use [ and ] instead.
36072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36073  if test "x$has_forbidden_chars" != x; then
36074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36078      # Going to short mode and back again did indeed matter. Since short mode is
36079      # case insensitive, let's make it lowercase to improve readability.
36080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36081      # Now convert it back to Unix-style (cygpath)
36082      input_path=`$CYGPATH -u "$shortmode_path"`
36083      new_path="$input_path"
36084    fi
36085  fi
36086
36087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36088  if test "x$test_cygdrive_prefix" = x; then
36089    # As a simple fix, exclude /usr/bin since it's not a real path.
36090    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36092      # a path prefixed by /cygdrive for fixpath to work.
36093      new_path="$CYGWIN_ROOT_PATH$input_path"
36094    fi
36095  fi
36096
36097  # remove trailing .exe if any
36098  new_path="${new_path/%.exe/}"
36099
36100    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36101
36102  # First separate the path from the arguments. This will split at the first
36103  # space.
36104  complete="$CXXCPP"
36105  path="${complete%% *}"
36106  tmp="$complete EOL"
36107  arguments="${tmp#* }"
36108
36109  # Input might be given as Windows format, start by converting to
36110  # unix format.
36111  new_path="$path"
36112
36113  windows_path="$new_path"
36114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36115    unix_path=`$CYGPATH -u "$windows_path"`
36116    new_path="$unix_path"
36117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36119    new_path="$unix_path"
36120  fi
36121
36122
36123  # Now try to locate executable using which
36124  new_path=`$WHICH "$new_path" 2> /dev/null`
36125
36126  if test "x$new_path" = x; then
36127    # Oops. Which didn't find the executable.
36128    # The splitting of arguments from the executable at a space might have been incorrect,
36129    # since paths with space are more likely in Windows. Give it another try with the whole
36130    # argument.
36131    path="$complete"
36132    arguments="EOL"
36133    new_path="$path"
36134
36135  windows_path="$new_path"
36136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36137    unix_path=`$CYGPATH -u "$windows_path"`
36138    new_path="$unix_path"
36139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36141    new_path="$unix_path"
36142  fi
36143
36144
36145    new_path=`$WHICH "$new_path" 2> /dev/null`
36146    # bat and cmd files are not always considered executable in MSYS causing which
36147    # to not find them
36148    if test "x$new_path" = x \
36149        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36150        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36151      new_path="$path"
36152
36153  windows_path="$new_path"
36154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36155    unix_path=`$CYGPATH -u "$windows_path"`
36156    new_path="$unix_path"
36157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36159    new_path="$unix_path"
36160  fi
36161
36162    fi
36163
36164    if test "x$new_path" = x; then
36165      # It's still not found. Now this is an unrecoverable error.
36166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36167$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36168      has_space=`$ECHO "$complete" | $GREP " "`
36169      if test "x$has_space" != x; then
36170        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36171$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36172      fi
36173      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36174    fi
36175  fi
36176
36177  # Now new_path has a complete unix path to the binary
36178  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36179    # Keep paths in /bin as-is, but remove trailing .exe if any
36180    new_path="${new_path/%.exe/}"
36181    # Do not save /bin paths to all_fixpath_prefixes!
36182  else
36183    # Not in mixed or Windows style, start by that.
36184    new_path=`cmd //c echo $new_path`
36185
36186  input_path="$new_path"
36187  # Check if we need to convert this using DOS-style short mode. If the path
36188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36189  # take no chances and rewrite it.
36190  # Note: m4 eats our [], so we need to use [ and ] instead.
36191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36192  if test "x$has_forbidden_chars" != x; then
36193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36195  fi
36196
36197    # Output is in $new_path
36198
36199  windows_path="$new_path"
36200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36201    unix_path=`$CYGPATH -u "$windows_path"`
36202    new_path="$unix_path"
36203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36205    new_path="$unix_path"
36206  fi
36207
36208    # remove trailing .exe if any
36209    new_path="${new_path/%.exe/}"
36210
36211    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36212    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36213  fi
36214
36215    else
36216      # We're on a unix platform. Hooray! :)
36217      # First separate the path from the arguments. This will split at the first
36218      # space.
36219      complete="$CXXCPP"
36220      path="${complete%% *}"
36221      tmp="$complete EOL"
36222      arguments="${tmp#* }"
36223
36224      # Cannot rely on the command "which" here since it doesn't always work.
36225      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36226      if test -z "$is_absolute_path"; then
36227        # Path to executable is not absolute. Find it.
36228        IFS_save="$IFS"
36229        IFS=:
36230        for p in $PATH; do
36231          if test -f "$p/$path" && test -x "$p/$path"; then
36232            new_path="$p/$path"
36233            break
36234          fi
36235        done
36236        IFS="$IFS_save"
36237      else
36238        # This is an absolute path, we can use it without further modifications.
36239        new_path="$path"
36240      fi
36241
36242      if test "x$new_path" = x; then
36243        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36244$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36245        has_space=`$ECHO "$complete" | $GREP " "`
36246        if test "x$has_space" != x; then
36247          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36248$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36249        fi
36250        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36251      fi
36252    fi
36253
36254    # Now join together the path and the arguments once again
36255    if test "x$arguments" != xEOL; then
36256      new_complete="$new_path ${arguments% *}"
36257    else
36258      new_complete="$new_path"
36259    fi
36260
36261    if test "x$complete" != "x$new_complete"; then
36262      CXXCPP="$new_complete"
36263      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36264$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36265    fi
36266  fi
36267
36268
36269  #
36270  # Setup the linker (LD)
36271  #
36272  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36273    # In the Microsoft toolchain we have a separate LD command "link".
36274    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36275    # a cygwin program for something completely different.
36276    # Extract the first word of "link", so it can be a program name with args.
36277set dummy link; ac_word=$2
36278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36279$as_echo_n "checking for $ac_word... " >&6; }
36280if ${ac_cv_prog_LD+:} false; then :
36281  $as_echo_n "(cached) " >&6
36282else
36283  if test -n "$LD"; then
36284  ac_cv_prog_LD="$LD" # Let the user override the test.
36285else
36286  ac_prog_rejected=no
36287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36288for as_dir in $PATH
36289do
36290  IFS=$as_save_IFS
36291  test -z "$as_dir" && as_dir=.
36292    for ac_exec_ext in '' $ac_executable_extensions; do
36293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36294    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36295       ac_prog_rejected=yes
36296       continue
36297     fi
36298    ac_cv_prog_LD="link"
36299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36300    break 2
36301  fi
36302done
36303  done
36304IFS=$as_save_IFS
36305
36306if test $ac_prog_rejected = yes; then
36307  # We found a bogon in the path, so make sure we never use it.
36308  set dummy $ac_cv_prog_LD
36309  shift
36310  if test $# != 0; then
36311    # We chose a different compiler from the bogus one.
36312    # However, it has the same basename, so the bogon will be chosen
36313    # first if we set LD to just the basename; use the full file name.
36314    shift
36315    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36316  fi
36317fi
36318fi
36319fi
36320LD=$ac_cv_prog_LD
36321if test -n "$LD"; then
36322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36323$as_echo "$LD" >&6; }
36324else
36325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36326$as_echo "no" >&6; }
36327fi
36328
36329
36330
36331  # Only process if variable expands to non-empty
36332
36333  if test "x$LD" != x; then
36334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36335
36336  # First separate the path from the arguments. This will split at the first
36337  # space.
36338  complete="$LD"
36339  path="${complete%% *}"
36340  tmp="$complete EOL"
36341  arguments="${tmp#* }"
36342
36343  # Input might be given as Windows format, start by converting to
36344  # unix format.
36345  new_path=`$CYGPATH -u "$path"`
36346
36347  # Now try to locate executable using which
36348  new_path=`$WHICH "$new_path" 2> /dev/null`
36349  # bat and cmd files are not always considered executable in cygwin causing which
36350  # to not find them
36351  if test "x$new_path" = x \
36352      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36353      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36354    new_path=`$CYGPATH -u "$path"`
36355  fi
36356  if test "x$new_path" = x; then
36357    # Oops. Which didn't find the executable.
36358    # The splitting of arguments from the executable at a space might have been incorrect,
36359    # since paths with space are more likely in Windows. Give it another try with the whole
36360    # argument.
36361    path="$complete"
36362    arguments="EOL"
36363    new_path=`$CYGPATH -u "$path"`
36364    new_path=`$WHICH "$new_path" 2> /dev/null`
36365    # bat and cmd files are not always considered executable in cygwin causing which
36366    # to not find them
36367    if test "x$new_path" = x \
36368        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36369        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36370      new_path=`$CYGPATH -u "$path"`
36371    fi
36372    if test "x$new_path" = x; then
36373      # It's still not found. Now this is an unrecoverable error.
36374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36375$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36376      has_space=`$ECHO "$complete" | $GREP " "`
36377      if test "x$has_space" != x; then
36378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36380      fi
36381      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36382    fi
36383  fi
36384
36385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36388  # "foo.exe" is OK but "foo" is an error.
36389  #
36390  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36391  # It is also a way to make sure we got the proper file name for the real test later on.
36392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36393  if test "x$test_shortpath" = x; then
36394    # Short path failed, file does not exist as specified.
36395    # Try adding .exe or .cmd
36396    if test -f "${new_path}.exe"; then
36397      input_to_shortpath="${new_path}.exe"
36398    elif test -f "${new_path}.cmd"; then
36399      input_to_shortpath="${new_path}.cmd"
36400    else
36401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36402$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36403      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36404$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36405      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36406    fi
36407  else
36408    input_to_shortpath="$new_path"
36409  fi
36410
36411  # Call helper function which possibly converts this using DOS-style short mode.
36412  # If so, the updated path is stored in $new_path.
36413  new_path="$input_to_shortpath"
36414
36415  input_path="$input_to_shortpath"
36416  # Check if we need to convert this using DOS-style short mode. If the path
36417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36418  # take no chances and rewrite it.
36419  # Note: m4 eats our [], so we need to use [ and ] instead.
36420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36421  if test "x$has_forbidden_chars" != x; then
36422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36426      # Going to short mode and back again did indeed matter. Since short mode is
36427      # case insensitive, let's make it lowercase to improve readability.
36428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36429      # Now convert it back to Unix-style (cygpath)
36430      input_path=`$CYGPATH -u "$shortmode_path"`
36431      new_path="$input_path"
36432    fi
36433  fi
36434
36435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36436  if test "x$test_cygdrive_prefix" = x; then
36437    # As a simple fix, exclude /usr/bin since it's not a real path.
36438    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36440      # a path prefixed by /cygdrive for fixpath to work.
36441      new_path="$CYGWIN_ROOT_PATH$input_path"
36442    fi
36443  fi
36444
36445  # remove trailing .exe if any
36446  new_path="${new_path/%.exe/}"
36447
36448    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36449
36450  # First separate the path from the arguments. This will split at the first
36451  # space.
36452  complete="$LD"
36453  path="${complete%% *}"
36454  tmp="$complete EOL"
36455  arguments="${tmp#* }"
36456
36457  # Input might be given as Windows format, start by converting to
36458  # unix format.
36459  new_path="$path"
36460
36461  windows_path="$new_path"
36462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36463    unix_path=`$CYGPATH -u "$windows_path"`
36464    new_path="$unix_path"
36465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36467    new_path="$unix_path"
36468  fi
36469
36470
36471  # Now try to locate executable using which
36472  new_path=`$WHICH "$new_path" 2> /dev/null`
36473
36474  if test "x$new_path" = x; then
36475    # Oops. Which didn't find the executable.
36476    # The splitting of arguments from the executable at a space might have been incorrect,
36477    # since paths with space are more likely in Windows. Give it another try with the whole
36478    # argument.
36479    path="$complete"
36480    arguments="EOL"
36481    new_path="$path"
36482
36483  windows_path="$new_path"
36484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36485    unix_path=`$CYGPATH -u "$windows_path"`
36486    new_path="$unix_path"
36487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36489    new_path="$unix_path"
36490  fi
36491
36492
36493    new_path=`$WHICH "$new_path" 2> /dev/null`
36494    # bat and cmd files are not always considered executable in MSYS causing which
36495    # to not find them
36496    if test "x$new_path" = x \
36497        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36498        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36499      new_path="$path"
36500
36501  windows_path="$new_path"
36502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36503    unix_path=`$CYGPATH -u "$windows_path"`
36504    new_path="$unix_path"
36505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36507    new_path="$unix_path"
36508  fi
36509
36510    fi
36511
36512    if test "x$new_path" = x; then
36513      # It's still not found. Now this is an unrecoverable error.
36514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36515$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36516      has_space=`$ECHO "$complete" | $GREP " "`
36517      if test "x$has_space" != x; then
36518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36520      fi
36521      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36522    fi
36523  fi
36524
36525  # Now new_path has a complete unix path to the binary
36526  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36527    # Keep paths in /bin as-is, but remove trailing .exe if any
36528    new_path="${new_path/%.exe/}"
36529    # Do not save /bin paths to all_fixpath_prefixes!
36530  else
36531    # Not in mixed or Windows style, start by that.
36532    new_path=`cmd //c echo $new_path`
36533
36534  input_path="$new_path"
36535  # Check if we need to convert this using DOS-style short mode. If the path
36536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36537  # take no chances and rewrite it.
36538  # Note: m4 eats our [], so we need to use [ and ] instead.
36539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36540  if test "x$has_forbidden_chars" != x; then
36541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36543  fi
36544
36545    # Output is in $new_path
36546
36547  windows_path="$new_path"
36548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36549    unix_path=`$CYGPATH -u "$windows_path"`
36550    new_path="$unix_path"
36551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36553    new_path="$unix_path"
36554  fi
36555
36556    # remove trailing .exe if any
36557    new_path="${new_path/%.exe/}"
36558
36559    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36560    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36561  fi
36562
36563    else
36564      # We're on a unix platform. Hooray! :)
36565      # First separate the path from the arguments. This will split at the first
36566      # space.
36567      complete="$LD"
36568      path="${complete%% *}"
36569      tmp="$complete EOL"
36570      arguments="${tmp#* }"
36571
36572      # Cannot rely on the command "which" here since it doesn't always work.
36573      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36574      if test -z "$is_absolute_path"; then
36575        # Path to executable is not absolute. Find it.
36576        IFS_save="$IFS"
36577        IFS=:
36578        for p in $PATH; do
36579          if test -f "$p/$path" && test -x "$p/$path"; then
36580            new_path="$p/$path"
36581            break
36582          fi
36583        done
36584        IFS="$IFS_save"
36585      else
36586        # This is an absolute path, we can use it without further modifications.
36587        new_path="$path"
36588      fi
36589
36590      if test "x$new_path" = x; then
36591        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36592$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36593        has_space=`$ECHO "$complete" | $GREP " "`
36594        if test "x$has_space" != x; then
36595          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36596$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36597        fi
36598        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36599      fi
36600    fi
36601
36602    # Now join together the path and the arguments once again
36603    if test "x$arguments" != xEOL; then
36604      new_complete="$new_path ${arguments% *}"
36605    else
36606      new_complete="$new_path"
36607    fi
36608
36609    if test "x$complete" != "x$new_complete"; then
36610      LD="$new_complete"
36611      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36612$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36613    fi
36614  fi
36615
36616    # Verify that we indeed succeeded with this trick.
36617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36618$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36619    "$LD" --version > /dev/null
36620    if test $? -eq 0 ; then
36621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36622$as_echo "no" >&6; }
36623      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36624    else
36625      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36626$as_echo "yes" >&6; }
36627    fi
36628    LDCXX="$LD"
36629  else
36630    # All other toolchains use the compiler to link.
36631    LD="$CC"
36632    LDCXX="$CXX"
36633  fi
36634
36635  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36636
36637
36638  #
36639  # Setup the assembler (AS)
36640  #
36641  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36642
36643
36644  # Publish this variable in the help.
36645
36646
36647  if [ -z "${AS+x}" ]; then
36648    # The variable is not set by user, try to locate tool using the code snippet
36649    for ac_prog in as
36650do
36651  # Extract the first word of "$ac_prog", so it can be a program name with args.
36652set dummy $ac_prog; ac_word=$2
36653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36654$as_echo_n "checking for $ac_word... " >&6; }
36655if ${ac_cv_path_AS+:} false; then :
36656  $as_echo_n "(cached) " >&6
36657else
36658  case $AS in
36659  [\\/]* | ?:[\\/]*)
36660  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36661  ;;
36662  *)
36663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36664for as_dir in $PATH
36665do
36666  IFS=$as_save_IFS
36667  test -z "$as_dir" && as_dir=.
36668    for ac_exec_ext in '' $ac_executable_extensions; do
36669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36670    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36672    break 2
36673  fi
36674done
36675  done
36676IFS=$as_save_IFS
36677
36678  ;;
36679esac
36680fi
36681AS=$ac_cv_path_AS
36682if test -n "$AS"; then
36683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36684$as_echo "$AS" >&6; }
36685else
36686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36687$as_echo "no" >&6; }
36688fi
36689
36690
36691  test -n "$AS" && break
36692done
36693
36694  else
36695    # The variable is set, but is it from the command line or the environment?
36696
36697    # Try to remove the string !AS! from our list.
36698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36700      # If it failed, the variable was not from the command line. Ignore it,
36701      # but warn the user (except for BASH, which is always set by the calling BASH).
36702      if test "xAS" != xBASH; then
36703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36704$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36705      fi
36706      # Try to locate tool using the code snippet
36707      for ac_prog in as
36708do
36709  # Extract the first word of "$ac_prog", so it can be a program name with args.
36710set dummy $ac_prog; ac_word=$2
36711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36712$as_echo_n "checking for $ac_word... " >&6; }
36713if ${ac_cv_path_AS+:} false; then :
36714  $as_echo_n "(cached) " >&6
36715else
36716  case $AS in
36717  [\\/]* | ?:[\\/]*)
36718  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36719  ;;
36720  *)
36721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36722for as_dir in $PATH
36723do
36724  IFS=$as_save_IFS
36725  test -z "$as_dir" && as_dir=.
36726    for ac_exec_ext in '' $ac_executable_extensions; do
36727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36728    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36730    break 2
36731  fi
36732done
36733  done
36734IFS=$as_save_IFS
36735
36736  ;;
36737esac
36738fi
36739AS=$ac_cv_path_AS
36740if test -n "$AS"; then
36741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36742$as_echo "$AS" >&6; }
36743else
36744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36745$as_echo "no" >&6; }
36746fi
36747
36748
36749  test -n "$AS" && break
36750done
36751
36752    else
36753      # If it succeeded, then it was overridden by the user. We will use it
36754      # for the tool.
36755
36756      # First remove it from the list of overridden variables, so we can test
36757      # for unknown variables in the end.
36758      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36759
36760      # Check if we try to supply an empty value
36761      if test "x$AS" = x; then
36762        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36763$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36764        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36765$as_echo_n "checking for AS... " >&6; }
36766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36767$as_echo "disabled" >&6; }
36768      else
36769        # Check if the provided tool contains a complete path.
36770        tool_specified="$AS"
36771        tool_basename="${tool_specified##*/}"
36772        if test "x$tool_basename" = "x$tool_specified"; then
36773          # A command without a complete path is provided, search $PATH.
36774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36775$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36776          # Extract the first word of "$tool_basename", so it can be a program name with args.
36777set dummy $tool_basename; ac_word=$2
36778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36779$as_echo_n "checking for $ac_word... " >&6; }
36780if ${ac_cv_path_AS+:} false; then :
36781  $as_echo_n "(cached) " >&6
36782else
36783  case $AS in
36784  [\\/]* | ?:[\\/]*)
36785  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36786  ;;
36787  *)
36788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36789for as_dir in $PATH
36790do
36791  IFS=$as_save_IFS
36792  test -z "$as_dir" && as_dir=.
36793    for ac_exec_ext in '' $ac_executable_extensions; do
36794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36795    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36797    break 2
36798  fi
36799done
36800  done
36801IFS=$as_save_IFS
36802
36803  ;;
36804esac
36805fi
36806AS=$ac_cv_path_AS
36807if test -n "$AS"; then
36808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36809$as_echo "$AS" >&6; }
36810else
36811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36812$as_echo "no" >&6; }
36813fi
36814
36815
36816          if test "x$AS" = x; then
36817            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36818          fi
36819        else
36820          # Otherwise we believe it is a complete path. Use it as it is.
36821          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36822$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36823          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36824$as_echo_n "checking for AS... " >&6; }
36825          if test ! -x "$tool_specified"; then
36826            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36827$as_echo "not found" >&6; }
36828            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36829          fi
36830          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36831$as_echo "$tool_specified" >&6; }
36832        fi
36833      fi
36834    fi
36835
36836  fi
36837
36838
36839
36840  # Only process if variable expands to non-empty
36841
36842  if test "x$AS" != x; then
36843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36844
36845  # First separate the path from the arguments. This will split at the first
36846  # space.
36847  complete="$AS"
36848  path="${complete%% *}"
36849  tmp="$complete EOL"
36850  arguments="${tmp#* }"
36851
36852  # Input might be given as Windows format, start by converting to
36853  # unix format.
36854  new_path=`$CYGPATH -u "$path"`
36855
36856  # Now try to locate executable using which
36857  new_path=`$WHICH "$new_path" 2> /dev/null`
36858  # bat and cmd files are not always considered executable in cygwin causing which
36859  # to not find them
36860  if test "x$new_path" = x \
36861      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36862      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36863    new_path=`$CYGPATH -u "$path"`
36864  fi
36865  if test "x$new_path" = x; then
36866    # Oops. Which didn't find the executable.
36867    # The splitting of arguments from the executable at a space might have been incorrect,
36868    # since paths with space are more likely in Windows. Give it another try with the whole
36869    # argument.
36870    path="$complete"
36871    arguments="EOL"
36872    new_path=`$CYGPATH -u "$path"`
36873    new_path=`$WHICH "$new_path" 2> /dev/null`
36874    # bat and cmd files are not always considered executable in cygwin causing which
36875    # to not find them
36876    if test "x$new_path" = x \
36877        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36878        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36879      new_path=`$CYGPATH -u "$path"`
36880    fi
36881    if test "x$new_path" = x; then
36882      # It's still not found. Now this is an unrecoverable error.
36883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36884$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36885      has_space=`$ECHO "$complete" | $GREP " "`
36886      if test "x$has_space" != x; then
36887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36889      fi
36890      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36891    fi
36892  fi
36893
36894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36897  # "foo.exe" is OK but "foo" is an error.
36898  #
36899  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36900  # It is also a way to make sure we got the proper file name for the real test later on.
36901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36902  if test "x$test_shortpath" = x; then
36903    # Short path failed, file does not exist as specified.
36904    # Try adding .exe or .cmd
36905    if test -f "${new_path}.exe"; then
36906      input_to_shortpath="${new_path}.exe"
36907    elif test -f "${new_path}.cmd"; then
36908      input_to_shortpath="${new_path}.cmd"
36909    else
36910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36911$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36912      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36913$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36914      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36915    fi
36916  else
36917    input_to_shortpath="$new_path"
36918  fi
36919
36920  # Call helper function which possibly converts this using DOS-style short mode.
36921  # If so, the updated path is stored in $new_path.
36922  new_path="$input_to_shortpath"
36923
36924  input_path="$input_to_shortpath"
36925  # Check if we need to convert this using DOS-style short mode. If the path
36926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36927  # take no chances and rewrite it.
36928  # Note: m4 eats our [], so we need to use [ and ] instead.
36929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36930  if test "x$has_forbidden_chars" != x; then
36931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36935      # Going to short mode and back again did indeed matter. Since short mode is
36936      # case insensitive, let's make it lowercase to improve readability.
36937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36938      # Now convert it back to Unix-style (cygpath)
36939      input_path=`$CYGPATH -u "$shortmode_path"`
36940      new_path="$input_path"
36941    fi
36942  fi
36943
36944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36945  if test "x$test_cygdrive_prefix" = x; then
36946    # As a simple fix, exclude /usr/bin since it's not a real path.
36947    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36949      # a path prefixed by /cygdrive for fixpath to work.
36950      new_path="$CYGWIN_ROOT_PATH$input_path"
36951    fi
36952  fi
36953
36954  # remove trailing .exe if any
36955  new_path="${new_path/%.exe/}"
36956
36957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36958
36959  # First separate the path from the arguments. This will split at the first
36960  # space.
36961  complete="$AS"
36962  path="${complete%% *}"
36963  tmp="$complete EOL"
36964  arguments="${tmp#* }"
36965
36966  # Input might be given as Windows format, start by converting to
36967  # unix format.
36968  new_path="$path"
36969
36970  windows_path="$new_path"
36971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36972    unix_path=`$CYGPATH -u "$windows_path"`
36973    new_path="$unix_path"
36974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36976    new_path="$unix_path"
36977  fi
36978
36979
36980  # Now try to locate executable using which
36981  new_path=`$WHICH "$new_path" 2> /dev/null`
36982
36983  if test "x$new_path" = x; then
36984    # Oops. Which didn't find the executable.
36985    # The splitting of arguments from the executable at a space might have been incorrect,
36986    # since paths with space are more likely in Windows. Give it another try with the whole
36987    # argument.
36988    path="$complete"
36989    arguments="EOL"
36990    new_path="$path"
36991
36992  windows_path="$new_path"
36993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36994    unix_path=`$CYGPATH -u "$windows_path"`
36995    new_path="$unix_path"
36996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36998    new_path="$unix_path"
36999  fi
37000
37001
37002    new_path=`$WHICH "$new_path" 2> /dev/null`
37003    # bat and cmd files are not always considered executable in MSYS causing which
37004    # to not find them
37005    if test "x$new_path" = x \
37006        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37007        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37008      new_path="$path"
37009
37010  windows_path="$new_path"
37011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37012    unix_path=`$CYGPATH -u "$windows_path"`
37013    new_path="$unix_path"
37014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37016    new_path="$unix_path"
37017  fi
37018
37019    fi
37020
37021    if test "x$new_path" = x; then
37022      # It's still not found. Now this is an unrecoverable error.
37023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37024$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37025      has_space=`$ECHO "$complete" | $GREP " "`
37026      if test "x$has_space" != x; then
37027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37029      fi
37030      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37031    fi
37032  fi
37033
37034  # Now new_path has a complete unix path to the binary
37035  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37036    # Keep paths in /bin as-is, but remove trailing .exe if any
37037    new_path="${new_path/%.exe/}"
37038    # Do not save /bin paths to all_fixpath_prefixes!
37039  else
37040    # Not in mixed or Windows style, start by that.
37041    new_path=`cmd //c echo $new_path`
37042
37043  input_path="$new_path"
37044  # Check if we need to convert this using DOS-style short mode. If the path
37045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37046  # take no chances and rewrite it.
37047  # Note: m4 eats our [], so we need to use [ and ] instead.
37048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37049  if test "x$has_forbidden_chars" != x; then
37050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37052  fi
37053
37054    # Output is in $new_path
37055
37056  windows_path="$new_path"
37057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37058    unix_path=`$CYGPATH -u "$windows_path"`
37059    new_path="$unix_path"
37060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37062    new_path="$unix_path"
37063  fi
37064
37065    # remove trailing .exe if any
37066    new_path="${new_path/%.exe/}"
37067
37068    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37069    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37070  fi
37071
37072    else
37073      # We're on a unix platform. Hooray! :)
37074      # First separate the path from the arguments. This will split at the first
37075      # space.
37076      complete="$AS"
37077      path="${complete%% *}"
37078      tmp="$complete EOL"
37079      arguments="${tmp#* }"
37080
37081      # Cannot rely on the command "which" here since it doesn't always work.
37082      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37083      if test -z "$is_absolute_path"; then
37084        # Path to executable is not absolute. Find it.
37085        IFS_save="$IFS"
37086        IFS=:
37087        for p in $PATH; do
37088          if test -f "$p/$path" && test -x "$p/$path"; then
37089            new_path="$p/$path"
37090            break
37091          fi
37092        done
37093        IFS="$IFS_save"
37094      else
37095        # This is an absolute path, we can use it without further modifications.
37096        new_path="$path"
37097      fi
37098
37099      if test "x$new_path" = x; then
37100        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37101$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37102        has_space=`$ECHO "$complete" | $GREP " "`
37103        if test "x$has_space" != x; then
37104          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37105$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37106        fi
37107        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37108      fi
37109    fi
37110
37111    # Now join together the path and the arguments once again
37112    if test "x$arguments" != xEOL; then
37113      new_complete="$new_path ${arguments% *}"
37114    else
37115      new_complete="$new_path"
37116    fi
37117
37118    if test "x$complete" != "x$new_complete"; then
37119      AS="$new_complete"
37120      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37121$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37122    fi
37123  fi
37124
37125    if test "x$AS" = x; then
37126      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37127    fi
37128  else
37129    # FIXME: is this correct for microsoft?
37130    AS="$CC -c"
37131  fi
37132
37133
37134  #
37135  # Setup the archiver (AR)
37136  #
37137  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37138    # The corresponding ar tool is lib.exe (used to create static libraries)
37139    # Extract the first word of "lib", so it can be a program name with args.
37140set dummy lib; ac_word=$2
37141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37142$as_echo_n "checking for $ac_word... " >&6; }
37143if ${ac_cv_prog_AR+:} false; then :
37144  $as_echo_n "(cached) " >&6
37145else
37146  if test -n "$AR"; then
37147  ac_cv_prog_AR="$AR" # Let the user override the test.
37148else
37149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37150for as_dir in $PATH
37151do
37152  IFS=$as_save_IFS
37153  test -z "$as_dir" && as_dir=.
37154    for ac_exec_ext in '' $ac_executable_extensions; do
37155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37156    ac_cv_prog_AR="lib"
37157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37158    break 2
37159  fi
37160done
37161  done
37162IFS=$as_save_IFS
37163
37164fi
37165fi
37166AR=$ac_cv_prog_AR
37167if test -n "$AR"; then
37168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37169$as_echo "$AR" >&6; }
37170else
37171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37172$as_echo "no" >&6; }
37173fi
37174
37175
37176  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37177
37178
37179  # Publish this variable in the help.
37180
37181
37182  if [ -z "${AR+x}" ]; then
37183    # The variable is not set by user, try to locate tool using the code snippet
37184    if test -n "$ac_tool_prefix"; then
37185  for ac_prog in ar gcc-ar
37186  do
37187    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37188set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37190$as_echo_n "checking for $ac_word... " >&6; }
37191if ${ac_cv_prog_AR+:} false; then :
37192  $as_echo_n "(cached) " >&6
37193else
37194  if test -n "$AR"; then
37195  ac_cv_prog_AR="$AR" # Let the user override the test.
37196else
37197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37198for as_dir in $PATH
37199do
37200  IFS=$as_save_IFS
37201  test -z "$as_dir" && as_dir=.
37202    for ac_exec_ext in '' $ac_executable_extensions; do
37203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37204    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37206    break 2
37207  fi
37208done
37209  done
37210IFS=$as_save_IFS
37211
37212fi
37213fi
37214AR=$ac_cv_prog_AR
37215if test -n "$AR"; then
37216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37217$as_echo "$AR" >&6; }
37218else
37219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37220$as_echo "no" >&6; }
37221fi
37222
37223
37224    test -n "$AR" && break
37225  done
37226fi
37227if test -z "$AR"; then
37228  ac_ct_AR=$AR
37229  for ac_prog in ar gcc-ar
37230do
37231  # Extract the first word of "$ac_prog", so it can be a program name with args.
37232set dummy $ac_prog; ac_word=$2
37233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37234$as_echo_n "checking for $ac_word... " >&6; }
37235if ${ac_cv_prog_ac_ct_AR+:} false; then :
37236  $as_echo_n "(cached) " >&6
37237else
37238  if test -n "$ac_ct_AR"; then
37239  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37240else
37241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37242for as_dir in $PATH
37243do
37244  IFS=$as_save_IFS
37245  test -z "$as_dir" && as_dir=.
37246    for ac_exec_ext in '' $ac_executable_extensions; do
37247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37248    ac_cv_prog_ac_ct_AR="$ac_prog"
37249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37250    break 2
37251  fi
37252done
37253  done
37254IFS=$as_save_IFS
37255
37256fi
37257fi
37258ac_ct_AR=$ac_cv_prog_ac_ct_AR
37259if test -n "$ac_ct_AR"; then
37260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37261$as_echo "$ac_ct_AR" >&6; }
37262else
37263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37264$as_echo "no" >&6; }
37265fi
37266
37267
37268  test -n "$ac_ct_AR" && break
37269done
37270
37271  if test "x$ac_ct_AR" = x; then
37272    AR=""
37273  else
37274    case $cross_compiling:$ac_tool_warned in
37275yes:)
37276{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37277$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37278ac_tool_warned=yes ;;
37279esac
37280    AR=$ac_ct_AR
37281  fi
37282fi
37283
37284  else
37285    # The variable is set, but is it from the command line or the environment?
37286
37287    # Try to remove the string !AR! from our list.
37288    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37289    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37290      # If it failed, the variable was not from the command line. Ignore it,
37291      # but warn the user (except for BASH, which is always set by the calling BASH).
37292      if test "xAR" != xBASH; then
37293        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37294$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37295      fi
37296      # Try to locate tool using the code snippet
37297      if test -n "$ac_tool_prefix"; then
37298  for ac_prog in ar gcc-ar
37299  do
37300    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37301set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37303$as_echo_n "checking for $ac_word... " >&6; }
37304if ${ac_cv_prog_AR+:} false; then :
37305  $as_echo_n "(cached) " >&6
37306else
37307  if test -n "$AR"; then
37308  ac_cv_prog_AR="$AR" # Let the user override the test.
37309else
37310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37311for as_dir in $PATH
37312do
37313  IFS=$as_save_IFS
37314  test -z "$as_dir" && as_dir=.
37315    for ac_exec_ext in '' $ac_executable_extensions; do
37316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37317    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37319    break 2
37320  fi
37321done
37322  done
37323IFS=$as_save_IFS
37324
37325fi
37326fi
37327AR=$ac_cv_prog_AR
37328if test -n "$AR"; then
37329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37330$as_echo "$AR" >&6; }
37331else
37332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37333$as_echo "no" >&6; }
37334fi
37335
37336
37337    test -n "$AR" && break
37338  done
37339fi
37340if test -z "$AR"; then
37341  ac_ct_AR=$AR
37342  for ac_prog in ar gcc-ar
37343do
37344  # Extract the first word of "$ac_prog", so it can be a program name with args.
37345set dummy $ac_prog; ac_word=$2
37346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37347$as_echo_n "checking for $ac_word... " >&6; }
37348if ${ac_cv_prog_ac_ct_AR+:} false; then :
37349  $as_echo_n "(cached) " >&6
37350else
37351  if test -n "$ac_ct_AR"; then
37352  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37353else
37354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37355for as_dir in $PATH
37356do
37357  IFS=$as_save_IFS
37358  test -z "$as_dir" && as_dir=.
37359    for ac_exec_ext in '' $ac_executable_extensions; do
37360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37361    ac_cv_prog_ac_ct_AR="$ac_prog"
37362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37363    break 2
37364  fi
37365done
37366  done
37367IFS=$as_save_IFS
37368
37369fi
37370fi
37371ac_ct_AR=$ac_cv_prog_ac_ct_AR
37372if test -n "$ac_ct_AR"; then
37373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37374$as_echo "$ac_ct_AR" >&6; }
37375else
37376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37377$as_echo "no" >&6; }
37378fi
37379
37380
37381  test -n "$ac_ct_AR" && break
37382done
37383
37384  if test "x$ac_ct_AR" = x; then
37385    AR=""
37386  else
37387    case $cross_compiling:$ac_tool_warned in
37388yes:)
37389{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37390$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37391ac_tool_warned=yes ;;
37392esac
37393    AR=$ac_ct_AR
37394  fi
37395fi
37396
37397    else
37398      # If it succeeded, then it was overridden by the user. We will use it
37399      # for the tool.
37400
37401      # First remove it from the list of overridden variables, so we can test
37402      # for unknown variables in the end.
37403      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37404
37405      # Check if we try to supply an empty value
37406      if test "x$AR" = x; then
37407        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37408$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37409        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37410$as_echo_n "checking for AR... " >&6; }
37411        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37412$as_echo "disabled" >&6; }
37413      else
37414        # Check if the provided tool contains a complete path.
37415        tool_specified="$AR"
37416        tool_basename="${tool_specified##*/}"
37417        if test "x$tool_basename" = "x$tool_specified"; then
37418          # A command without a complete path is provided, search $PATH.
37419          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37420$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37421          # Extract the first word of "$tool_basename", so it can be a program name with args.
37422set dummy $tool_basename; ac_word=$2
37423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37424$as_echo_n "checking for $ac_word... " >&6; }
37425if ${ac_cv_path_AR+:} false; then :
37426  $as_echo_n "(cached) " >&6
37427else
37428  case $AR in
37429  [\\/]* | ?:[\\/]*)
37430  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37431  ;;
37432  *)
37433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37434for as_dir in $PATH
37435do
37436  IFS=$as_save_IFS
37437  test -z "$as_dir" && as_dir=.
37438    for ac_exec_ext in '' $ac_executable_extensions; do
37439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37440    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37442    break 2
37443  fi
37444done
37445  done
37446IFS=$as_save_IFS
37447
37448  ;;
37449esac
37450fi
37451AR=$ac_cv_path_AR
37452if test -n "$AR"; then
37453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37454$as_echo "$AR" >&6; }
37455else
37456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37457$as_echo "no" >&6; }
37458fi
37459
37460
37461          if test "x$AR" = x; then
37462            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37463          fi
37464        else
37465          # Otherwise we believe it is a complete path. Use it as it is.
37466          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37467$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37468          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37469$as_echo_n "checking for AR... " >&6; }
37470          if test ! -x "$tool_specified"; then
37471            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37472$as_echo "not found" >&6; }
37473            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37474          fi
37475          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37476$as_echo "$tool_specified" >&6; }
37477        fi
37478      fi
37479    fi
37480
37481  fi
37482
37483
37484  else
37485
37486
37487  # Publish this variable in the help.
37488
37489
37490  if [ -z "${AR+x}" ]; then
37491    # The variable is not set by user, try to locate tool using the code snippet
37492    if test -n "$ac_tool_prefix"; then
37493  for ac_prog in ar
37494  do
37495    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37496set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37498$as_echo_n "checking for $ac_word... " >&6; }
37499if ${ac_cv_prog_AR+:} false; then :
37500  $as_echo_n "(cached) " >&6
37501else
37502  if test -n "$AR"; then
37503  ac_cv_prog_AR="$AR" # Let the user override the test.
37504else
37505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37506for as_dir in $PATH
37507do
37508  IFS=$as_save_IFS
37509  test -z "$as_dir" && as_dir=.
37510    for ac_exec_ext in '' $ac_executable_extensions; do
37511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37512    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37514    break 2
37515  fi
37516done
37517  done
37518IFS=$as_save_IFS
37519
37520fi
37521fi
37522AR=$ac_cv_prog_AR
37523if test -n "$AR"; then
37524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37525$as_echo "$AR" >&6; }
37526else
37527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37528$as_echo "no" >&6; }
37529fi
37530
37531
37532    test -n "$AR" && break
37533  done
37534fi
37535if test -z "$AR"; then
37536  ac_ct_AR=$AR
37537  for ac_prog in ar
37538do
37539  # Extract the first word of "$ac_prog", so it can be a program name with args.
37540set dummy $ac_prog; ac_word=$2
37541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37542$as_echo_n "checking for $ac_word... " >&6; }
37543if ${ac_cv_prog_ac_ct_AR+:} false; then :
37544  $as_echo_n "(cached) " >&6
37545else
37546  if test -n "$ac_ct_AR"; then
37547  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37548else
37549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37550for as_dir in $PATH
37551do
37552  IFS=$as_save_IFS
37553  test -z "$as_dir" && as_dir=.
37554    for ac_exec_ext in '' $ac_executable_extensions; do
37555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37556    ac_cv_prog_ac_ct_AR="$ac_prog"
37557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37558    break 2
37559  fi
37560done
37561  done
37562IFS=$as_save_IFS
37563
37564fi
37565fi
37566ac_ct_AR=$ac_cv_prog_ac_ct_AR
37567if test -n "$ac_ct_AR"; then
37568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37569$as_echo "$ac_ct_AR" >&6; }
37570else
37571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37572$as_echo "no" >&6; }
37573fi
37574
37575
37576  test -n "$ac_ct_AR" && break
37577done
37578
37579  if test "x$ac_ct_AR" = x; then
37580    AR=""
37581  else
37582    case $cross_compiling:$ac_tool_warned in
37583yes:)
37584{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37585$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37586ac_tool_warned=yes ;;
37587esac
37588    AR=$ac_ct_AR
37589  fi
37590fi
37591
37592  else
37593    # The variable is set, but is it from the command line or the environment?
37594
37595    # Try to remove the string !AR! from our list.
37596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37598      # If it failed, the variable was not from the command line. Ignore it,
37599      # but warn the user (except for BASH, which is always set by the calling BASH).
37600      if test "xAR" != xBASH; then
37601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37602$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37603      fi
37604      # Try to locate tool using the code snippet
37605      if test -n "$ac_tool_prefix"; then
37606  for ac_prog in ar
37607  do
37608    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37609set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37611$as_echo_n "checking for $ac_word... " >&6; }
37612if ${ac_cv_prog_AR+:} false; then :
37613  $as_echo_n "(cached) " >&6
37614else
37615  if test -n "$AR"; then
37616  ac_cv_prog_AR="$AR" # Let the user override the test.
37617else
37618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37619for as_dir in $PATH
37620do
37621  IFS=$as_save_IFS
37622  test -z "$as_dir" && as_dir=.
37623    for ac_exec_ext in '' $ac_executable_extensions; do
37624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37625    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37627    break 2
37628  fi
37629done
37630  done
37631IFS=$as_save_IFS
37632
37633fi
37634fi
37635AR=$ac_cv_prog_AR
37636if test -n "$AR"; then
37637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37638$as_echo "$AR" >&6; }
37639else
37640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37641$as_echo "no" >&6; }
37642fi
37643
37644
37645    test -n "$AR" && break
37646  done
37647fi
37648if test -z "$AR"; then
37649  ac_ct_AR=$AR
37650  for ac_prog in ar
37651do
37652  # Extract the first word of "$ac_prog", so it can be a program name with args.
37653set dummy $ac_prog; ac_word=$2
37654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37655$as_echo_n "checking for $ac_word... " >&6; }
37656if ${ac_cv_prog_ac_ct_AR+:} false; then :
37657  $as_echo_n "(cached) " >&6
37658else
37659  if test -n "$ac_ct_AR"; then
37660  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37661else
37662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37663for as_dir in $PATH
37664do
37665  IFS=$as_save_IFS
37666  test -z "$as_dir" && as_dir=.
37667    for ac_exec_ext in '' $ac_executable_extensions; do
37668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37669    ac_cv_prog_ac_ct_AR="$ac_prog"
37670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37671    break 2
37672  fi
37673done
37674  done
37675IFS=$as_save_IFS
37676
37677fi
37678fi
37679ac_ct_AR=$ac_cv_prog_ac_ct_AR
37680if test -n "$ac_ct_AR"; then
37681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37682$as_echo "$ac_ct_AR" >&6; }
37683else
37684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37685$as_echo "no" >&6; }
37686fi
37687
37688
37689  test -n "$ac_ct_AR" && break
37690done
37691
37692  if test "x$ac_ct_AR" = x; then
37693    AR=""
37694  else
37695    case $cross_compiling:$ac_tool_warned in
37696yes:)
37697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37699ac_tool_warned=yes ;;
37700esac
37701    AR=$ac_ct_AR
37702  fi
37703fi
37704
37705    else
37706      # If it succeeded, then it was overridden by the user. We will use it
37707      # for the tool.
37708
37709      # First remove it from the list of overridden variables, so we can test
37710      # for unknown variables in the end.
37711      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37712
37713      # Check if we try to supply an empty value
37714      if test "x$AR" = x; then
37715        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37716$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37717        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37718$as_echo_n "checking for AR... " >&6; }
37719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37720$as_echo "disabled" >&6; }
37721      else
37722        # Check if the provided tool contains a complete path.
37723        tool_specified="$AR"
37724        tool_basename="${tool_specified##*/}"
37725        if test "x$tool_basename" = "x$tool_specified"; then
37726          # A command without a complete path is provided, search $PATH.
37727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37728$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37729          # Extract the first word of "$tool_basename", so it can be a program name with args.
37730set dummy $tool_basename; ac_word=$2
37731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37732$as_echo_n "checking for $ac_word... " >&6; }
37733if ${ac_cv_path_AR+:} false; then :
37734  $as_echo_n "(cached) " >&6
37735else
37736  case $AR in
37737  [\\/]* | ?:[\\/]*)
37738  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37739  ;;
37740  *)
37741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37742for as_dir in $PATH
37743do
37744  IFS=$as_save_IFS
37745  test -z "$as_dir" && as_dir=.
37746    for ac_exec_ext in '' $ac_executable_extensions; do
37747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37748    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37750    break 2
37751  fi
37752done
37753  done
37754IFS=$as_save_IFS
37755
37756  ;;
37757esac
37758fi
37759AR=$ac_cv_path_AR
37760if test -n "$AR"; then
37761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37762$as_echo "$AR" >&6; }
37763else
37764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37765$as_echo "no" >&6; }
37766fi
37767
37768
37769          if test "x$AR" = x; then
37770            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37771          fi
37772        else
37773          # Otherwise we believe it is a complete path. Use it as it is.
37774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37775$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37776          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37777$as_echo_n "checking for AR... " >&6; }
37778          if test ! -x "$tool_specified"; then
37779            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37780$as_echo "not found" >&6; }
37781            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37782          fi
37783          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37784$as_echo "$tool_specified" >&6; }
37785        fi
37786      fi
37787    fi
37788
37789  fi
37790
37791
37792  fi
37793
37794  # Only process if variable expands to non-empty
37795
37796  if test "x$AR" != x; then
37797    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37798
37799  # First separate the path from the arguments. This will split at the first
37800  # space.
37801  complete="$AR"
37802  path="${complete%% *}"
37803  tmp="$complete EOL"
37804  arguments="${tmp#* }"
37805
37806  # Input might be given as Windows format, start by converting to
37807  # unix format.
37808  new_path=`$CYGPATH -u "$path"`
37809
37810  # Now try to locate executable using which
37811  new_path=`$WHICH "$new_path" 2> /dev/null`
37812  # bat and cmd files are not always considered executable in cygwin causing which
37813  # to not find them
37814  if test "x$new_path" = x \
37815      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37816      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37817    new_path=`$CYGPATH -u "$path"`
37818  fi
37819  if test "x$new_path" = x; then
37820    # Oops. Which didn't find the executable.
37821    # The splitting of arguments from the executable at a space might have been incorrect,
37822    # since paths with space are more likely in Windows. Give it another try with the whole
37823    # argument.
37824    path="$complete"
37825    arguments="EOL"
37826    new_path=`$CYGPATH -u "$path"`
37827    new_path=`$WHICH "$new_path" 2> /dev/null`
37828    # bat and cmd files are not always considered executable in cygwin causing which
37829    # to not find them
37830    if test "x$new_path" = x \
37831        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37832        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37833      new_path=`$CYGPATH -u "$path"`
37834    fi
37835    if test "x$new_path" = x; then
37836      # It's still not found. Now this is an unrecoverable error.
37837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37838$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37839      has_space=`$ECHO "$complete" | $GREP " "`
37840      if test "x$has_space" != x; then
37841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37843      fi
37844      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37845    fi
37846  fi
37847
37848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37851  # "foo.exe" is OK but "foo" is an error.
37852  #
37853  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37854  # It is also a way to make sure we got the proper file name for the real test later on.
37855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37856  if test "x$test_shortpath" = x; then
37857    # Short path failed, file does not exist as specified.
37858    # Try adding .exe or .cmd
37859    if test -f "${new_path}.exe"; then
37860      input_to_shortpath="${new_path}.exe"
37861    elif test -f "${new_path}.cmd"; then
37862      input_to_shortpath="${new_path}.cmd"
37863    else
37864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37865$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37866      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37867$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37868      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37869    fi
37870  else
37871    input_to_shortpath="$new_path"
37872  fi
37873
37874  # Call helper function which possibly converts this using DOS-style short mode.
37875  # If so, the updated path is stored in $new_path.
37876  new_path="$input_to_shortpath"
37877
37878  input_path="$input_to_shortpath"
37879  # Check if we need to convert this using DOS-style short mode. If the path
37880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37881  # take no chances and rewrite it.
37882  # Note: m4 eats our [], so we need to use [ and ] instead.
37883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37884  if test "x$has_forbidden_chars" != x; then
37885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37889      # Going to short mode and back again did indeed matter. Since short mode is
37890      # case insensitive, let's make it lowercase to improve readability.
37891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37892      # Now convert it back to Unix-style (cygpath)
37893      input_path=`$CYGPATH -u "$shortmode_path"`
37894      new_path="$input_path"
37895    fi
37896  fi
37897
37898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37899  if test "x$test_cygdrive_prefix" = x; then
37900    # As a simple fix, exclude /usr/bin since it's not a real path.
37901    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37903      # a path prefixed by /cygdrive for fixpath to work.
37904      new_path="$CYGWIN_ROOT_PATH$input_path"
37905    fi
37906  fi
37907
37908  # remove trailing .exe if any
37909  new_path="${new_path/%.exe/}"
37910
37911    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37912
37913  # First separate the path from the arguments. This will split at the first
37914  # space.
37915  complete="$AR"
37916  path="${complete%% *}"
37917  tmp="$complete EOL"
37918  arguments="${tmp#* }"
37919
37920  # Input might be given as Windows format, start by converting to
37921  # unix format.
37922  new_path="$path"
37923
37924  windows_path="$new_path"
37925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37926    unix_path=`$CYGPATH -u "$windows_path"`
37927    new_path="$unix_path"
37928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37930    new_path="$unix_path"
37931  fi
37932
37933
37934  # Now try to locate executable using which
37935  new_path=`$WHICH "$new_path" 2> /dev/null`
37936
37937  if test "x$new_path" = x; then
37938    # Oops. Which didn't find the executable.
37939    # The splitting of arguments from the executable at a space might have been incorrect,
37940    # since paths with space are more likely in Windows. Give it another try with the whole
37941    # argument.
37942    path="$complete"
37943    arguments="EOL"
37944    new_path="$path"
37945
37946  windows_path="$new_path"
37947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37948    unix_path=`$CYGPATH -u "$windows_path"`
37949    new_path="$unix_path"
37950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37952    new_path="$unix_path"
37953  fi
37954
37955
37956    new_path=`$WHICH "$new_path" 2> /dev/null`
37957    # bat and cmd files are not always considered executable in MSYS causing which
37958    # to not find them
37959    if test "x$new_path" = x \
37960        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37961        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37962      new_path="$path"
37963
37964  windows_path="$new_path"
37965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37966    unix_path=`$CYGPATH -u "$windows_path"`
37967    new_path="$unix_path"
37968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37970    new_path="$unix_path"
37971  fi
37972
37973    fi
37974
37975    if test "x$new_path" = x; then
37976      # It's still not found. Now this is an unrecoverable error.
37977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37978$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37979      has_space=`$ECHO "$complete" | $GREP " "`
37980      if test "x$has_space" != x; then
37981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37983      fi
37984      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37985    fi
37986  fi
37987
37988  # Now new_path has a complete unix path to the binary
37989  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37990    # Keep paths in /bin as-is, but remove trailing .exe if any
37991    new_path="${new_path/%.exe/}"
37992    # Do not save /bin paths to all_fixpath_prefixes!
37993  else
37994    # Not in mixed or Windows style, start by that.
37995    new_path=`cmd //c echo $new_path`
37996
37997  input_path="$new_path"
37998  # Check if we need to convert this using DOS-style short mode. If the path
37999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38000  # take no chances and rewrite it.
38001  # Note: m4 eats our [], so we need to use [ and ] instead.
38002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38003  if test "x$has_forbidden_chars" != x; then
38004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38005    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38006  fi
38007
38008    # Output is in $new_path
38009
38010  windows_path="$new_path"
38011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38012    unix_path=`$CYGPATH -u "$windows_path"`
38013    new_path="$unix_path"
38014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38016    new_path="$unix_path"
38017  fi
38018
38019    # remove trailing .exe if any
38020    new_path="${new_path/%.exe/}"
38021
38022    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38023    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38024  fi
38025
38026    else
38027      # We're on a unix platform. Hooray! :)
38028      # First separate the path from the arguments. This will split at the first
38029      # space.
38030      complete="$AR"
38031      path="${complete%% *}"
38032      tmp="$complete EOL"
38033      arguments="${tmp#* }"
38034
38035      # Cannot rely on the command "which" here since it doesn't always work.
38036      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38037      if test -z "$is_absolute_path"; then
38038        # Path to executable is not absolute. Find it.
38039        IFS_save="$IFS"
38040        IFS=:
38041        for p in $PATH; do
38042          if test -f "$p/$path" && test -x "$p/$path"; then
38043            new_path="$p/$path"
38044            break
38045          fi
38046        done
38047        IFS="$IFS_save"
38048      else
38049        # This is an absolute path, we can use it without further modifications.
38050        new_path="$path"
38051      fi
38052
38053      if test "x$new_path" = x; then
38054        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38055$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38056        has_space=`$ECHO "$complete" | $GREP " "`
38057        if test "x$has_space" != x; then
38058          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38059$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38060        fi
38061        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38062      fi
38063    fi
38064
38065    # Now join together the path and the arguments once again
38066    if test "x$arguments" != xEOL; then
38067      new_complete="$new_path ${arguments% *}"
38068    else
38069      new_complete="$new_path"
38070    fi
38071
38072    if test "x$complete" != "x$new_complete"; then
38073      AR="$new_complete"
38074      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38075$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38076    fi
38077  fi
38078
38079
38080
38081  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38082
38083
38084  # Publish this variable in the help.
38085
38086
38087  if [ -z "${LIPO+x}" ]; then
38088    # The variable is not set by user, try to locate tool using the code snippet
38089    for ac_prog in lipo
38090do
38091  # Extract the first word of "$ac_prog", so it can be a program name with args.
38092set dummy $ac_prog; ac_word=$2
38093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38094$as_echo_n "checking for $ac_word... " >&6; }
38095if ${ac_cv_path_LIPO+:} false; then :
38096  $as_echo_n "(cached) " >&6
38097else
38098  case $LIPO in
38099  [\\/]* | ?:[\\/]*)
38100  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38101  ;;
38102  *)
38103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38104for as_dir in $PATH
38105do
38106  IFS=$as_save_IFS
38107  test -z "$as_dir" && as_dir=.
38108    for ac_exec_ext in '' $ac_executable_extensions; do
38109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38110    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38112    break 2
38113  fi
38114done
38115  done
38116IFS=$as_save_IFS
38117
38118  ;;
38119esac
38120fi
38121LIPO=$ac_cv_path_LIPO
38122if test -n "$LIPO"; then
38123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38124$as_echo "$LIPO" >&6; }
38125else
38126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38127$as_echo "no" >&6; }
38128fi
38129
38130
38131  test -n "$LIPO" && break
38132done
38133
38134  else
38135    # The variable is set, but is it from the command line or the environment?
38136
38137    # Try to remove the string !LIPO! from our list.
38138    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38139    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38140      # If it failed, the variable was not from the command line. Ignore it,
38141      # but warn the user (except for BASH, which is always set by the calling BASH).
38142      if test "xLIPO" != xBASH; then
38143        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38144$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38145      fi
38146      # Try to locate tool using the code snippet
38147      for ac_prog in lipo
38148do
38149  # Extract the first word of "$ac_prog", so it can be a program name with args.
38150set dummy $ac_prog; ac_word=$2
38151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38152$as_echo_n "checking for $ac_word... " >&6; }
38153if ${ac_cv_path_LIPO+:} false; then :
38154  $as_echo_n "(cached) " >&6
38155else
38156  case $LIPO in
38157  [\\/]* | ?:[\\/]*)
38158  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38159  ;;
38160  *)
38161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38162for as_dir in $PATH
38163do
38164  IFS=$as_save_IFS
38165  test -z "$as_dir" && as_dir=.
38166    for ac_exec_ext in '' $ac_executable_extensions; do
38167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38168    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38170    break 2
38171  fi
38172done
38173  done
38174IFS=$as_save_IFS
38175
38176  ;;
38177esac
38178fi
38179LIPO=$ac_cv_path_LIPO
38180if test -n "$LIPO"; then
38181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38182$as_echo "$LIPO" >&6; }
38183else
38184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38185$as_echo "no" >&6; }
38186fi
38187
38188
38189  test -n "$LIPO" && break
38190done
38191
38192    else
38193      # If it succeeded, then it was overridden by the user. We will use it
38194      # for the tool.
38195
38196      # First remove it from the list of overridden variables, so we can test
38197      # for unknown variables in the end.
38198      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38199
38200      # Check if we try to supply an empty value
38201      if test "x$LIPO" = x; then
38202        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38203$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38204        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38205$as_echo_n "checking for LIPO... " >&6; }
38206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38207$as_echo "disabled" >&6; }
38208      else
38209        # Check if the provided tool contains a complete path.
38210        tool_specified="$LIPO"
38211        tool_basename="${tool_specified##*/}"
38212        if test "x$tool_basename" = "x$tool_specified"; then
38213          # A command without a complete path is provided, search $PATH.
38214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38215$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38216          # Extract the first word of "$tool_basename", so it can be a program name with args.
38217set dummy $tool_basename; ac_word=$2
38218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38219$as_echo_n "checking for $ac_word... " >&6; }
38220if ${ac_cv_path_LIPO+:} false; then :
38221  $as_echo_n "(cached) " >&6
38222else
38223  case $LIPO in
38224  [\\/]* | ?:[\\/]*)
38225  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38226  ;;
38227  *)
38228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38229for as_dir in $PATH
38230do
38231  IFS=$as_save_IFS
38232  test -z "$as_dir" && as_dir=.
38233    for ac_exec_ext in '' $ac_executable_extensions; do
38234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38235    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38237    break 2
38238  fi
38239done
38240  done
38241IFS=$as_save_IFS
38242
38243  ;;
38244esac
38245fi
38246LIPO=$ac_cv_path_LIPO
38247if test -n "$LIPO"; then
38248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38249$as_echo "$LIPO" >&6; }
38250else
38251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38252$as_echo "no" >&6; }
38253fi
38254
38255
38256          if test "x$LIPO" = x; then
38257            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38258          fi
38259        else
38260          # Otherwise we believe it is a complete path. Use it as it is.
38261          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38262$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38263          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38264$as_echo_n "checking for LIPO... " >&6; }
38265          if test ! -x "$tool_specified"; then
38266            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38267$as_echo "not found" >&6; }
38268            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38269          fi
38270          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38271$as_echo "$tool_specified" >&6; }
38272        fi
38273      fi
38274    fi
38275
38276  fi
38277
38278
38279
38280  # Only process if variable expands to non-empty
38281
38282  if test "x$LIPO" != x; then
38283    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38284
38285  # First separate the path from the arguments. This will split at the first
38286  # space.
38287  complete="$LIPO"
38288  path="${complete%% *}"
38289  tmp="$complete EOL"
38290  arguments="${tmp#* }"
38291
38292  # Input might be given as Windows format, start by converting to
38293  # unix format.
38294  new_path=`$CYGPATH -u "$path"`
38295
38296  # Now try to locate executable using which
38297  new_path=`$WHICH "$new_path" 2> /dev/null`
38298  # bat and cmd files are not always considered executable in cygwin causing which
38299  # to not find them
38300  if test "x$new_path" = x \
38301      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38302      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38303    new_path=`$CYGPATH -u "$path"`
38304  fi
38305  if test "x$new_path" = x; then
38306    # Oops. Which didn't find the executable.
38307    # The splitting of arguments from the executable at a space might have been incorrect,
38308    # since paths with space are more likely in Windows. Give it another try with the whole
38309    # argument.
38310    path="$complete"
38311    arguments="EOL"
38312    new_path=`$CYGPATH -u "$path"`
38313    new_path=`$WHICH "$new_path" 2> /dev/null`
38314    # bat and cmd files are not always considered executable in cygwin causing which
38315    # to not find them
38316    if test "x$new_path" = x \
38317        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38318        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38319      new_path=`$CYGPATH -u "$path"`
38320    fi
38321    if test "x$new_path" = x; then
38322      # It's still not found. Now this is an unrecoverable error.
38323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38324$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38325      has_space=`$ECHO "$complete" | $GREP " "`
38326      if test "x$has_space" != x; then
38327        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38328$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38329      fi
38330      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38331    fi
38332  fi
38333
38334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38337  # "foo.exe" is OK but "foo" is an error.
38338  #
38339  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38340  # It is also a way to make sure we got the proper file name for the real test later on.
38341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38342  if test "x$test_shortpath" = x; then
38343    # Short path failed, file does not exist as specified.
38344    # Try adding .exe or .cmd
38345    if test -f "${new_path}.exe"; then
38346      input_to_shortpath="${new_path}.exe"
38347    elif test -f "${new_path}.cmd"; then
38348      input_to_shortpath="${new_path}.cmd"
38349    else
38350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38351$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38352      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38353$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38354      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38355    fi
38356  else
38357    input_to_shortpath="$new_path"
38358  fi
38359
38360  # Call helper function which possibly converts this using DOS-style short mode.
38361  # If so, the updated path is stored in $new_path.
38362  new_path="$input_to_shortpath"
38363
38364  input_path="$input_to_shortpath"
38365  # Check if we need to convert this using DOS-style short mode. If the path
38366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38367  # take no chances and rewrite it.
38368  # Note: m4 eats our [], so we need to use [ and ] instead.
38369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38370  if test "x$has_forbidden_chars" != x; then
38371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38375      # Going to short mode and back again did indeed matter. Since short mode is
38376      # case insensitive, let's make it lowercase to improve readability.
38377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38378      # Now convert it back to Unix-style (cygpath)
38379      input_path=`$CYGPATH -u "$shortmode_path"`
38380      new_path="$input_path"
38381    fi
38382  fi
38383
38384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38385  if test "x$test_cygdrive_prefix" = x; then
38386    # As a simple fix, exclude /usr/bin since it's not a real path.
38387    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38389      # a path prefixed by /cygdrive for fixpath to work.
38390      new_path="$CYGWIN_ROOT_PATH$input_path"
38391    fi
38392  fi
38393
38394  # remove trailing .exe if any
38395  new_path="${new_path/%.exe/}"
38396
38397    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38398
38399  # First separate the path from the arguments. This will split at the first
38400  # space.
38401  complete="$LIPO"
38402  path="${complete%% *}"
38403  tmp="$complete EOL"
38404  arguments="${tmp#* }"
38405
38406  # Input might be given as Windows format, start by converting to
38407  # unix format.
38408  new_path="$path"
38409
38410  windows_path="$new_path"
38411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38412    unix_path=`$CYGPATH -u "$windows_path"`
38413    new_path="$unix_path"
38414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38416    new_path="$unix_path"
38417  fi
38418
38419
38420  # Now try to locate executable using which
38421  new_path=`$WHICH "$new_path" 2> /dev/null`
38422
38423  if test "x$new_path" = x; then
38424    # Oops. Which didn't find the executable.
38425    # The splitting of arguments from the executable at a space might have been incorrect,
38426    # since paths with space are more likely in Windows. Give it another try with the whole
38427    # argument.
38428    path="$complete"
38429    arguments="EOL"
38430    new_path="$path"
38431
38432  windows_path="$new_path"
38433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38434    unix_path=`$CYGPATH -u "$windows_path"`
38435    new_path="$unix_path"
38436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38438    new_path="$unix_path"
38439  fi
38440
38441
38442    new_path=`$WHICH "$new_path" 2> /dev/null`
38443    # bat and cmd files are not always considered executable in MSYS causing which
38444    # to not find them
38445    if test "x$new_path" = x \
38446        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38447        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38448      new_path="$path"
38449
38450  windows_path="$new_path"
38451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38452    unix_path=`$CYGPATH -u "$windows_path"`
38453    new_path="$unix_path"
38454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38456    new_path="$unix_path"
38457  fi
38458
38459    fi
38460
38461    if test "x$new_path" = x; then
38462      # It's still not found. Now this is an unrecoverable error.
38463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38464$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38465      has_space=`$ECHO "$complete" | $GREP " "`
38466      if test "x$has_space" != x; then
38467        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38468$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38469      fi
38470      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38471    fi
38472  fi
38473
38474  # Now new_path has a complete unix path to the binary
38475  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38476    # Keep paths in /bin as-is, but remove trailing .exe if any
38477    new_path="${new_path/%.exe/}"
38478    # Do not save /bin paths to all_fixpath_prefixes!
38479  else
38480    # Not in mixed or Windows style, start by that.
38481    new_path=`cmd //c echo $new_path`
38482
38483  input_path="$new_path"
38484  # Check if we need to convert this using DOS-style short mode. If the path
38485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38486  # take no chances and rewrite it.
38487  # Note: m4 eats our [], so we need to use [ and ] instead.
38488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38489  if test "x$has_forbidden_chars" != x; then
38490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38491    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38492  fi
38493
38494    # Output is in $new_path
38495
38496  windows_path="$new_path"
38497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38498    unix_path=`$CYGPATH -u "$windows_path"`
38499    new_path="$unix_path"
38500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38502    new_path="$unix_path"
38503  fi
38504
38505    # remove trailing .exe if any
38506    new_path="${new_path/%.exe/}"
38507
38508    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38509    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38510  fi
38511
38512    else
38513      # We're on a unix platform. Hooray! :)
38514      # First separate the path from the arguments. This will split at the first
38515      # space.
38516      complete="$LIPO"
38517      path="${complete%% *}"
38518      tmp="$complete EOL"
38519      arguments="${tmp#* }"
38520
38521      # Cannot rely on the command "which" here since it doesn't always work.
38522      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38523      if test -z "$is_absolute_path"; then
38524        # Path to executable is not absolute. Find it.
38525        IFS_save="$IFS"
38526        IFS=:
38527        for p in $PATH; do
38528          if test -f "$p/$path" && test -x "$p/$path"; then
38529            new_path="$p/$path"
38530            break
38531          fi
38532        done
38533        IFS="$IFS_save"
38534      else
38535        # This is an absolute path, we can use it without further modifications.
38536        new_path="$path"
38537      fi
38538
38539      if test "x$new_path" = x; then
38540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38541$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38542        has_space=`$ECHO "$complete" | $GREP " "`
38543        if test "x$has_space" != x; then
38544          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38545$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38546        fi
38547        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38548      fi
38549    fi
38550
38551    # Now join together the path and the arguments once again
38552    if test "x$arguments" != xEOL; then
38553      new_complete="$new_path ${arguments% *}"
38554    else
38555      new_complete="$new_path"
38556    fi
38557
38558    if test "x$complete" != "x$new_complete"; then
38559      LIPO="$new_complete"
38560      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38561$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38562    fi
38563  fi
38564
38565  fi
38566
38567  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38568    # Extract the first word of "mt", so it can be a program name with args.
38569set dummy mt; ac_word=$2
38570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38571$as_echo_n "checking for $ac_word... " >&6; }
38572if ${ac_cv_prog_MT+:} false; then :
38573  $as_echo_n "(cached) " >&6
38574else
38575  if test -n "$MT"; then
38576  ac_cv_prog_MT="$MT" # Let the user override the test.
38577else
38578  ac_prog_rejected=no
38579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38580for as_dir in $PATH
38581do
38582  IFS=$as_save_IFS
38583  test -z "$as_dir" && as_dir=.
38584    for ac_exec_ext in '' $ac_executable_extensions; do
38585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38586    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38587       ac_prog_rejected=yes
38588       continue
38589     fi
38590    ac_cv_prog_MT="mt"
38591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38592    break 2
38593  fi
38594done
38595  done
38596IFS=$as_save_IFS
38597
38598if test $ac_prog_rejected = yes; then
38599  # We found a bogon in the path, so make sure we never use it.
38600  set dummy $ac_cv_prog_MT
38601  shift
38602  if test $# != 0; then
38603    # We chose a different compiler from the bogus one.
38604    # However, it has the same basename, so the bogon will be chosen
38605    # first if we set MT to just the basename; use the full file name.
38606    shift
38607    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38608  fi
38609fi
38610fi
38611fi
38612MT=$ac_cv_prog_MT
38613if test -n "$MT"; then
38614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38615$as_echo "$MT" >&6; }
38616else
38617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38618$as_echo "no" >&6; }
38619fi
38620
38621
38622
38623  # Only process if variable expands to non-empty
38624
38625  if test "x$MT" != x; then
38626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38627
38628  # First separate the path from the arguments. This will split at the first
38629  # space.
38630  complete="$MT"
38631  path="${complete%% *}"
38632  tmp="$complete EOL"
38633  arguments="${tmp#* }"
38634
38635  # Input might be given as Windows format, start by converting to
38636  # unix format.
38637  new_path=`$CYGPATH -u "$path"`
38638
38639  # Now try to locate executable using which
38640  new_path=`$WHICH "$new_path" 2> /dev/null`
38641  # bat and cmd files are not always considered executable in cygwin causing which
38642  # to not find them
38643  if test "x$new_path" = x \
38644      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38645      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38646    new_path=`$CYGPATH -u "$path"`
38647  fi
38648  if test "x$new_path" = x; then
38649    # Oops. Which didn't find the executable.
38650    # The splitting of arguments from the executable at a space might have been incorrect,
38651    # since paths with space are more likely in Windows. Give it another try with the whole
38652    # argument.
38653    path="$complete"
38654    arguments="EOL"
38655    new_path=`$CYGPATH -u "$path"`
38656    new_path=`$WHICH "$new_path" 2> /dev/null`
38657    # bat and cmd files are not always considered executable in cygwin causing which
38658    # to not find them
38659    if test "x$new_path" = x \
38660        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38661        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38662      new_path=`$CYGPATH -u "$path"`
38663    fi
38664    if test "x$new_path" = x; then
38665      # It's still not found. Now this is an unrecoverable error.
38666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38667$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38668      has_space=`$ECHO "$complete" | $GREP " "`
38669      if test "x$has_space" != x; then
38670        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38671$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38672      fi
38673      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38674    fi
38675  fi
38676
38677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38680  # "foo.exe" is OK but "foo" is an error.
38681  #
38682  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38683  # It is also a way to make sure we got the proper file name for the real test later on.
38684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38685  if test "x$test_shortpath" = x; then
38686    # Short path failed, file does not exist as specified.
38687    # Try adding .exe or .cmd
38688    if test -f "${new_path}.exe"; then
38689      input_to_shortpath="${new_path}.exe"
38690    elif test -f "${new_path}.cmd"; then
38691      input_to_shortpath="${new_path}.cmd"
38692    else
38693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38694$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38695      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38696$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38697      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38698    fi
38699  else
38700    input_to_shortpath="$new_path"
38701  fi
38702
38703  # Call helper function which possibly converts this using DOS-style short mode.
38704  # If so, the updated path is stored in $new_path.
38705  new_path="$input_to_shortpath"
38706
38707  input_path="$input_to_shortpath"
38708  # Check if we need to convert this using DOS-style short mode. If the path
38709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38710  # take no chances and rewrite it.
38711  # Note: m4 eats our [], so we need to use [ and ] instead.
38712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38713  if test "x$has_forbidden_chars" != x; then
38714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38718      # Going to short mode and back again did indeed matter. Since short mode is
38719      # case insensitive, let's make it lowercase to improve readability.
38720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38721      # Now convert it back to Unix-style (cygpath)
38722      input_path=`$CYGPATH -u "$shortmode_path"`
38723      new_path="$input_path"
38724    fi
38725  fi
38726
38727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38728  if test "x$test_cygdrive_prefix" = x; then
38729    # As a simple fix, exclude /usr/bin since it's not a real path.
38730    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38732      # a path prefixed by /cygdrive for fixpath to work.
38733      new_path="$CYGWIN_ROOT_PATH$input_path"
38734    fi
38735  fi
38736
38737  # remove trailing .exe if any
38738  new_path="${new_path/%.exe/}"
38739
38740    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38741
38742  # First separate the path from the arguments. This will split at the first
38743  # space.
38744  complete="$MT"
38745  path="${complete%% *}"
38746  tmp="$complete EOL"
38747  arguments="${tmp#* }"
38748
38749  # Input might be given as Windows format, start by converting to
38750  # unix format.
38751  new_path="$path"
38752
38753  windows_path="$new_path"
38754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38755    unix_path=`$CYGPATH -u "$windows_path"`
38756    new_path="$unix_path"
38757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38759    new_path="$unix_path"
38760  fi
38761
38762
38763  # Now try to locate executable using which
38764  new_path=`$WHICH "$new_path" 2> /dev/null`
38765
38766  if test "x$new_path" = x; then
38767    # Oops. Which didn't find the executable.
38768    # The splitting of arguments from the executable at a space might have been incorrect,
38769    # since paths with space are more likely in Windows. Give it another try with the whole
38770    # argument.
38771    path="$complete"
38772    arguments="EOL"
38773    new_path="$path"
38774
38775  windows_path="$new_path"
38776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38777    unix_path=`$CYGPATH -u "$windows_path"`
38778    new_path="$unix_path"
38779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38781    new_path="$unix_path"
38782  fi
38783
38784
38785    new_path=`$WHICH "$new_path" 2> /dev/null`
38786    # bat and cmd files are not always considered executable in MSYS causing which
38787    # to not find them
38788    if test "x$new_path" = x \
38789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38791      new_path="$path"
38792
38793  windows_path="$new_path"
38794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38795    unix_path=`$CYGPATH -u "$windows_path"`
38796    new_path="$unix_path"
38797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38799    new_path="$unix_path"
38800  fi
38801
38802    fi
38803
38804    if test "x$new_path" = x; then
38805      # It's still not found. Now this is an unrecoverable error.
38806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38807$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38808      has_space=`$ECHO "$complete" | $GREP " "`
38809      if test "x$has_space" != x; then
38810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38812      fi
38813      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38814    fi
38815  fi
38816
38817  # Now new_path has a complete unix path to the binary
38818  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38819    # Keep paths in /bin as-is, but remove trailing .exe if any
38820    new_path="${new_path/%.exe/}"
38821    # Do not save /bin paths to all_fixpath_prefixes!
38822  else
38823    # Not in mixed or Windows style, start by that.
38824    new_path=`cmd //c echo $new_path`
38825
38826  input_path="$new_path"
38827  # Check if we need to convert this using DOS-style short mode. If the path
38828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38829  # take no chances and rewrite it.
38830  # Note: m4 eats our [], so we need to use [ and ] instead.
38831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38832  if test "x$has_forbidden_chars" != x; then
38833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38835  fi
38836
38837    # Output is in $new_path
38838
38839  windows_path="$new_path"
38840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38841    unix_path=`$CYGPATH -u "$windows_path"`
38842    new_path="$unix_path"
38843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38845    new_path="$unix_path"
38846  fi
38847
38848    # remove trailing .exe if any
38849    new_path="${new_path/%.exe/}"
38850
38851    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38852    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38853  fi
38854
38855    else
38856      # We're on a unix platform. Hooray! :)
38857      # First separate the path from the arguments. This will split at the first
38858      # space.
38859      complete="$MT"
38860      path="${complete%% *}"
38861      tmp="$complete EOL"
38862      arguments="${tmp#* }"
38863
38864      # Cannot rely on the command "which" here since it doesn't always work.
38865      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38866      if test -z "$is_absolute_path"; then
38867        # Path to executable is not absolute. Find it.
38868        IFS_save="$IFS"
38869        IFS=:
38870        for p in $PATH; do
38871          if test -f "$p/$path" && test -x "$p/$path"; then
38872            new_path="$p/$path"
38873            break
38874          fi
38875        done
38876        IFS="$IFS_save"
38877      else
38878        # This is an absolute path, we can use it without further modifications.
38879        new_path="$path"
38880      fi
38881
38882      if test "x$new_path" = x; then
38883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38884$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38885        has_space=`$ECHO "$complete" | $GREP " "`
38886        if test "x$has_space" != x; then
38887          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38888$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38889        fi
38890        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38891      fi
38892    fi
38893
38894    # Now join together the path and the arguments once again
38895    if test "x$arguments" != xEOL; then
38896      new_complete="$new_path ${arguments% *}"
38897    else
38898      new_complete="$new_path"
38899    fi
38900
38901    if test "x$complete" != "x$new_complete"; then
38902      MT="$new_complete"
38903      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38904$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38905    fi
38906  fi
38907
38908    # Setup the resource compiler (RC)
38909    # Extract the first word of "rc", so it can be a program name with args.
38910set dummy rc; ac_word=$2
38911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38912$as_echo_n "checking for $ac_word... " >&6; }
38913if ${ac_cv_prog_RC+:} false; then :
38914  $as_echo_n "(cached) " >&6
38915else
38916  if test -n "$RC"; then
38917  ac_cv_prog_RC="$RC" # Let the user override the test.
38918else
38919  ac_prog_rejected=no
38920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38921for as_dir in $PATH
38922do
38923  IFS=$as_save_IFS
38924  test -z "$as_dir" && as_dir=.
38925    for ac_exec_ext in '' $ac_executable_extensions; do
38926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38927    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38928       ac_prog_rejected=yes
38929       continue
38930     fi
38931    ac_cv_prog_RC="rc"
38932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38933    break 2
38934  fi
38935done
38936  done
38937IFS=$as_save_IFS
38938
38939if test $ac_prog_rejected = yes; then
38940  # We found a bogon in the path, so make sure we never use it.
38941  set dummy $ac_cv_prog_RC
38942  shift
38943  if test $# != 0; then
38944    # We chose a different compiler from the bogus one.
38945    # However, it has the same basename, so the bogon will be chosen
38946    # first if we set RC to just the basename; use the full file name.
38947    shift
38948    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38949  fi
38950fi
38951fi
38952fi
38953RC=$ac_cv_prog_RC
38954if test -n "$RC"; then
38955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38956$as_echo "$RC" >&6; }
38957else
38958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38959$as_echo "no" >&6; }
38960fi
38961
38962
38963
38964  # Only process if variable expands to non-empty
38965
38966  if test "x$RC" != x; then
38967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38968
38969  # First separate the path from the arguments. This will split at the first
38970  # space.
38971  complete="$RC"
38972  path="${complete%% *}"
38973  tmp="$complete EOL"
38974  arguments="${tmp#* }"
38975
38976  # Input might be given as Windows format, start by converting to
38977  # unix format.
38978  new_path=`$CYGPATH -u "$path"`
38979
38980  # Now try to locate executable using which
38981  new_path=`$WHICH "$new_path" 2> /dev/null`
38982  # bat and cmd files are not always considered executable in cygwin causing which
38983  # to not find them
38984  if test "x$new_path" = x \
38985      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38986      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38987    new_path=`$CYGPATH -u "$path"`
38988  fi
38989  if test "x$new_path" = x; then
38990    # Oops. Which didn't find the executable.
38991    # The splitting of arguments from the executable at a space might have been incorrect,
38992    # since paths with space are more likely in Windows. Give it another try with the whole
38993    # argument.
38994    path="$complete"
38995    arguments="EOL"
38996    new_path=`$CYGPATH -u "$path"`
38997    new_path=`$WHICH "$new_path" 2> /dev/null`
38998    # bat and cmd files are not always considered executable in cygwin causing which
38999    # to not find them
39000    if test "x$new_path" = x \
39001        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39002        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39003      new_path=`$CYGPATH -u "$path"`
39004    fi
39005    if test "x$new_path" = x; then
39006      # It's still not found. Now this is an unrecoverable error.
39007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39008$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39009      has_space=`$ECHO "$complete" | $GREP " "`
39010      if test "x$has_space" != x; then
39011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39013      fi
39014      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39015    fi
39016  fi
39017
39018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39021  # "foo.exe" is OK but "foo" is an error.
39022  #
39023  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39024  # It is also a way to make sure we got the proper file name for the real test later on.
39025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39026  if test "x$test_shortpath" = x; then
39027    # Short path failed, file does not exist as specified.
39028    # Try adding .exe or .cmd
39029    if test -f "${new_path}.exe"; then
39030      input_to_shortpath="${new_path}.exe"
39031    elif test -f "${new_path}.cmd"; then
39032      input_to_shortpath="${new_path}.cmd"
39033    else
39034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39035$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39036      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39037$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39038      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39039    fi
39040  else
39041    input_to_shortpath="$new_path"
39042  fi
39043
39044  # Call helper function which possibly converts this using DOS-style short mode.
39045  # If so, the updated path is stored in $new_path.
39046  new_path="$input_to_shortpath"
39047
39048  input_path="$input_to_shortpath"
39049  # Check if we need to convert this using DOS-style short mode. If the path
39050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39051  # take no chances and rewrite it.
39052  # Note: m4 eats our [], so we need to use [ and ] instead.
39053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39054  if test "x$has_forbidden_chars" != x; then
39055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39059      # Going to short mode and back again did indeed matter. Since short mode is
39060      # case insensitive, let's make it lowercase to improve readability.
39061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39062      # Now convert it back to Unix-style (cygpath)
39063      input_path=`$CYGPATH -u "$shortmode_path"`
39064      new_path="$input_path"
39065    fi
39066  fi
39067
39068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39069  if test "x$test_cygdrive_prefix" = x; then
39070    # As a simple fix, exclude /usr/bin since it's not a real path.
39071    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39073      # a path prefixed by /cygdrive for fixpath to work.
39074      new_path="$CYGWIN_ROOT_PATH$input_path"
39075    fi
39076  fi
39077
39078  # remove trailing .exe if any
39079  new_path="${new_path/%.exe/}"
39080
39081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39082
39083  # First separate the path from the arguments. This will split at the first
39084  # space.
39085  complete="$RC"
39086  path="${complete%% *}"
39087  tmp="$complete EOL"
39088  arguments="${tmp#* }"
39089
39090  # Input might be given as Windows format, start by converting to
39091  # unix format.
39092  new_path="$path"
39093
39094  windows_path="$new_path"
39095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39096    unix_path=`$CYGPATH -u "$windows_path"`
39097    new_path="$unix_path"
39098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39100    new_path="$unix_path"
39101  fi
39102
39103
39104  # Now try to locate executable using which
39105  new_path=`$WHICH "$new_path" 2> /dev/null`
39106
39107  if test "x$new_path" = x; then
39108    # Oops. Which didn't find the executable.
39109    # The splitting of arguments from the executable at a space might have been incorrect,
39110    # since paths with space are more likely in Windows. Give it another try with the whole
39111    # argument.
39112    path="$complete"
39113    arguments="EOL"
39114    new_path="$path"
39115
39116  windows_path="$new_path"
39117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39118    unix_path=`$CYGPATH -u "$windows_path"`
39119    new_path="$unix_path"
39120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39122    new_path="$unix_path"
39123  fi
39124
39125
39126    new_path=`$WHICH "$new_path" 2> /dev/null`
39127    # bat and cmd files are not always considered executable in MSYS causing which
39128    # to not find them
39129    if test "x$new_path" = x \
39130        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39131        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39132      new_path="$path"
39133
39134  windows_path="$new_path"
39135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39136    unix_path=`$CYGPATH -u "$windows_path"`
39137    new_path="$unix_path"
39138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39140    new_path="$unix_path"
39141  fi
39142
39143    fi
39144
39145    if test "x$new_path" = x; then
39146      # It's still not found. Now this is an unrecoverable error.
39147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39148$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39149      has_space=`$ECHO "$complete" | $GREP " "`
39150      if test "x$has_space" != x; then
39151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39153      fi
39154      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39155    fi
39156  fi
39157
39158  # Now new_path has a complete unix path to the binary
39159  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39160    # Keep paths in /bin as-is, but remove trailing .exe if any
39161    new_path="${new_path/%.exe/}"
39162    # Do not save /bin paths to all_fixpath_prefixes!
39163  else
39164    # Not in mixed or Windows style, start by that.
39165    new_path=`cmd //c echo $new_path`
39166
39167  input_path="$new_path"
39168  # Check if we need to convert this using DOS-style short mode. If the path
39169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39170  # take no chances and rewrite it.
39171  # Note: m4 eats our [], so we need to use [ and ] instead.
39172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39173  if test "x$has_forbidden_chars" != x; then
39174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39176  fi
39177
39178    # Output is in $new_path
39179
39180  windows_path="$new_path"
39181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39182    unix_path=`$CYGPATH -u "$windows_path"`
39183    new_path="$unix_path"
39184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39186    new_path="$unix_path"
39187  fi
39188
39189    # remove trailing .exe if any
39190    new_path="${new_path/%.exe/}"
39191
39192    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39193    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39194  fi
39195
39196    else
39197      # We're on a unix platform. Hooray! :)
39198      # First separate the path from the arguments. This will split at the first
39199      # space.
39200      complete="$RC"
39201      path="${complete%% *}"
39202      tmp="$complete EOL"
39203      arguments="${tmp#* }"
39204
39205      # Cannot rely on the command "which" here since it doesn't always work.
39206      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39207      if test -z "$is_absolute_path"; then
39208        # Path to executable is not absolute. Find it.
39209        IFS_save="$IFS"
39210        IFS=:
39211        for p in $PATH; do
39212          if test -f "$p/$path" && test -x "$p/$path"; then
39213            new_path="$p/$path"
39214            break
39215          fi
39216        done
39217        IFS="$IFS_save"
39218      else
39219        # This is an absolute path, we can use it without further modifications.
39220        new_path="$path"
39221      fi
39222
39223      if test "x$new_path" = x; then
39224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39225$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39226        has_space=`$ECHO "$complete" | $GREP " "`
39227        if test "x$has_space" != x; then
39228          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39229$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39230        fi
39231        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39232      fi
39233    fi
39234
39235    # Now join together the path and the arguments once again
39236    if test "x$arguments" != xEOL; then
39237      new_complete="$new_path ${arguments% *}"
39238    else
39239      new_complete="$new_path"
39240    fi
39241
39242    if test "x$complete" != "x$new_complete"; then
39243      RC="$new_complete"
39244      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39245$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39246    fi
39247  fi
39248
39249    # Extract the first word of "dumpbin", so it can be a program name with args.
39250set dummy dumpbin; ac_word=$2
39251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39252$as_echo_n "checking for $ac_word... " >&6; }
39253if ${ac_cv_prog_DUMPBIN+:} false; then :
39254  $as_echo_n "(cached) " >&6
39255else
39256  if test -n "$DUMPBIN"; then
39257  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39258else
39259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39260for as_dir in $PATH
39261do
39262  IFS=$as_save_IFS
39263  test -z "$as_dir" && as_dir=.
39264    for ac_exec_ext in '' $ac_executable_extensions; do
39265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39266    ac_cv_prog_DUMPBIN="dumpbin"
39267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39268    break 2
39269  fi
39270done
39271  done
39272IFS=$as_save_IFS
39273
39274fi
39275fi
39276DUMPBIN=$ac_cv_prog_DUMPBIN
39277if test -n "$DUMPBIN"; then
39278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39279$as_echo "$DUMPBIN" >&6; }
39280else
39281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39282$as_echo "no" >&6; }
39283fi
39284
39285
39286
39287  # Only process if variable expands to non-empty
39288
39289  if test "x$DUMPBIN" != x; then
39290    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39291
39292  # First separate the path from the arguments. This will split at the first
39293  # space.
39294  complete="$DUMPBIN"
39295  path="${complete%% *}"
39296  tmp="$complete EOL"
39297  arguments="${tmp#* }"
39298
39299  # Input might be given as Windows format, start by converting to
39300  # unix format.
39301  new_path=`$CYGPATH -u "$path"`
39302
39303  # Now try to locate executable using which
39304  new_path=`$WHICH "$new_path" 2> /dev/null`
39305  # bat and cmd files are not always considered executable in cygwin causing which
39306  # to not find them
39307  if test "x$new_path" = x \
39308      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39309      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39310    new_path=`$CYGPATH -u "$path"`
39311  fi
39312  if test "x$new_path" = x; then
39313    # Oops. Which didn't find the executable.
39314    # The splitting of arguments from the executable at a space might have been incorrect,
39315    # since paths with space are more likely in Windows. Give it another try with the whole
39316    # argument.
39317    path="$complete"
39318    arguments="EOL"
39319    new_path=`$CYGPATH -u "$path"`
39320    new_path=`$WHICH "$new_path" 2> /dev/null`
39321    # bat and cmd files are not always considered executable in cygwin causing which
39322    # to not find them
39323    if test "x$new_path" = x \
39324        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39325        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39326      new_path=`$CYGPATH -u "$path"`
39327    fi
39328    if test "x$new_path" = x; then
39329      # It's still not found. Now this is an unrecoverable error.
39330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39331$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39332      has_space=`$ECHO "$complete" | $GREP " "`
39333      if test "x$has_space" != x; then
39334        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39335$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39336      fi
39337      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39338    fi
39339  fi
39340
39341  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39342  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39343  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39344  # "foo.exe" is OK but "foo" is an error.
39345  #
39346  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39347  # It is also a way to make sure we got the proper file name for the real test later on.
39348  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39349  if test "x$test_shortpath" = x; then
39350    # Short path failed, file does not exist as specified.
39351    # Try adding .exe or .cmd
39352    if test -f "${new_path}.exe"; then
39353      input_to_shortpath="${new_path}.exe"
39354    elif test -f "${new_path}.cmd"; then
39355      input_to_shortpath="${new_path}.cmd"
39356    else
39357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39358$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39359      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39360$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39361      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39362    fi
39363  else
39364    input_to_shortpath="$new_path"
39365  fi
39366
39367  # Call helper function which possibly converts this using DOS-style short mode.
39368  # If so, the updated path is stored in $new_path.
39369  new_path="$input_to_shortpath"
39370
39371  input_path="$input_to_shortpath"
39372  # Check if we need to convert this using DOS-style short mode. If the path
39373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39374  # take no chances and rewrite it.
39375  # Note: m4 eats our [], so we need to use [ and ] instead.
39376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39377  if test "x$has_forbidden_chars" != x; then
39378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39379    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39380    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39381    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39382      # Going to short mode and back again did indeed matter. Since short mode is
39383      # case insensitive, let's make it lowercase to improve readability.
39384      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39385      # Now convert it back to Unix-style (cygpath)
39386      input_path=`$CYGPATH -u "$shortmode_path"`
39387      new_path="$input_path"
39388    fi
39389  fi
39390
39391  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39392  if test "x$test_cygdrive_prefix" = x; then
39393    # As a simple fix, exclude /usr/bin since it's not a real path.
39394    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39395      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39396      # a path prefixed by /cygdrive for fixpath to work.
39397      new_path="$CYGWIN_ROOT_PATH$input_path"
39398    fi
39399  fi
39400
39401  # remove trailing .exe if any
39402  new_path="${new_path/%.exe/}"
39403
39404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39405
39406  # First separate the path from the arguments. This will split at the first
39407  # space.
39408  complete="$DUMPBIN"
39409  path="${complete%% *}"
39410  tmp="$complete EOL"
39411  arguments="${tmp#* }"
39412
39413  # Input might be given as Windows format, start by converting to
39414  # unix format.
39415  new_path="$path"
39416
39417  windows_path="$new_path"
39418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39419    unix_path=`$CYGPATH -u "$windows_path"`
39420    new_path="$unix_path"
39421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39423    new_path="$unix_path"
39424  fi
39425
39426
39427  # Now try to locate executable using which
39428  new_path=`$WHICH "$new_path" 2> /dev/null`
39429
39430  if test "x$new_path" = x; then
39431    # Oops. Which didn't find the executable.
39432    # The splitting of arguments from the executable at a space might have been incorrect,
39433    # since paths with space are more likely in Windows. Give it another try with the whole
39434    # argument.
39435    path="$complete"
39436    arguments="EOL"
39437    new_path="$path"
39438
39439  windows_path="$new_path"
39440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39441    unix_path=`$CYGPATH -u "$windows_path"`
39442    new_path="$unix_path"
39443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39445    new_path="$unix_path"
39446  fi
39447
39448
39449    new_path=`$WHICH "$new_path" 2> /dev/null`
39450    # bat and cmd files are not always considered executable in MSYS causing which
39451    # to not find them
39452    if test "x$new_path" = x \
39453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39455      new_path="$path"
39456
39457  windows_path="$new_path"
39458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39459    unix_path=`$CYGPATH -u "$windows_path"`
39460    new_path="$unix_path"
39461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39463    new_path="$unix_path"
39464  fi
39465
39466    fi
39467
39468    if test "x$new_path" = x; then
39469      # It's still not found. Now this is an unrecoverable error.
39470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39471$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39472      has_space=`$ECHO "$complete" | $GREP " "`
39473      if test "x$has_space" != x; then
39474        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39475$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39476      fi
39477      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39478    fi
39479  fi
39480
39481  # Now new_path has a complete unix path to the binary
39482  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39483    # Keep paths in /bin as-is, but remove trailing .exe if any
39484    new_path="${new_path/%.exe/}"
39485    # Do not save /bin paths to all_fixpath_prefixes!
39486  else
39487    # Not in mixed or Windows style, start by that.
39488    new_path=`cmd //c echo $new_path`
39489
39490  input_path="$new_path"
39491  # Check if we need to convert this using DOS-style short mode. If the path
39492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39493  # take no chances and rewrite it.
39494  # Note: m4 eats our [], so we need to use [ and ] instead.
39495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39496  if test "x$has_forbidden_chars" != x; then
39497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39498    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39499  fi
39500
39501    # Output is in $new_path
39502
39503  windows_path="$new_path"
39504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39505    unix_path=`$CYGPATH -u "$windows_path"`
39506    new_path="$unix_path"
39507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39509    new_path="$unix_path"
39510  fi
39511
39512    # remove trailing .exe if any
39513    new_path="${new_path/%.exe/}"
39514
39515    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39516    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39517  fi
39518
39519    else
39520      # We're on a unix platform. Hooray! :)
39521      # First separate the path from the arguments. This will split at the first
39522      # space.
39523      complete="$DUMPBIN"
39524      path="${complete%% *}"
39525      tmp="$complete EOL"
39526      arguments="${tmp#* }"
39527
39528      # Cannot rely on the command "which" here since it doesn't always work.
39529      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39530      if test -z "$is_absolute_path"; then
39531        # Path to executable is not absolute. Find it.
39532        IFS_save="$IFS"
39533        IFS=:
39534        for p in $PATH; do
39535          if test -f "$p/$path" && test -x "$p/$path"; then
39536            new_path="$p/$path"
39537            break
39538          fi
39539        done
39540        IFS="$IFS_save"
39541      else
39542        # This is an absolute path, we can use it without further modifications.
39543        new_path="$path"
39544      fi
39545
39546      if test "x$new_path" = x; then
39547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39548$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39549        has_space=`$ECHO "$complete" | $GREP " "`
39550        if test "x$has_space" != x; then
39551          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39552$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39553        fi
39554        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39555      fi
39556    fi
39557
39558    # Now join together the path and the arguments once again
39559    if test "x$arguments" != xEOL; then
39560      new_complete="$new_path ${arguments% *}"
39561    else
39562      new_complete="$new_path"
39563    fi
39564
39565    if test "x$complete" != "x$new_complete"; then
39566      DUMPBIN="$new_complete"
39567      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39568$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39569    fi
39570  fi
39571
39572    # We need to check for 'msbuild.exe' because at the place where we expect to
39573    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39574    # won't find the 'msbuild.exe' executable in that case (and the
39575    # 'ac_executable_extensions' is unusable due to performance reasons).
39576    # Notice that we intentionally don't fix up the path to MSBUILD because we
39577    # will call it in a DOS shell during freetype detection on Windows (see
39578    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39579    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39580set dummy msbuild.exe; ac_word=$2
39581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39582$as_echo_n "checking for $ac_word... " >&6; }
39583if ${ac_cv_prog_MSBUILD+:} false; then :
39584  $as_echo_n "(cached) " >&6
39585else
39586  if test -n "$MSBUILD"; then
39587  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39588else
39589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39590for as_dir in $PATH
39591do
39592  IFS=$as_save_IFS
39593  test -z "$as_dir" && as_dir=.
39594    for ac_exec_ext in '' $ac_executable_extensions; do
39595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39596    ac_cv_prog_MSBUILD="msbuild.exe"
39597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39598    break 2
39599  fi
39600done
39601  done
39602IFS=$as_save_IFS
39603
39604fi
39605fi
39606MSBUILD=$ac_cv_prog_MSBUILD
39607if test -n "$MSBUILD"; then
39608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39609$as_echo "$MSBUILD" >&6; }
39610else
39611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39612$as_echo "no" >&6; }
39613fi
39614
39615
39616  fi
39617
39618  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39619
39620
39621  # Publish this variable in the help.
39622
39623
39624  if [ -z "${STRIP+x}" ]; then
39625    # The variable is not set by user, try to locate tool using the code snippet
39626    for ac_prog in strip
39627do
39628  # Extract the first word of "$ac_prog", so it can be a program name with args.
39629set dummy $ac_prog; ac_word=$2
39630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39631$as_echo_n "checking for $ac_word... " >&6; }
39632if ${ac_cv_path_STRIP+:} false; then :
39633  $as_echo_n "(cached) " >&6
39634else
39635  case $STRIP in
39636  [\\/]* | ?:[\\/]*)
39637  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39638  ;;
39639  *)
39640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39641for as_dir in $PATH
39642do
39643  IFS=$as_save_IFS
39644  test -z "$as_dir" && as_dir=.
39645    for ac_exec_ext in '' $ac_executable_extensions; do
39646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39647    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39649    break 2
39650  fi
39651done
39652  done
39653IFS=$as_save_IFS
39654
39655  ;;
39656esac
39657fi
39658STRIP=$ac_cv_path_STRIP
39659if test -n "$STRIP"; then
39660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39661$as_echo "$STRIP" >&6; }
39662else
39663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39664$as_echo "no" >&6; }
39665fi
39666
39667
39668  test -n "$STRIP" && break
39669done
39670
39671  else
39672    # The variable is set, but is it from the command line or the environment?
39673
39674    # Try to remove the string !STRIP! from our list.
39675    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39676    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39677      # If it failed, the variable was not from the command line. Ignore it,
39678      # but warn the user (except for BASH, which is always set by the calling BASH).
39679      if test "xSTRIP" != xBASH; then
39680        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39681$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39682      fi
39683      # Try to locate tool using the code snippet
39684      for ac_prog in strip
39685do
39686  # Extract the first word of "$ac_prog", so it can be a program name with args.
39687set dummy $ac_prog; ac_word=$2
39688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39689$as_echo_n "checking for $ac_word... " >&6; }
39690if ${ac_cv_path_STRIP+:} false; then :
39691  $as_echo_n "(cached) " >&6
39692else
39693  case $STRIP in
39694  [\\/]* | ?:[\\/]*)
39695  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39696  ;;
39697  *)
39698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39699for as_dir in $PATH
39700do
39701  IFS=$as_save_IFS
39702  test -z "$as_dir" && as_dir=.
39703    for ac_exec_ext in '' $ac_executable_extensions; do
39704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39705    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39707    break 2
39708  fi
39709done
39710  done
39711IFS=$as_save_IFS
39712
39713  ;;
39714esac
39715fi
39716STRIP=$ac_cv_path_STRIP
39717if test -n "$STRIP"; then
39718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39719$as_echo "$STRIP" >&6; }
39720else
39721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39722$as_echo "no" >&6; }
39723fi
39724
39725
39726  test -n "$STRIP" && break
39727done
39728
39729    else
39730      # If it succeeded, then it was overridden by the user. We will use it
39731      # for the tool.
39732
39733      # First remove it from the list of overridden variables, so we can test
39734      # for unknown variables in the end.
39735      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39736
39737      # Check if we try to supply an empty value
39738      if test "x$STRIP" = x; then
39739        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39740$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39741        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39742$as_echo_n "checking for STRIP... " >&6; }
39743        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39744$as_echo "disabled" >&6; }
39745      else
39746        # Check if the provided tool contains a complete path.
39747        tool_specified="$STRIP"
39748        tool_basename="${tool_specified##*/}"
39749        if test "x$tool_basename" = "x$tool_specified"; then
39750          # A command without a complete path is provided, search $PATH.
39751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39752$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39753          # Extract the first word of "$tool_basename", so it can be a program name with args.
39754set dummy $tool_basename; ac_word=$2
39755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39756$as_echo_n "checking for $ac_word... " >&6; }
39757if ${ac_cv_path_STRIP+:} false; then :
39758  $as_echo_n "(cached) " >&6
39759else
39760  case $STRIP in
39761  [\\/]* | ?:[\\/]*)
39762  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39763  ;;
39764  *)
39765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39766for as_dir in $PATH
39767do
39768  IFS=$as_save_IFS
39769  test -z "$as_dir" && as_dir=.
39770    for ac_exec_ext in '' $ac_executable_extensions; do
39771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39772    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39774    break 2
39775  fi
39776done
39777  done
39778IFS=$as_save_IFS
39779
39780  ;;
39781esac
39782fi
39783STRIP=$ac_cv_path_STRIP
39784if test -n "$STRIP"; then
39785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39786$as_echo "$STRIP" >&6; }
39787else
39788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39789$as_echo "no" >&6; }
39790fi
39791
39792
39793          if test "x$STRIP" = x; then
39794            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39795          fi
39796        else
39797          # Otherwise we believe it is a complete path. Use it as it is.
39798          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39799$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39800          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39801$as_echo_n "checking for STRIP... " >&6; }
39802          if test ! -x "$tool_specified"; then
39803            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39804$as_echo "not found" >&6; }
39805            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39806          fi
39807          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39808$as_echo "$tool_specified" >&6; }
39809        fi
39810      fi
39811    fi
39812
39813  fi
39814
39815
39816
39817  # Only process if variable expands to non-empty
39818
39819  if test "x$STRIP" != x; then
39820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39821
39822  # First separate the path from the arguments. This will split at the first
39823  # space.
39824  complete="$STRIP"
39825  path="${complete%% *}"
39826  tmp="$complete EOL"
39827  arguments="${tmp#* }"
39828
39829  # Input might be given as Windows format, start by converting to
39830  # unix format.
39831  new_path=`$CYGPATH -u "$path"`
39832
39833  # Now try to locate executable using which
39834  new_path=`$WHICH "$new_path" 2> /dev/null`
39835  # bat and cmd files are not always considered executable in cygwin causing which
39836  # to not find them
39837  if test "x$new_path" = x \
39838      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39839      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39840    new_path=`$CYGPATH -u "$path"`
39841  fi
39842  if test "x$new_path" = x; then
39843    # Oops. Which didn't find the executable.
39844    # The splitting of arguments from the executable at a space might have been incorrect,
39845    # since paths with space are more likely in Windows. Give it another try with the whole
39846    # argument.
39847    path="$complete"
39848    arguments="EOL"
39849    new_path=`$CYGPATH -u "$path"`
39850    new_path=`$WHICH "$new_path" 2> /dev/null`
39851    # bat and cmd files are not always considered executable in cygwin causing which
39852    # to not find them
39853    if test "x$new_path" = x \
39854        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39855        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39856      new_path=`$CYGPATH -u "$path"`
39857    fi
39858    if test "x$new_path" = x; then
39859      # It's still not found. Now this is an unrecoverable error.
39860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39861$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39862      has_space=`$ECHO "$complete" | $GREP " "`
39863      if test "x$has_space" != x; then
39864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39866      fi
39867      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39868    fi
39869  fi
39870
39871  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39872  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39873  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39874  # "foo.exe" is OK but "foo" is an error.
39875  #
39876  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39877  # It is also a way to make sure we got the proper file name for the real test later on.
39878  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39879  if test "x$test_shortpath" = x; then
39880    # Short path failed, file does not exist as specified.
39881    # Try adding .exe or .cmd
39882    if test -f "${new_path}.exe"; then
39883      input_to_shortpath="${new_path}.exe"
39884    elif test -f "${new_path}.cmd"; then
39885      input_to_shortpath="${new_path}.cmd"
39886    else
39887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39888$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39889      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39890$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39891      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39892    fi
39893  else
39894    input_to_shortpath="$new_path"
39895  fi
39896
39897  # Call helper function which possibly converts this using DOS-style short mode.
39898  # If so, the updated path is stored in $new_path.
39899  new_path="$input_to_shortpath"
39900
39901  input_path="$input_to_shortpath"
39902  # Check if we need to convert this using DOS-style short mode. If the path
39903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39904  # take no chances and rewrite it.
39905  # Note: m4 eats our [], so we need to use [ and ] instead.
39906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39907  if test "x$has_forbidden_chars" != x; then
39908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39912      # Going to short mode and back again did indeed matter. Since short mode is
39913      # case insensitive, let's make it lowercase to improve readability.
39914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39915      # Now convert it back to Unix-style (cygpath)
39916      input_path=`$CYGPATH -u "$shortmode_path"`
39917      new_path="$input_path"
39918    fi
39919  fi
39920
39921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39922  if test "x$test_cygdrive_prefix" = x; then
39923    # As a simple fix, exclude /usr/bin since it's not a real path.
39924    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39926      # a path prefixed by /cygdrive for fixpath to work.
39927      new_path="$CYGWIN_ROOT_PATH$input_path"
39928    fi
39929  fi
39930
39931  # remove trailing .exe if any
39932  new_path="${new_path/%.exe/}"
39933
39934    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39935
39936  # First separate the path from the arguments. This will split at the first
39937  # space.
39938  complete="$STRIP"
39939  path="${complete%% *}"
39940  tmp="$complete EOL"
39941  arguments="${tmp#* }"
39942
39943  # Input might be given as Windows format, start by converting to
39944  # unix format.
39945  new_path="$path"
39946
39947  windows_path="$new_path"
39948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39949    unix_path=`$CYGPATH -u "$windows_path"`
39950    new_path="$unix_path"
39951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39953    new_path="$unix_path"
39954  fi
39955
39956
39957  # Now try to locate executable using which
39958  new_path=`$WHICH "$new_path" 2> /dev/null`
39959
39960  if test "x$new_path" = x; then
39961    # Oops. Which didn't find the executable.
39962    # The splitting of arguments from the executable at a space might have been incorrect,
39963    # since paths with space are more likely in Windows. Give it another try with the whole
39964    # argument.
39965    path="$complete"
39966    arguments="EOL"
39967    new_path="$path"
39968
39969  windows_path="$new_path"
39970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39971    unix_path=`$CYGPATH -u "$windows_path"`
39972    new_path="$unix_path"
39973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39975    new_path="$unix_path"
39976  fi
39977
39978
39979    new_path=`$WHICH "$new_path" 2> /dev/null`
39980    # bat and cmd files are not always considered executable in MSYS causing which
39981    # to not find them
39982    if test "x$new_path" = x \
39983        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39984        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39985      new_path="$path"
39986
39987  windows_path="$new_path"
39988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39989    unix_path=`$CYGPATH -u "$windows_path"`
39990    new_path="$unix_path"
39991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39993    new_path="$unix_path"
39994  fi
39995
39996    fi
39997
39998    if test "x$new_path" = x; then
39999      # It's still not found. Now this is an unrecoverable error.
40000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40001$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40002      has_space=`$ECHO "$complete" | $GREP " "`
40003      if test "x$has_space" != x; then
40004        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40005$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40006      fi
40007      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40008    fi
40009  fi
40010
40011  # Now new_path has a complete unix path to the binary
40012  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40013    # Keep paths in /bin as-is, but remove trailing .exe if any
40014    new_path="${new_path/%.exe/}"
40015    # Do not save /bin paths to all_fixpath_prefixes!
40016  else
40017    # Not in mixed or Windows style, start by that.
40018    new_path=`cmd //c echo $new_path`
40019
40020  input_path="$new_path"
40021  # Check if we need to convert this using DOS-style short mode. If the path
40022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40023  # take no chances and rewrite it.
40024  # Note: m4 eats our [], so we need to use [ and ] instead.
40025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40026  if test "x$has_forbidden_chars" != x; then
40027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40028    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40029  fi
40030
40031    # Output is in $new_path
40032
40033  windows_path="$new_path"
40034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40035    unix_path=`$CYGPATH -u "$windows_path"`
40036    new_path="$unix_path"
40037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40039    new_path="$unix_path"
40040  fi
40041
40042    # remove trailing .exe if any
40043    new_path="${new_path/%.exe/}"
40044
40045    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40046    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40047  fi
40048
40049    else
40050      # We're on a unix platform. Hooray! :)
40051      # First separate the path from the arguments. This will split at the first
40052      # space.
40053      complete="$STRIP"
40054      path="${complete%% *}"
40055      tmp="$complete EOL"
40056      arguments="${tmp#* }"
40057
40058      # Cannot rely on the command "which" here since it doesn't always work.
40059      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40060      if test -z "$is_absolute_path"; then
40061        # Path to executable is not absolute. Find it.
40062        IFS_save="$IFS"
40063        IFS=:
40064        for p in $PATH; do
40065          if test -f "$p/$path" && test -x "$p/$path"; then
40066            new_path="$p/$path"
40067            break
40068          fi
40069        done
40070        IFS="$IFS_save"
40071      else
40072        # This is an absolute path, we can use it without further modifications.
40073        new_path="$path"
40074      fi
40075
40076      if test "x$new_path" = x; then
40077        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40078$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40079        has_space=`$ECHO "$complete" | $GREP " "`
40080        if test "x$has_space" != x; then
40081          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40082$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40083        fi
40084        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40085      fi
40086    fi
40087
40088    # Now join together the path and the arguments once again
40089    if test "x$arguments" != xEOL; then
40090      new_complete="$new_path ${arguments% *}"
40091    else
40092      new_complete="$new_path"
40093    fi
40094
40095    if test "x$complete" != "x$new_complete"; then
40096      STRIP="$new_complete"
40097      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40098$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40099    fi
40100  fi
40101
40102
40103
40104  # Publish this variable in the help.
40105
40106
40107  if [ -z "${NM+x}" ]; then
40108    # The variable is not set by user, try to locate tool using the code snippet
40109    for ac_prog in nm
40110do
40111  # Extract the first word of "$ac_prog", so it can be a program name with args.
40112set dummy $ac_prog; ac_word=$2
40113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40114$as_echo_n "checking for $ac_word... " >&6; }
40115if ${ac_cv_path_NM+:} false; then :
40116  $as_echo_n "(cached) " >&6
40117else
40118  case $NM in
40119  [\\/]* | ?:[\\/]*)
40120  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40121  ;;
40122  *)
40123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40124for as_dir in $PATH
40125do
40126  IFS=$as_save_IFS
40127  test -z "$as_dir" && as_dir=.
40128    for ac_exec_ext in '' $ac_executable_extensions; do
40129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40130    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40132    break 2
40133  fi
40134done
40135  done
40136IFS=$as_save_IFS
40137
40138  ;;
40139esac
40140fi
40141NM=$ac_cv_path_NM
40142if test -n "$NM"; then
40143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40144$as_echo "$NM" >&6; }
40145else
40146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40147$as_echo "no" >&6; }
40148fi
40149
40150
40151  test -n "$NM" && break
40152done
40153
40154  else
40155    # The variable is set, but is it from the command line or the environment?
40156
40157    # Try to remove the string !NM! from our list.
40158    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40159    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40160      # If it failed, the variable was not from the command line. Ignore it,
40161      # but warn the user (except for BASH, which is always set by the calling BASH).
40162      if test "xNM" != xBASH; then
40163        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40164$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40165      fi
40166      # Try to locate tool using the code snippet
40167      for ac_prog in nm
40168do
40169  # Extract the first word of "$ac_prog", so it can be a program name with args.
40170set dummy $ac_prog; ac_word=$2
40171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40172$as_echo_n "checking for $ac_word... " >&6; }
40173if ${ac_cv_path_NM+:} false; then :
40174  $as_echo_n "(cached) " >&6
40175else
40176  case $NM in
40177  [\\/]* | ?:[\\/]*)
40178  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40179  ;;
40180  *)
40181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40182for as_dir in $PATH
40183do
40184  IFS=$as_save_IFS
40185  test -z "$as_dir" && as_dir=.
40186    for ac_exec_ext in '' $ac_executable_extensions; do
40187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40188    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40190    break 2
40191  fi
40192done
40193  done
40194IFS=$as_save_IFS
40195
40196  ;;
40197esac
40198fi
40199NM=$ac_cv_path_NM
40200if test -n "$NM"; then
40201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40202$as_echo "$NM" >&6; }
40203else
40204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40205$as_echo "no" >&6; }
40206fi
40207
40208
40209  test -n "$NM" && break
40210done
40211
40212    else
40213      # If it succeeded, then it was overridden by the user. We will use it
40214      # for the tool.
40215
40216      # First remove it from the list of overridden variables, so we can test
40217      # for unknown variables in the end.
40218      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40219
40220      # Check if we try to supply an empty value
40221      if test "x$NM" = x; then
40222        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40223$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40224        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40225$as_echo_n "checking for NM... " >&6; }
40226        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40227$as_echo "disabled" >&6; }
40228      else
40229        # Check if the provided tool contains a complete path.
40230        tool_specified="$NM"
40231        tool_basename="${tool_specified##*/}"
40232        if test "x$tool_basename" = "x$tool_specified"; then
40233          # A command without a complete path is provided, search $PATH.
40234          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40235$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40236          # Extract the first word of "$tool_basename", so it can be a program name with args.
40237set dummy $tool_basename; ac_word=$2
40238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40239$as_echo_n "checking for $ac_word... " >&6; }
40240if ${ac_cv_path_NM+:} false; then :
40241  $as_echo_n "(cached) " >&6
40242else
40243  case $NM in
40244  [\\/]* | ?:[\\/]*)
40245  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40246  ;;
40247  *)
40248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40249for as_dir in $PATH
40250do
40251  IFS=$as_save_IFS
40252  test -z "$as_dir" && as_dir=.
40253    for ac_exec_ext in '' $ac_executable_extensions; do
40254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40255    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40257    break 2
40258  fi
40259done
40260  done
40261IFS=$as_save_IFS
40262
40263  ;;
40264esac
40265fi
40266NM=$ac_cv_path_NM
40267if test -n "$NM"; then
40268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40269$as_echo "$NM" >&6; }
40270else
40271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40272$as_echo "no" >&6; }
40273fi
40274
40275
40276          if test "x$NM" = x; then
40277            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40278          fi
40279        else
40280          # Otherwise we believe it is a complete path. Use it as it is.
40281          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40282$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40283          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40284$as_echo_n "checking for NM... " >&6; }
40285          if test ! -x "$tool_specified"; then
40286            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40287$as_echo "not found" >&6; }
40288            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40289          fi
40290          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40291$as_echo "$tool_specified" >&6; }
40292        fi
40293      fi
40294    fi
40295
40296  fi
40297
40298
40299
40300  # Only process if variable expands to non-empty
40301
40302  if test "x$NM" != x; then
40303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40304
40305  # First separate the path from the arguments. This will split at the first
40306  # space.
40307  complete="$NM"
40308  path="${complete%% *}"
40309  tmp="$complete EOL"
40310  arguments="${tmp#* }"
40311
40312  # Input might be given as Windows format, start by converting to
40313  # unix format.
40314  new_path=`$CYGPATH -u "$path"`
40315
40316  # Now try to locate executable using which
40317  new_path=`$WHICH "$new_path" 2> /dev/null`
40318  # bat and cmd files are not always considered executable in cygwin causing which
40319  # to not find them
40320  if test "x$new_path" = x \
40321      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40322      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40323    new_path=`$CYGPATH -u "$path"`
40324  fi
40325  if test "x$new_path" = x; then
40326    # Oops. Which didn't find the executable.
40327    # The splitting of arguments from the executable at a space might have been incorrect,
40328    # since paths with space are more likely in Windows. Give it another try with the whole
40329    # argument.
40330    path="$complete"
40331    arguments="EOL"
40332    new_path=`$CYGPATH -u "$path"`
40333    new_path=`$WHICH "$new_path" 2> /dev/null`
40334    # bat and cmd files are not always considered executable in cygwin causing which
40335    # to not find them
40336    if test "x$new_path" = x \
40337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40339      new_path=`$CYGPATH -u "$path"`
40340    fi
40341    if test "x$new_path" = x; then
40342      # It's still not found. Now this is an unrecoverable error.
40343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40344$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40345      has_space=`$ECHO "$complete" | $GREP " "`
40346      if test "x$has_space" != x; then
40347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40349      fi
40350      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40351    fi
40352  fi
40353
40354  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40355  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40356  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40357  # "foo.exe" is OK but "foo" is an error.
40358  #
40359  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40360  # It is also a way to make sure we got the proper file name for the real test later on.
40361  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40362  if test "x$test_shortpath" = x; then
40363    # Short path failed, file does not exist as specified.
40364    # Try adding .exe or .cmd
40365    if test -f "${new_path}.exe"; then
40366      input_to_shortpath="${new_path}.exe"
40367    elif test -f "${new_path}.cmd"; then
40368      input_to_shortpath="${new_path}.cmd"
40369    else
40370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40371$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40372      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40373$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40374      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40375    fi
40376  else
40377    input_to_shortpath="$new_path"
40378  fi
40379
40380  # Call helper function which possibly converts this using DOS-style short mode.
40381  # If so, the updated path is stored in $new_path.
40382  new_path="$input_to_shortpath"
40383
40384  input_path="$input_to_shortpath"
40385  # Check if we need to convert this using DOS-style short mode. If the path
40386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40387  # take no chances and rewrite it.
40388  # Note: m4 eats our [], so we need to use [ and ] instead.
40389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40390  if test "x$has_forbidden_chars" != x; then
40391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40395      # Going to short mode and back again did indeed matter. Since short mode is
40396      # case insensitive, let's make it lowercase to improve readability.
40397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40398      # Now convert it back to Unix-style (cygpath)
40399      input_path=`$CYGPATH -u "$shortmode_path"`
40400      new_path="$input_path"
40401    fi
40402  fi
40403
40404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40405  if test "x$test_cygdrive_prefix" = x; then
40406    # As a simple fix, exclude /usr/bin since it's not a real path.
40407    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40409      # a path prefixed by /cygdrive for fixpath to work.
40410      new_path="$CYGWIN_ROOT_PATH$input_path"
40411    fi
40412  fi
40413
40414  # remove trailing .exe if any
40415  new_path="${new_path/%.exe/}"
40416
40417    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40418
40419  # First separate the path from the arguments. This will split at the first
40420  # space.
40421  complete="$NM"
40422  path="${complete%% *}"
40423  tmp="$complete EOL"
40424  arguments="${tmp#* }"
40425
40426  # Input might be given as Windows format, start by converting to
40427  # unix format.
40428  new_path="$path"
40429
40430  windows_path="$new_path"
40431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40432    unix_path=`$CYGPATH -u "$windows_path"`
40433    new_path="$unix_path"
40434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40436    new_path="$unix_path"
40437  fi
40438
40439
40440  # Now try to locate executable using which
40441  new_path=`$WHICH "$new_path" 2> /dev/null`
40442
40443  if test "x$new_path" = x; then
40444    # Oops. Which didn't find the executable.
40445    # The splitting of arguments from the executable at a space might have been incorrect,
40446    # since paths with space are more likely in Windows. Give it another try with the whole
40447    # argument.
40448    path="$complete"
40449    arguments="EOL"
40450    new_path="$path"
40451
40452  windows_path="$new_path"
40453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40454    unix_path=`$CYGPATH -u "$windows_path"`
40455    new_path="$unix_path"
40456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40458    new_path="$unix_path"
40459  fi
40460
40461
40462    new_path=`$WHICH "$new_path" 2> /dev/null`
40463    # bat and cmd files are not always considered executable in MSYS causing which
40464    # to not find them
40465    if test "x$new_path" = x \
40466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40468      new_path="$path"
40469
40470  windows_path="$new_path"
40471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40472    unix_path=`$CYGPATH -u "$windows_path"`
40473    new_path="$unix_path"
40474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40476    new_path="$unix_path"
40477  fi
40478
40479    fi
40480
40481    if test "x$new_path" = x; then
40482      # It's still not found. Now this is an unrecoverable error.
40483      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40484$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40485      has_space=`$ECHO "$complete" | $GREP " "`
40486      if test "x$has_space" != x; then
40487        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40488$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40489      fi
40490      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40491    fi
40492  fi
40493
40494  # Now new_path has a complete unix path to the binary
40495  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40496    # Keep paths in /bin as-is, but remove trailing .exe if any
40497    new_path="${new_path/%.exe/}"
40498    # Do not save /bin paths to all_fixpath_prefixes!
40499  else
40500    # Not in mixed or Windows style, start by that.
40501    new_path=`cmd //c echo $new_path`
40502
40503  input_path="$new_path"
40504  # Check if we need to convert this using DOS-style short mode. If the path
40505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40506  # take no chances and rewrite it.
40507  # Note: m4 eats our [], so we need to use [ and ] instead.
40508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40509  if test "x$has_forbidden_chars" != x; then
40510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40512  fi
40513
40514    # Output is in $new_path
40515
40516  windows_path="$new_path"
40517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40518    unix_path=`$CYGPATH -u "$windows_path"`
40519    new_path="$unix_path"
40520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40522    new_path="$unix_path"
40523  fi
40524
40525    # remove trailing .exe if any
40526    new_path="${new_path/%.exe/}"
40527
40528    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40529    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40530  fi
40531
40532    else
40533      # We're on a unix platform. Hooray! :)
40534      # First separate the path from the arguments. This will split at the first
40535      # space.
40536      complete="$NM"
40537      path="${complete%% *}"
40538      tmp="$complete EOL"
40539      arguments="${tmp#* }"
40540
40541      # Cannot rely on the command "which" here since it doesn't always work.
40542      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40543      if test -z "$is_absolute_path"; then
40544        # Path to executable is not absolute. Find it.
40545        IFS_save="$IFS"
40546        IFS=:
40547        for p in $PATH; do
40548          if test -f "$p/$path" && test -x "$p/$path"; then
40549            new_path="$p/$path"
40550            break
40551          fi
40552        done
40553        IFS="$IFS_save"
40554      else
40555        # This is an absolute path, we can use it without further modifications.
40556        new_path="$path"
40557      fi
40558
40559      if test "x$new_path" = x; then
40560        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40561$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40562        has_space=`$ECHO "$complete" | $GREP " "`
40563        if test "x$has_space" != x; then
40564          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40565$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40566        fi
40567        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40568      fi
40569    fi
40570
40571    # Now join together the path and the arguments once again
40572    if test "x$arguments" != xEOL; then
40573      new_complete="$new_path ${arguments% *}"
40574    else
40575      new_complete="$new_path"
40576    fi
40577
40578    if test "x$complete" != "x$new_complete"; then
40579      NM="$new_complete"
40580      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40581$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40582    fi
40583  fi
40584
40585
40586
40587  # Publish this variable in the help.
40588
40589
40590  if [ -z "${GNM+x}" ]; then
40591    # The variable is not set by user, try to locate tool using the code snippet
40592    for ac_prog in gnm
40593do
40594  # Extract the first word of "$ac_prog", so it can be a program name with args.
40595set dummy $ac_prog; ac_word=$2
40596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40597$as_echo_n "checking for $ac_word... " >&6; }
40598if ${ac_cv_path_GNM+:} false; then :
40599  $as_echo_n "(cached) " >&6
40600else
40601  case $GNM in
40602  [\\/]* | ?:[\\/]*)
40603  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40604  ;;
40605  *)
40606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40607for as_dir in $PATH
40608do
40609  IFS=$as_save_IFS
40610  test -z "$as_dir" && as_dir=.
40611    for ac_exec_ext in '' $ac_executable_extensions; do
40612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40613    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40615    break 2
40616  fi
40617done
40618  done
40619IFS=$as_save_IFS
40620
40621  ;;
40622esac
40623fi
40624GNM=$ac_cv_path_GNM
40625if test -n "$GNM"; then
40626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40627$as_echo "$GNM" >&6; }
40628else
40629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40630$as_echo "no" >&6; }
40631fi
40632
40633
40634  test -n "$GNM" && break
40635done
40636
40637  else
40638    # The variable is set, but is it from the command line or the environment?
40639
40640    # Try to remove the string !GNM! from our list.
40641    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40642    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40643      # If it failed, the variable was not from the command line. Ignore it,
40644      # but warn the user (except for BASH, which is always set by the calling BASH).
40645      if test "xGNM" != xBASH; then
40646        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40647$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40648      fi
40649      # Try to locate tool using the code snippet
40650      for ac_prog in gnm
40651do
40652  # Extract the first word of "$ac_prog", so it can be a program name with args.
40653set dummy $ac_prog; ac_word=$2
40654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40655$as_echo_n "checking for $ac_word... " >&6; }
40656if ${ac_cv_path_GNM+:} false; then :
40657  $as_echo_n "(cached) " >&6
40658else
40659  case $GNM in
40660  [\\/]* | ?:[\\/]*)
40661  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40662  ;;
40663  *)
40664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40665for as_dir in $PATH
40666do
40667  IFS=$as_save_IFS
40668  test -z "$as_dir" && as_dir=.
40669    for ac_exec_ext in '' $ac_executable_extensions; do
40670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40671    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40673    break 2
40674  fi
40675done
40676  done
40677IFS=$as_save_IFS
40678
40679  ;;
40680esac
40681fi
40682GNM=$ac_cv_path_GNM
40683if test -n "$GNM"; then
40684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40685$as_echo "$GNM" >&6; }
40686else
40687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40688$as_echo "no" >&6; }
40689fi
40690
40691
40692  test -n "$GNM" && break
40693done
40694
40695    else
40696      # If it succeeded, then it was overridden by the user. We will use it
40697      # for the tool.
40698
40699      # First remove it from the list of overridden variables, so we can test
40700      # for unknown variables in the end.
40701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40702
40703      # Check if we try to supply an empty value
40704      if test "x$GNM" = x; then
40705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40706$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40708$as_echo_n "checking for GNM... " >&6; }
40709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40710$as_echo "disabled" >&6; }
40711      else
40712        # Check if the provided tool contains a complete path.
40713        tool_specified="$GNM"
40714        tool_basename="${tool_specified##*/}"
40715        if test "x$tool_basename" = "x$tool_specified"; then
40716          # A command without a complete path is provided, search $PATH.
40717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40718$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40719          # Extract the first word of "$tool_basename", so it can be a program name with args.
40720set dummy $tool_basename; ac_word=$2
40721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40722$as_echo_n "checking for $ac_word... " >&6; }
40723if ${ac_cv_path_GNM+:} false; then :
40724  $as_echo_n "(cached) " >&6
40725else
40726  case $GNM in
40727  [\\/]* | ?:[\\/]*)
40728  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40729  ;;
40730  *)
40731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40732for as_dir in $PATH
40733do
40734  IFS=$as_save_IFS
40735  test -z "$as_dir" && as_dir=.
40736    for ac_exec_ext in '' $ac_executable_extensions; do
40737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40738    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40740    break 2
40741  fi
40742done
40743  done
40744IFS=$as_save_IFS
40745
40746  ;;
40747esac
40748fi
40749GNM=$ac_cv_path_GNM
40750if test -n "$GNM"; then
40751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40752$as_echo "$GNM" >&6; }
40753else
40754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40755$as_echo "no" >&6; }
40756fi
40757
40758
40759          if test "x$GNM" = x; then
40760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40761          fi
40762        else
40763          # Otherwise we believe it is a complete path. Use it as it is.
40764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40765$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40767$as_echo_n "checking for GNM... " >&6; }
40768          if test ! -x "$tool_specified"; then
40769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40770$as_echo "not found" >&6; }
40771            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40772          fi
40773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40774$as_echo "$tool_specified" >&6; }
40775        fi
40776      fi
40777    fi
40778
40779  fi
40780
40781
40782
40783  # Only process if variable expands to non-empty
40784
40785  if test "x$GNM" != x; then
40786    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40787
40788  # First separate the path from the arguments. This will split at the first
40789  # space.
40790  complete="$GNM"
40791  path="${complete%% *}"
40792  tmp="$complete EOL"
40793  arguments="${tmp#* }"
40794
40795  # Input might be given as Windows format, start by converting to
40796  # unix format.
40797  new_path=`$CYGPATH -u "$path"`
40798
40799  # Now try to locate executable using which
40800  new_path=`$WHICH "$new_path" 2> /dev/null`
40801  # bat and cmd files are not always considered executable in cygwin causing which
40802  # to not find them
40803  if test "x$new_path" = x \
40804      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40805      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40806    new_path=`$CYGPATH -u "$path"`
40807  fi
40808  if test "x$new_path" = x; then
40809    # Oops. Which didn't find the executable.
40810    # The splitting of arguments from the executable at a space might have been incorrect,
40811    # since paths with space are more likely in Windows. Give it another try with the whole
40812    # argument.
40813    path="$complete"
40814    arguments="EOL"
40815    new_path=`$CYGPATH -u "$path"`
40816    new_path=`$WHICH "$new_path" 2> /dev/null`
40817    # bat and cmd files are not always considered executable in cygwin causing which
40818    # to not find them
40819    if test "x$new_path" = x \
40820        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40821        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40822      new_path=`$CYGPATH -u "$path"`
40823    fi
40824    if test "x$new_path" = x; then
40825      # It's still not found. Now this is an unrecoverable error.
40826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40827$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40828      has_space=`$ECHO "$complete" | $GREP " "`
40829      if test "x$has_space" != x; then
40830        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40831$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40832      fi
40833      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40834    fi
40835  fi
40836
40837  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40838  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40839  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40840  # "foo.exe" is OK but "foo" is an error.
40841  #
40842  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40843  # It is also a way to make sure we got the proper file name for the real test later on.
40844  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40845  if test "x$test_shortpath" = x; then
40846    # Short path failed, file does not exist as specified.
40847    # Try adding .exe or .cmd
40848    if test -f "${new_path}.exe"; then
40849      input_to_shortpath="${new_path}.exe"
40850    elif test -f "${new_path}.cmd"; then
40851      input_to_shortpath="${new_path}.cmd"
40852    else
40853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40854$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40855      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40856$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40857      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40858    fi
40859  else
40860    input_to_shortpath="$new_path"
40861  fi
40862
40863  # Call helper function which possibly converts this using DOS-style short mode.
40864  # If so, the updated path is stored in $new_path.
40865  new_path="$input_to_shortpath"
40866
40867  input_path="$input_to_shortpath"
40868  # Check if we need to convert this using DOS-style short mode. If the path
40869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40870  # take no chances and rewrite it.
40871  # Note: m4 eats our [], so we need to use [ and ] instead.
40872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40873  if test "x$has_forbidden_chars" != x; then
40874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40878      # Going to short mode and back again did indeed matter. Since short mode is
40879      # case insensitive, let's make it lowercase to improve readability.
40880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40881      # Now convert it back to Unix-style (cygpath)
40882      input_path=`$CYGPATH -u "$shortmode_path"`
40883      new_path="$input_path"
40884    fi
40885  fi
40886
40887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40888  if test "x$test_cygdrive_prefix" = x; then
40889    # As a simple fix, exclude /usr/bin since it's not a real path.
40890    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40892      # a path prefixed by /cygdrive for fixpath to work.
40893      new_path="$CYGWIN_ROOT_PATH$input_path"
40894    fi
40895  fi
40896
40897  # remove trailing .exe if any
40898  new_path="${new_path/%.exe/}"
40899
40900    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40901
40902  # First separate the path from the arguments. This will split at the first
40903  # space.
40904  complete="$GNM"
40905  path="${complete%% *}"
40906  tmp="$complete EOL"
40907  arguments="${tmp#* }"
40908
40909  # Input might be given as Windows format, start by converting to
40910  # unix format.
40911  new_path="$path"
40912
40913  windows_path="$new_path"
40914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40915    unix_path=`$CYGPATH -u "$windows_path"`
40916    new_path="$unix_path"
40917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40919    new_path="$unix_path"
40920  fi
40921
40922
40923  # Now try to locate executable using which
40924  new_path=`$WHICH "$new_path" 2> /dev/null`
40925
40926  if test "x$new_path" = x; then
40927    # Oops. Which didn't find the executable.
40928    # The splitting of arguments from the executable at a space might have been incorrect,
40929    # since paths with space are more likely in Windows. Give it another try with the whole
40930    # argument.
40931    path="$complete"
40932    arguments="EOL"
40933    new_path="$path"
40934
40935  windows_path="$new_path"
40936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40937    unix_path=`$CYGPATH -u "$windows_path"`
40938    new_path="$unix_path"
40939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40941    new_path="$unix_path"
40942  fi
40943
40944
40945    new_path=`$WHICH "$new_path" 2> /dev/null`
40946    # bat and cmd files are not always considered executable in MSYS causing which
40947    # to not find them
40948    if test "x$new_path" = x \
40949        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40950        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40951      new_path="$path"
40952
40953  windows_path="$new_path"
40954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40955    unix_path=`$CYGPATH -u "$windows_path"`
40956    new_path="$unix_path"
40957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40959    new_path="$unix_path"
40960  fi
40961
40962    fi
40963
40964    if test "x$new_path" = x; then
40965      # It's still not found. Now this is an unrecoverable error.
40966      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40967$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40968      has_space=`$ECHO "$complete" | $GREP " "`
40969      if test "x$has_space" != x; then
40970        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40971$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40972      fi
40973      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40974    fi
40975  fi
40976
40977  # Now new_path has a complete unix path to the binary
40978  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40979    # Keep paths in /bin as-is, but remove trailing .exe if any
40980    new_path="${new_path/%.exe/}"
40981    # Do not save /bin paths to all_fixpath_prefixes!
40982  else
40983    # Not in mixed or Windows style, start by that.
40984    new_path=`cmd //c echo $new_path`
40985
40986  input_path="$new_path"
40987  # Check if we need to convert this using DOS-style short mode. If the path
40988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40989  # take no chances and rewrite it.
40990  # Note: m4 eats our [], so we need to use [ and ] instead.
40991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40992  if test "x$has_forbidden_chars" != x; then
40993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40995  fi
40996
40997    # Output is in $new_path
40998
40999  windows_path="$new_path"
41000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41001    unix_path=`$CYGPATH -u "$windows_path"`
41002    new_path="$unix_path"
41003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41005    new_path="$unix_path"
41006  fi
41007
41008    # remove trailing .exe if any
41009    new_path="${new_path/%.exe/}"
41010
41011    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41012    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41013  fi
41014
41015    else
41016      # We're on a unix platform. Hooray! :)
41017      # First separate the path from the arguments. This will split at the first
41018      # space.
41019      complete="$GNM"
41020      path="${complete%% *}"
41021      tmp="$complete EOL"
41022      arguments="${tmp#* }"
41023
41024      # Cannot rely on the command "which" here since it doesn't always work.
41025      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41026      if test -z "$is_absolute_path"; then
41027        # Path to executable is not absolute. Find it.
41028        IFS_save="$IFS"
41029        IFS=:
41030        for p in $PATH; do
41031          if test -f "$p/$path" && test -x "$p/$path"; then
41032            new_path="$p/$path"
41033            break
41034          fi
41035        done
41036        IFS="$IFS_save"
41037      else
41038        # This is an absolute path, we can use it without further modifications.
41039        new_path="$path"
41040      fi
41041
41042      if test "x$new_path" = x; then
41043        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41044$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41045        has_space=`$ECHO "$complete" | $GREP " "`
41046        if test "x$has_space" != x; then
41047          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41048$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41049        fi
41050        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41051      fi
41052    fi
41053
41054    # Now join together the path and the arguments once again
41055    if test "x$arguments" != xEOL; then
41056      new_complete="$new_path ${arguments% *}"
41057    else
41058      new_complete="$new_path"
41059    fi
41060
41061    if test "x$complete" != "x$new_complete"; then
41062      GNM="$new_complete"
41063      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41064$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41065    fi
41066  fi
41067
41068  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41069    # FIXME: we should unify this with the solaris case above.
41070
41071
41072  # Publish this variable in the help.
41073
41074
41075  if [ -z "${STRIP+x}" ]; then
41076    # The variable is not set by user, try to locate tool using the code snippet
41077    if test -n "$ac_tool_prefix"; then
41078  for ac_prog in strip
41079  do
41080    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41081set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41083$as_echo_n "checking for $ac_word... " >&6; }
41084if ${ac_cv_prog_STRIP+:} false; then :
41085  $as_echo_n "(cached) " >&6
41086else
41087  if test -n "$STRIP"; then
41088  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41089else
41090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41091for as_dir in $PATH
41092do
41093  IFS=$as_save_IFS
41094  test -z "$as_dir" && as_dir=.
41095    for ac_exec_ext in '' $ac_executable_extensions; do
41096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41097    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41099    break 2
41100  fi
41101done
41102  done
41103IFS=$as_save_IFS
41104
41105fi
41106fi
41107STRIP=$ac_cv_prog_STRIP
41108if test -n "$STRIP"; then
41109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41110$as_echo "$STRIP" >&6; }
41111else
41112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41113$as_echo "no" >&6; }
41114fi
41115
41116
41117    test -n "$STRIP" && break
41118  done
41119fi
41120if test -z "$STRIP"; then
41121  ac_ct_STRIP=$STRIP
41122  for ac_prog in strip
41123do
41124  # Extract the first word of "$ac_prog", so it can be a program name with args.
41125set dummy $ac_prog; ac_word=$2
41126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41127$as_echo_n "checking for $ac_word... " >&6; }
41128if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41129  $as_echo_n "(cached) " >&6
41130else
41131  if test -n "$ac_ct_STRIP"; then
41132  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41133else
41134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41135for as_dir in $PATH
41136do
41137  IFS=$as_save_IFS
41138  test -z "$as_dir" && as_dir=.
41139    for ac_exec_ext in '' $ac_executable_extensions; do
41140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41141    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41143    break 2
41144  fi
41145done
41146  done
41147IFS=$as_save_IFS
41148
41149fi
41150fi
41151ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41152if test -n "$ac_ct_STRIP"; then
41153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41154$as_echo "$ac_ct_STRIP" >&6; }
41155else
41156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41157$as_echo "no" >&6; }
41158fi
41159
41160
41161  test -n "$ac_ct_STRIP" && break
41162done
41163
41164  if test "x$ac_ct_STRIP" = x; then
41165    STRIP=""
41166  else
41167    case $cross_compiling:$ac_tool_warned in
41168yes:)
41169{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41170$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41171ac_tool_warned=yes ;;
41172esac
41173    STRIP=$ac_ct_STRIP
41174  fi
41175fi
41176
41177  else
41178    # The variable is set, but is it from the command line or the environment?
41179
41180    # Try to remove the string !STRIP! from our list.
41181    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41182    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41183      # If it failed, the variable was not from the command line. Ignore it,
41184      # but warn the user (except for BASH, which is always set by the calling BASH).
41185      if test "xSTRIP" != xBASH; then
41186        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41187$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41188      fi
41189      # Try to locate tool using the code snippet
41190      if test -n "$ac_tool_prefix"; then
41191  for ac_prog in strip
41192  do
41193    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41194set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41196$as_echo_n "checking for $ac_word... " >&6; }
41197if ${ac_cv_prog_STRIP+:} false; then :
41198  $as_echo_n "(cached) " >&6
41199else
41200  if test -n "$STRIP"; then
41201  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41202else
41203as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41204for as_dir in $PATH
41205do
41206  IFS=$as_save_IFS
41207  test -z "$as_dir" && as_dir=.
41208    for ac_exec_ext in '' $ac_executable_extensions; do
41209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41210    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41212    break 2
41213  fi
41214done
41215  done
41216IFS=$as_save_IFS
41217
41218fi
41219fi
41220STRIP=$ac_cv_prog_STRIP
41221if test -n "$STRIP"; then
41222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41223$as_echo "$STRIP" >&6; }
41224else
41225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41226$as_echo "no" >&6; }
41227fi
41228
41229
41230    test -n "$STRIP" && break
41231  done
41232fi
41233if test -z "$STRIP"; then
41234  ac_ct_STRIP=$STRIP
41235  for ac_prog in strip
41236do
41237  # Extract the first word of "$ac_prog", so it can be a program name with args.
41238set dummy $ac_prog; ac_word=$2
41239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41240$as_echo_n "checking for $ac_word... " >&6; }
41241if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41242  $as_echo_n "(cached) " >&6
41243else
41244  if test -n "$ac_ct_STRIP"; then
41245  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41246else
41247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41248for as_dir in $PATH
41249do
41250  IFS=$as_save_IFS
41251  test -z "$as_dir" && as_dir=.
41252    for ac_exec_ext in '' $ac_executable_extensions; do
41253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41254    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41256    break 2
41257  fi
41258done
41259  done
41260IFS=$as_save_IFS
41261
41262fi
41263fi
41264ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41265if test -n "$ac_ct_STRIP"; then
41266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41267$as_echo "$ac_ct_STRIP" >&6; }
41268else
41269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41270$as_echo "no" >&6; }
41271fi
41272
41273
41274  test -n "$ac_ct_STRIP" && break
41275done
41276
41277  if test "x$ac_ct_STRIP" = x; then
41278    STRIP=""
41279  else
41280    case $cross_compiling:$ac_tool_warned in
41281yes:)
41282{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41283$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41284ac_tool_warned=yes ;;
41285esac
41286    STRIP=$ac_ct_STRIP
41287  fi
41288fi
41289
41290    else
41291      # If it succeeded, then it was overridden by the user. We will use it
41292      # for the tool.
41293
41294      # First remove it from the list of overridden variables, so we can test
41295      # for unknown variables in the end.
41296      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41297
41298      # Check if we try to supply an empty value
41299      if test "x$STRIP" = x; then
41300        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41301$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41302        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41303$as_echo_n "checking for STRIP... " >&6; }
41304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41305$as_echo "disabled" >&6; }
41306      else
41307        # Check if the provided tool contains a complete path.
41308        tool_specified="$STRIP"
41309        tool_basename="${tool_specified##*/}"
41310        if test "x$tool_basename" = "x$tool_specified"; then
41311          # A command without a complete path is provided, search $PATH.
41312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41313$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41314          # Extract the first word of "$tool_basename", so it can be a program name with args.
41315set dummy $tool_basename; ac_word=$2
41316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41317$as_echo_n "checking for $ac_word... " >&6; }
41318if ${ac_cv_path_STRIP+:} false; then :
41319  $as_echo_n "(cached) " >&6
41320else
41321  case $STRIP in
41322  [\\/]* | ?:[\\/]*)
41323  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41324  ;;
41325  *)
41326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41327for as_dir in $PATH
41328do
41329  IFS=$as_save_IFS
41330  test -z "$as_dir" && as_dir=.
41331    for ac_exec_ext in '' $ac_executable_extensions; do
41332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41333    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41335    break 2
41336  fi
41337done
41338  done
41339IFS=$as_save_IFS
41340
41341  ;;
41342esac
41343fi
41344STRIP=$ac_cv_path_STRIP
41345if test -n "$STRIP"; then
41346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41347$as_echo "$STRIP" >&6; }
41348else
41349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41350$as_echo "no" >&6; }
41351fi
41352
41353
41354          if test "x$STRIP" = x; then
41355            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41356          fi
41357        else
41358          # Otherwise we believe it is a complete path. Use it as it is.
41359          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41360$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41361          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41362$as_echo_n "checking for STRIP... " >&6; }
41363          if test ! -x "$tool_specified"; then
41364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41365$as_echo "not found" >&6; }
41366            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41367          fi
41368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41369$as_echo "$tool_specified" >&6; }
41370        fi
41371      fi
41372    fi
41373
41374  fi
41375
41376
41377
41378  # Only process if variable expands to non-empty
41379
41380  if test "x$STRIP" != x; then
41381    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41382
41383  # First separate the path from the arguments. This will split at the first
41384  # space.
41385  complete="$STRIP"
41386  path="${complete%% *}"
41387  tmp="$complete EOL"
41388  arguments="${tmp#* }"
41389
41390  # Input might be given as Windows format, start by converting to
41391  # unix format.
41392  new_path=`$CYGPATH -u "$path"`
41393
41394  # Now try to locate executable using which
41395  new_path=`$WHICH "$new_path" 2> /dev/null`
41396  # bat and cmd files are not always considered executable in cygwin causing which
41397  # to not find them
41398  if test "x$new_path" = x \
41399      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41400      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41401    new_path=`$CYGPATH -u "$path"`
41402  fi
41403  if test "x$new_path" = x; then
41404    # Oops. Which didn't find the executable.
41405    # The splitting of arguments from the executable at a space might have been incorrect,
41406    # since paths with space are more likely in Windows. Give it another try with the whole
41407    # argument.
41408    path="$complete"
41409    arguments="EOL"
41410    new_path=`$CYGPATH -u "$path"`
41411    new_path=`$WHICH "$new_path" 2> /dev/null`
41412    # bat and cmd files are not always considered executable in cygwin causing which
41413    # to not find them
41414    if test "x$new_path" = x \
41415        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41416        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41417      new_path=`$CYGPATH -u "$path"`
41418    fi
41419    if test "x$new_path" = x; then
41420      # It's still not found. Now this is an unrecoverable error.
41421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41422$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41423      has_space=`$ECHO "$complete" | $GREP " "`
41424      if test "x$has_space" != x; then
41425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41427      fi
41428      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41429    fi
41430  fi
41431
41432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41435  # "foo.exe" is OK but "foo" is an error.
41436  #
41437  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41438  # It is also a way to make sure we got the proper file name for the real test later on.
41439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41440  if test "x$test_shortpath" = x; then
41441    # Short path failed, file does not exist as specified.
41442    # Try adding .exe or .cmd
41443    if test -f "${new_path}.exe"; then
41444      input_to_shortpath="${new_path}.exe"
41445    elif test -f "${new_path}.cmd"; then
41446      input_to_shortpath="${new_path}.cmd"
41447    else
41448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41449$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41450      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41451$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41452      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41453    fi
41454  else
41455    input_to_shortpath="$new_path"
41456  fi
41457
41458  # Call helper function which possibly converts this using DOS-style short mode.
41459  # If so, the updated path is stored in $new_path.
41460  new_path="$input_to_shortpath"
41461
41462  input_path="$input_to_shortpath"
41463  # Check if we need to convert this using DOS-style short mode. If the path
41464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41465  # take no chances and rewrite it.
41466  # Note: m4 eats our [], so we need to use [ and ] instead.
41467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41468  if test "x$has_forbidden_chars" != x; then
41469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41470    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41471    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41472    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41473      # Going to short mode and back again did indeed matter. Since short mode is
41474      # case insensitive, let's make it lowercase to improve readability.
41475      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41476      # Now convert it back to Unix-style (cygpath)
41477      input_path=`$CYGPATH -u "$shortmode_path"`
41478      new_path="$input_path"
41479    fi
41480  fi
41481
41482  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41483  if test "x$test_cygdrive_prefix" = x; then
41484    # As a simple fix, exclude /usr/bin since it's not a real path.
41485    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41486      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41487      # a path prefixed by /cygdrive for fixpath to work.
41488      new_path="$CYGWIN_ROOT_PATH$input_path"
41489    fi
41490  fi
41491
41492  # remove trailing .exe if any
41493  new_path="${new_path/%.exe/}"
41494
41495    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41496
41497  # First separate the path from the arguments. This will split at the first
41498  # space.
41499  complete="$STRIP"
41500  path="${complete%% *}"
41501  tmp="$complete EOL"
41502  arguments="${tmp#* }"
41503
41504  # Input might be given as Windows format, start by converting to
41505  # unix format.
41506  new_path="$path"
41507
41508  windows_path="$new_path"
41509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41510    unix_path=`$CYGPATH -u "$windows_path"`
41511    new_path="$unix_path"
41512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41514    new_path="$unix_path"
41515  fi
41516
41517
41518  # Now try to locate executable using which
41519  new_path=`$WHICH "$new_path" 2> /dev/null`
41520
41521  if test "x$new_path" = x; then
41522    # Oops. Which didn't find the executable.
41523    # The splitting of arguments from the executable at a space might have been incorrect,
41524    # since paths with space are more likely in Windows. Give it another try with the whole
41525    # argument.
41526    path="$complete"
41527    arguments="EOL"
41528    new_path="$path"
41529
41530  windows_path="$new_path"
41531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41532    unix_path=`$CYGPATH -u "$windows_path"`
41533    new_path="$unix_path"
41534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41536    new_path="$unix_path"
41537  fi
41538
41539
41540    new_path=`$WHICH "$new_path" 2> /dev/null`
41541    # bat and cmd files are not always considered executable in MSYS causing which
41542    # to not find them
41543    if test "x$new_path" = x \
41544        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41545        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41546      new_path="$path"
41547
41548  windows_path="$new_path"
41549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41550    unix_path=`$CYGPATH -u "$windows_path"`
41551    new_path="$unix_path"
41552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41554    new_path="$unix_path"
41555  fi
41556
41557    fi
41558
41559    if test "x$new_path" = x; then
41560      # It's still not found. Now this is an unrecoverable error.
41561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41562$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41563      has_space=`$ECHO "$complete" | $GREP " "`
41564      if test "x$has_space" != x; then
41565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41567      fi
41568      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41569    fi
41570  fi
41571
41572  # Now new_path has a complete unix path to the binary
41573  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41574    # Keep paths in /bin as-is, but remove trailing .exe if any
41575    new_path="${new_path/%.exe/}"
41576    # Do not save /bin paths to all_fixpath_prefixes!
41577  else
41578    # Not in mixed or Windows style, start by that.
41579    new_path=`cmd //c echo $new_path`
41580
41581  input_path="$new_path"
41582  # Check if we need to convert this using DOS-style short mode. If the path
41583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41584  # take no chances and rewrite it.
41585  # Note: m4 eats our [], so we need to use [ and ] instead.
41586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41587  if test "x$has_forbidden_chars" != x; then
41588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41590  fi
41591
41592    # Output is in $new_path
41593
41594  windows_path="$new_path"
41595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41596    unix_path=`$CYGPATH -u "$windows_path"`
41597    new_path="$unix_path"
41598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41600    new_path="$unix_path"
41601  fi
41602
41603    # remove trailing .exe if any
41604    new_path="${new_path/%.exe/}"
41605
41606    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41607    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41608  fi
41609
41610    else
41611      # We're on a unix platform. Hooray! :)
41612      # First separate the path from the arguments. This will split at the first
41613      # space.
41614      complete="$STRIP"
41615      path="${complete%% *}"
41616      tmp="$complete EOL"
41617      arguments="${tmp#* }"
41618
41619      # Cannot rely on the command "which" here since it doesn't always work.
41620      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41621      if test -z "$is_absolute_path"; then
41622        # Path to executable is not absolute. Find it.
41623        IFS_save="$IFS"
41624        IFS=:
41625        for p in $PATH; do
41626          if test -f "$p/$path" && test -x "$p/$path"; then
41627            new_path="$p/$path"
41628            break
41629          fi
41630        done
41631        IFS="$IFS_save"
41632      else
41633        # This is an absolute path, we can use it without further modifications.
41634        new_path="$path"
41635      fi
41636
41637      if test "x$new_path" = x; then
41638        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41639$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41640        has_space=`$ECHO "$complete" | $GREP " "`
41641        if test "x$has_space" != x; then
41642          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41643$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41644        fi
41645        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41646      fi
41647    fi
41648
41649    # Now join together the path and the arguments once again
41650    if test "x$arguments" != xEOL; then
41651      new_complete="$new_path ${arguments% *}"
41652    else
41653      new_complete="$new_path"
41654    fi
41655
41656    if test "x$complete" != "x$new_complete"; then
41657      STRIP="$new_complete"
41658      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41659$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41660    fi
41661  fi
41662
41663    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41664
41665
41666  # Publish this variable in the help.
41667
41668
41669  if [ -z "${NM+x}" ]; then
41670    # The variable is not set by user, try to locate tool using the code snippet
41671    if test -n "$ac_tool_prefix"; then
41672  for ac_prog in nm gcc-nm
41673  do
41674    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41675set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41677$as_echo_n "checking for $ac_word... " >&6; }
41678if ${ac_cv_prog_NM+:} false; then :
41679  $as_echo_n "(cached) " >&6
41680else
41681  if test -n "$NM"; then
41682  ac_cv_prog_NM="$NM" # Let the user override the test.
41683else
41684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41685for as_dir in $PATH
41686do
41687  IFS=$as_save_IFS
41688  test -z "$as_dir" && as_dir=.
41689    for ac_exec_ext in '' $ac_executable_extensions; do
41690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41691    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41693    break 2
41694  fi
41695done
41696  done
41697IFS=$as_save_IFS
41698
41699fi
41700fi
41701NM=$ac_cv_prog_NM
41702if test -n "$NM"; then
41703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41704$as_echo "$NM" >&6; }
41705else
41706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41707$as_echo "no" >&6; }
41708fi
41709
41710
41711    test -n "$NM" && break
41712  done
41713fi
41714if test -z "$NM"; then
41715  ac_ct_NM=$NM
41716  for ac_prog in nm gcc-nm
41717do
41718  # Extract the first word of "$ac_prog", so it can be a program name with args.
41719set dummy $ac_prog; ac_word=$2
41720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41721$as_echo_n "checking for $ac_word... " >&6; }
41722if ${ac_cv_prog_ac_ct_NM+:} false; then :
41723  $as_echo_n "(cached) " >&6
41724else
41725  if test -n "$ac_ct_NM"; then
41726  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41727else
41728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41729for as_dir in $PATH
41730do
41731  IFS=$as_save_IFS
41732  test -z "$as_dir" && as_dir=.
41733    for ac_exec_ext in '' $ac_executable_extensions; do
41734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41735    ac_cv_prog_ac_ct_NM="$ac_prog"
41736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41737    break 2
41738  fi
41739done
41740  done
41741IFS=$as_save_IFS
41742
41743fi
41744fi
41745ac_ct_NM=$ac_cv_prog_ac_ct_NM
41746if test -n "$ac_ct_NM"; then
41747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41748$as_echo "$ac_ct_NM" >&6; }
41749else
41750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41751$as_echo "no" >&6; }
41752fi
41753
41754
41755  test -n "$ac_ct_NM" && break
41756done
41757
41758  if test "x$ac_ct_NM" = x; then
41759    NM=""
41760  else
41761    case $cross_compiling:$ac_tool_warned in
41762yes:)
41763{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41764$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41765ac_tool_warned=yes ;;
41766esac
41767    NM=$ac_ct_NM
41768  fi
41769fi
41770
41771  else
41772    # The variable is set, but is it from the command line or the environment?
41773
41774    # Try to remove the string !NM! from our list.
41775    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41776    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41777      # If it failed, the variable was not from the command line. Ignore it,
41778      # but warn the user (except for BASH, which is always set by the calling BASH).
41779      if test "xNM" != xBASH; then
41780        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41781$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41782      fi
41783      # Try to locate tool using the code snippet
41784      if test -n "$ac_tool_prefix"; then
41785  for ac_prog in nm gcc-nm
41786  do
41787    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41788set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41790$as_echo_n "checking for $ac_word... " >&6; }
41791if ${ac_cv_prog_NM+:} false; then :
41792  $as_echo_n "(cached) " >&6
41793else
41794  if test -n "$NM"; then
41795  ac_cv_prog_NM="$NM" # Let the user override the test.
41796else
41797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41798for as_dir in $PATH
41799do
41800  IFS=$as_save_IFS
41801  test -z "$as_dir" && as_dir=.
41802    for ac_exec_ext in '' $ac_executable_extensions; do
41803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41804    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41806    break 2
41807  fi
41808done
41809  done
41810IFS=$as_save_IFS
41811
41812fi
41813fi
41814NM=$ac_cv_prog_NM
41815if test -n "$NM"; then
41816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41817$as_echo "$NM" >&6; }
41818else
41819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41820$as_echo "no" >&6; }
41821fi
41822
41823
41824    test -n "$NM" && break
41825  done
41826fi
41827if test -z "$NM"; then
41828  ac_ct_NM=$NM
41829  for ac_prog in nm gcc-nm
41830do
41831  # Extract the first word of "$ac_prog", so it can be a program name with args.
41832set dummy $ac_prog; ac_word=$2
41833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41834$as_echo_n "checking for $ac_word... " >&6; }
41835if ${ac_cv_prog_ac_ct_NM+:} false; then :
41836  $as_echo_n "(cached) " >&6
41837else
41838  if test -n "$ac_ct_NM"; then
41839  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41840else
41841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41842for as_dir in $PATH
41843do
41844  IFS=$as_save_IFS
41845  test -z "$as_dir" && as_dir=.
41846    for ac_exec_ext in '' $ac_executable_extensions; do
41847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41848    ac_cv_prog_ac_ct_NM="$ac_prog"
41849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41850    break 2
41851  fi
41852done
41853  done
41854IFS=$as_save_IFS
41855
41856fi
41857fi
41858ac_ct_NM=$ac_cv_prog_ac_ct_NM
41859if test -n "$ac_ct_NM"; then
41860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41861$as_echo "$ac_ct_NM" >&6; }
41862else
41863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41864$as_echo "no" >&6; }
41865fi
41866
41867
41868  test -n "$ac_ct_NM" && break
41869done
41870
41871  if test "x$ac_ct_NM" = x; then
41872    NM=""
41873  else
41874    case $cross_compiling:$ac_tool_warned in
41875yes:)
41876{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41877$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41878ac_tool_warned=yes ;;
41879esac
41880    NM=$ac_ct_NM
41881  fi
41882fi
41883
41884    else
41885      # If it succeeded, then it was overridden by the user. We will use it
41886      # for the tool.
41887
41888      # First remove it from the list of overridden variables, so we can test
41889      # for unknown variables in the end.
41890      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41891
41892      # Check if we try to supply an empty value
41893      if test "x$NM" = x; then
41894        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41895$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41897$as_echo_n "checking for NM... " >&6; }
41898        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41899$as_echo "disabled" >&6; }
41900      else
41901        # Check if the provided tool contains a complete path.
41902        tool_specified="$NM"
41903        tool_basename="${tool_specified##*/}"
41904        if test "x$tool_basename" = "x$tool_specified"; then
41905          # A command without a complete path is provided, search $PATH.
41906          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41907$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41908          # Extract the first word of "$tool_basename", so it can be a program name with args.
41909set dummy $tool_basename; ac_word=$2
41910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41911$as_echo_n "checking for $ac_word... " >&6; }
41912if ${ac_cv_path_NM+:} false; then :
41913  $as_echo_n "(cached) " >&6
41914else
41915  case $NM in
41916  [\\/]* | ?:[\\/]*)
41917  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41918  ;;
41919  *)
41920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41921for as_dir in $PATH
41922do
41923  IFS=$as_save_IFS
41924  test -z "$as_dir" && as_dir=.
41925    for ac_exec_ext in '' $ac_executable_extensions; do
41926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41927    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41929    break 2
41930  fi
41931done
41932  done
41933IFS=$as_save_IFS
41934
41935  ;;
41936esac
41937fi
41938NM=$ac_cv_path_NM
41939if test -n "$NM"; then
41940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41941$as_echo "$NM" >&6; }
41942else
41943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41944$as_echo "no" >&6; }
41945fi
41946
41947
41948          if test "x$NM" = x; then
41949            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41950          fi
41951        else
41952          # Otherwise we believe it is a complete path. Use it as it is.
41953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41954$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41955          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41956$as_echo_n "checking for NM... " >&6; }
41957          if test ! -x "$tool_specified"; then
41958            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41959$as_echo "not found" >&6; }
41960            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41961          fi
41962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41963$as_echo "$tool_specified" >&6; }
41964        fi
41965      fi
41966    fi
41967
41968  fi
41969
41970
41971    else
41972
41973
41974  # Publish this variable in the help.
41975
41976
41977  if [ -z "${NM+x}" ]; then
41978    # The variable is not set by user, try to locate tool using the code snippet
41979    if test -n "$ac_tool_prefix"; then
41980  for ac_prog in nm
41981  do
41982    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41983set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41985$as_echo_n "checking for $ac_word... " >&6; }
41986if ${ac_cv_prog_NM+:} false; then :
41987  $as_echo_n "(cached) " >&6
41988else
41989  if test -n "$NM"; then
41990  ac_cv_prog_NM="$NM" # Let the user override the test.
41991else
41992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41993for as_dir in $PATH
41994do
41995  IFS=$as_save_IFS
41996  test -z "$as_dir" && as_dir=.
41997    for ac_exec_ext in '' $ac_executable_extensions; do
41998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41999    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42001    break 2
42002  fi
42003done
42004  done
42005IFS=$as_save_IFS
42006
42007fi
42008fi
42009NM=$ac_cv_prog_NM
42010if test -n "$NM"; then
42011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42012$as_echo "$NM" >&6; }
42013else
42014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42015$as_echo "no" >&6; }
42016fi
42017
42018
42019    test -n "$NM" && break
42020  done
42021fi
42022if test -z "$NM"; then
42023  ac_ct_NM=$NM
42024  for ac_prog in nm
42025do
42026  # Extract the first word of "$ac_prog", so it can be a program name with args.
42027set dummy $ac_prog; ac_word=$2
42028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42029$as_echo_n "checking for $ac_word... " >&6; }
42030if ${ac_cv_prog_ac_ct_NM+:} false; then :
42031  $as_echo_n "(cached) " >&6
42032else
42033  if test -n "$ac_ct_NM"; then
42034  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42035else
42036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42037for as_dir in $PATH
42038do
42039  IFS=$as_save_IFS
42040  test -z "$as_dir" && as_dir=.
42041    for ac_exec_ext in '' $ac_executable_extensions; do
42042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42043    ac_cv_prog_ac_ct_NM="$ac_prog"
42044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42045    break 2
42046  fi
42047done
42048  done
42049IFS=$as_save_IFS
42050
42051fi
42052fi
42053ac_ct_NM=$ac_cv_prog_ac_ct_NM
42054if test -n "$ac_ct_NM"; then
42055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42056$as_echo "$ac_ct_NM" >&6; }
42057else
42058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42059$as_echo "no" >&6; }
42060fi
42061
42062
42063  test -n "$ac_ct_NM" && break
42064done
42065
42066  if test "x$ac_ct_NM" = x; then
42067    NM=""
42068  else
42069    case $cross_compiling:$ac_tool_warned in
42070yes:)
42071{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42072$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42073ac_tool_warned=yes ;;
42074esac
42075    NM=$ac_ct_NM
42076  fi
42077fi
42078
42079  else
42080    # The variable is set, but is it from the command line or the environment?
42081
42082    # Try to remove the string !NM! from our list.
42083    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42084    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42085      # If it failed, the variable was not from the command line. Ignore it,
42086      # but warn the user (except for BASH, which is always set by the calling BASH).
42087      if test "xNM" != xBASH; then
42088        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42089$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42090      fi
42091      # Try to locate tool using the code snippet
42092      if test -n "$ac_tool_prefix"; then
42093  for ac_prog in nm
42094  do
42095    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42096set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42098$as_echo_n "checking for $ac_word... " >&6; }
42099if ${ac_cv_prog_NM+:} false; then :
42100  $as_echo_n "(cached) " >&6
42101else
42102  if test -n "$NM"; then
42103  ac_cv_prog_NM="$NM" # Let the user override the test.
42104else
42105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42106for as_dir in $PATH
42107do
42108  IFS=$as_save_IFS
42109  test -z "$as_dir" && as_dir=.
42110    for ac_exec_ext in '' $ac_executable_extensions; do
42111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42112    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42114    break 2
42115  fi
42116done
42117  done
42118IFS=$as_save_IFS
42119
42120fi
42121fi
42122NM=$ac_cv_prog_NM
42123if test -n "$NM"; then
42124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42125$as_echo "$NM" >&6; }
42126else
42127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42128$as_echo "no" >&6; }
42129fi
42130
42131
42132    test -n "$NM" && break
42133  done
42134fi
42135if test -z "$NM"; then
42136  ac_ct_NM=$NM
42137  for ac_prog in nm
42138do
42139  # Extract the first word of "$ac_prog", so it can be a program name with args.
42140set dummy $ac_prog; ac_word=$2
42141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42142$as_echo_n "checking for $ac_word... " >&6; }
42143if ${ac_cv_prog_ac_ct_NM+:} false; then :
42144  $as_echo_n "(cached) " >&6
42145else
42146  if test -n "$ac_ct_NM"; then
42147  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42148else
42149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42150for as_dir in $PATH
42151do
42152  IFS=$as_save_IFS
42153  test -z "$as_dir" && as_dir=.
42154    for ac_exec_ext in '' $ac_executable_extensions; do
42155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42156    ac_cv_prog_ac_ct_NM="$ac_prog"
42157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42158    break 2
42159  fi
42160done
42161  done
42162IFS=$as_save_IFS
42163
42164fi
42165fi
42166ac_ct_NM=$ac_cv_prog_ac_ct_NM
42167if test -n "$ac_ct_NM"; then
42168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42169$as_echo "$ac_ct_NM" >&6; }
42170else
42171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42172$as_echo "no" >&6; }
42173fi
42174
42175
42176  test -n "$ac_ct_NM" && break
42177done
42178
42179  if test "x$ac_ct_NM" = x; then
42180    NM=""
42181  else
42182    case $cross_compiling:$ac_tool_warned in
42183yes:)
42184{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42185$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42186ac_tool_warned=yes ;;
42187esac
42188    NM=$ac_ct_NM
42189  fi
42190fi
42191
42192    else
42193      # If it succeeded, then it was overridden by the user. We will use it
42194      # for the tool.
42195
42196      # First remove it from the list of overridden variables, so we can test
42197      # for unknown variables in the end.
42198      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42199
42200      # Check if we try to supply an empty value
42201      if test "x$NM" = x; then
42202        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42203$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42204        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42205$as_echo_n "checking for NM... " >&6; }
42206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42207$as_echo "disabled" >&6; }
42208      else
42209        # Check if the provided tool contains a complete path.
42210        tool_specified="$NM"
42211        tool_basename="${tool_specified##*/}"
42212        if test "x$tool_basename" = "x$tool_specified"; then
42213          # A command without a complete path is provided, search $PATH.
42214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42215$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42216          # Extract the first word of "$tool_basename", so it can be a program name with args.
42217set dummy $tool_basename; ac_word=$2
42218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42219$as_echo_n "checking for $ac_word... " >&6; }
42220if ${ac_cv_path_NM+:} false; then :
42221  $as_echo_n "(cached) " >&6
42222else
42223  case $NM in
42224  [\\/]* | ?:[\\/]*)
42225  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42226  ;;
42227  *)
42228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42229for as_dir in $PATH
42230do
42231  IFS=$as_save_IFS
42232  test -z "$as_dir" && as_dir=.
42233    for ac_exec_ext in '' $ac_executable_extensions; do
42234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42235    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42237    break 2
42238  fi
42239done
42240  done
42241IFS=$as_save_IFS
42242
42243  ;;
42244esac
42245fi
42246NM=$ac_cv_path_NM
42247if test -n "$NM"; then
42248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42249$as_echo "$NM" >&6; }
42250else
42251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42252$as_echo "no" >&6; }
42253fi
42254
42255
42256          if test "x$NM" = x; then
42257            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42258          fi
42259        else
42260          # Otherwise we believe it is a complete path. Use it as it is.
42261          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42262$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42263          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42264$as_echo_n "checking for NM... " >&6; }
42265          if test ! -x "$tool_specified"; then
42266            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42267$as_echo "not found" >&6; }
42268            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42269          fi
42270          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42271$as_echo "$tool_specified" >&6; }
42272        fi
42273      fi
42274    fi
42275
42276  fi
42277
42278
42279    fi
42280
42281  # Only process if variable expands to non-empty
42282
42283  if test "x$NM" != x; then
42284    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42285
42286  # First separate the path from the arguments. This will split at the first
42287  # space.
42288  complete="$NM"
42289  path="${complete%% *}"
42290  tmp="$complete EOL"
42291  arguments="${tmp#* }"
42292
42293  # Input might be given as Windows format, start by converting to
42294  # unix format.
42295  new_path=`$CYGPATH -u "$path"`
42296
42297  # Now try to locate executable using which
42298  new_path=`$WHICH "$new_path" 2> /dev/null`
42299  # bat and cmd files are not always considered executable in cygwin causing which
42300  # to not find them
42301  if test "x$new_path" = x \
42302      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42303      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42304    new_path=`$CYGPATH -u "$path"`
42305  fi
42306  if test "x$new_path" = x; then
42307    # Oops. Which didn't find the executable.
42308    # The splitting of arguments from the executable at a space might have been incorrect,
42309    # since paths with space are more likely in Windows. Give it another try with the whole
42310    # argument.
42311    path="$complete"
42312    arguments="EOL"
42313    new_path=`$CYGPATH -u "$path"`
42314    new_path=`$WHICH "$new_path" 2> /dev/null`
42315    # bat and cmd files are not always considered executable in cygwin causing which
42316    # to not find them
42317    if test "x$new_path" = x \
42318        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42319        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42320      new_path=`$CYGPATH -u "$path"`
42321    fi
42322    if test "x$new_path" = x; then
42323      # It's still not found. Now this is an unrecoverable error.
42324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42325$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42326      has_space=`$ECHO "$complete" | $GREP " "`
42327      if test "x$has_space" != x; then
42328        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42329$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42330      fi
42331      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42332    fi
42333  fi
42334
42335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42338  # "foo.exe" is OK but "foo" is an error.
42339  #
42340  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42341  # It is also a way to make sure we got the proper file name for the real test later on.
42342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42343  if test "x$test_shortpath" = x; then
42344    # Short path failed, file does not exist as specified.
42345    # Try adding .exe or .cmd
42346    if test -f "${new_path}.exe"; then
42347      input_to_shortpath="${new_path}.exe"
42348    elif test -f "${new_path}.cmd"; then
42349      input_to_shortpath="${new_path}.cmd"
42350    else
42351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42352$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42353      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42354$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42355      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42356    fi
42357  else
42358    input_to_shortpath="$new_path"
42359  fi
42360
42361  # Call helper function which possibly converts this using DOS-style short mode.
42362  # If so, the updated path is stored in $new_path.
42363  new_path="$input_to_shortpath"
42364
42365  input_path="$input_to_shortpath"
42366  # Check if we need to convert this using DOS-style short mode. If the path
42367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42368  # take no chances and rewrite it.
42369  # Note: m4 eats our [], so we need to use [ and ] instead.
42370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42371  if test "x$has_forbidden_chars" != x; then
42372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42376      # Going to short mode and back again did indeed matter. Since short mode is
42377      # case insensitive, let's make it lowercase to improve readability.
42378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42379      # Now convert it back to Unix-style (cygpath)
42380      input_path=`$CYGPATH -u "$shortmode_path"`
42381      new_path="$input_path"
42382    fi
42383  fi
42384
42385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42386  if test "x$test_cygdrive_prefix" = x; then
42387    # As a simple fix, exclude /usr/bin since it's not a real path.
42388    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42390      # a path prefixed by /cygdrive for fixpath to work.
42391      new_path="$CYGWIN_ROOT_PATH$input_path"
42392    fi
42393  fi
42394
42395  # remove trailing .exe if any
42396  new_path="${new_path/%.exe/}"
42397
42398    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42399
42400  # First separate the path from the arguments. This will split at the first
42401  # space.
42402  complete="$NM"
42403  path="${complete%% *}"
42404  tmp="$complete EOL"
42405  arguments="${tmp#* }"
42406
42407  # Input might be given as Windows format, start by converting to
42408  # unix format.
42409  new_path="$path"
42410
42411  windows_path="$new_path"
42412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42413    unix_path=`$CYGPATH -u "$windows_path"`
42414    new_path="$unix_path"
42415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42417    new_path="$unix_path"
42418  fi
42419
42420
42421  # Now try to locate executable using which
42422  new_path=`$WHICH "$new_path" 2> /dev/null`
42423
42424  if test "x$new_path" = x; then
42425    # Oops. Which didn't find the executable.
42426    # The splitting of arguments from the executable at a space might have been incorrect,
42427    # since paths with space are more likely in Windows. Give it another try with the whole
42428    # argument.
42429    path="$complete"
42430    arguments="EOL"
42431    new_path="$path"
42432
42433  windows_path="$new_path"
42434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42435    unix_path=`$CYGPATH -u "$windows_path"`
42436    new_path="$unix_path"
42437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42439    new_path="$unix_path"
42440  fi
42441
42442
42443    new_path=`$WHICH "$new_path" 2> /dev/null`
42444    # bat and cmd files are not always considered executable in MSYS causing which
42445    # to not find them
42446    if test "x$new_path" = x \
42447        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42448        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42449      new_path="$path"
42450
42451  windows_path="$new_path"
42452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42453    unix_path=`$CYGPATH -u "$windows_path"`
42454    new_path="$unix_path"
42455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42457    new_path="$unix_path"
42458  fi
42459
42460    fi
42461
42462    if test "x$new_path" = x; then
42463      # It's still not found. Now this is an unrecoverable error.
42464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42465$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42466      has_space=`$ECHO "$complete" | $GREP " "`
42467      if test "x$has_space" != x; then
42468        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42469$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42470      fi
42471      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42472    fi
42473  fi
42474
42475  # Now new_path has a complete unix path to the binary
42476  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42477    # Keep paths in /bin as-is, but remove trailing .exe if any
42478    new_path="${new_path/%.exe/}"
42479    # Do not save /bin paths to all_fixpath_prefixes!
42480  else
42481    # Not in mixed or Windows style, start by that.
42482    new_path=`cmd //c echo $new_path`
42483
42484  input_path="$new_path"
42485  # Check if we need to convert this using DOS-style short mode. If the path
42486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42487  # take no chances and rewrite it.
42488  # Note: m4 eats our [], so we need to use [ and ] instead.
42489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42490  if test "x$has_forbidden_chars" != x; then
42491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42492    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42493  fi
42494
42495    # Output is in $new_path
42496
42497  windows_path="$new_path"
42498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42499    unix_path=`$CYGPATH -u "$windows_path"`
42500    new_path="$unix_path"
42501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42503    new_path="$unix_path"
42504  fi
42505
42506    # remove trailing .exe if any
42507    new_path="${new_path/%.exe/}"
42508
42509    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42510    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42511  fi
42512
42513    else
42514      # We're on a unix platform. Hooray! :)
42515      # First separate the path from the arguments. This will split at the first
42516      # space.
42517      complete="$NM"
42518      path="${complete%% *}"
42519      tmp="$complete EOL"
42520      arguments="${tmp#* }"
42521
42522      # Cannot rely on the command "which" here since it doesn't always work.
42523      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42524      if test -z "$is_absolute_path"; then
42525        # Path to executable is not absolute. Find it.
42526        IFS_save="$IFS"
42527        IFS=:
42528        for p in $PATH; do
42529          if test -f "$p/$path" && test -x "$p/$path"; then
42530            new_path="$p/$path"
42531            break
42532          fi
42533        done
42534        IFS="$IFS_save"
42535      else
42536        # This is an absolute path, we can use it without further modifications.
42537        new_path="$path"
42538      fi
42539
42540      if test "x$new_path" = x; then
42541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42542$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42543        has_space=`$ECHO "$complete" | $GREP " "`
42544        if test "x$has_space" != x; then
42545          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42546$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42547        fi
42548        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42549      fi
42550    fi
42551
42552    # Now join together the path and the arguments once again
42553    if test "x$arguments" != xEOL; then
42554      new_complete="$new_path ${arguments% *}"
42555    else
42556      new_complete="$new_path"
42557    fi
42558
42559    if test "x$complete" != "x$new_complete"; then
42560      NM="$new_complete"
42561      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42562$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42563    fi
42564  fi
42565
42566    GNM="$NM"
42567
42568  fi
42569
42570  # objcopy is used for moving debug symbols to separate files when
42571  # full debug symbols are enabled.
42572  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42573
42574
42575  # Publish this variable in the help.
42576
42577
42578  if [ -z "${OBJCOPY+x}" ]; then
42579    # The variable is not set by user, try to locate tool using the code snippet
42580    if test -n "$ac_tool_prefix"; then
42581  for ac_prog in gobjcopy objcopy
42582  do
42583    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42584set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42586$as_echo_n "checking for $ac_word... " >&6; }
42587if ${ac_cv_prog_OBJCOPY+:} false; then :
42588  $as_echo_n "(cached) " >&6
42589else
42590  if test -n "$OBJCOPY"; then
42591  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42592else
42593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42594for as_dir in $PATH
42595do
42596  IFS=$as_save_IFS
42597  test -z "$as_dir" && as_dir=.
42598    for ac_exec_ext in '' $ac_executable_extensions; do
42599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42600    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42602    break 2
42603  fi
42604done
42605  done
42606IFS=$as_save_IFS
42607
42608fi
42609fi
42610OBJCOPY=$ac_cv_prog_OBJCOPY
42611if test -n "$OBJCOPY"; then
42612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42613$as_echo "$OBJCOPY" >&6; }
42614else
42615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42616$as_echo "no" >&6; }
42617fi
42618
42619
42620    test -n "$OBJCOPY" && break
42621  done
42622fi
42623if test -z "$OBJCOPY"; then
42624  ac_ct_OBJCOPY=$OBJCOPY
42625  for ac_prog in gobjcopy objcopy
42626do
42627  # Extract the first word of "$ac_prog", so it can be a program name with args.
42628set dummy $ac_prog; ac_word=$2
42629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42630$as_echo_n "checking for $ac_word... " >&6; }
42631if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42632  $as_echo_n "(cached) " >&6
42633else
42634  if test -n "$ac_ct_OBJCOPY"; then
42635  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42636else
42637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42638for as_dir in $PATH
42639do
42640  IFS=$as_save_IFS
42641  test -z "$as_dir" && as_dir=.
42642    for ac_exec_ext in '' $ac_executable_extensions; do
42643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42644    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42646    break 2
42647  fi
42648done
42649  done
42650IFS=$as_save_IFS
42651
42652fi
42653fi
42654ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42655if test -n "$ac_ct_OBJCOPY"; then
42656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42657$as_echo "$ac_ct_OBJCOPY" >&6; }
42658else
42659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42660$as_echo "no" >&6; }
42661fi
42662
42663
42664  test -n "$ac_ct_OBJCOPY" && break
42665done
42666
42667  if test "x$ac_ct_OBJCOPY" = x; then
42668    OBJCOPY=""
42669  else
42670    case $cross_compiling:$ac_tool_warned in
42671yes:)
42672{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42673$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42674ac_tool_warned=yes ;;
42675esac
42676    OBJCOPY=$ac_ct_OBJCOPY
42677  fi
42678fi
42679
42680  else
42681    # The variable is set, but is it from the command line or the environment?
42682
42683    # Try to remove the string !OBJCOPY! from our list.
42684    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42685    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42686      # If it failed, the variable was not from the command line. Ignore it,
42687      # but warn the user (except for BASH, which is always set by the calling BASH).
42688      if test "xOBJCOPY" != xBASH; then
42689        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42690$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42691      fi
42692      # Try to locate tool using the code snippet
42693      if test -n "$ac_tool_prefix"; then
42694  for ac_prog in gobjcopy objcopy
42695  do
42696    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42697set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42699$as_echo_n "checking for $ac_word... " >&6; }
42700if ${ac_cv_prog_OBJCOPY+:} false; then :
42701  $as_echo_n "(cached) " >&6
42702else
42703  if test -n "$OBJCOPY"; then
42704  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42705else
42706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42707for as_dir in $PATH
42708do
42709  IFS=$as_save_IFS
42710  test -z "$as_dir" && as_dir=.
42711    for ac_exec_ext in '' $ac_executable_extensions; do
42712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42713    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42715    break 2
42716  fi
42717done
42718  done
42719IFS=$as_save_IFS
42720
42721fi
42722fi
42723OBJCOPY=$ac_cv_prog_OBJCOPY
42724if test -n "$OBJCOPY"; then
42725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42726$as_echo "$OBJCOPY" >&6; }
42727else
42728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42729$as_echo "no" >&6; }
42730fi
42731
42732
42733    test -n "$OBJCOPY" && break
42734  done
42735fi
42736if test -z "$OBJCOPY"; then
42737  ac_ct_OBJCOPY=$OBJCOPY
42738  for ac_prog in gobjcopy objcopy
42739do
42740  # Extract the first word of "$ac_prog", so it can be a program name with args.
42741set dummy $ac_prog; ac_word=$2
42742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42743$as_echo_n "checking for $ac_word... " >&6; }
42744if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42745  $as_echo_n "(cached) " >&6
42746else
42747  if test -n "$ac_ct_OBJCOPY"; then
42748  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42749else
42750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42751for as_dir in $PATH
42752do
42753  IFS=$as_save_IFS
42754  test -z "$as_dir" && as_dir=.
42755    for ac_exec_ext in '' $ac_executable_extensions; do
42756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42757    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42759    break 2
42760  fi
42761done
42762  done
42763IFS=$as_save_IFS
42764
42765fi
42766fi
42767ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42768if test -n "$ac_ct_OBJCOPY"; then
42769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42770$as_echo "$ac_ct_OBJCOPY" >&6; }
42771else
42772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42773$as_echo "no" >&6; }
42774fi
42775
42776
42777  test -n "$ac_ct_OBJCOPY" && break
42778done
42779
42780  if test "x$ac_ct_OBJCOPY" = x; then
42781    OBJCOPY=""
42782  else
42783    case $cross_compiling:$ac_tool_warned in
42784yes:)
42785{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42786$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42787ac_tool_warned=yes ;;
42788esac
42789    OBJCOPY=$ac_ct_OBJCOPY
42790  fi
42791fi
42792
42793    else
42794      # If it succeeded, then it was overridden by the user. We will use it
42795      # for the tool.
42796
42797      # First remove it from the list of overridden variables, so we can test
42798      # for unknown variables in the end.
42799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42800
42801      # Check if we try to supply an empty value
42802      if test "x$OBJCOPY" = x; then
42803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42804$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42806$as_echo_n "checking for OBJCOPY... " >&6; }
42807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42808$as_echo "disabled" >&6; }
42809      else
42810        # Check if the provided tool contains a complete path.
42811        tool_specified="$OBJCOPY"
42812        tool_basename="${tool_specified##*/}"
42813        if test "x$tool_basename" = "x$tool_specified"; then
42814          # A command without a complete path is provided, search $PATH.
42815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42816$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42817          # Extract the first word of "$tool_basename", so it can be a program name with args.
42818set dummy $tool_basename; ac_word=$2
42819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42820$as_echo_n "checking for $ac_word... " >&6; }
42821if ${ac_cv_path_OBJCOPY+:} false; then :
42822  $as_echo_n "(cached) " >&6
42823else
42824  case $OBJCOPY in
42825  [\\/]* | ?:[\\/]*)
42826  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42827  ;;
42828  *)
42829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42830for as_dir in $PATH
42831do
42832  IFS=$as_save_IFS
42833  test -z "$as_dir" && as_dir=.
42834    for ac_exec_ext in '' $ac_executable_extensions; do
42835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42836    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42838    break 2
42839  fi
42840done
42841  done
42842IFS=$as_save_IFS
42843
42844  ;;
42845esac
42846fi
42847OBJCOPY=$ac_cv_path_OBJCOPY
42848if test -n "$OBJCOPY"; then
42849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42850$as_echo "$OBJCOPY" >&6; }
42851else
42852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42853$as_echo "no" >&6; }
42854fi
42855
42856
42857          if test "x$OBJCOPY" = x; then
42858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42859          fi
42860        else
42861          # Otherwise we believe it is a complete path. Use it as it is.
42862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42863$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42865$as_echo_n "checking for OBJCOPY... " >&6; }
42866          if test ! -x "$tool_specified"; then
42867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42868$as_echo "not found" >&6; }
42869            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42870          fi
42871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42872$as_echo "$tool_specified" >&6; }
42873        fi
42874      fi
42875    fi
42876
42877  fi
42878
42879
42880    # Only call fixup if objcopy was found.
42881    if test -n "$OBJCOPY"; then
42882
42883  # Only process if variable expands to non-empty
42884
42885  if test "x$OBJCOPY" != x; then
42886    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42887
42888  # First separate the path from the arguments. This will split at the first
42889  # space.
42890  complete="$OBJCOPY"
42891  path="${complete%% *}"
42892  tmp="$complete EOL"
42893  arguments="${tmp#* }"
42894
42895  # Input might be given as Windows format, start by converting to
42896  # unix format.
42897  new_path=`$CYGPATH -u "$path"`
42898
42899  # Now try to locate executable using which
42900  new_path=`$WHICH "$new_path" 2> /dev/null`
42901  # bat and cmd files are not always considered executable in cygwin causing which
42902  # to not find them
42903  if test "x$new_path" = x \
42904      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42905      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42906    new_path=`$CYGPATH -u "$path"`
42907  fi
42908  if test "x$new_path" = x; then
42909    # Oops. Which didn't find the executable.
42910    # The splitting of arguments from the executable at a space might have been incorrect,
42911    # since paths with space are more likely in Windows. Give it another try with the whole
42912    # argument.
42913    path="$complete"
42914    arguments="EOL"
42915    new_path=`$CYGPATH -u "$path"`
42916    new_path=`$WHICH "$new_path" 2> /dev/null`
42917    # bat and cmd files are not always considered executable in cygwin causing which
42918    # to not find them
42919    if test "x$new_path" = x \
42920        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42921        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42922      new_path=`$CYGPATH -u "$path"`
42923    fi
42924    if test "x$new_path" = x; then
42925      # It's still not found. Now this is an unrecoverable error.
42926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42927$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42928      has_space=`$ECHO "$complete" | $GREP " "`
42929      if test "x$has_space" != x; then
42930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42932      fi
42933      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42934    fi
42935  fi
42936
42937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42940  # "foo.exe" is OK but "foo" is an error.
42941  #
42942  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42943  # It is also a way to make sure we got the proper file name for the real test later on.
42944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42945  if test "x$test_shortpath" = x; then
42946    # Short path failed, file does not exist as specified.
42947    # Try adding .exe or .cmd
42948    if test -f "${new_path}.exe"; then
42949      input_to_shortpath="${new_path}.exe"
42950    elif test -f "${new_path}.cmd"; then
42951      input_to_shortpath="${new_path}.cmd"
42952    else
42953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42954$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42955      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42956$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42957      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42958    fi
42959  else
42960    input_to_shortpath="$new_path"
42961  fi
42962
42963  # Call helper function which possibly converts this using DOS-style short mode.
42964  # If so, the updated path is stored in $new_path.
42965  new_path="$input_to_shortpath"
42966
42967  input_path="$input_to_shortpath"
42968  # Check if we need to convert this using DOS-style short mode. If the path
42969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42970  # take no chances and rewrite it.
42971  # Note: m4 eats our [], so we need to use [ and ] instead.
42972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42973  if test "x$has_forbidden_chars" != x; then
42974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42978      # Going to short mode and back again did indeed matter. Since short mode is
42979      # case insensitive, let's make it lowercase to improve readability.
42980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42981      # Now convert it back to Unix-style (cygpath)
42982      input_path=`$CYGPATH -u "$shortmode_path"`
42983      new_path="$input_path"
42984    fi
42985  fi
42986
42987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42988  if test "x$test_cygdrive_prefix" = x; then
42989    # As a simple fix, exclude /usr/bin since it's not a real path.
42990    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42992      # a path prefixed by /cygdrive for fixpath to work.
42993      new_path="$CYGWIN_ROOT_PATH$input_path"
42994    fi
42995  fi
42996
42997  # remove trailing .exe if any
42998  new_path="${new_path/%.exe/}"
42999
43000    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43001
43002  # First separate the path from the arguments. This will split at the first
43003  # space.
43004  complete="$OBJCOPY"
43005  path="${complete%% *}"
43006  tmp="$complete EOL"
43007  arguments="${tmp#* }"
43008
43009  # Input might be given as Windows format, start by converting to
43010  # unix format.
43011  new_path="$path"
43012
43013  windows_path="$new_path"
43014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43015    unix_path=`$CYGPATH -u "$windows_path"`
43016    new_path="$unix_path"
43017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43019    new_path="$unix_path"
43020  fi
43021
43022
43023  # Now try to locate executable using which
43024  new_path=`$WHICH "$new_path" 2> /dev/null`
43025
43026  if test "x$new_path" = x; then
43027    # Oops. Which didn't find the executable.
43028    # The splitting of arguments from the executable at a space might have been incorrect,
43029    # since paths with space are more likely in Windows. Give it another try with the whole
43030    # argument.
43031    path="$complete"
43032    arguments="EOL"
43033    new_path="$path"
43034
43035  windows_path="$new_path"
43036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43037    unix_path=`$CYGPATH -u "$windows_path"`
43038    new_path="$unix_path"
43039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43041    new_path="$unix_path"
43042  fi
43043
43044
43045    new_path=`$WHICH "$new_path" 2> /dev/null`
43046    # bat and cmd files are not always considered executable in MSYS causing which
43047    # to not find them
43048    if test "x$new_path" = x \
43049        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43050        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43051      new_path="$path"
43052
43053  windows_path="$new_path"
43054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43055    unix_path=`$CYGPATH -u "$windows_path"`
43056    new_path="$unix_path"
43057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43059    new_path="$unix_path"
43060  fi
43061
43062    fi
43063
43064    if test "x$new_path" = x; then
43065      # It's still not found. Now this is an unrecoverable error.
43066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43067$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43068      has_space=`$ECHO "$complete" | $GREP " "`
43069      if test "x$has_space" != x; then
43070        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43071$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43072      fi
43073      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43074    fi
43075  fi
43076
43077  # Now new_path has a complete unix path to the binary
43078  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43079    # Keep paths in /bin as-is, but remove trailing .exe if any
43080    new_path="${new_path/%.exe/}"
43081    # Do not save /bin paths to all_fixpath_prefixes!
43082  else
43083    # Not in mixed or Windows style, start by that.
43084    new_path=`cmd //c echo $new_path`
43085
43086  input_path="$new_path"
43087  # Check if we need to convert this using DOS-style short mode. If the path
43088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43089  # take no chances and rewrite it.
43090  # Note: m4 eats our [], so we need to use [ and ] instead.
43091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43092  if test "x$has_forbidden_chars" != x; then
43093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43095  fi
43096
43097    # Output is in $new_path
43098
43099  windows_path="$new_path"
43100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43101    unix_path=`$CYGPATH -u "$windows_path"`
43102    new_path="$unix_path"
43103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43105    new_path="$unix_path"
43106  fi
43107
43108    # remove trailing .exe if any
43109    new_path="${new_path/%.exe/}"
43110
43111    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43112    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43113  fi
43114
43115    else
43116      # We're on a unix platform. Hooray! :)
43117      # First separate the path from the arguments. This will split at the first
43118      # space.
43119      complete="$OBJCOPY"
43120      path="${complete%% *}"
43121      tmp="$complete EOL"
43122      arguments="${tmp#* }"
43123
43124      # Cannot rely on the command "which" here since it doesn't always work.
43125      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43126      if test -z "$is_absolute_path"; then
43127        # Path to executable is not absolute. Find it.
43128        IFS_save="$IFS"
43129        IFS=:
43130        for p in $PATH; do
43131          if test -f "$p/$path" && test -x "$p/$path"; then
43132            new_path="$p/$path"
43133            break
43134          fi
43135        done
43136        IFS="$IFS_save"
43137      else
43138        # This is an absolute path, we can use it without further modifications.
43139        new_path="$path"
43140      fi
43141
43142      if test "x$new_path" = x; then
43143        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43144$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43145        has_space=`$ECHO "$complete" | $GREP " "`
43146        if test "x$has_space" != x; then
43147          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43148$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43149        fi
43150        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43151      fi
43152    fi
43153
43154    # Now join together the path and the arguments once again
43155    if test "x$arguments" != xEOL; then
43156      new_complete="$new_path ${arguments% *}"
43157    else
43158      new_complete="$new_path"
43159    fi
43160
43161    if test "x$complete" != "x$new_complete"; then
43162      OBJCOPY="$new_complete"
43163      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43164$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43165    fi
43166  fi
43167
43168      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43169        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43170        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43171        # - version number is last blank separate word on first line
43172        # - version number formats that have been seen:
43173        #   - <major>.<minor>
43174        #   - <major>.<minor>.<micro>
43175        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43176        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43177         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43178              -e 's/.* //' \
43179              -e '/^[01]\./b bad' \
43180              -e '/^2\./{' \
43181              -e '  s/^2\.//' \
43182              -e '  /^[0-9]$/b bad' \
43183              -e '  /^[0-9]\./b bad' \
43184              -e '  /^1[0-9]$/b bad' \
43185              -e '  /^1[0-9]\./b bad' \
43186              -e '  /^20\./b bad' \
43187              -e '  /^21\.0$/b bad' \
43188              -e '  /^21\.0\./b bad' \
43189              -e '}' \
43190              -e ':good' \
43191              -e 's/.*/VALID_VERSION/p' \
43192              -e 'q' \
43193              -e ':bad' \
43194              -e 's/.*/BAD_VERSION/p' \
43195              -e 'q'`
43196        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43197          OBJCOPY=
43198          { $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
43199$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43200          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43201$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43202          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43203$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43204          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43205$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43206          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43207$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43208        fi
43209      fi
43210    fi
43211  fi
43212
43213
43214
43215  # Publish this variable in the help.
43216
43217
43218  if [ -z "${OBJDUMP+x}" ]; then
43219    # The variable is not set by user, try to locate tool using the code snippet
43220    if test -n "$ac_tool_prefix"; then
43221  for ac_prog in gobjdump objdump
43222  do
43223    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43224set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43226$as_echo_n "checking for $ac_word... " >&6; }
43227if ${ac_cv_prog_OBJDUMP+:} false; then :
43228  $as_echo_n "(cached) " >&6
43229else
43230  if test -n "$OBJDUMP"; then
43231  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43232else
43233as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43234for as_dir in $PATH
43235do
43236  IFS=$as_save_IFS
43237  test -z "$as_dir" && as_dir=.
43238    for ac_exec_ext in '' $ac_executable_extensions; do
43239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43240    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43242    break 2
43243  fi
43244done
43245  done
43246IFS=$as_save_IFS
43247
43248fi
43249fi
43250OBJDUMP=$ac_cv_prog_OBJDUMP
43251if test -n "$OBJDUMP"; then
43252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43253$as_echo "$OBJDUMP" >&6; }
43254else
43255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43256$as_echo "no" >&6; }
43257fi
43258
43259
43260    test -n "$OBJDUMP" && break
43261  done
43262fi
43263if test -z "$OBJDUMP"; then
43264  ac_ct_OBJDUMP=$OBJDUMP
43265  for ac_prog in gobjdump objdump
43266do
43267  # Extract the first word of "$ac_prog", so it can be a program name with args.
43268set dummy $ac_prog; ac_word=$2
43269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43270$as_echo_n "checking for $ac_word... " >&6; }
43271if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43272  $as_echo_n "(cached) " >&6
43273else
43274  if test -n "$ac_ct_OBJDUMP"; then
43275  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43276else
43277as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43278for as_dir in $PATH
43279do
43280  IFS=$as_save_IFS
43281  test -z "$as_dir" && as_dir=.
43282    for ac_exec_ext in '' $ac_executable_extensions; do
43283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43284    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43286    break 2
43287  fi
43288done
43289  done
43290IFS=$as_save_IFS
43291
43292fi
43293fi
43294ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43295if test -n "$ac_ct_OBJDUMP"; then
43296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43297$as_echo "$ac_ct_OBJDUMP" >&6; }
43298else
43299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43300$as_echo "no" >&6; }
43301fi
43302
43303
43304  test -n "$ac_ct_OBJDUMP" && break
43305done
43306
43307  if test "x$ac_ct_OBJDUMP" = x; then
43308    OBJDUMP=""
43309  else
43310    case $cross_compiling:$ac_tool_warned in
43311yes:)
43312{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43313$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43314ac_tool_warned=yes ;;
43315esac
43316    OBJDUMP=$ac_ct_OBJDUMP
43317  fi
43318fi
43319
43320  else
43321    # The variable is set, but is it from the command line or the environment?
43322
43323    # Try to remove the string !OBJDUMP! from our list.
43324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43326      # If it failed, the variable was not from the command line. Ignore it,
43327      # but warn the user (except for BASH, which is always set by the calling BASH).
43328      if test "xOBJDUMP" != xBASH; then
43329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43330$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43331      fi
43332      # Try to locate tool using the code snippet
43333      if test -n "$ac_tool_prefix"; then
43334  for ac_prog in gobjdump objdump
43335  do
43336    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43337set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43339$as_echo_n "checking for $ac_word... " >&6; }
43340if ${ac_cv_prog_OBJDUMP+:} false; then :
43341  $as_echo_n "(cached) " >&6
43342else
43343  if test -n "$OBJDUMP"; then
43344  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43345else
43346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43347for as_dir in $PATH
43348do
43349  IFS=$as_save_IFS
43350  test -z "$as_dir" && as_dir=.
43351    for ac_exec_ext in '' $ac_executable_extensions; do
43352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43353    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43355    break 2
43356  fi
43357done
43358  done
43359IFS=$as_save_IFS
43360
43361fi
43362fi
43363OBJDUMP=$ac_cv_prog_OBJDUMP
43364if test -n "$OBJDUMP"; then
43365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43366$as_echo "$OBJDUMP" >&6; }
43367else
43368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43369$as_echo "no" >&6; }
43370fi
43371
43372
43373    test -n "$OBJDUMP" && break
43374  done
43375fi
43376if test -z "$OBJDUMP"; then
43377  ac_ct_OBJDUMP=$OBJDUMP
43378  for ac_prog in gobjdump objdump
43379do
43380  # Extract the first word of "$ac_prog", so it can be a program name with args.
43381set dummy $ac_prog; ac_word=$2
43382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43383$as_echo_n "checking for $ac_word... " >&6; }
43384if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43385  $as_echo_n "(cached) " >&6
43386else
43387  if test -n "$ac_ct_OBJDUMP"; then
43388  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43389else
43390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43391for as_dir in $PATH
43392do
43393  IFS=$as_save_IFS
43394  test -z "$as_dir" && as_dir=.
43395    for ac_exec_ext in '' $ac_executable_extensions; do
43396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43397    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43399    break 2
43400  fi
43401done
43402  done
43403IFS=$as_save_IFS
43404
43405fi
43406fi
43407ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43408if test -n "$ac_ct_OBJDUMP"; then
43409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43410$as_echo "$ac_ct_OBJDUMP" >&6; }
43411else
43412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43413$as_echo "no" >&6; }
43414fi
43415
43416
43417  test -n "$ac_ct_OBJDUMP" && break
43418done
43419
43420  if test "x$ac_ct_OBJDUMP" = x; then
43421    OBJDUMP=""
43422  else
43423    case $cross_compiling:$ac_tool_warned in
43424yes:)
43425{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43426$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43427ac_tool_warned=yes ;;
43428esac
43429    OBJDUMP=$ac_ct_OBJDUMP
43430  fi
43431fi
43432
43433    else
43434      # If it succeeded, then it was overridden by the user. We will use it
43435      # for the tool.
43436
43437      # First remove it from the list of overridden variables, so we can test
43438      # for unknown variables in the end.
43439      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43440
43441      # Check if we try to supply an empty value
43442      if test "x$OBJDUMP" = x; then
43443        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43444$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43445        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43446$as_echo_n "checking for OBJDUMP... " >&6; }
43447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43448$as_echo "disabled" >&6; }
43449      else
43450        # Check if the provided tool contains a complete path.
43451        tool_specified="$OBJDUMP"
43452        tool_basename="${tool_specified##*/}"
43453        if test "x$tool_basename" = "x$tool_specified"; then
43454          # A command without a complete path is provided, search $PATH.
43455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43456$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43457          # Extract the first word of "$tool_basename", so it can be a program name with args.
43458set dummy $tool_basename; ac_word=$2
43459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43460$as_echo_n "checking for $ac_word... " >&6; }
43461if ${ac_cv_path_OBJDUMP+:} false; then :
43462  $as_echo_n "(cached) " >&6
43463else
43464  case $OBJDUMP in
43465  [\\/]* | ?:[\\/]*)
43466  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43467  ;;
43468  *)
43469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43470for as_dir in $PATH
43471do
43472  IFS=$as_save_IFS
43473  test -z "$as_dir" && as_dir=.
43474    for ac_exec_ext in '' $ac_executable_extensions; do
43475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43476    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43478    break 2
43479  fi
43480done
43481  done
43482IFS=$as_save_IFS
43483
43484  ;;
43485esac
43486fi
43487OBJDUMP=$ac_cv_path_OBJDUMP
43488if test -n "$OBJDUMP"; then
43489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43490$as_echo "$OBJDUMP" >&6; }
43491else
43492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43493$as_echo "no" >&6; }
43494fi
43495
43496
43497          if test "x$OBJDUMP" = x; then
43498            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43499          fi
43500        else
43501          # Otherwise we believe it is a complete path. Use it as it is.
43502          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43503$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43504          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43505$as_echo_n "checking for OBJDUMP... " >&6; }
43506          if test ! -x "$tool_specified"; then
43507            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43508$as_echo "not found" >&6; }
43509            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43510          fi
43511          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43512$as_echo "$tool_specified" >&6; }
43513        fi
43514      fi
43515    fi
43516
43517  fi
43518
43519
43520  if test "x$OBJDUMP" != x; then
43521    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43522    # bails if argument is missing.
43523
43524  # Only process if variable expands to non-empty
43525
43526  if test "x$OBJDUMP" != x; then
43527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43528
43529  # First separate the path from the arguments. This will split at the first
43530  # space.
43531  complete="$OBJDUMP"
43532  path="${complete%% *}"
43533  tmp="$complete EOL"
43534  arguments="${tmp#* }"
43535
43536  # Input might be given as Windows format, start by converting to
43537  # unix format.
43538  new_path=`$CYGPATH -u "$path"`
43539
43540  # Now try to locate executable using which
43541  new_path=`$WHICH "$new_path" 2> /dev/null`
43542  # bat and cmd files are not always considered executable in cygwin causing which
43543  # to not find them
43544  if test "x$new_path" = x \
43545      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43546      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43547    new_path=`$CYGPATH -u "$path"`
43548  fi
43549  if test "x$new_path" = x; then
43550    # Oops. Which didn't find the executable.
43551    # The splitting of arguments from the executable at a space might have been incorrect,
43552    # since paths with space are more likely in Windows. Give it another try with the whole
43553    # argument.
43554    path="$complete"
43555    arguments="EOL"
43556    new_path=`$CYGPATH -u "$path"`
43557    new_path=`$WHICH "$new_path" 2> /dev/null`
43558    # bat and cmd files are not always considered executable in cygwin causing which
43559    # to not find them
43560    if test "x$new_path" = x \
43561        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43562        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43563      new_path=`$CYGPATH -u "$path"`
43564    fi
43565    if test "x$new_path" = x; then
43566      # It's still not found. Now this is an unrecoverable error.
43567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43568$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43569      has_space=`$ECHO "$complete" | $GREP " "`
43570      if test "x$has_space" != x; then
43571        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43572$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43573      fi
43574      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43575    fi
43576  fi
43577
43578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43581  # "foo.exe" is OK but "foo" is an error.
43582  #
43583  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43584  # It is also a way to make sure we got the proper file name for the real test later on.
43585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43586  if test "x$test_shortpath" = x; then
43587    # Short path failed, file does not exist as specified.
43588    # Try adding .exe or .cmd
43589    if test -f "${new_path}.exe"; then
43590      input_to_shortpath="${new_path}.exe"
43591    elif test -f "${new_path}.cmd"; then
43592      input_to_shortpath="${new_path}.cmd"
43593    else
43594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43595$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43596      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43597$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43598      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43599    fi
43600  else
43601    input_to_shortpath="$new_path"
43602  fi
43603
43604  # Call helper function which possibly converts this using DOS-style short mode.
43605  # If so, the updated path is stored in $new_path.
43606  new_path="$input_to_shortpath"
43607
43608  input_path="$input_to_shortpath"
43609  # Check if we need to convert this using DOS-style short mode. If the path
43610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43611  # take no chances and rewrite it.
43612  # Note: m4 eats our [], so we need to use [ and ] instead.
43613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43614  if test "x$has_forbidden_chars" != x; then
43615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43619      # Going to short mode and back again did indeed matter. Since short mode is
43620      # case insensitive, let's make it lowercase to improve readability.
43621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43622      # Now convert it back to Unix-style (cygpath)
43623      input_path=`$CYGPATH -u "$shortmode_path"`
43624      new_path="$input_path"
43625    fi
43626  fi
43627
43628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43629  if test "x$test_cygdrive_prefix" = x; then
43630    # As a simple fix, exclude /usr/bin since it's not a real path.
43631    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43633      # a path prefixed by /cygdrive for fixpath to work.
43634      new_path="$CYGWIN_ROOT_PATH$input_path"
43635    fi
43636  fi
43637
43638  # remove trailing .exe if any
43639  new_path="${new_path/%.exe/}"
43640
43641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43642
43643  # First separate the path from the arguments. This will split at the first
43644  # space.
43645  complete="$OBJDUMP"
43646  path="${complete%% *}"
43647  tmp="$complete EOL"
43648  arguments="${tmp#* }"
43649
43650  # Input might be given as Windows format, start by converting to
43651  # unix format.
43652  new_path="$path"
43653
43654  windows_path="$new_path"
43655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43656    unix_path=`$CYGPATH -u "$windows_path"`
43657    new_path="$unix_path"
43658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43660    new_path="$unix_path"
43661  fi
43662
43663
43664  # Now try to locate executable using which
43665  new_path=`$WHICH "$new_path" 2> /dev/null`
43666
43667  if test "x$new_path" = x; then
43668    # Oops. Which didn't find the executable.
43669    # The splitting of arguments from the executable at a space might have been incorrect,
43670    # since paths with space are more likely in Windows. Give it another try with the whole
43671    # argument.
43672    path="$complete"
43673    arguments="EOL"
43674    new_path="$path"
43675
43676  windows_path="$new_path"
43677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43678    unix_path=`$CYGPATH -u "$windows_path"`
43679    new_path="$unix_path"
43680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43682    new_path="$unix_path"
43683  fi
43684
43685
43686    new_path=`$WHICH "$new_path" 2> /dev/null`
43687    # bat and cmd files are not always considered executable in MSYS causing which
43688    # to not find them
43689    if test "x$new_path" = x \
43690        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43691        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43692      new_path="$path"
43693
43694  windows_path="$new_path"
43695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43696    unix_path=`$CYGPATH -u "$windows_path"`
43697    new_path="$unix_path"
43698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43700    new_path="$unix_path"
43701  fi
43702
43703    fi
43704
43705    if test "x$new_path" = x; then
43706      # It's still not found. Now this is an unrecoverable error.
43707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43708$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43709      has_space=`$ECHO "$complete" | $GREP " "`
43710      if test "x$has_space" != x; then
43711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43713      fi
43714      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43715    fi
43716  fi
43717
43718  # Now new_path has a complete unix path to the binary
43719  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43720    # Keep paths in /bin as-is, but remove trailing .exe if any
43721    new_path="${new_path/%.exe/}"
43722    # Do not save /bin paths to all_fixpath_prefixes!
43723  else
43724    # Not in mixed or Windows style, start by that.
43725    new_path=`cmd //c echo $new_path`
43726
43727  input_path="$new_path"
43728  # Check if we need to convert this using DOS-style short mode. If the path
43729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43730  # take no chances and rewrite it.
43731  # Note: m4 eats our [], so we need to use [ and ] instead.
43732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43733  if test "x$has_forbidden_chars" != x; then
43734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43736  fi
43737
43738    # Output is in $new_path
43739
43740  windows_path="$new_path"
43741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43742    unix_path=`$CYGPATH -u "$windows_path"`
43743    new_path="$unix_path"
43744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43746    new_path="$unix_path"
43747  fi
43748
43749    # remove trailing .exe if any
43750    new_path="${new_path/%.exe/}"
43751
43752    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43753    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43754  fi
43755
43756    else
43757      # We're on a unix platform. Hooray! :)
43758      # First separate the path from the arguments. This will split at the first
43759      # space.
43760      complete="$OBJDUMP"
43761      path="${complete%% *}"
43762      tmp="$complete EOL"
43763      arguments="${tmp#* }"
43764
43765      # Cannot rely on the command "which" here since it doesn't always work.
43766      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43767      if test -z "$is_absolute_path"; then
43768        # Path to executable is not absolute. Find it.
43769        IFS_save="$IFS"
43770        IFS=:
43771        for p in $PATH; do
43772          if test -f "$p/$path" && test -x "$p/$path"; then
43773            new_path="$p/$path"
43774            break
43775          fi
43776        done
43777        IFS="$IFS_save"
43778      else
43779        # This is an absolute path, we can use it without further modifications.
43780        new_path="$path"
43781      fi
43782
43783      if test "x$new_path" = x; then
43784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43785$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43786        has_space=`$ECHO "$complete" | $GREP " "`
43787        if test "x$has_space" != x; then
43788          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43789$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43790        fi
43791        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43792      fi
43793    fi
43794
43795    # Now join together the path and the arguments once again
43796    if test "x$arguments" != xEOL; then
43797      new_complete="$new_path ${arguments% *}"
43798    else
43799      new_complete="$new_path"
43800    fi
43801
43802    if test "x$complete" != "x$new_complete"; then
43803      OBJDUMP="$new_complete"
43804      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43805$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43806    fi
43807  fi
43808
43809  fi
43810
43811
43812  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43813  # to remain in place. Otherwise the compiler will not work in some siutations
43814  # in later configure checks.
43815  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43816    PATH="$OLD_PATH"
43817  fi
43818
43819  # Restore the flags to the user specified values.
43820  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43821  CFLAGS="$ORG_CFLAGS"
43822  CXXFLAGS="$ORG_CXXFLAGS"
43823
43824
43825# Finally do some processing after the detection phase
43826
43827  if test "x$COMPILE_TYPE" = "xcross"; then
43828    # Now we need to find a C/C++ compiler that can build executables for the
43829    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43830    # used once. Also, we need to do this without adding a tools dir to the
43831    # path, otherwise we might pick up cross-compilers which don't use standard
43832    # naming.
43833
43834    OLDPATH="$PATH"
43835
43836
43837# Check whether --with-build-devkit was given.
43838if test "${with_build_devkit+set}" = set; then :
43839  withval=$with_build_devkit;
43840fi
43841
43842    if test "x$with_build_devkit" = "xyes"; then
43843      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43844    elif test -n "$with_build_devkit"; then
43845      if test ! -d "$with_build_devkit"; then
43846        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43847      else
43848
43849  # Only process if variable expands to non-empty
43850
43851  if test "x$with_build_devkit" != x; then
43852    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43853
43854  # Input might be given as Windows format, start by converting to
43855  # unix format.
43856  path="$with_build_devkit"
43857  new_path=`$CYGPATH -u "$path"`
43858
43859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43862  # "foo.exe" is OK but "foo" is an error.
43863  #
43864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43865  # It is also a way to make sure we got the proper file name for the real test later on.
43866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43867  if test "x$test_shortpath" = x; then
43868    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43869$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43870    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43871  fi
43872
43873  # Call helper function which possibly converts this using DOS-style short mode.
43874  # If so, the updated path is stored in $new_path.
43875
43876  input_path="$new_path"
43877  # Check if we need to convert this using DOS-style short mode. If the path
43878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43879  # take no chances and rewrite it.
43880  # Note: m4 eats our [], so we need to use [ and ] instead.
43881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43882  if test "x$has_forbidden_chars" != x; then
43883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43887      # Going to short mode and back again did indeed matter. Since short mode is
43888      # case insensitive, let's make it lowercase to improve readability.
43889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43890      # Now convert it back to Unix-style (cygpath)
43891      input_path=`$CYGPATH -u "$shortmode_path"`
43892      new_path="$input_path"
43893    fi
43894  fi
43895
43896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43897  if test "x$test_cygdrive_prefix" = x; then
43898    # As a simple fix, exclude /usr/bin since it's not a real path.
43899    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43901      # a path prefixed by /cygdrive for fixpath to work.
43902      new_path="$CYGWIN_ROOT_PATH$input_path"
43903    fi
43904  fi
43905
43906
43907  if test "x$path" != "x$new_path"; then
43908    with_build_devkit="$new_path"
43909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43910$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43911  fi
43912
43913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43914
43915  path="$with_build_devkit"
43916  has_colon=`$ECHO $path | $GREP ^.:`
43917  new_path="$path"
43918  if test "x$has_colon" = x; then
43919    # Not in mixed or Windows style, start by that.
43920    new_path=`cmd //c echo $path`
43921  fi
43922
43923
43924  input_path="$new_path"
43925  # Check if we need to convert this using DOS-style short mode. If the path
43926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43927  # take no chances and rewrite it.
43928  # Note: m4 eats our [], so we need to use [ and ] instead.
43929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43930  if test "x$has_forbidden_chars" != x; then
43931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43933  fi
43934
43935
43936  windows_path="$new_path"
43937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43938    unix_path=`$CYGPATH -u "$windows_path"`
43939    new_path="$unix_path"
43940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43942    new_path="$unix_path"
43943  fi
43944
43945  if test "x$path" != "x$new_path"; then
43946    with_build_devkit="$new_path"
43947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43948$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43949  fi
43950
43951  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43952  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43953
43954    else
43955      # We're on a unix platform. Hooray! :)
43956      path="$with_build_devkit"
43957      has_space=`$ECHO "$path" | $GREP " "`
43958      if test "x$has_space" != x; then
43959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43960$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43961        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43962      fi
43963
43964      # Use eval to expand a potential ~
43965      eval path="$path"
43966      if test ! -f "$path" && test ! -d "$path"; then
43967        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43968      fi
43969
43970      if test -d "$path"; then
43971        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43972      else
43973        dir="`$DIRNAME "$path"`"
43974        base="`$BASENAME "$path"`"
43975        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43976      fi
43977    fi
43978  fi
43979
43980        BUILD_DEVKIT_ROOT="$with_build_devkit"
43981        # Check for a meta data info file in the root of the devkit
43982        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43983          # Process devkit.info so that existing devkit variables are not
43984          # modified by this
43985          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43986              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43987              -e "s/\$host/\$build/g" \
43988              $BUILD_DEVKIT_ROOT/devkit.info \
43989              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43990          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43991          # This potentially sets the following:
43992          # A descriptive name of the devkit
43993
43994  if test "x$BUILD_DEVKIT_NAME" = x; then
43995    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43996  fi
43997
43998          # Corresponds to --with-extra-path
43999
44000  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44001    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44002  fi
44003
44004          # Corresponds to --with-toolchain-path
44005
44006  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44007    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44008  fi
44009
44010          # Corresponds to --with-sysroot
44011
44012  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44013    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44014  fi
44015
44016          # Skip the Window specific parts
44017        fi
44018
44019        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44020$as_echo_n "checking for build platform devkit... " >&6; }
44021        if test "x$BUILD_DEVKIT_NAME" != x; then
44022          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44023$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44024        else
44025          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44026$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44027        fi
44028
44029        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44030
44031  if test "x$BUILD_SYSROOT" != "x"; then
44032    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44033      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44034        # Solaris Studio does not have a concept of sysroot. Instead we must
44035        # make sure the default include and lib dirs are appended to each
44036        # compile and link command line. Must also add -I-xbuiltin to enable
44037        # inlining of system functions and intrinsics.
44038        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44039        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44040            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44041      fi
44042    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44043      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44044      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44045    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44046      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44047      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44048    fi
44049    # The global CFLAGS and LDFLAGS variables need these for configure to function
44050    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44051    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44052    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44053    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44054  fi
44055
44056  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44057    # We also need -iframework<path>/System/Library/Frameworks
44058    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44059    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44060    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44061    # set this here so it doesn't have to be peppered throughout the forest
44062    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44063    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44064  fi
44065
44066
44067
44068
44069
44070         # Fallback default of just /bin if DEVKIT_PATH is not defined
44071        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44072          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44073        fi
44074        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44075      fi
44076    fi
44077
44078    # FIXME: we should list the discovered compilers as an exclude pattern!
44079    # If we do that, we can do this detection before POST_DETECTION, and still
44080    # find the build compilers in the tools dir, if needed.
44081
44082
44083
44084  # Publish this variable in the help.
44085
44086
44087  if [ -z "${BUILD_CC+x}" ]; then
44088    # The variable is not set by user, try to locate tool using the code snippet
44089    for ac_prog in cl cc gcc
44090do
44091  # Extract the first word of "$ac_prog", so it can be a program name with args.
44092set dummy $ac_prog; ac_word=$2
44093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44094$as_echo_n "checking for $ac_word... " >&6; }
44095if ${ac_cv_path_BUILD_CC+:} false; then :
44096  $as_echo_n "(cached) " >&6
44097else
44098  case $BUILD_CC in
44099  [\\/]* | ?:[\\/]*)
44100  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44101  ;;
44102  *)
44103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44104for as_dir in $PATH
44105do
44106  IFS=$as_save_IFS
44107  test -z "$as_dir" && as_dir=.
44108    for ac_exec_ext in '' $ac_executable_extensions; do
44109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44110    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44112    break 2
44113  fi
44114done
44115  done
44116IFS=$as_save_IFS
44117
44118  ;;
44119esac
44120fi
44121BUILD_CC=$ac_cv_path_BUILD_CC
44122if test -n "$BUILD_CC"; then
44123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44124$as_echo "$BUILD_CC" >&6; }
44125else
44126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44127$as_echo "no" >&6; }
44128fi
44129
44130
44131  test -n "$BUILD_CC" && break
44132done
44133
44134  else
44135    # The variable is set, but is it from the command line or the environment?
44136
44137    # Try to remove the string !BUILD_CC! from our list.
44138    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44139    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44140      # If it failed, the variable was not from the command line. Ignore it,
44141      # but warn the user (except for BASH, which is always set by the calling BASH).
44142      if test "xBUILD_CC" != xBASH; then
44143        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44144$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44145      fi
44146      # Try to locate tool using the code snippet
44147      for ac_prog in cl cc gcc
44148do
44149  # Extract the first word of "$ac_prog", so it can be a program name with args.
44150set dummy $ac_prog; ac_word=$2
44151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44152$as_echo_n "checking for $ac_word... " >&6; }
44153if ${ac_cv_path_BUILD_CC+:} false; then :
44154  $as_echo_n "(cached) " >&6
44155else
44156  case $BUILD_CC in
44157  [\\/]* | ?:[\\/]*)
44158  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44159  ;;
44160  *)
44161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44162for as_dir in $PATH
44163do
44164  IFS=$as_save_IFS
44165  test -z "$as_dir" && as_dir=.
44166    for ac_exec_ext in '' $ac_executable_extensions; do
44167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44168    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44170    break 2
44171  fi
44172done
44173  done
44174IFS=$as_save_IFS
44175
44176  ;;
44177esac
44178fi
44179BUILD_CC=$ac_cv_path_BUILD_CC
44180if test -n "$BUILD_CC"; then
44181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44182$as_echo "$BUILD_CC" >&6; }
44183else
44184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44185$as_echo "no" >&6; }
44186fi
44187
44188
44189  test -n "$BUILD_CC" && break
44190done
44191
44192    else
44193      # If it succeeded, then it was overridden by the user. We will use it
44194      # for the tool.
44195
44196      # First remove it from the list of overridden variables, so we can test
44197      # for unknown variables in the end.
44198      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44199
44200      # Check if we try to supply an empty value
44201      if test "x$BUILD_CC" = x; then
44202        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44203$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44204        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44205$as_echo_n "checking for BUILD_CC... " >&6; }
44206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44207$as_echo "disabled" >&6; }
44208      else
44209        # Check if the provided tool contains a complete path.
44210        tool_specified="$BUILD_CC"
44211        tool_basename="${tool_specified##*/}"
44212        if test "x$tool_basename" = "x$tool_specified"; then
44213          # A command without a complete path is provided, search $PATH.
44214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44215$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44216          # Extract the first word of "$tool_basename", so it can be a program name with args.
44217set dummy $tool_basename; ac_word=$2
44218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44219$as_echo_n "checking for $ac_word... " >&6; }
44220if ${ac_cv_path_BUILD_CC+:} false; then :
44221  $as_echo_n "(cached) " >&6
44222else
44223  case $BUILD_CC in
44224  [\\/]* | ?:[\\/]*)
44225  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44226  ;;
44227  *)
44228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44229for as_dir in $PATH
44230do
44231  IFS=$as_save_IFS
44232  test -z "$as_dir" && as_dir=.
44233    for ac_exec_ext in '' $ac_executable_extensions; do
44234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44235    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44237    break 2
44238  fi
44239done
44240  done
44241IFS=$as_save_IFS
44242
44243  ;;
44244esac
44245fi
44246BUILD_CC=$ac_cv_path_BUILD_CC
44247if test -n "$BUILD_CC"; then
44248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44249$as_echo "$BUILD_CC" >&6; }
44250else
44251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44252$as_echo "no" >&6; }
44253fi
44254
44255
44256          if test "x$BUILD_CC" = x; then
44257            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44258          fi
44259        else
44260          # Otherwise we believe it is a complete path. Use it as it is.
44261          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44262$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44263          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44264$as_echo_n "checking for BUILD_CC... " >&6; }
44265          if test ! -x "$tool_specified"; then
44266            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44267$as_echo "not found" >&6; }
44268            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44269          fi
44270          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44271$as_echo "$tool_specified" >&6; }
44272        fi
44273      fi
44274    fi
44275
44276  fi
44277
44278
44279
44280  if test "x$BUILD_CC" = x; then
44281    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44282  fi
44283
44284
44285
44286  # Only process if variable expands to non-empty
44287
44288  if test "x$BUILD_CC" != x; then
44289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44290
44291  # First separate the path from the arguments. This will split at the first
44292  # space.
44293  complete="$BUILD_CC"
44294  path="${complete%% *}"
44295  tmp="$complete EOL"
44296  arguments="${tmp#* }"
44297
44298  # Input might be given as Windows format, start by converting to
44299  # unix format.
44300  new_path=`$CYGPATH -u "$path"`
44301
44302  # Now try to locate executable using which
44303  new_path=`$WHICH "$new_path" 2> /dev/null`
44304  # bat and cmd files are not always considered executable in cygwin causing which
44305  # to not find them
44306  if test "x$new_path" = x \
44307      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44308      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44309    new_path=`$CYGPATH -u "$path"`
44310  fi
44311  if test "x$new_path" = x; then
44312    # Oops. Which didn't find the executable.
44313    # The splitting of arguments from the executable at a space might have been incorrect,
44314    # since paths with space are more likely in Windows. Give it another try with the whole
44315    # argument.
44316    path="$complete"
44317    arguments="EOL"
44318    new_path=`$CYGPATH -u "$path"`
44319    new_path=`$WHICH "$new_path" 2> /dev/null`
44320    # bat and cmd files are not always considered executable in cygwin causing which
44321    # to not find them
44322    if test "x$new_path" = x \
44323        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44324        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44325      new_path=`$CYGPATH -u "$path"`
44326    fi
44327    if test "x$new_path" = x; then
44328      # It's still not found. Now this is an unrecoverable error.
44329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44330$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44331      has_space=`$ECHO "$complete" | $GREP " "`
44332      if test "x$has_space" != x; then
44333        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44334$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44335      fi
44336      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44337    fi
44338  fi
44339
44340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44343  # "foo.exe" is OK but "foo" is an error.
44344  #
44345  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44346  # It is also a way to make sure we got the proper file name for the real test later on.
44347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44348  if test "x$test_shortpath" = x; then
44349    # Short path failed, file does not exist as specified.
44350    # Try adding .exe or .cmd
44351    if test -f "${new_path}.exe"; then
44352      input_to_shortpath="${new_path}.exe"
44353    elif test -f "${new_path}.cmd"; then
44354      input_to_shortpath="${new_path}.cmd"
44355    else
44356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44357$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44358      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44359$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44360      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44361    fi
44362  else
44363    input_to_shortpath="$new_path"
44364  fi
44365
44366  # Call helper function which possibly converts this using DOS-style short mode.
44367  # If so, the updated path is stored in $new_path.
44368  new_path="$input_to_shortpath"
44369
44370  input_path="$input_to_shortpath"
44371  # Check if we need to convert this using DOS-style short mode. If the path
44372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44373  # take no chances and rewrite it.
44374  # Note: m4 eats our [], so we need to use [ and ] instead.
44375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44376  if test "x$has_forbidden_chars" != x; then
44377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44381      # Going to short mode and back again did indeed matter. Since short mode is
44382      # case insensitive, let's make it lowercase to improve readability.
44383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44384      # Now convert it back to Unix-style (cygpath)
44385      input_path=`$CYGPATH -u "$shortmode_path"`
44386      new_path="$input_path"
44387    fi
44388  fi
44389
44390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44391  if test "x$test_cygdrive_prefix" = x; then
44392    # As a simple fix, exclude /usr/bin since it's not a real path.
44393    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44395      # a path prefixed by /cygdrive for fixpath to work.
44396      new_path="$CYGWIN_ROOT_PATH$input_path"
44397    fi
44398  fi
44399
44400  # remove trailing .exe if any
44401  new_path="${new_path/%.exe/}"
44402
44403    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44404
44405  # First separate the path from the arguments. This will split at the first
44406  # space.
44407  complete="$BUILD_CC"
44408  path="${complete%% *}"
44409  tmp="$complete EOL"
44410  arguments="${tmp#* }"
44411
44412  # Input might be given as Windows format, start by converting to
44413  # unix format.
44414  new_path="$path"
44415
44416  windows_path="$new_path"
44417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44418    unix_path=`$CYGPATH -u "$windows_path"`
44419    new_path="$unix_path"
44420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44422    new_path="$unix_path"
44423  fi
44424
44425
44426  # Now try to locate executable using which
44427  new_path=`$WHICH "$new_path" 2> /dev/null`
44428
44429  if test "x$new_path" = x; then
44430    # Oops. Which didn't find the executable.
44431    # The splitting of arguments from the executable at a space might have been incorrect,
44432    # since paths with space are more likely in Windows. Give it another try with the whole
44433    # argument.
44434    path="$complete"
44435    arguments="EOL"
44436    new_path="$path"
44437
44438  windows_path="$new_path"
44439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44440    unix_path=`$CYGPATH -u "$windows_path"`
44441    new_path="$unix_path"
44442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44444    new_path="$unix_path"
44445  fi
44446
44447
44448    new_path=`$WHICH "$new_path" 2> /dev/null`
44449    # bat and cmd files are not always considered executable in MSYS causing which
44450    # to not find them
44451    if test "x$new_path" = x \
44452        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44453        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44454      new_path="$path"
44455
44456  windows_path="$new_path"
44457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44458    unix_path=`$CYGPATH -u "$windows_path"`
44459    new_path="$unix_path"
44460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44462    new_path="$unix_path"
44463  fi
44464
44465    fi
44466
44467    if test "x$new_path" = x; then
44468      # It's still not found. Now this is an unrecoverable error.
44469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44470$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44471      has_space=`$ECHO "$complete" | $GREP " "`
44472      if test "x$has_space" != x; then
44473        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44474$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44475      fi
44476      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44477    fi
44478  fi
44479
44480  # Now new_path has a complete unix path to the binary
44481  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44482    # Keep paths in /bin as-is, but remove trailing .exe if any
44483    new_path="${new_path/%.exe/}"
44484    # Do not save /bin paths to all_fixpath_prefixes!
44485  else
44486    # Not in mixed or Windows style, start by that.
44487    new_path=`cmd //c echo $new_path`
44488
44489  input_path="$new_path"
44490  # Check if we need to convert this using DOS-style short mode. If the path
44491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44492  # take no chances and rewrite it.
44493  # Note: m4 eats our [], so we need to use [ and ] instead.
44494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44495  if test "x$has_forbidden_chars" != x; then
44496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44498  fi
44499
44500    # Output is in $new_path
44501
44502  windows_path="$new_path"
44503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44504    unix_path=`$CYGPATH -u "$windows_path"`
44505    new_path="$unix_path"
44506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44508    new_path="$unix_path"
44509  fi
44510
44511    # remove trailing .exe if any
44512    new_path="${new_path/%.exe/}"
44513
44514    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44515    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44516  fi
44517
44518    else
44519      # We're on a unix platform. Hooray! :)
44520      # First separate the path from the arguments. This will split at the first
44521      # space.
44522      complete="$BUILD_CC"
44523      path="${complete%% *}"
44524      tmp="$complete EOL"
44525      arguments="${tmp#* }"
44526
44527      # Cannot rely on the command "which" here since it doesn't always work.
44528      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44529      if test -z "$is_absolute_path"; then
44530        # Path to executable is not absolute. Find it.
44531        IFS_save="$IFS"
44532        IFS=:
44533        for p in $PATH; do
44534          if test -f "$p/$path" && test -x "$p/$path"; then
44535            new_path="$p/$path"
44536            break
44537          fi
44538        done
44539        IFS="$IFS_save"
44540      else
44541        # This is an absolute path, we can use it without further modifications.
44542        new_path="$path"
44543      fi
44544
44545      if test "x$new_path" = x; then
44546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44547$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44548        has_space=`$ECHO "$complete" | $GREP " "`
44549        if test "x$has_space" != x; then
44550          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44551$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44552        fi
44553        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44554      fi
44555    fi
44556
44557    # Now join together the path and the arguments once again
44558    if test "x$arguments" != xEOL; then
44559      new_complete="$new_path ${arguments% *}"
44560    else
44561      new_complete="$new_path"
44562    fi
44563
44564    if test "x$complete" != "x$new_complete"; then
44565      BUILD_CC="$new_complete"
44566      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44567$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44568    fi
44569  fi
44570
44571
44572
44573
44574  # Publish this variable in the help.
44575
44576
44577  if [ -z "${BUILD_CXX+x}" ]; then
44578    # The variable is not set by user, try to locate tool using the code snippet
44579    for ac_prog in cl CC g++
44580do
44581  # Extract the first word of "$ac_prog", so it can be a program name with args.
44582set dummy $ac_prog; ac_word=$2
44583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44584$as_echo_n "checking for $ac_word... " >&6; }
44585if ${ac_cv_path_BUILD_CXX+:} false; then :
44586  $as_echo_n "(cached) " >&6
44587else
44588  case $BUILD_CXX in
44589  [\\/]* | ?:[\\/]*)
44590  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44591  ;;
44592  *)
44593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44594for as_dir in $PATH
44595do
44596  IFS=$as_save_IFS
44597  test -z "$as_dir" && as_dir=.
44598    for ac_exec_ext in '' $ac_executable_extensions; do
44599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44600    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44602    break 2
44603  fi
44604done
44605  done
44606IFS=$as_save_IFS
44607
44608  ;;
44609esac
44610fi
44611BUILD_CXX=$ac_cv_path_BUILD_CXX
44612if test -n "$BUILD_CXX"; then
44613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44614$as_echo "$BUILD_CXX" >&6; }
44615else
44616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44617$as_echo "no" >&6; }
44618fi
44619
44620
44621  test -n "$BUILD_CXX" && break
44622done
44623
44624  else
44625    # The variable is set, but is it from the command line or the environment?
44626
44627    # Try to remove the string !BUILD_CXX! from our list.
44628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44630      # If it failed, the variable was not from the command line. Ignore it,
44631      # but warn the user (except for BASH, which is always set by the calling BASH).
44632      if test "xBUILD_CXX" != xBASH; then
44633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44634$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44635      fi
44636      # Try to locate tool using the code snippet
44637      for ac_prog in cl CC g++
44638do
44639  # Extract the first word of "$ac_prog", so it can be a program name with args.
44640set dummy $ac_prog; ac_word=$2
44641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44642$as_echo_n "checking for $ac_word... " >&6; }
44643if ${ac_cv_path_BUILD_CXX+:} false; then :
44644  $as_echo_n "(cached) " >&6
44645else
44646  case $BUILD_CXX in
44647  [\\/]* | ?:[\\/]*)
44648  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44649  ;;
44650  *)
44651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44652for as_dir in $PATH
44653do
44654  IFS=$as_save_IFS
44655  test -z "$as_dir" && as_dir=.
44656    for ac_exec_ext in '' $ac_executable_extensions; do
44657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44658    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44660    break 2
44661  fi
44662done
44663  done
44664IFS=$as_save_IFS
44665
44666  ;;
44667esac
44668fi
44669BUILD_CXX=$ac_cv_path_BUILD_CXX
44670if test -n "$BUILD_CXX"; then
44671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44672$as_echo "$BUILD_CXX" >&6; }
44673else
44674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44675$as_echo "no" >&6; }
44676fi
44677
44678
44679  test -n "$BUILD_CXX" && break
44680done
44681
44682    else
44683      # If it succeeded, then it was overridden by the user. We will use it
44684      # for the tool.
44685
44686      # First remove it from the list of overridden variables, so we can test
44687      # for unknown variables in the end.
44688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44689
44690      # Check if we try to supply an empty value
44691      if test "x$BUILD_CXX" = x; then
44692        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44693$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44695$as_echo_n "checking for BUILD_CXX... " >&6; }
44696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44697$as_echo "disabled" >&6; }
44698      else
44699        # Check if the provided tool contains a complete path.
44700        tool_specified="$BUILD_CXX"
44701        tool_basename="${tool_specified##*/}"
44702        if test "x$tool_basename" = "x$tool_specified"; then
44703          # A command without a complete path is provided, search $PATH.
44704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44705$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44706          # Extract the first word of "$tool_basename", so it can be a program name with args.
44707set dummy $tool_basename; ac_word=$2
44708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44709$as_echo_n "checking for $ac_word... " >&6; }
44710if ${ac_cv_path_BUILD_CXX+:} false; then :
44711  $as_echo_n "(cached) " >&6
44712else
44713  case $BUILD_CXX in
44714  [\\/]* | ?:[\\/]*)
44715  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44716  ;;
44717  *)
44718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44719for as_dir in $PATH
44720do
44721  IFS=$as_save_IFS
44722  test -z "$as_dir" && as_dir=.
44723    for ac_exec_ext in '' $ac_executable_extensions; do
44724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44725    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44727    break 2
44728  fi
44729done
44730  done
44731IFS=$as_save_IFS
44732
44733  ;;
44734esac
44735fi
44736BUILD_CXX=$ac_cv_path_BUILD_CXX
44737if test -n "$BUILD_CXX"; then
44738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44739$as_echo "$BUILD_CXX" >&6; }
44740else
44741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44742$as_echo "no" >&6; }
44743fi
44744
44745
44746          if test "x$BUILD_CXX" = x; then
44747            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44748          fi
44749        else
44750          # Otherwise we believe it is a complete path. Use it as it is.
44751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44752$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44753          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44754$as_echo_n "checking for BUILD_CXX... " >&6; }
44755          if test ! -x "$tool_specified"; then
44756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44757$as_echo "not found" >&6; }
44758            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44759          fi
44760          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44761$as_echo "$tool_specified" >&6; }
44762        fi
44763      fi
44764    fi
44765
44766  fi
44767
44768
44769
44770  if test "x$BUILD_CXX" = x; then
44771    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44772  fi
44773
44774
44775
44776  # Only process if variable expands to non-empty
44777
44778  if test "x$BUILD_CXX" != x; then
44779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44780
44781  # First separate the path from the arguments. This will split at the first
44782  # space.
44783  complete="$BUILD_CXX"
44784  path="${complete%% *}"
44785  tmp="$complete EOL"
44786  arguments="${tmp#* }"
44787
44788  # Input might be given as Windows format, start by converting to
44789  # unix format.
44790  new_path=`$CYGPATH -u "$path"`
44791
44792  # Now try to locate executable using which
44793  new_path=`$WHICH "$new_path" 2> /dev/null`
44794  # bat and cmd files are not always considered executable in cygwin causing which
44795  # to not find them
44796  if test "x$new_path" = x \
44797      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44798      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44799    new_path=`$CYGPATH -u "$path"`
44800  fi
44801  if test "x$new_path" = x; then
44802    # Oops. Which didn't find the executable.
44803    # The splitting of arguments from the executable at a space might have been incorrect,
44804    # since paths with space are more likely in Windows. Give it another try with the whole
44805    # argument.
44806    path="$complete"
44807    arguments="EOL"
44808    new_path=`$CYGPATH -u "$path"`
44809    new_path=`$WHICH "$new_path" 2> /dev/null`
44810    # bat and cmd files are not always considered executable in cygwin causing which
44811    # to not find them
44812    if test "x$new_path" = x \
44813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44815      new_path=`$CYGPATH -u "$path"`
44816    fi
44817    if test "x$new_path" = x; then
44818      # It's still not found. Now this is an unrecoverable error.
44819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44820$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44821      has_space=`$ECHO "$complete" | $GREP " "`
44822      if test "x$has_space" != x; then
44823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44825      fi
44826      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44827    fi
44828  fi
44829
44830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44833  # "foo.exe" is OK but "foo" is an error.
44834  #
44835  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44836  # It is also a way to make sure we got the proper file name for the real test later on.
44837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44838  if test "x$test_shortpath" = x; then
44839    # Short path failed, file does not exist as specified.
44840    # Try adding .exe or .cmd
44841    if test -f "${new_path}.exe"; then
44842      input_to_shortpath="${new_path}.exe"
44843    elif test -f "${new_path}.cmd"; then
44844      input_to_shortpath="${new_path}.cmd"
44845    else
44846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44847$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44850      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44851    fi
44852  else
44853    input_to_shortpath="$new_path"
44854  fi
44855
44856  # Call helper function which possibly converts this using DOS-style short mode.
44857  # If so, the updated path is stored in $new_path.
44858  new_path="$input_to_shortpath"
44859
44860  input_path="$input_to_shortpath"
44861  # Check if we need to convert this using DOS-style short mode. If the path
44862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44863  # take no chances and rewrite it.
44864  # Note: m4 eats our [], so we need to use [ and ] instead.
44865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44866  if test "x$has_forbidden_chars" != x; then
44867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44871      # Going to short mode and back again did indeed matter. Since short mode is
44872      # case insensitive, let's make it lowercase to improve readability.
44873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44874      # Now convert it back to Unix-style (cygpath)
44875      input_path=`$CYGPATH -u "$shortmode_path"`
44876      new_path="$input_path"
44877    fi
44878  fi
44879
44880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44881  if test "x$test_cygdrive_prefix" = x; then
44882    # As a simple fix, exclude /usr/bin since it's not a real path.
44883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44885      # a path prefixed by /cygdrive for fixpath to work.
44886      new_path="$CYGWIN_ROOT_PATH$input_path"
44887    fi
44888  fi
44889
44890  # remove trailing .exe if any
44891  new_path="${new_path/%.exe/}"
44892
44893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44894
44895  # First separate the path from the arguments. This will split at the first
44896  # space.
44897  complete="$BUILD_CXX"
44898  path="${complete%% *}"
44899  tmp="$complete EOL"
44900  arguments="${tmp#* }"
44901
44902  # Input might be given as Windows format, start by converting to
44903  # unix format.
44904  new_path="$path"
44905
44906  windows_path="$new_path"
44907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44908    unix_path=`$CYGPATH -u "$windows_path"`
44909    new_path="$unix_path"
44910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44912    new_path="$unix_path"
44913  fi
44914
44915
44916  # Now try to locate executable using which
44917  new_path=`$WHICH "$new_path" 2> /dev/null`
44918
44919  if test "x$new_path" = x; then
44920    # Oops. Which didn't find the executable.
44921    # The splitting of arguments from the executable at a space might have been incorrect,
44922    # since paths with space are more likely in Windows. Give it another try with the whole
44923    # argument.
44924    path="$complete"
44925    arguments="EOL"
44926    new_path="$path"
44927
44928  windows_path="$new_path"
44929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44930    unix_path=`$CYGPATH -u "$windows_path"`
44931    new_path="$unix_path"
44932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44934    new_path="$unix_path"
44935  fi
44936
44937
44938    new_path=`$WHICH "$new_path" 2> /dev/null`
44939    # bat and cmd files are not always considered executable in MSYS causing which
44940    # to not find them
44941    if test "x$new_path" = x \
44942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44944      new_path="$path"
44945
44946  windows_path="$new_path"
44947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44948    unix_path=`$CYGPATH -u "$windows_path"`
44949    new_path="$unix_path"
44950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44952    new_path="$unix_path"
44953  fi
44954
44955    fi
44956
44957    if test "x$new_path" = x; then
44958      # It's still not found. Now this is an unrecoverable error.
44959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44960$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44961      has_space=`$ECHO "$complete" | $GREP " "`
44962      if test "x$has_space" != x; then
44963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44965      fi
44966      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44967    fi
44968  fi
44969
44970  # Now new_path has a complete unix path to the binary
44971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44972    # Keep paths in /bin as-is, but remove trailing .exe if any
44973    new_path="${new_path/%.exe/}"
44974    # Do not save /bin paths to all_fixpath_prefixes!
44975  else
44976    # Not in mixed or Windows style, start by that.
44977    new_path=`cmd //c echo $new_path`
44978
44979  input_path="$new_path"
44980  # Check if we need to convert this using DOS-style short mode. If the path
44981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44982  # take no chances and rewrite it.
44983  # Note: m4 eats our [], so we need to use [ and ] instead.
44984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44985  if test "x$has_forbidden_chars" != x; then
44986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44988  fi
44989
44990    # Output is in $new_path
44991
44992  windows_path="$new_path"
44993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44994    unix_path=`$CYGPATH -u "$windows_path"`
44995    new_path="$unix_path"
44996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44998    new_path="$unix_path"
44999  fi
45000
45001    # remove trailing .exe if any
45002    new_path="${new_path/%.exe/}"
45003
45004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45006  fi
45007
45008    else
45009      # We're on a unix platform. Hooray! :)
45010      # First separate the path from the arguments. This will split at the first
45011      # space.
45012      complete="$BUILD_CXX"
45013      path="${complete%% *}"
45014      tmp="$complete EOL"
45015      arguments="${tmp#* }"
45016
45017      # Cannot rely on the command "which" here since it doesn't always work.
45018      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45019      if test -z "$is_absolute_path"; then
45020        # Path to executable is not absolute. Find it.
45021        IFS_save="$IFS"
45022        IFS=:
45023        for p in $PATH; do
45024          if test -f "$p/$path" && test -x "$p/$path"; then
45025            new_path="$p/$path"
45026            break
45027          fi
45028        done
45029        IFS="$IFS_save"
45030      else
45031        # This is an absolute path, we can use it without further modifications.
45032        new_path="$path"
45033      fi
45034
45035      if test "x$new_path" = x; then
45036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45037$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45038        has_space=`$ECHO "$complete" | $GREP " "`
45039        if test "x$has_space" != x; then
45040          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45041$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45042        fi
45043        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45044      fi
45045    fi
45046
45047    # Now join together the path and the arguments once again
45048    if test "x$arguments" != xEOL; then
45049      new_complete="$new_path ${arguments% *}"
45050    else
45051      new_complete="$new_path"
45052    fi
45053
45054    if test "x$complete" != "x$new_complete"; then
45055      BUILD_CXX="$new_complete"
45056      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45057$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45058    fi
45059  fi
45060
45061
45062
45063  # Publish this variable in the help.
45064
45065
45066  if [ -z "${BUILD_NM+x}" ]; then
45067    # The variable is not set by user, try to locate tool using the code snippet
45068    for ac_prog in nm gcc-nm
45069do
45070  # Extract the first word of "$ac_prog", so it can be a program name with args.
45071set dummy $ac_prog; ac_word=$2
45072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45073$as_echo_n "checking for $ac_word... " >&6; }
45074if ${ac_cv_path_BUILD_NM+:} false; then :
45075  $as_echo_n "(cached) " >&6
45076else
45077  case $BUILD_NM in
45078  [\\/]* | ?:[\\/]*)
45079  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45080  ;;
45081  *)
45082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45083for as_dir in $PATH
45084do
45085  IFS=$as_save_IFS
45086  test -z "$as_dir" && as_dir=.
45087    for ac_exec_ext in '' $ac_executable_extensions; do
45088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45089    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45091    break 2
45092  fi
45093done
45094  done
45095IFS=$as_save_IFS
45096
45097  ;;
45098esac
45099fi
45100BUILD_NM=$ac_cv_path_BUILD_NM
45101if test -n "$BUILD_NM"; then
45102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45103$as_echo "$BUILD_NM" >&6; }
45104else
45105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45106$as_echo "no" >&6; }
45107fi
45108
45109
45110  test -n "$BUILD_NM" && break
45111done
45112
45113  else
45114    # The variable is set, but is it from the command line or the environment?
45115
45116    # Try to remove the string !BUILD_NM! from our list.
45117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45119      # If it failed, the variable was not from the command line. Ignore it,
45120      # but warn the user (except for BASH, which is always set by the calling BASH).
45121      if test "xBUILD_NM" != xBASH; then
45122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45123$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45124      fi
45125      # Try to locate tool using the code snippet
45126      for ac_prog in nm gcc-nm
45127do
45128  # Extract the first word of "$ac_prog", so it can be a program name with args.
45129set dummy $ac_prog; ac_word=$2
45130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45131$as_echo_n "checking for $ac_word... " >&6; }
45132if ${ac_cv_path_BUILD_NM+:} false; then :
45133  $as_echo_n "(cached) " >&6
45134else
45135  case $BUILD_NM in
45136  [\\/]* | ?:[\\/]*)
45137  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45138  ;;
45139  *)
45140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45141for as_dir in $PATH
45142do
45143  IFS=$as_save_IFS
45144  test -z "$as_dir" && as_dir=.
45145    for ac_exec_ext in '' $ac_executable_extensions; do
45146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45147    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45149    break 2
45150  fi
45151done
45152  done
45153IFS=$as_save_IFS
45154
45155  ;;
45156esac
45157fi
45158BUILD_NM=$ac_cv_path_BUILD_NM
45159if test -n "$BUILD_NM"; then
45160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45161$as_echo "$BUILD_NM" >&6; }
45162else
45163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45164$as_echo "no" >&6; }
45165fi
45166
45167
45168  test -n "$BUILD_NM" && break
45169done
45170
45171    else
45172      # If it succeeded, then it was overridden by the user. We will use it
45173      # for the tool.
45174
45175      # First remove it from the list of overridden variables, so we can test
45176      # for unknown variables in the end.
45177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45178
45179      # Check if we try to supply an empty value
45180      if test "x$BUILD_NM" = x; then
45181        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45182$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45183        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45184$as_echo_n "checking for BUILD_NM... " >&6; }
45185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45186$as_echo "disabled" >&6; }
45187      else
45188        # Check if the provided tool contains a complete path.
45189        tool_specified="$BUILD_NM"
45190        tool_basename="${tool_specified##*/}"
45191        if test "x$tool_basename" = "x$tool_specified"; then
45192          # A command without a complete path is provided, search $PATH.
45193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45194$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45195          # Extract the first word of "$tool_basename", so it can be a program name with args.
45196set dummy $tool_basename; ac_word=$2
45197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45198$as_echo_n "checking for $ac_word... " >&6; }
45199if ${ac_cv_path_BUILD_NM+:} false; then :
45200  $as_echo_n "(cached) " >&6
45201else
45202  case $BUILD_NM in
45203  [\\/]* | ?:[\\/]*)
45204  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45205  ;;
45206  *)
45207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45208for as_dir in $PATH
45209do
45210  IFS=$as_save_IFS
45211  test -z "$as_dir" && as_dir=.
45212    for ac_exec_ext in '' $ac_executable_extensions; do
45213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45214    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45216    break 2
45217  fi
45218done
45219  done
45220IFS=$as_save_IFS
45221
45222  ;;
45223esac
45224fi
45225BUILD_NM=$ac_cv_path_BUILD_NM
45226if test -n "$BUILD_NM"; then
45227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45228$as_echo "$BUILD_NM" >&6; }
45229else
45230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45231$as_echo "no" >&6; }
45232fi
45233
45234
45235          if test "x$BUILD_NM" = x; then
45236            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45237          fi
45238        else
45239          # Otherwise we believe it is a complete path. Use it as it is.
45240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45241$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45242          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45243$as_echo_n "checking for BUILD_NM... " >&6; }
45244          if test ! -x "$tool_specified"; then
45245            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45246$as_echo "not found" >&6; }
45247            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45248          fi
45249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45250$as_echo "$tool_specified" >&6; }
45251        fi
45252      fi
45253    fi
45254
45255  fi
45256
45257
45258
45259  # Only process if variable expands to non-empty
45260
45261  if test "x$BUILD_NM" != x; then
45262    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45263
45264  # First separate the path from the arguments. This will split at the first
45265  # space.
45266  complete="$BUILD_NM"
45267  path="${complete%% *}"
45268  tmp="$complete EOL"
45269  arguments="${tmp#* }"
45270
45271  # Input might be given as Windows format, start by converting to
45272  # unix format.
45273  new_path=`$CYGPATH -u "$path"`
45274
45275  # Now try to locate executable using which
45276  new_path=`$WHICH "$new_path" 2> /dev/null`
45277  # bat and cmd files are not always considered executable in cygwin causing which
45278  # to not find them
45279  if test "x$new_path" = x \
45280      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45281      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45282    new_path=`$CYGPATH -u "$path"`
45283  fi
45284  if test "x$new_path" = x; then
45285    # Oops. Which didn't find the executable.
45286    # The splitting of arguments from the executable at a space might have been incorrect,
45287    # since paths with space are more likely in Windows. Give it another try with the whole
45288    # argument.
45289    path="$complete"
45290    arguments="EOL"
45291    new_path=`$CYGPATH -u "$path"`
45292    new_path=`$WHICH "$new_path" 2> /dev/null`
45293    # bat and cmd files are not always considered executable in cygwin causing which
45294    # to not find them
45295    if test "x$new_path" = x \
45296        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45297        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45298      new_path=`$CYGPATH -u "$path"`
45299    fi
45300    if test "x$new_path" = x; then
45301      # It's still not found. Now this is an unrecoverable error.
45302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45303$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45304      has_space=`$ECHO "$complete" | $GREP " "`
45305      if test "x$has_space" != x; then
45306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45308      fi
45309      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45310    fi
45311  fi
45312
45313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45316  # "foo.exe" is OK but "foo" is an error.
45317  #
45318  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45319  # It is also a way to make sure we got the proper file name for the real test later on.
45320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45321  if test "x$test_shortpath" = x; then
45322    # Short path failed, file does not exist as specified.
45323    # Try adding .exe or .cmd
45324    if test -f "${new_path}.exe"; then
45325      input_to_shortpath="${new_path}.exe"
45326    elif test -f "${new_path}.cmd"; then
45327      input_to_shortpath="${new_path}.cmd"
45328    else
45329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45330$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45331      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45332$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45333      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45334    fi
45335  else
45336    input_to_shortpath="$new_path"
45337  fi
45338
45339  # Call helper function which possibly converts this using DOS-style short mode.
45340  # If so, the updated path is stored in $new_path.
45341  new_path="$input_to_shortpath"
45342
45343  input_path="$input_to_shortpath"
45344  # Check if we need to convert this using DOS-style short mode. If the path
45345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45346  # take no chances and rewrite it.
45347  # Note: m4 eats our [], so we need to use [ and ] instead.
45348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45349  if test "x$has_forbidden_chars" != x; then
45350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45354      # Going to short mode and back again did indeed matter. Since short mode is
45355      # case insensitive, let's make it lowercase to improve readability.
45356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45357      # Now convert it back to Unix-style (cygpath)
45358      input_path=`$CYGPATH -u "$shortmode_path"`
45359      new_path="$input_path"
45360    fi
45361  fi
45362
45363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45364  if test "x$test_cygdrive_prefix" = x; then
45365    # As a simple fix, exclude /usr/bin since it's not a real path.
45366    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45368      # a path prefixed by /cygdrive for fixpath to work.
45369      new_path="$CYGWIN_ROOT_PATH$input_path"
45370    fi
45371  fi
45372
45373  # remove trailing .exe if any
45374  new_path="${new_path/%.exe/}"
45375
45376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45377
45378  # First separate the path from the arguments. This will split at the first
45379  # space.
45380  complete="$BUILD_NM"
45381  path="${complete%% *}"
45382  tmp="$complete EOL"
45383  arguments="${tmp#* }"
45384
45385  # Input might be given as Windows format, start by converting to
45386  # unix format.
45387  new_path="$path"
45388
45389  windows_path="$new_path"
45390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45391    unix_path=`$CYGPATH -u "$windows_path"`
45392    new_path="$unix_path"
45393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45395    new_path="$unix_path"
45396  fi
45397
45398
45399  # Now try to locate executable using which
45400  new_path=`$WHICH "$new_path" 2> /dev/null`
45401
45402  if test "x$new_path" = x; then
45403    # Oops. Which didn't find the executable.
45404    # The splitting of arguments from the executable at a space might have been incorrect,
45405    # since paths with space are more likely in Windows. Give it another try with the whole
45406    # argument.
45407    path="$complete"
45408    arguments="EOL"
45409    new_path="$path"
45410
45411  windows_path="$new_path"
45412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45413    unix_path=`$CYGPATH -u "$windows_path"`
45414    new_path="$unix_path"
45415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45417    new_path="$unix_path"
45418  fi
45419
45420
45421    new_path=`$WHICH "$new_path" 2> /dev/null`
45422    # bat and cmd files are not always considered executable in MSYS causing which
45423    # to not find them
45424    if test "x$new_path" = x \
45425        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45426        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45427      new_path="$path"
45428
45429  windows_path="$new_path"
45430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45431    unix_path=`$CYGPATH -u "$windows_path"`
45432    new_path="$unix_path"
45433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45435    new_path="$unix_path"
45436  fi
45437
45438    fi
45439
45440    if test "x$new_path" = x; then
45441      # It's still not found. Now this is an unrecoverable error.
45442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45443$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45444      has_space=`$ECHO "$complete" | $GREP " "`
45445      if test "x$has_space" != x; then
45446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45448      fi
45449      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45450    fi
45451  fi
45452
45453  # Now new_path has a complete unix path to the binary
45454  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45455    # Keep paths in /bin as-is, but remove trailing .exe if any
45456    new_path="${new_path/%.exe/}"
45457    # Do not save /bin paths to all_fixpath_prefixes!
45458  else
45459    # Not in mixed or Windows style, start by that.
45460    new_path=`cmd //c echo $new_path`
45461
45462  input_path="$new_path"
45463  # Check if we need to convert this using DOS-style short mode. If the path
45464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45465  # take no chances and rewrite it.
45466  # Note: m4 eats our [], so we need to use [ and ] instead.
45467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45468  if test "x$has_forbidden_chars" != x; then
45469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45471  fi
45472
45473    # Output is in $new_path
45474
45475  windows_path="$new_path"
45476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45477    unix_path=`$CYGPATH -u "$windows_path"`
45478    new_path="$unix_path"
45479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45481    new_path="$unix_path"
45482  fi
45483
45484    # remove trailing .exe if any
45485    new_path="${new_path/%.exe/}"
45486
45487    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45488    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45489  fi
45490
45491    else
45492      # We're on a unix platform. Hooray! :)
45493      # First separate the path from the arguments. This will split at the first
45494      # space.
45495      complete="$BUILD_NM"
45496      path="${complete%% *}"
45497      tmp="$complete EOL"
45498      arguments="${tmp#* }"
45499
45500      # Cannot rely on the command "which" here since it doesn't always work.
45501      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45502      if test -z "$is_absolute_path"; then
45503        # Path to executable is not absolute. Find it.
45504        IFS_save="$IFS"
45505        IFS=:
45506        for p in $PATH; do
45507          if test -f "$p/$path" && test -x "$p/$path"; then
45508            new_path="$p/$path"
45509            break
45510          fi
45511        done
45512        IFS="$IFS_save"
45513      else
45514        # This is an absolute path, we can use it without further modifications.
45515        new_path="$path"
45516      fi
45517
45518      if test "x$new_path" = x; then
45519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45520$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45521        has_space=`$ECHO "$complete" | $GREP " "`
45522        if test "x$has_space" != x; then
45523          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45525        fi
45526        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45527      fi
45528    fi
45529
45530    # Now join together the path and the arguments once again
45531    if test "x$arguments" != xEOL; then
45532      new_complete="$new_path ${arguments% *}"
45533    else
45534      new_complete="$new_path"
45535    fi
45536
45537    if test "x$complete" != "x$new_complete"; then
45538      BUILD_NM="$new_complete"
45539      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45540$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45541    fi
45542  fi
45543
45544
45545
45546  # Publish this variable in the help.
45547
45548
45549  if [ -z "${BUILD_AR+x}" ]; then
45550    # The variable is not set by user, try to locate tool using the code snippet
45551    for ac_prog in ar gcc-ar
45552do
45553  # Extract the first word of "$ac_prog", so it can be a program name with args.
45554set dummy $ac_prog; ac_word=$2
45555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45556$as_echo_n "checking for $ac_word... " >&6; }
45557if ${ac_cv_path_BUILD_AR+:} false; then :
45558  $as_echo_n "(cached) " >&6
45559else
45560  case $BUILD_AR in
45561  [\\/]* | ?:[\\/]*)
45562  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45563  ;;
45564  *)
45565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45566for as_dir in $PATH
45567do
45568  IFS=$as_save_IFS
45569  test -z "$as_dir" && as_dir=.
45570    for ac_exec_ext in '' $ac_executable_extensions; do
45571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45572    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45574    break 2
45575  fi
45576done
45577  done
45578IFS=$as_save_IFS
45579
45580  ;;
45581esac
45582fi
45583BUILD_AR=$ac_cv_path_BUILD_AR
45584if test -n "$BUILD_AR"; then
45585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45586$as_echo "$BUILD_AR" >&6; }
45587else
45588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45589$as_echo "no" >&6; }
45590fi
45591
45592
45593  test -n "$BUILD_AR" && break
45594done
45595
45596  else
45597    # The variable is set, but is it from the command line or the environment?
45598
45599    # Try to remove the string !BUILD_AR! from our list.
45600    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45601    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45602      # If it failed, the variable was not from the command line. Ignore it,
45603      # but warn the user (except for BASH, which is always set by the calling BASH).
45604      if test "xBUILD_AR" != xBASH; then
45605        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45606$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45607      fi
45608      # Try to locate tool using the code snippet
45609      for ac_prog in ar gcc-ar
45610do
45611  # Extract the first word of "$ac_prog", so it can be a program name with args.
45612set dummy $ac_prog; ac_word=$2
45613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45614$as_echo_n "checking for $ac_word... " >&6; }
45615if ${ac_cv_path_BUILD_AR+:} false; then :
45616  $as_echo_n "(cached) " >&6
45617else
45618  case $BUILD_AR in
45619  [\\/]* | ?:[\\/]*)
45620  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45621  ;;
45622  *)
45623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45624for as_dir in $PATH
45625do
45626  IFS=$as_save_IFS
45627  test -z "$as_dir" && as_dir=.
45628    for ac_exec_ext in '' $ac_executable_extensions; do
45629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45630    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45632    break 2
45633  fi
45634done
45635  done
45636IFS=$as_save_IFS
45637
45638  ;;
45639esac
45640fi
45641BUILD_AR=$ac_cv_path_BUILD_AR
45642if test -n "$BUILD_AR"; then
45643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45644$as_echo "$BUILD_AR" >&6; }
45645else
45646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45647$as_echo "no" >&6; }
45648fi
45649
45650
45651  test -n "$BUILD_AR" && break
45652done
45653
45654    else
45655      # If it succeeded, then it was overridden by the user. We will use it
45656      # for the tool.
45657
45658      # First remove it from the list of overridden variables, so we can test
45659      # for unknown variables in the end.
45660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45661
45662      # Check if we try to supply an empty value
45663      if test "x$BUILD_AR" = x; then
45664        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45665$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45667$as_echo_n "checking for BUILD_AR... " >&6; }
45668        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45669$as_echo "disabled" >&6; }
45670      else
45671        # Check if the provided tool contains a complete path.
45672        tool_specified="$BUILD_AR"
45673        tool_basename="${tool_specified##*/}"
45674        if test "x$tool_basename" = "x$tool_specified"; then
45675          # A command without a complete path is provided, search $PATH.
45676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45677$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45678          # Extract the first word of "$tool_basename", so it can be a program name with args.
45679set dummy $tool_basename; ac_word=$2
45680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45681$as_echo_n "checking for $ac_word... " >&6; }
45682if ${ac_cv_path_BUILD_AR+:} false; then :
45683  $as_echo_n "(cached) " >&6
45684else
45685  case $BUILD_AR in
45686  [\\/]* | ?:[\\/]*)
45687  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45688  ;;
45689  *)
45690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45691for as_dir in $PATH
45692do
45693  IFS=$as_save_IFS
45694  test -z "$as_dir" && as_dir=.
45695    for ac_exec_ext in '' $ac_executable_extensions; do
45696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45697    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45699    break 2
45700  fi
45701done
45702  done
45703IFS=$as_save_IFS
45704
45705  ;;
45706esac
45707fi
45708BUILD_AR=$ac_cv_path_BUILD_AR
45709if test -n "$BUILD_AR"; then
45710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45711$as_echo "$BUILD_AR" >&6; }
45712else
45713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45714$as_echo "no" >&6; }
45715fi
45716
45717
45718          if test "x$BUILD_AR" = x; then
45719            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45720          fi
45721        else
45722          # Otherwise we believe it is a complete path. Use it as it is.
45723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45724$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45725          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45726$as_echo_n "checking for BUILD_AR... " >&6; }
45727          if test ! -x "$tool_specified"; then
45728            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45729$as_echo "not found" >&6; }
45730            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45731          fi
45732          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45733$as_echo "$tool_specified" >&6; }
45734        fi
45735      fi
45736    fi
45737
45738  fi
45739
45740
45741
45742  # Only process if variable expands to non-empty
45743
45744  if test "x$BUILD_AR" != x; then
45745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45746
45747  # First separate the path from the arguments. This will split at the first
45748  # space.
45749  complete="$BUILD_AR"
45750  path="${complete%% *}"
45751  tmp="$complete EOL"
45752  arguments="${tmp#* }"
45753
45754  # Input might be given as Windows format, start by converting to
45755  # unix format.
45756  new_path=`$CYGPATH -u "$path"`
45757
45758  # Now try to locate executable using which
45759  new_path=`$WHICH "$new_path" 2> /dev/null`
45760  # bat and cmd files are not always considered executable in cygwin causing which
45761  # to not find them
45762  if test "x$new_path" = x \
45763      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45764      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45765    new_path=`$CYGPATH -u "$path"`
45766  fi
45767  if test "x$new_path" = x; then
45768    # Oops. Which didn't find the executable.
45769    # The splitting of arguments from the executable at a space might have been incorrect,
45770    # since paths with space are more likely in Windows. Give it another try with the whole
45771    # argument.
45772    path="$complete"
45773    arguments="EOL"
45774    new_path=`$CYGPATH -u "$path"`
45775    new_path=`$WHICH "$new_path" 2> /dev/null`
45776    # bat and cmd files are not always considered executable in cygwin causing which
45777    # to not find them
45778    if test "x$new_path" = x \
45779        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45780        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45781      new_path=`$CYGPATH -u "$path"`
45782    fi
45783    if test "x$new_path" = x; then
45784      # It's still not found. Now this is an unrecoverable error.
45785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45786$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45787      has_space=`$ECHO "$complete" | $GREP " "`
45788      if test "x$has_space" != x; then
45789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45791      fi
45792      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45793    fi
45794  fi
45795
45796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45799  # "foo.exe" is OK but "foo" is an error.
45800  #
45801  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45802  # It is also a way to make sure we got the proper file name for the real test later on.
45803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45804  if test "x$test_shortpath" = x; then
45805    # Short path failed, file does not exist as specified.
45806    # Try adding .exe or .cmd
45807    if test -f "${new_path}.exe"; then
45808      input_to_shortpath="${new_path}.exe"
45809    elif test -f "${new_path}.cmd"; then
45810      input_to_shortpath="${new_path}.cmd"
45811    else
45812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45813$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45814      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45815$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45816      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45817    fi
45818  else
45819    input_to_shortpath="$new_path"
45820  fi
45821
45822  # Call helper function which possibly converts this using DOS-style short mode.
45823  # If so, the updated path is stored in $new_path.
45824  new_path="$input_to_shortpath"
45825
45826  input_path="$input_to_shortpath"
45827  # Check if we need to convert this using DOS-style short mode. If the path
45828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45829  # take no chances and rewrite it.
45830  # Note: m4 eats our [], so we need to use [ and ] instead.
45831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45832  if test "x$has_forbidden_chars" != x; then
45833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45837      # Going to short mode and back again did indeed matter. Since short mode is
45838      # case insensitive, let's make it lowercase to improve readability.
45839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45840      # Now convert it back to Unix-style (cygpath)
45841      input_path=`$CYGPATH -u "$shortmode_path"`
45842      new_path="$input_path"
45843    fi
45844  fi
45845
45846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45847  if test "x$test_cygdrive_prefix" = x; then
45848    # As a simple fix, exclude /usr/bin since it's not a real path.
45849    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45851      # a path prefixed by /cygdrive for fixpath to work.
45852      new_path="$CYGWIN_ROOT_PATH$input_path"
45853    fi
45854  fi
45855
45856  # remove trailing .exe if any
45857  new_path="${new_path/%.exe/}"
45858
45859    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45860
45861  # First separate the path from the arguments. This will split at the first
45862  # space.
45863  complete="$BUILD_AR"
45864  path="${complete%% *}"
45865  tmp="$complete EOL"
45866  arguments="${tmp#* }"
45867
45868  # Input might be given as Windows format, start by converting to
45869  # unix format.
45870  new_path="$path"
45871
45872  windows_path="$new_path"
45873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45874    unix_path=`$CYGPATH -u "$windows_path"`
45875    new_path="$unix_path"
45876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45878    new_path="$unix_path"
45879  fi
45880
45881
45882  # Now try to locate executable using which
45883  new_path=`$WHICH "$new_path" 2> /dev/null`
45884
45885  if test "x$new_path" = x; then
45886    # Oops. Which didn't find the executable.
45887    # The splitting of arguments from the executable at a space might have been incorrect,
45888    # since paths with space are more likely in Windows. Give it another try with the whole
45889    # argument.
45890    path="$complete"
45891    arguments="EOL"
45892    new_path="$path"
45893
45894  windows_path="$new_path"
45895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45896    unix_path=`$CYGPATH -u "$windows_path"`
45897    new_path="$unix_path"
45898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45900    new_path="$unix_path"
45901  fi
45902
45903
45904    new_path=`$WHICH "$new_path" 2> /dev/null`
45905    # bat and cmd files are not always considered executable in MSYS causing which
45906    # to not find them
45907    if test "x$new_path" = x \
45908        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45909        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45910      new_path="$path"
45911
45912  windows_path="$new_path"
45913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45914    unix_path=`$CYGPATH -u "$windows_path"`
45915    new_path="$unix_path"
45916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45918    new_path="$unix_path"
45919  fi
45920
45921    fi
45922
45923    if test "x$new_path" = x; then
45924      # It's still not found. Now this is an unrecoverable error.
45925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45926$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45927      has_space=`$ECHO "$complete" | $GREP " "`
45928      if test "x$has_space" != x; then
45929        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45930$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45931      fi
45932      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45933    fi
45934  fi
45935
45936  # Now new_path has a complete unix path to the binary
45937  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45938    # Keep paths in /bin as-is, but remove trailing .exe if any
45939    new_path="${new_path/%.exe/}"
45940    # Do not save /bin paths to all_fixpath_prefixes!
45941  else
45942    # Not in mixed or Windows style, start by that.
45943    new_path=`cmd //c echo $new_path`
45944
45945  input_path="$new_path"
45946  # Check if we need to convert this using DOS-style short mode. If the path
45947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45948  # take no chances and rewrite it.
45949  # Note: m4 eats our [], so we need to use [ and ] instead.
45950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45951  if test "x$has_forbidden_chars" != x; then
45952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45954  fi
45955
45956    # Output is in $new_path
45957
45958  windows_path="$new_path"
45959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45960    unix_path=`$CYGPATH -u "$windows_path"`
45961    new_path="$unix_path"
45962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45964    new_path="$unix_path"
45965  fi
45966
45967    # remove trailing .exe if any
45968    new_path="${new_path/%.exe/}"
45969
45970    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45971    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45972  fi
45973
45974    else
45975      # We're on a unix platform. Hooray! :)
45976      # First separate the path from the arguments. This will split at the first
45977      # space.
45978      complete="$BUILD_AR"
45979      path="${complete%% *}"
45980      tmp="$complete EOL"
45981      arguments="${tmp#* }"
45982
45983      # Cannot rely on the command "which" here since it doesn't always work.
45984      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45985      if test -z "$is_absolute_path"; then
45986        # Path to executable is not absolute. Find it.
45987        IFS_save="$IFS"
45988        IFS=:
45989        for p in $PATH; do
45990          if test -f "$p/$path" && test -x "$p/$path"; then
45991            new_path="$p/$path"
45992            break
45993          fi
45994        done
45995        IFS="$IFS_save"
45996      else
45997        # This is an absolute path, we can use it without further modifications.
45998        new_path="$path"
45999      fi
46000
46001      if test "x$new_path" = x; then
46002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46003$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46004        has_space=`$ECHO "$complete" | $GREP " "`
46005        if test "x$has_space" != x; then
46006          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46007$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46008        fi
46009        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46010      fi
46011    fi
46012
46013    # Now join together the path and the arguments once again
46014    if test "x$arguments" != xEOL; then
46015      new_complete="$new_path ${arguments% *}"
46016    else
46017      new_complete="$new_path"
46018    fi
46019
46020    if test "x$complete" != "x$new_complete"; then
46021      BUILD_AR="$new_complete"
46022      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46023$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46024    fi
46025  fi
46026
46027
46028
46029  # Publish this variable in the help.
46030
46031
46032  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46033    # The variable is not set by user, try to locate tool using the code snippet
46034    for ac_prog in objcopy
46035do
46036  # Extract the first word of "$ac_prog", so it can be a program name with args.
46037set dummy $ac_prog; ac_word=$2
46038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46039$as_echo_n "checking for $ac_word... " >&6; }
46040if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46041  $as_echo_n "(cached) " >&6
46042else
46043  case $BUILD_OBJCOPY in
46044  [\\/]* | ?:[\\/]*)
46045  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46046  ;;
46047  *)
46048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46049for as_dir in $PATH
46050do
46051  IFS=$as_save_IFS
46052  test -z "$as_dir" && as_dir=.
46053    for ac_exec_ext in '' $ac_executable_extensions; do
46054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46055    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46057    break 2
46058  fi
46059done
46060  done
46061IFS=$as_save_IFS
46062
46063  ;;
46064esac
46065fi
46066BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46067if test -n "$BUILD_OBJCOPY"; then
46068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46069$as_echo "$BUILD_OBJCOPY" >&6; }
46070else
46071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46072$as_echo "no" >&6; }
46073fi
46074
46075
46076  test -n "$BUILD_OBJCOPY" && break
46077done
46078
46079  else
46080    # The variable is set, but is it from the command line or the environment?
46081
46082    # Try to remove the string !BUILD_OBJCOPY! from our list.
46083    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46084    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46085      # If it failed, the variable was not from the command line. Ignore it,
46086      # but warn the user (except for BASH, which is always set by the calling BASH).
46087      if test "xBUILD_OBJCOPY" != xBASH; then
46088        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46089$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46090      fi
46091      # Try to locate tool using the code snippet
46092      for ac_prog in objcopy
46093do
46094  # Extract the first word of "$ac_prog", so it can be a program name with args.
46095set dummy $ac_prog; ac_word=$2
46096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46097$as_echo_n "checking for $ac_word... " >&6; }
46098if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46099  $as_echo_n "(cached) " >&6
46100else
46101  case $BUILD_OBJCOPY in
46102  [\\/]* | ?:[\\/]*)
46103  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46104  ;;
46105  *)
46106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46107for as_dir in $PATH
46108do
46109  IFS=$as_save_IFS
46110  test -z "$as_dir" && as_dir=.
46111    for ac_exec_ext in '' $ac_executable_extensions; do
46112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46113    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46115    break 2
46116  fi
46117done
46118  done
46119IFS=$as_save_IFS
46120
46121  ;;
46122esac
46123fi
46124BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46125if test -n "$BUILD_OBJCOPY"; then
46126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46127$as_echo "$BUILD_OBJCOPY" >&6; }
46128else
46129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46130$as_echo "no" >&6; }
46131fi
46132
46133
46134  test -n "$BUILD_OBJCOPY" && break
46135done
46136
46137    else
46138      # If it succeeded, then it was overridden by the user. We will use it
46139      # for the tool.
46140
46141      # First remove it from the list of overridden variables, so we can test
46142      # for unknown variables in the end.
46143      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46144
46145      # Check if we try to supply an empty value
46146      if test "x$BUILD_OBJCOPY" = x; then
46147        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46148$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46149        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46150$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46151        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46152$as_echo "disabled" >&6; }
46153      else
46154        # Check if the provided tool contains a complete path.
46155        tool_specified="$BUILD_OBJCOPY"
46156        tool_basename="${tool_specified##*/}"
46157        if test "x$tool_basename" = "x$tool_specified"; then
46158          # A command without a complete path is provided, search $PATH.
46159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46160$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46161          # Extract the first word of "$tool_basename", so it can be a program name with args.
46162set dummy $tool_basename; ac_word=$2
46163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46164$as_echo_n "checking for $ac_word... " >&6; }
46165if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46166  $as_echo_n "(cached) " >&6
46167else
46168  case $BUILD_OBJCOPY in
46169  [\\/]* | ?:[\\/]*)
46170  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46171  ;;
46172  *)
46173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46174for as_dir in $PATH
46175do
46176  IFS=$as_save_IFS
46177  test -z "$as_dir" && as_dir=.
46178    for ac_exec_ext in '' $ac_executable_extensions; do
46179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46180    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46182    break 2
46183  fi
46184done
46185  done
46186IFS=$as_save_IFS
46187
46188  ;;
46189esac
46190fi
46191BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46192if test -n "$BUILD_OBJCOPY"; then
46193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46194$as_echo "$BUILD_OBJCOPY" >&6; }
46195else
46196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46197$as_echo "no" >&6; }
46198fi
46199
46200
46201          if test "x$BUILD_OBJCOPY" = x; then
46202            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46203          fi
46204        else
46205          # Otherwise we believe it is a complete path. Use it as it is.
46206          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46207$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46208          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46209$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46210          if test ! -x "$tool_specified"; then
46211            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46212$as_echo "not found" >&6; }
46213            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46214          fi
46215          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46216$as_echo "$tool_specified" >&6; }
46217        fi
46218      fi
46219    fi
46220
46221  fi
46222
46223
46224
46225  # Only process if variable expands to non-empty
46226
46227  if test "x$BUILD_OBJCOPY" != x; then
46228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46229
46230  # First separate the path from the arguments. This will split at the first
46231  # space.
46232  complete="$BUILD_OBJCOPY"
46233  path="${complete%% *}"
46234  tmp="$complete EOL"
46235  arguments="${tmp#* }"
46236
46237  # Input might be given as Windows format, start by converting to
46238  # unix format.
46239  new_path=`$CYGPATH -u "$path"`
46240
46241  # Now try to locate executable using which
46242  new_path=`$WHICH "$new_path" 2> /dev/null`
46243  # bat and cmd files are not always considered executable in cygwin causing which
46244  # to not find them
46245  if test "x$new_path" = x \
46246      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46247      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46248    new_path=`$CYGPATH -u "$path"`
46249  fi
46250  if test "x$new_path" = x; then
46251    # Oops. Which didn't find the executable.
46252    # The splitting of arguments from the executable at a space might have been incorrect,
46253    # since paths with space are more likely in Windows. Give it another try with the whole
46254    # argument.
46255    path="$complete"
46256    arguments="EOL"
46257    new_path=`$CYGPATH -u "$path"`
46258    new_path=`$WHICH "$new_path" 2> /dev/null`
46259    # bat and cmd files are not always considered executable in cygwin causing which
46260    # to not find them
46261    if test "x$new_path" = x \
46262        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46263        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46264      new_path=`$CYGPATH -u "$path"`
46265    fi
46266    if test "x$new_path" = x; then
46267      # It's still not found. Now this is an unrecoverable error.
46268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46269$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46270      has_space=`$ECHO "$complete" | $GREP " "`
46271      if test "x$has_space" != x; then
46272        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46273$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46274      fi
46275      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46276    fi
46277  fi
46278
46279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46282  # "foo.exe" is OK but "foo" is an error.
46283  #
46284  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46285  # It is also a way to make sure we got the proper file name for the real test later on.
46286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46287  if test "x$test_shortpath" = x; then
46288    # Short path failed, file does not exist as specified.
46289    # Try adding .exe or .cmd
46290    if test -f "${new_path}.exe"; then
46291      input_to_shortpath="${new_path}.exe"
46292    elif test -f "${new_path}.cmd"; then
46293      input_to_shortpath="${new_path}.cmd"
46294    else
46295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46296$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46297      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46298$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46299      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46300    fi
46301  else
46302    input_to_shortpath="$new_path"
46303  fi
46304
46305  # Call helper function which possibly converts this using DOS-style short mode.
46306  # If so, the updated path is stored in $new_path.
46307  new_path="$input_to_shortpath"
46308
46309  input_path="$input_to_shortpath"
46310  # Check if we need to convert this using DOS-style short mode. If the path
46311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46312  # take no chances and rewrite it.
46313  # Note: m4 eats our [], so we need to use [ and ] instead.
46314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46315  if test "x$has_forbidden_chars" != x; then
46316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46320      # Going to short mode and back again did indeed matter. Since short mode is
46321      # case insensitive, let's make it lowercase to improve readability.
46322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46323      # Now convert it back to Unix-style (cygpath)
46324      input_path=`$CYGPATH -u "$shortmode_path"`
46325      new_path="$input_path"
46326    fi
46327  fi
46328
46329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46330  if test "x$test_cygdrive_prefix" = x; then
46331    # As a simple fix, exclude /usr/bin since it's not a real path.
46332    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46334      # a path prefixed by /cygdrive for fixpath to work.
46335      new_path="$CYGWIN_ROOT_PATH$input_path"
46336    fi
46337  fi
46338
46339  # remove trailing .exe if any
46340  new_path="${new_path/%.exe/}"
46341
46342    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46343
46344  # First separate the path from the arguments. This will split at the first
46345  # space.
46346  complete="$BUILD_OBJCOPY"
46347  path="${complete%% *}"
46348  tmp="$complete EOL"
46349  arguments="${tmp#* }"
46350
46351  # Input might be given as Windows format, start by converting to
46352  # unix format.
46353  new_path="$path"
46354
46355  windows_path="$new_path"
46356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46357    unix_path=`$CYGPATH -u "$windows_path"`
46358    new_path="$unix_path"
46359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46361    new_path="$unix_path"
46362  fi
46363
46364
46365  # Now try to locate executable using which
46366  new_path=`$WHICH "$new_path" 2> /dev/null`
46367
46368  if test "x$new_path" = x; then
46369    # Oops. Which didn't find the executable.
46370    # The splitting of arguments from the executable at a space might have been incorrect,
46371    # since paths with space are more likely in Windows. Give it another try with the whole
46372    # argument.
46373    path="$complete"
46374    arguments="EOL"
46375    new_path="$path"
46376
46377  windows_path="$new_path"
46378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46379    unix_path=`$CYGPATH -u "$windows_path"`
46380    new_path="$unix_path"
46381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46383    new_path="$unix_path"
46384  fi
46385
46386
46387    new_path=`$WHICH "$new_path" 2> /dev/null`
46388    # bat and cmd files are not always considered executable in MSYS causing which
46389    # to not find them
46390    if test "x$new_path" = x \
46391        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46392        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46393      new_path="$path"
46394
46395  windows_path="$new_path"
46396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46397    unix_path=`$CYGPATH -u "$windows_path"`
46398    new_path="$unix_path"
46399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46401    new_path="$unix_path"
46402  fi
46403
46404    fi
46405
46406    if test "x$new_path" = x; then
46407      # It's still not found. Now this is an unrecoverable error.
46408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46409$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46410      has_space=`$ECHO "$complete" | $GREP " "`
46411      if test "x$has_space" != x; then
46412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46414      fi
46415      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46416    fi
46417  fi
46418
46419  # Now new_path has a complete unix path to the binary
46420  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46421    # Keep paths in /bin as-is, but remove trailing .exe if any
46422    new_path="${new_path/%.exe/}"
46423    # Do not save /bin paths to all_fixpath_prefixes!
46424  else
46425    # Not in mixed or Windows style, start by that.
46426    new_path=`cmd //c echo $new_path`
46427
46428  input_path="$new_path"
46429  # Check if we need to convert this using DOS-style short mode. If the path
46430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46431  # take no chances and rewrite it.
46432  # Note: m4 eats our [], so we need to use [ and ] instead.
46433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46434  if test "x$has_forbidden_chars" != x; then
46435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46437  fi
46438
46439    # Output is in $new_path
46440
46441  windows_path="$new_path"
46442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46443    unix_path=`$CYGPATH -u "$windows_path"`
46444    new_path="$unix_path"
46445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46447    new_path="$unix_path"
46448  fi
46449
46450    # remove trailing .exe if any
46451    new_path="${new_path/%.exe/}"
46452
46453    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46454    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46455  fi
46456
46457    else
46458      # We're on a unix platform. Hooray! :)
46459      # First separate the path from the arguments. This will split at the first
46460      # space.
46461      complete="$BUILD_OBJCOPY"
46462      path="${complete%% *}"
46463      tmp="$complete EOL"
46464      arguments="${tmp#* }"
46465
46466      # Cannot rely on the command "which" here since it doesn't always work.
46467      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46468      if test -z "$is_absolute_path"; then
46469        # Path to executable is not absolute. Find it.
46470        IFS_save="$IFS"
46471        IFS=:
46472        for p in $PATH; do
46473          if test -f "$p/$path" && test -x "$p/$path"; then
46474            new_path="$p/$path"
46475            break
46476          fi
46477        done
46478        IFS="$IFS_save"
46479      else
46480        # This is an absolute path, we can use it without further modifications.
46481        new_path="$path"
46482      fi
46483
46484      if test "x$new_path" = x; then
46485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46486$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46487        has_space=`$ECHO "$complete" | $GREP " "`
46488        if test "x$has_space" != x; then
46489          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46490$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46491        fi
46492        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46493      fi
46494    fi
46495
46496    # Now join together the path and the arguments once again
46497    if test "x$arguments" != xEOL; then
46498      new_complete="$new_path ${arguments% *}"
46499    else
46500      new_complete="$new_path"
46501    fi
46502
46503    if test "x$complete" != "x$new_complete"; then
46504      BUILD_OBJCOPY="$new_complete"
46505      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46506$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46507    fi
46508  fi
46509
46510
46511
46512  # Publish this variable in the help.
46513
46514
46515  if [ -z "${BUILD_STRIP+x}" ]; then
46516    # The variable is not set by user, try to locate tool using the code snippet
46517    for ac_prog in strip
46518do
46519  # Extract the first word of "$ac_prog", so it can be a program name with args.
46520set dummy $ac_prog; ac_word=$2
46521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46522$as_echo_n "checking for $ac_word... " >&6; }
46523if ${ac_cv_path_BUILD_STRIP+:} false; then :
46524  $as_echo_n "(cached) " >&6
46525else
46526  case $BUILD_STRIP in
46527  [\\/]* | ?:[\\/]*)
46528  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46529  ;;
46530  *)
46531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46532for as_dir in $PATH
46533do
46534  IFS=$as_save_IFS
46535  test -z "$as_dir" && as_dir=.
46536    for ac_exec_ext in '' $ac_executable_extensions; do
46537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46538    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46540    break 2
46541  fi
46542done
46543  done
46544IFS=$as_save_IFS
46545
46546  ;;
46547esac
46548fi
46549BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46550if test -n "$BUILD_STRIP"; then
46551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46552$as_echo "$BUILD_STRIP" >&6; }
46553else
46554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46555$as_echo "no" >&6; }
46556fi
46557
46558
46559  test -n "$BUILD_STRIP" && break
46560done
46561
46562  else
46563    # The variable is set, but is it from the command line or the environment?
46564
46565    # Try to remove the string !BUILD_STRIP! from our list.
46566    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46567    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46568      # If it failed, the variable was not from the command line. Ignore it,
46569      # but warn the user (except for BASH, which is always set by the calling BASH).
46570      if test "xBUILD_STRIP" != xBASH; then
46571        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46572$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46573      fi
46574      # Try to locate tool using the code snippet
46575      for ac_prog in strip
46576do
46577  # Extract the first word of "$ac_prog", so it can be a program name with args.
46578set dummy $ac_prog; ac_word=$2
46579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46580$as_echo_n "checking for $ac_word... " >&6; }
46581if ${ac_cv_path_BUILD_STRIP+:} false; then :
46582  $as_echo_n "(cached) " >&6
46583else
46584  case $BUILD_STRIP in
46585  [\\/]* | ?:[\\/]*)
46586  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46587  ;;
46588  *)
46589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46590for as_dir in $PATH
46591do
46592  IFS=$as_save_IFS
46593  test -z "$as_dir" && as_dir=.
46594    for ac_exec_ext in '' $ac_executable_extensions; do
46595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46596    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46598    break 2
46599  fi
46600done
46601  done
46602IFS=$as_save_IFS
46603
46604  ;;
46605esac
46606fi
46607BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46608if test -n "$BUILD_STRIP"; then
46609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46610$as_echo "$BUILD_STRIP" >&6; }
46611else
46612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46613$as_echo "no" >&6; }
46614fi
46615
46616
46617  test -n "$BUILD_STRIP" && break
46618done
46619
46620    else
46621      # If it succeeded, then it was overridden by the user. We will use it
46622      # for the tool.
46623
46624      # First remove it from the list of overridden variables, so we can test
46625      # for unknown variables in the end.
46626      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46627
46628      # Check if we try to supply an empty value
46629      if test "x$BUILD_STRIP" = x; then
46630        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46631$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46632        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46633$as_echo_n "checking for BUILD_STRIP... " >&6; }
46634        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46635$as_echo "disabled" >&6; }
46636      else
46637        # Check if the provided tool contains a complete path.
46638        tool_specified="$BUILD_STRIP"
46639        tool_basename="${tool_specified##*/}"
46640        if test "x$tool_basename" = "x$tool_specified"; then
46641          # A command without a complete path is provided, search $PATH.
46642          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46643$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46644          # Extract the first word of "$tool_basename", so it can be a program name with args.
46645set dummy $tool_basename; ac_word=$2
46646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46647$as_echo_n "checking for $ac_word... " >&6; }
46648if ${ac_cv_path_BUILD_STRIP+:} false; then :
46649  $as_echo_n "(cached) " >&6
46650else
46651  case $BUILD_STRIP in
46652  [\\/]* | ?:[\\/]*)
46653  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46654  ;;
46655  *)
46656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46657for as_dir in $PATH
46658do
46659  IFS=$as_save_IFS
46660  test -z "$as_dir" && as_dir=.
46661    for ac_exec_ext in '' $ac_executable_extensions; do
46662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46663    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46665    break 2
46666  fi
46667done
46668  done
46669IFS=$as_save_IFS
46670
46671  ;;
46672esac
46673fi
46674BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46675if test -n "$BUILD_STRIP"; then
46676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46677$as_echo "$BUILD_STRIP" >&6; }
46678else
46679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46680$as_echo "no" >&6; }
46681fi
46682
46683
46684          if test "x$BUILD_STRIP" = x; then
46685            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46686          fi
46687        else
46688          # Otherwise we believe it is a complete path. Use it as it is.
46689          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46690$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46691          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46692$as_echo_n "checking for BUILD_STRIP... " >&6; }
46693          if test ! -x "$tool_specified"; then
46694            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46695$as_echo "not found" >&6; }
46696            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46697          fi
46698          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46699$as_echo "$tool_specified" >&6; }
46700        fi
46701      fi
46702    fi
46703
46704  fi
46705
46706
46707
46708  # Only process if variable expands to non-empty
46709
46710  if test "x$BUILD_STRIP" != x; then
46711    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46712
46713  # First separate the path from the arguments. This will split at the first
46714  # space.
46715  complete="$BUILD_STRIP"
46716  path="${complete%% *}"
46717  tmp="$complete EOL"
46718  arguments="${tmp#* }"
46719
46720  # Input might be given as Windows format, start by converting to
46721  # unix format.
46722  new_path=`$CYGPATH -u "$path"`
46723
46724  # Now try to locate executable using which
46725  new_path=`$WHICH "$new_path" 2> /dev/null`
46726  # bat and cmd files are not always considered executable in cygwin causing which
46727  # to not find them
46728  if test "x$new_path" = x \
46729      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46730      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46731    new_path=`$CYGPATH -u "$path"`
46732  fi
46733  if test "x$new_path" = x; then
46734    # Oops. Which didn't find the executable.
46735    # The splitting of arguments from the executable at a space might have been incorrect,
46736    # since paths with space are more likely in Windows. Give it another try with the whole
46737    # argument.
46738    path="$complete"
46739    arguments="EOL"
46740    new_path=`$CYGPATH -u "$path"`
46741    new_path=`$WHICH "$new_path" 2> /dev/null`
46742    # bat and cmd files are not always considered executable in cygwin causing which
46743    # to not find them
46744    if test "x$new_path" = x \
46745        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46746        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46747      new_path=`$CYGPATH -u "$path"`
46748    fi
46749    if test "x$new_path" = x; then
46750      # It's still not found. Now this is an unrecoverable error.
46751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46752$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46753      has_space=`$ECHO "$complete" | $GREP " "`
46754      if test "x$has_space" != x; then
46755        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46756$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46757      fi
46758      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46759    fi
46760  fi
46761
46762  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46763  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46764  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46765  # "foo.exe" is OK but "foo" is an error.
46766  #
46767  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46768  # It is also a way to make sure we got the proper file name for the real test later on.
46769  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46770  if test "x$test_shortpath" = x; then
46771    # Short path failed, file does not exist as specified.
46772    # Try adding .exe or .cmd
46773    if test -f "${new_path}.exe"; then
46774      input_to_shortpath="${new_path}.exe"
46775    elif test -f "${new_path}.cmd"; then
46776      input_to_shortpath="${new_path}.cmd"
46777    else
46778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46779$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46780      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46781$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46782      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46783    fi
46784  else
46785    input_to_shortpath="$new_path"
46786  fi
46787
46788  # Call helper function which possibly converts this using DOS-style short mode.
46789  # If so, the updated path is stored in $new_path.
46790  new_path="$input_to_shortpath"
46791
46792  input_path="$input_to_shortpath"
46793  # Check if we need to convert this using DOS-style short mode. If the path
46794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46795  # take no chances and rewrite it.
46796  # Note: m4 eats our [], so we need to use [ and ] instead.
46797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46798  if test "x$has_forbidden_chars" != x; then
46799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46800    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46801    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46802    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46803      # Going to short mode and back again did indeed matter. Since short mode is
46804      # case insensitive, let's make it lowercase to improve readability.
46805      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46806      # Now convert it back to Unix-style (cygpath)
46807      input_path=`$CYGPATH -u "$shortmode_path"`
46808      new_path="$input_path"
46809    fi
46810  fi
46811
46812  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46813  if test "x$test_cygdrive_prefix" = x; then
46814    # As a simple fix, exclude /usr/bin since it's not a real path.
46815    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46816      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46817      # a path prefixed by /cygdrive for fixpath to work.
46818      new_path="$CYGWIN_ROOT_PATH$input_path"
46819    fi
46820  fi
46821
46822  # remove trailing .exe if any
46823  new_path="${new_path/%.exe/}"
46824
46825    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46826
46827  # First separate the path from the arguments. This will split at the first
46828  # space.
46829  complete="$BUILD_STRIP"
46830  path="${complete%% *}"
46831  tmp="$complete EOL"
46832  arguments="${tmp#* }"
46833
46834  # Input might be given as Windows format, start by converting to
46835  # unix format.
46836  new_path="$path"
46837
46838  windows_path="$new_path"
46839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46840    unix_path=`$CYGPATH -u "$windows_path"`
46841    new_path="$unix_path"
46842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46844    new_path="$unix_path"
46845  fi
46846
46847
46848  # Now try to locate executable using which
46849  new_path=`$WHICH "$new_path" 2> /dev/null`
46850
46851  if test "x$new_path" = x; then
46852    # Oops. Which didn't find the executable.
46853    # The splitting of arguments from the executable at a space might have been incorrect,
46854    # since paths with space are more likely in Windows. Give it another try with the whole
46855    # argument.
46856    path="$complete"
46857    arguments="EOL"
46858    new_path="$path"
46859
46860  windows_path="$new_path"
46861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46862    unix_path=`$CYGPATH -u "$windows_path"`
46863    new_path="$unix_path"
46864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46866    new_path="$unix_path"
46867  fi
46868
46869
46870    new_path=`$WHICH "$new_path" 2> /dev/null`
46871    # bat and cmd files are not always considered executable in MSYS causing which
46872    # to not find them
46873    if test "x$new_path" = x \
46874        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46875        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46876      new_path="$path"
46877
46878  windows_path="$new_path"
46879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46880    unix_path=`$CYGPATH -u "$windows_path"`
46881    new_path="$unix_path"
46882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46884    new_path="$unix_path"
46885  fi
46886
46887    fi
46888
46889    if test "x$new_path" = x; then
46890      # It's still not found. Now this is an unrecoverable error.
46891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46892$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46893      has_space=`$ECHO "$complete" | $GREP " "`
46894      if test "x$has_space" != x; then
46895        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46896$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46897      fi
46898      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46899    fi
46900  fi
46901
46902  # Now new_path has a complete unix path to the binary
46903  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46904    # Keep paths in /bin as-is, but remove trailing .exe if any
46905    new_path="${new_path/%.exe/}"
46906    # Do not save /bin paths to all_fixpath_prefixes!
46907  else
46908    # Not in mixed or Windows style, start by that.
46909    new_path=`cmd //c echo $new_path`
46910
46911  input_path="$new_path"
46912  # Check if we need to convert this using DOS-style short mode. If the path
46913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46914  # take no chances and rewrite it.
46915  # Note: m4 eats our [], so we need to use [ and ] instead.
46916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46917  if test "x$has_forbidden_chars" != x; then
46918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46919    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46920  fi
46921
46922    # Output is in $new_path
46923
46924  windows_path="$new_path"
46925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46926    unix_path=`$CYGPATH -u "$windows_path"`
46927    new_path="$unix_path"
46928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46930    new_path="$unix_path"
46931  fi
46932
46933    # remove trailing .exe if any
46934    new_path="${new_path/%.exe/}"
46935
46936    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46937    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46938  fi
46939
46940    else
46941      # We're on a unix platform. Hooray! :)
46942      # First separate the path from the arguments. This will split at the first
46943      # space.
46944      complete="$BUILD_STRIP"
46945      path="${complete%% *}"
46946      tmp="$complete EOL"
46947      arguments="${tmp#* }"
46948
46949      # Cannot rely on the command "which" here since it doesn't always work.
46950      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46951      if test -z "$is_absolute_path"; then
46952        # Path to executable is not absolute. Find it.
46953        IFS_save="$IFS"
46954        IFS=:
46955        for p in $PATH; do
46956          if test -f "$p/$path" && test -x "$p/$path"; then
46957            new_path="$p/$path"
46958            break
46959          fi
46960        done
46961        IFS="$IFS_save"
46962      else
46963        # This is an absolute path, we can use it without further modifications.
46964        new_path="$path"
46965      fi
46966
46967      if test "x$new_path" = x; then
46968        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46969$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46970        has_space=`$ECHO "$complete" | $GREP " "`
46971        if test "x$has_space" != x; then
46972          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46973$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46974        fi
46975        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46976      fi
46977    fi
46978
46979    # Now join together the path and the arguments once again
46980    if test "x$arguments" != xEOL; then
46981      new_complete="$new_path ${arguments% *}"
46982    else
46983      new_complete="$new_path"
46984    fi
46985
46986    if test "x$complete" != "x$new_complete"; then
46987      BUILD_STRIP="$new_complete"
46988      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46989$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46990    fi
46991  fi
46992
46993    # Assume the C compiler is the assembler
46994    BUILD_AS="$BUILD_CC -c"
46995    # Just like for the target compiler, use the compiler as linker
46996    BUILD_LD="$BUILD_CC"
46997    BUILD_LDCXX="$BUILD_CXX"
46998
46999    PATH="$OLDPATH"
47000
47001
47002  COMPILER=$BUILD_CC
47003  COMPILER_NAME=BuildC
47004
47005  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47006    # cc -V output typically looks like
47007    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47008    # or
47009    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47010    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47011    # Check that this is likely to be the Solaris Studio cc.
47012    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47013    if test $? -ne 0; then
47014      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47015      { $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
47016$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47017      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47018$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47019      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47020$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47021      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47022    fi
47023    # Remove usage instructions (if present), and
47024    # collapse compiler output into a single line
47025    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47026        $SED -e 's/ *[Uu]sage:.*//'`
47027    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47028        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47029  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47030    # xlc -qversion output typically looks like
47031    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47032    #     Version: 11.01.0000.0015
47033    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47034    # Check that this is likely to be the IBM XL C compiler.
47035    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47036    if test $? -ne 0; then
47037      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47038      { $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
47039$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47040      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47041$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47042      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47043$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47044      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47045    fi
47046    # Collapse compiler output into a single line
47047    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47048    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47049        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47050  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47051    # There is no specific version flag, but all output starts with a version string.
47052    # First line typically looks something like:
47053    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47054    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47055    # Check that this is likely to be Microsoft CL.EXE.
47056    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47057    if test $? -ne 0; then
47058      { $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
47059$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47060      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47061$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47062      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47063    fi
47064    # Collapse compiler output into a single line
47065    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47066    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47067        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47068  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47069    # gcc --version output typically looks like
47070    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47071    #     Copyright (C) 2013 Free Software Foundation, Inc.
47072    #     This is free software; see the source for copying conditions.  There is NO
47073    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47074    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47075    # Check that this is likely to be GCC.
47076    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47077    if test $? -ne 0; then
47078      { $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
47079$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47080      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47081$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47082      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47083    fi
47084    # Remove Copyright and legalese from version string, and
47085    # collapse into a single line
47086    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47087        $SED -e 's/ *Copyright .*//'`
47088    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47089        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47090  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47091    # clang --version output typically looks like
47092    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47093    #    clang version 3.3 (tags/RELEASE_33/final)
47094    # or
47095    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47096    #    Target: x86_64-pc-linux-gnu
47097    #    Thread model: posix
47098    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47099    # Check that this is likely to be clang
47100    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47101    if test $? -ne 0; then
47102      { $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
47103$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47104      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47105$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47106      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47107    fi
47108    # Collapse compiler output into a single line
47109    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47110    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47111        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47112  else
47113      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47114  fi
47115  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47116  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47117  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47118  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47119
47120  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47121$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47122
47123
47124  COMPILER=$BUILD_CXX
47125  COMPILER_NAME=BuildC++
47126
47127  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47128    # cc -V output typically looks like
47129    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47130    # or
47131    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47132    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47133    # Check that this is likely to be the Solaris Studio cc.
47134    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47135    if test $? -ne 0; then
47136      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47137      { $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
47138$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47139      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47140$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47141      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47142$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47143      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47144    fi
47145    # Remove usage instructions (if present), and
47146    # collapse compiler output into a single line
47147    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47148        $SED -e 's/ *[Uu]sage:.*//'`
47149    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47150        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47151  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47152    # xlc -qversion output typically looks like
47153    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47154    #     Version: 11.01.0000.0015
47155    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47156    # Check that this is likely to be the IBM XL C compiler.
47157    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47158    if test $? -ne 0; then
47159      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47160      { $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
47161$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47162      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47163$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47164      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47165$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47166      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47167    fi
47168    # Collapse compiler output into a single line
47169    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47170    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47171        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47172  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47173    # There is no specific version flag, but all output starts with a version string.
47174    # First line typically looks something like:
47175    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47176    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47177    # Check that this is likely to be Microsoft CL.EXE.
47178    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47179    if test $? -ne 0; then
47180      { $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
47181$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47182      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47183$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47184      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47185    fi
47186    # Collapse compiler output into a single line
47187    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47188    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47189        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47190  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47191    # gcc --version output typically looks like
47192    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47193    #     Copyright (C) 2013 Free Software Foundation, Inc.
47194    #     This is free software; see the source for copying conditions.  There is NO
47195    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47196    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47197    # Check that this is likely to be GCC.
47198    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47199    if test $? -ne 0; then
47200      { $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
47201$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47202      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47203$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47204      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47205    fi
47206    # Remove Copyright and legalese from version string, and
47207    # collapse into a single line
47208    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47209        $SED -e 's/ *Copyright .*//'`
47210    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47211        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47212  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47213    # clang --version output typically looks like
47214    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47215    #    clang version 3.3 (tags/RELEASE_33/final)
47216    # or
47217    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47218    #    Target: x86_64-pc-linux-gnu
47219    #    Thread model: posix
47220    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47221    # Check that this is likely to be clang
47222    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47223    if test $? -ne 0; then
47224      { $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
47225$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47226      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47227$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47228      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47229    fi
47230    # Collapse compiler output into a single line
47231    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47232    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47233        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47234  else
47235      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47236  fi
47237  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47238  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47239  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47240  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47241
47242  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47243$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47244
47245
47246  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47247    { $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
47248$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47249    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47250$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47251  fi
47252
47253  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47254  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47255    { $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
47256$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;}
47257  fi
47258
47259  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47260    { $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
47261$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47262  fi
47263
47264  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47265
47266  else
47267    # If we are not cross compiling, use the normal target compilers for
47268    # building the build platform executables.
47269    BUILD_CC="$CC"
47270    BUILD_CXX="$CXX"
47271    BUILD_LD="$LD"
47272    BUILD_LDCXX="$LDCXX"
47273    BUILD_NM="$NM"
47274    BUILD_AS="$AS"
47275    BUILD_OBJCOPY="$OBJCOPY"
47276    BUILD_STRIP="$STRIP"
47277    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47278    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47279    BUILD_AR="$AR"
47280
47281
47282  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47283    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47284$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47285    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47286$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47287  fi
47288
47289  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47290  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47291    { $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
47292$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;}
47293  fi
47294
47295  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47296    { $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
47297$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47298  fi
47299
47300  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47301
47302  fi
47303
47304
47305
47306
47307
47308
47309
47310
47311
47312
47313
47314
47315
47316
47317  # The package path is used only on macosx?
47318  # FIXME: clean this up, and/or move it elsewhere.
47319  PACKAGE_PATH=/opt/local
47320
47321
47322  # Check for extra potential brokenness.
47323  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47324    # On Windows, double-check that we got the right compiler.
47325    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47326    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47327    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47328      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47329        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
47330      fi
47331    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47332      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47333        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47334      fi
47335    fi
47336  fi
47337
47338  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47339    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47340    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47341    # This is later checked when setting flags.
47342
47343    # "-Og" suppported for GCC 4.8 and later
47344    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392    # Execute function body
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441    # Execute function body
47442
47443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47444$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47445  supports=yes
47446
47447  saved_cflags="$CFLAGS"
47448  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47449  ac_ext=c
47450ac_cpp='$CPP $CPPFLAGS'
47451ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47452ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47453ac_compiler_gnu=$ac_cv_c_compiler_gnu
47454
47455  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47456/* end confdefs.h.  */
47457int i;
47458_ACEOF
47459if ac_fn_c_try_compile "$LINENO"; then :
47460
47461else
47462  supports=no
47463fi
47464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47465  ac_ext=cpp
47466ac_cpp='$CXXCPP $CPPFLAGS'
47467ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47468ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47469ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47470
47471  CFLAGS="$saved_cflags"
47472
47473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47474$as_echo "$supports" >&6; }
47475  if test "x$supports" = "xyes" ; then
47476    :
47477    C_COMP_SUPPORTS="yes"
47478  else
47479    :
47480    C_COMP_SUPPORTS="no"
47481  fi
47482
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541    # Execute function body
47542
47543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47544$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47545  supports=yes
47546
47547  saved_cxxflags="$CXXFLAGS"
47548  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47549  ac_ext=cpp
47550ac_cpp='$CXXCPP $CPPFLAGS'
47551ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47552ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47553ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47554
47555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47556/* end confdefs.h.  */
47557int i;
47558_ACEOF
47559if ac_fn_cxx_try_compile "$LINENO"; then :
47560
47561else
47562  supports=no
47563fi
47564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47565  ac_ext=cpp
47566ac_cpp='$CXXCPP $CPPFLAGS'
47567ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47568ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47569ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47570
47571  CXXFLAGS="$saved_cxxflags"
47572
47573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47574$as_echo "$supports" >&6; }
47575  if test "x$supports" = "xyes" ; then
47576    :
47577    CXX_COMP_SUPPORTS="yes"
47578  else
47579    :
47580    CXX_COMP_SUPPORTS="no"
47581  fi
47582
47583
47584
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594
47595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47596$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47597  supports=no
47598  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47599
47600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47601$as_echo "$supports" >&6; }
47602  if test "x$supports" = "xyes" ; then
47603    :
47604    HAS_CFLAG_OPTIMIZE_DEBUG=true
47605  else
47606    :
47607    HAS_CFLAG_OPTIMIZE_DEBUG=false
47608  fi
47609
47610
47611
47612
47613
47614
47615
47616    # "-z relro" supported in GNU binutils 2.17 and later
47617    LINKER_RELRO_FLAG="-Wl,-z,relro"
47618
47619
47620
47621
47622
47623
47624
47625
47626
47627
47628
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665    # Execute function body
47666
47667  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47668$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47669  supports=yes
47670
47671  saved_ldflags="$LDFLAGS"
47672  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47673  ac_ext=c
47674ac_cpp='$CPP $CPPFLAGS'
47675ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47676ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47677ac_compiler_gnu=$ac_cv_c_compiler_gnu
47678
47679  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47680/* end confdefs.h.  */
47681
47682int
47683main ()
47684{
47685
47686  ;
47687  return 0;
47688}
47689_ACEOF
47690if ac_fn_c_try_link "$LINENO"; then :
47691
47692else
47693  supports=no
47694fi
47695rm -f core conftest.err conftest.$ac_objext \
47696    conftest$ac_exeext conftest.$ac_ext
47697  ac_ext=cpp
47698ac_cpp='$CXXCPP $CPPFLAGS'
47699ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47700ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47701ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47702
47703  LDFLAGS="$saved_ldflags"
47704
47705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47706$as_echo "$supports" >&6; }
47707  if test "x$supports" = "xyes" ; then
47708    :
47709    HAS_LINKER_RELRO=true
47710  else
47711    :
47712    HAS_LINKER_RELRO=false
47713  fi
47714
47715
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727    # "-z now" supported in GNU binutils 2.11 and later
47728    LINKER_NOW_FLAG="-Wl,-z,now"
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776    # Execute function body
47777
47778  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47779$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47780  supports=yes
47781
47782  saved_ldflags="$LDFLAGS"
47783  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47784  ac_ext=c
47785ac_cpp='$CPP $CPPFLAGS'
47786ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47787ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47788ac_compiler_gnu=$ac_cv_c_compiler_gnu
47789
47790  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47791/* end confdefs.h.  */
47792
47793int
47794main ()
47795{
47796
47797  ;
47798  return 0;
47799}
47800_ACEOF
47801if ac_fn_c_try_link "$LINENO"; then :
47802
47803else
47804  supports=no
47805fi
47806rm -f core conftest.err conftest.$ac_objext \
47807    conftest$ac_exeext conftest.$ac_ext
47808  ac_ext=cpp
47809ac_cpp='$CXXCPP $CPPFLAGS'
47810ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47811ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47812ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47813
47814  LDFLAGS="$saved_ldflags"
47815
47816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47817$as_echo "$supports" >&6; }
47818  if test "x$supports" = "xyes" ; then
47819    :
47820    HAS_LINKER_NOW=true
47821  else
47822    :
47823    HAS_LINKER_NOW=false
47824  fi
47825
47826
47827
47828
47829
47830
47831
47832
47833
47834
47835
47836
47837  fi
47838
47839  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47840  # in executable.'
47841  USING_BROKEN_SUSE_LD=no
47842  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47844$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47845    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47846    $ECHO "int main() { }" > main.c
47847    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47849$as_echo "no" >&6; }
47850      USING_BROKEN_SUSE_LD=no
47851    else
47852      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47853$as_echo "yes" >&6; }
47854      USING_BROKEN_SUSE_LD=yes
47855    fi
47856    $RM version-script.map main.c a.out
47857  fi
47858
47859
47860  # Setup hotspot lecagy names for toolchains
47861  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47862  if test "x$TOOLCHAIN_TYPE" = xclang; then
47863    HOTSPOT_TOOLCHAIN_TYPE=gcc
47864  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47865    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47866  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47867    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47868  fi
47869
47870
47871
47872# Setup the JTReg Regression Test Harness.
47873
47874
47875# Check whether --with-jtreg was given.
47876if test "${with_jtreg+set}" = set; then :
47877  withval=$with_jtreg;
47878else
47879  with_jtreg=no
47880fi
47881
47882
47883  if test "x$with_jtreg" = xno; then
47884    # jtreg disabled
47885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47886$as_echo_n "checking for jtreg... " >&6; }
47887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47888$as_echo "no" >&6; }
47889  else
47890    if test "x$with_jtreg" != xyes; then
47891      # with path specified.
47892      JT_HOME="$with_jtreg"
47893    fi
47894
47895    if test "x$JT_HOME" != x; then
47896      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47897$as_echo_n "checking for jtreg... " >&6; }
47898
47899      # use JT_HOME enviroment var.
47900
47901  # Only process if variable expands to non-empty
47902
47903  if test "x$JT_HOME" != x; then
47904    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47905
47906  # Input might be given as Windows format, start by converting to
47907  # unix format.
47908  path="$JT_HOME"
47909  new_path=`$CYGPATH -u "$path"`
47910
47911  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47912  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47913  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47914  # "foo.exe" is OK but "foo" is an error.
47915  #
47916  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47917  # It is also a way to make sure we got the proper file name for the real test later on.
47918  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47919  if test "x$test_shortpath" = x; then
47920    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47921$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47922    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47923  fi
47924
47925  # Call helper function which possibly converts this using DOS-style short mode.
47926  # If so, the updated path is stored in $new_path.
47927
47928  input_path="$new_path"
47929  # Check if we need to convert this using DOS-style short mode. If the path
47930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47931  # take no chances and rewrite it.
47932  # Note: m4 eats our [], so we need to use [ and ] instead.
47933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47934  if test "x$has_forbidden_chars" != x; then
47935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47939      # Going to short mode and back again did indeed matter. Since short mode is
47940      # case insensitive, let's make it lowercase to improve readability.
47941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47942      # Now convert it back to Unix-style (cygpath)
47943      input_path=`$CYGPATH -u "$shortmode_path"`
47944      new_path="$input_path"
47945    fi
47946  fi
47947
47948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47949  if test "x$test_cygdrive_prefix" = x; then
47950    # As a simple fix, exclude /usr/bin since it's not a real path.
47951    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47953      # a path prefixed by /cygdrive for fixpath to work.
47954      new_path="$CYGWIN_ROOT_PATH$input_path"
47955    fi
47956  fi
47957
47958
47959  if test "x$path" != "x$new_path"; then
47960    JT_HOME="$new_path"
47961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47962$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47963  fi
47964
47965    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47966
47967  path="$JT_HOME"
47968  has_colon=`$ECHO $path | $GREP ^.:`
47969  new_path="$path"
47970  if test "x$has_colon" = x; then
47971    # Not in mixed or Windows style, start by that.
47972    new_path=`cmd //c echo $path`
47973  fi
47974
47975
47976  input_path="$new_path"
47977  # Check if we need to convert this using DOS-style short mode. If the path
47978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47979  # take no chances and rewrite it.
47980  # Note: m4 eats our [], so we need to use [ and ] instead.
47981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47982  if test "x$has_forbidden_chars" != x; then
47983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47984    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47985  fi
47986
47987
47988  windows_path="$new_path"
47989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47990    unix_path=`$CYGPATH -u "$windows_path"`
47991    new_path="$unix_path"
47992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47994    new_path="$unix_path"
47995  fi
47996
47997  if test "x$path" != "x$new_path"; then
47998    JT_HOME="$new_path"
47999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48000$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48001  fi
48002
48003  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48004  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48005
48006    else
48007      # We're on a unix platform. Hooray! :)
48008      path="$JT_HOME"
48009      has_space=`$ECHO "$path" | $GREP " "`
48010      if test "x$has_space" != x; then
48011        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48012$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48013        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48014      fi
48015
48016      # Use eval to expand a potential ~
48017      eval path="$path"
48018      if test ! -f "$path" && test ! -d "$path"; then
48019        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48020      fi
48021
48022      if test -d "$path"; then
48023        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48024      else
48025        dir="`$DIRNAME "$path"`"
48026        base="`$BASENAME "$path"`"
48027        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48028      fi
48029    fi
48030  fi
48031
48032
48033      # jtreg win32 script works for everybody
48034      JTREGEXE="$JT_HOME/bin/jtreg"
48035
48036      if test ! -f "$JTREGEXE"; then
48037        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48038      fi
48039
48040      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48041$as_echo "$JTREGEXE" >&6; }
48042    else
48043      # try to find jtreg on path
48044
48045
48046
48047  # Publish this variable in the help.
48048
48049
48050  if [ -z "${JTREGEXE+x}" ]; then
48051    # The variable is not set by user, try to locate tool using the code snippet
48052    for ac_prog in jtreg
48053do
48054  # Extract the first word of "$ac_prog", so it can be a program name with args.
48055set dummy $ac_prog; ac_word=$2
48056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48057$as_echo_n "checking for $ac_word... " >&6; }
48058if ${ac_cv_path_JTREGEXE+:} false; then :
48059  $as_echo_n "(cached) " >&6
48060else
48061  case $JTREGEXE in
48062  [\\/]* | ?:[\\/]*)
48063  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48064  ;;
48065  *)
48066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48067for as_dir in $PATH
48068do
48069  IFS=$as_save_IFS
48070  test -z "$as_dir" && as_dir=.
48071    for ac_exec_ext in '' $ac_executable_extensions; do
48072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48073    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48075    break 2
48076  fi
48077done
48078  done
48079IFS=$as_save_IFS
48080
48081  ;;
48082esac
48083fi
48084JTREGEXE=$ac_cv_path_JTREGEXE
48085if test -n "$JTREGEXE"; then
48086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48087$as_echo "$JTREGEXE" >&6; }
48088else
48089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48090$as_echo "no" >&6; }
48091fi
48092
48093
48094  test -n "$JTREGEXE" && break
48095done
48096
48097  else
48098    # The variable is set, but is it from the command line or the environment?
48099
48100    # Try to remove the string !JTREGEXE! from our list.
48101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48103      # If it failed, the variable was not from the command line. Ignore it,
48104      # but warn the user (except for BASH, which is always set by the calling BASH).
48105      if test "xJTREGEXE" != xBASH; then
48106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48107$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48108      fi
48109      # Try to locate tool using the code snippet
48110      for ac_prog in jtreg
48111do
48112  # Extract the first word of "$ac_prog", so it can be a program name with args.
48113set dummy $ac_prog; ac_word=$2
48114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48115$as_echo_n "checking for $ac_word... " >&6; }
48116if ${ac_cv_path_JTREGEXE+:} false; then :
48117  $as_echo_n "(cached) " >&6
48118else
48119  case $JTREGEXE in
48120  [\\/]* | ?:[\\/]*)
48121  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48122  ;;
48123  *)
48124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48125for as_dir in $PATH
48126do
48127  IFS=$as_save_IFS
48128  test -z "$as_dir" && as_dir=.
48129    for ac_exec_ext in '' $ac_executable_extensions; do
48130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48131    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48133    break 2
48134  fi
48135done
48136  done
48137IFS=$as_save_IFS
48138
48139  ;;
48140esac
48141fi
48142JTREGEXE=$ac_cv_path_JTREGEXE
48143if test -n "$JTREGEXE"; then
48144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48145$as_echo "$JTREGEXE" >&6; }
48146else
48147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48148$as_echo "no" >&6; }
48149fi
48150
48151
48152  test -n "$JTREGEXE" && break
48153done
48154
48155    else
48156      # If it succeeded, then it was overridden by the user. We will use it
48157      # for the tool.
48158
48159      # First remove it from the list of overridden variables, so we can test
48160      # for unknown variables in the end.
48161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48162
48163      # Check if we try to supply an empty value
48164      if test "x$JTREGEXE" = x; then
48165        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48166$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48168$as_echo_n "checking for JTREGEXE... " >&6; }
48169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48170$as_echo "disabled" >&6; }
48171      else
48172        # Check if the provided tool contains a complete path.
48173        tool_specified="$JTREGEXE"
48174        tool_basename="${tool_specified##*/}"
48175        if test "x$tool_basename" = "x$tool_specified"; then
48176          # A command without a complete path is provided, search $PATH.
48177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48178$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48179          # Extract the first word of "$tool_basename", so it can be a program name with args.
48180set dummy $tool_basename; ac_word=$2
48181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48182$as_echo_n "checking for $ac_word... " >&6; }
48183if ${ac_cv_path_JTREGEXE+:} false; then :
48184  $as_echo_n "(cached) " >&6
48185else
48186  case $JTREGEXE in
48187  [\\/]* | ?:[\\/]*)
48188  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48189  ;;
48190  *)
48191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48192for as_dir in $PATH
48193do
48194  IFS=$as_save_IFS
48195  test -z "$as_dir" && as_dir=.
48196    for ac_exec_ext in '' $ac_executable_extensions; do
48197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48198    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48200    break 2
48201  fi
48202done
48203  done
48204IFS=$as_save_IFS
48205
48206  ;;
48207esac
48208fi
48209JTREGEXE=$ac_cv_path_JTREGEXE
48210if test -n "$JTREGEXE"; then
48211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48212$as_echo "$JTREGEXE" >&6; }
48213else
48214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48215$as_echo "no" >&6; }
48216fi
48217
48218
48219          if test "x$JTREGEXE" = x; then
48220            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48221          fi
48222        else
48223          # Otherwise we believe it is a complete path. Use it as it is.
48224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48225$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48226          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48227$as_echo_n "checking for JTREGEXE... " >&6; }
48228          if test ! -x "$tool_specified"; then
48229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48230$as_echo "not found" >&6; }
48231            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48232          fi
48233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48234$as_echo "$tool_specified" >&6; }
48235        fi
48236      fi
48237    fi
48238
48239  fi
48240
48241
48242
48243  if test "x$JTREGEXE" = x; then
48244    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48245  fi
48246
48247
48248      JT_HOME="`$DIRNAME $JTREGEXE`"
48249    fi
48250  fi
48251
48252
48253
48254
48255
48256
48257  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48258  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48259  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48260  #                              commands produced by the link step (currently AIX only)
48261  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48262    COMPILER_TARGET_BITS_FLAG="-q"
48263    COMPILER_COMMAND_FILE_FLAG="-f"
48264    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48265  else
48266    COMPILER_TARGET_BITS_FLAG="-m"
48267    COMPILER_COMMAND_FILE_FLAG="@"
48268    COMPILER_BINDCMD_FILE_FLAG=""
48269
48270    # The solstudio linker does not support @-files.
48271    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48272      COMPILER_COMMAND_FILE_FLAG=
48273    fi
48274
48275    # Check if @file is supported by gcc
48276    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48277      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48278$as_echo_n "checking if @file is supported by gcc... " >&6; }
48279      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48280      $ECHO "" "--version" > command.file
48281      if $CXX @command.file 2>&5 >&5; then
48282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48283$as_echo "yes" >&6; }
48284        COMPILER_COMMAND_FILE_FLAG="@"
48285      else
48286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48287$as_echo "no" >&6; }
48288        COMPILER_COMMAND_FILE_FLAG=
48289      fi
48290      $RM command.file
48291    fi
48292  fi
48293
48294
48295
48296
48297  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48298  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48299    ARFLAGS="-r"
48300  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48301    ARFLAGS="-X64"
48302  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48303    # lib.exe is used as AR to create static libraries.
48304    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48305  else
48306    ARFLAGS=""
48307  fi
48308
48309
48310  ## Setup strip.
48311  # FIXME: should this really be per platform, or should it be per toolchain type?
48312  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48313  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48314  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48315    STRIPFLAGS="-g"
48316  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48317    STRIPFLAGS="-x"
48318  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48319    STRIPFLAGS="-S"
48320  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48321    STRIPFLAGS="-X32_64"
48322  fi
48323
48324
48325
48326  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48327    CC_OUT_OPTION=-Fo
48328    EXE_OUT_OPTION=-out:
48329    LD_OUT_OPTION=-out:
48330    AR_OUT_OPTION=-out:
48331  else
48332    # The option used to specify the target .o,.a or .so file.
48333    # When compiling, how to specify the to be created object file.
48334    CC_OUT_OPTION='-o$(SPACE)'
48335    # When linking, how to specify the to be created executable.
48336    EXE_OUT_OPTION='-o$(SPACE)'
48337    # When linking, how to specify the to be created dynamically linkable library.
48338    LD_OUT_OPTION='-o$(SPACE)'
48339    # When archiving, how to specify the to be create static archive for object files.
48340    AR_OUT_OPTION='rcs$(SPACE)'
48341  fi
48342
48343
48344
48345
48346
48347  # On Windows, we need to set RC flags.
48348  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48349    RC_FLAGS="-nologo -l0x409"
48350    JVM_RCFLAGS="-nologo"
48351    if test "x$DEBUG_LEVEL" = xrelease; then
48352      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48353      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48354    fi
48355
48356    # The version variables used to create RC_FLAGS may be overridden
48357    # in a custom configure script, or possibly the command line.
48358    # Let those variables be expanded at make time in spec.gmk.
48359    # The \$ are escaped to the shell, and the $(...) variables
48360    # are evaluated by make.
48361    RC_FLAGS="$RC_FLAGS \
48362        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48363        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48364        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48365        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48366        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48367        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48368        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48369
48370    JVM_RCFLAGS="$JVM_RCFLAGS \
48371        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48372        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48373        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48374        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48375        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48376        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48377        -D\"HS_FNAME=jvm.dll\" \
48378        -D\"HS_INTERNAL_NAME=jvm\""
48379  fi
48380
48381
48382
48383  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48384    # silence copyright notice and other headers.
48385    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48386  fi
48387
48388
48389# Now we can test some aspects on the target using configure macros.
48390
48391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48392$as_echo_n "checking for ANSI C header files... " >&6; }
48393if ${ac_cv_header_stdc+:} false; then :
48394  $as_echo_n "(cached) " >&6
48395else
48396  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48397/* end confdefs.h.  */
48398#include <stdlib.h>
48399#include <stdarg.h>
48400#include <string.h>
48401#include <float.h>
48402
48403int
48404main ()
48405{
48406
48407  ;
48408  return 0;
48409}
48410_ACEOF
48411if ac_fn_cxx_try_compile "$LINENO"; then :
48412  ac_cv_header_stdc=yes
48413else
48414  ac_cv_header_stdc=no
48415fi
48416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48417
48418if test $ac_cv_header_stdc = yes; then
48419  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48420  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48421/* end confdefs.h.  */
48422#include <string.h>
48423
48424_ACEOF
48425if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48426  $EGREP "memchr" >/dev/null 2>&1; then :
48427
48428else
48429  ac_cv_header_stdc=no
48430fi
48431rm -f conftest*
48432
48433fi
48434
48435if test $ac_cv_header_stdc = yes; then
48436  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48437  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48438/* end confdefs.h.  */
48439#include <stdlib.h>
48440
48441_ACEOF
48442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48443  $EGREP "free" >/dev/null 2>&1; then :
48444
48445else
48446  ac_cv_header_stdc=no
48447fi
48448rm -f conftest*
48449
48450fi
48451
48452if test $ac_cv_header_stdc = yes; then
48453  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48454  if test "$cross_compiling" = yes; then :
48455  :
48456else
48457  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48458/* end confdefs.h.  */
48459#include <ctype.h>
48460#include <stdlib.h>
48461#if ((' ' & 0x0FF) == 0x020)
48462# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48463# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48464#else
48465# define ISLOWER(c) \
48466		   (('a' <= (c) && (c) <= 'i') \
48467		     || ('j' <= (c) && (c) <= 'r') \
48468		     || ('s' <= (c) && (c) <= 'z'))
48469# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48470#endif
48471
48472#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48473int
48474main ()
48475{
48476  int i;
48477  for (i = 0; i < 256; i++)
48478    if (XOR (islower (i), ISLOWER (i))
48479	|| toupper (i) != TOUPPER (i))
48480      return 2;
48481  return 0;
48482}
48483_ACEOF
48484if ac_fn_cxx_try_run "$LINENO"; then :
48485
48486else
48487  ac_cv_header_stdc=no
48488fi
48489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48490  conftest.$ac_objext conftest.beam conftest.$ac_ext
48491fi
48492
48493fi
48494fi
48495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48496$as_echo "$ac_cv_header_stdc" >&6; }
48497if test $ac_cv_header_stdc = yes; then
48498
48499$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48500
48501fi
48502
48503# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48504for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48505		  inttypes.h stdint.h unistd.h
48506do :
48507  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48508ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48509"
48510if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48511  cat >>confdefs.h <<_ACEOF
48512#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48513_ACEOF
48514
48515fi
48516
48517done
48518
48519
48520
48521  ###############################################################################
48522  #
48523  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48524  # (The JVM can use 32 or 64 bit Java pointers but that decision
48525  # is made at runtime.)
48526  #
48527
48528  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48529    # Always specify -m flag on Solaris
48530    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48531
48532  # When we add flags to the "official" CFLAGS etc, we need to
48533  # keep track of these additions in ADDED_CFLAGS etc. These
48534  # will later be checked to make sure only controlled additions
48535  # have been made to CFLAGS etc.
48536  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48537  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48538  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48539
48540  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48541  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48542  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48543
48544  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48545  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48546  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48547
48548  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48549  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48550  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48551
48552  elif test "x$COMPILE_TYPE" = xreduced; then
48553    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48554      # Specify -m if running reduced on unix platforms
48555
48556  # When we add flags to the "official" CFLAGS etc, we need to
48557  # keep track of these additions in ADDED_CFLAGS etc. These
48558  # will later be checked to make sure only controlled additions
48559  # have been made to CFLAGS etc.
48560  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48561  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48562  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48563
48564  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48565  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48566  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48567
48568  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48569  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48570  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48571
48572  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48573  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48574  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48575
48576    fi
48577  fi
48578  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48579    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48580    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48581    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48582  fi
48583
48584  # Make compilation sanity check
48585  for ac_header in stdio.h
48586do :
48587  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48588if test "x$ac_cv_header_stdio_h" = xyes; then :
48589  cat >>confdefs.h <<_ACEOF
48590#define HAVE_STDIO_H 1
48591_ACEOF
48592
48593else
48594
48595    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48596$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48597    if test "x$COMPILE_TYPE" = xreduced; then
48598
48599  # Print a helpful message on how to acquire the necessary build dependency.
48600  # reduced is the help tag: freetype, cups, alsa etc
48601  MISSING_DEPENDENCY=reduced
48602
48603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48604    cygwin_help $MISSING_DEPENDENCY
48605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48606    msys_help $MISSING_DEPENDENCY
48607  else
48608    PKGHANDLER_COMMAND=
48609
48610    case $PKGHANDLER in
48611      apt-get)
48612        apt_help     $MISSING_DEPENDENCY ;;
48613      yum)
48614        yum_help     $MISSING_DEPENDENCY ;;
48615      brew)
48616        brew_help    $MISSING_DEPENDENCY ;;
48617      port)
48618        port_help    $MISSING_DEPENDENCY ;;
48619      pkgutil)
48620        pkgutil_help $MISSING_DEPENDENCY ;;
48621      pkgadd)
48622        pkgadd_help  $MISSING_DEPENDENCY ;;
48623    esac
48624
48625    if test "x$PKGHANDLER_COMMAND" != x; then
48626      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48627    fi
48628  fi
48629
48630      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48631$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48632    elif test "x$COMPILE_TYPE" = xcross; then
48633      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48634$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48635    fi
48636    as_fn_error $? "Cannot continue." "$LINENO" 5
48637
48638fi
48639
48640done
48641
48642
48643  # The cast to long int works around a bug in the HP C Compiler
48644# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48645# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48646# This bug is HP SR number 8606223364.
48647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48648$as_echo_n "checking size of int *... " >&6; }
48649if ${ac_cv_sizeof_int_p+:} false; then :
48650  $as_echo_n "(cached) " >&6
48651else
48652  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48653
48654else
48655  if test "$ac_cv_type_int_p" = yes; then
48656     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48658as_fn_error 77 "cannot compute sizeof (int *)
48659See \`config.log' for more details" "$LINENO" 5; }
48660   else
48661     ac_cv_sizeof_int_p=0
48662   fi
48663fi
48664
48665fi
48666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48667$as_echo "$ac_cv_sizeof_int_p" >&6; }
48668
48669
48670
48671cat >>confdefs.h <<_ACEOF
48672#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48673_ACEOF
48674
48675
48676
48677  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48678  if test "x$ac_cv_sizeof_int_p" = x; then
48679    # The test failed, lets stick to the assumed value.
48680    { $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
48681$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48682  else
48683    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48684
48685    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48686      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48687      # Let's try to implicitely set the compilers target architecture and retry the test
48688      { $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
48689$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;}
48690      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48691$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48692
48693  # When we add flags to the "official" CFLAGS etc, we need to
48694  # keep track of these additions in ADDED_CFLAGS etc. These
48695  # will later be checked to make sure only controlled additions
48696  # have been made to CFLAGS etc.
48697  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48698  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48699  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48700
48701  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48702  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48703  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48704
48705  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48706  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48707  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48708
48709  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48710  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48711  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48712
48713
48714      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48715      unset ac_cv_sizeof_int_p
48716      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48717      cat >>confdefs.h <<_ACEOF
48718#undef SIZEOF_INT_P
48719_ACEOF
48720
48721      # The cast to long int works around a bug in the HP C Compiler
48722# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48723# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48724# This bug is HP SR number 8606223364.
48725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48726$as_echo_n "checking size of int *... " >&6; }
48727if ${ac_cv_sizeof_int_p+:} false; then :
48728  $as_echo_n "(cached) " >&6
48729else
48730  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48731
48732else
48733  if test "$ac_cv_type_int_p" = yes; then
48734     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48736as_fn_error 77 "cannot compute sizeof (int *)
48737See \`config.log' for more details" "$LINENO" 5; }
48738   else
48739     ac_cv_sizeof_int_p=0
48740   fi
48741fi
48742
48743fi
48744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48745$as_echo "$ac_cv_sizeof_int_p" >&6; }
48746
48747
48748
48749cat >>confdefs.h <<_ACEOF
48750#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48751_ACEOF
48752
48753
48754
48755      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48756
48757      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48758        { $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
48759$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;}
48760        if test "x$COMPILE_TYPE" = xreduced; then
48761
48762  # Print a helpful message on how to acquire the necessary build dependency.
48763  # reduced is the help tag: freetype, cups, alsa etc
48764  MISSING_DEPENDENCY=reduced
48765
48766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48767    cygwin_help $MISSING_DEPENDENCY
48768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48769    msys_help $MISSING_DEPENDENCY
48770  else
48771    PKGHANDLER_COMMAND=
48772
48773    case $PKGHANDLER in
48774      apt-get)
48775        apt_help     $MISSING_DEPENDENCY ;;
48776      yum)
48777        yum_help     $MISSING_DEPENDENCY ;;
48778      brew)
48779        brew_help    $MISSING_DEPENDENCY ;;
48780      port)
48781        port_help    $MISSING_DEPENDENCY ;;
48782      pkgutil)
48783        pkgutil_help $MISSING_DEPENDENCY ;;
48784      pkgadd)
48785        pkgadd_help  $MISSING_DEPENDENCY ;;
48786    esac
48787
48788    if test "x$PKGHANDLER_COMMAND" != x; then
48789      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48790    fi
48791  fi
48792
48793          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48794$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48795        elif test "x$COMPILE_TYPE" = xcross; then
48796          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48797$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48798        fi
48799        as_fn_error $? "Cannot continue." "$LINENO" 5
48800      fi
48801    fi
48802  fi
48803
48804  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48805$as_echo_n "checking for target address size... " >&6; }
48806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48807$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48808
48809
48810  ###############################################################################
48811  #
48812  # Is the target little of big endian?
48813  #
48814   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48815$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48816if ${ac_cv_c_bigendian+:} false; then :
48817  $as_echo_n "(cached) " >&6
48818else
48819  ac_cv_c_bigendian=unknown
48820    # See if we're dealing with a universal compiler.
48821    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48822/* end confdefs.h.  */
48823#ifndef __APPLE_CC__
48824	       not a universal capable compiler
48825	     #endif
48826	     typedef int dummy;
48827
48828_ACEOF
48829if ac_fn_cxx_try_compile "$LINENO"; then :
48830
48831	# Check for potential -arch flags.  It is not universal unless
48832	# there are at least two -arch flags with different values.
48833	ac_arch=
48834	ac_prev=
48835	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48836	 if test -n "$ac_prev"; then
48837	   case $ac_word in
48838	     i?86 | x86_64 | ppc | ppc64)
48839	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48840		 ac_arch=$ac_word
48841	       else
48842		 ac_cv_c_bigendian=universal
48843		 break
48844	       fi
48845	       ;;
48846	   esac
48847	   ac_prev=
48848	 elif test "x$ac_word" = "x-arch"; then
48849	   ac_prev=arch
48850	 fi
48851       done
48852fi
48853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48854    if test $ac_cv_c_bigendian = unknown; then
48855      # See if sys/param.h defines the BYTE_ORDER macro.
48856      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48857/* end confdefs.h.  */
48858#include <sys/types.h>
48859	     #include <sys/param.h>
48860
48861int
48862main ()
48863{
48864#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48865		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48866		     && LITTLE_ENDIAN)
48867	      bogus endian macros
48868	     #endif
48869
48870  ;
48871  return 0;
48872}
48873_ACEOF
48874if ac_fn_cxx_try_compile "$LINENO"; then :
48875  # It does; now see whether it defined to BIG_ENDIAN or not.
48876	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48877/* end confdefs.h.  */
48878#include <sys/types.h>
48879		#include <sys/param.h>
48880
48881int
48882main ()
48883{
48884#if BYTE_ORDER != BIG_ENDIAN
48885		 not big endian
48886		#endif
48887
48888  ;
48889  return 0;
48890}
48891_ACEOF
48892if ac_fn_cxx_try_compile "$LINENO"; then :
48893  ac_cv_c_bigendian=yes
48894else
48895  ac_cv_c_bigendian=no
48896fi
48897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48898fi
48899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48900    fi
48901    if test $ac_cv_c_bigendian = unknown; then
48902      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48903      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48904/* end confdefs.h.  */
48905#include <limits.h>
48906
48907int
48908main ()
48909{
48910#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48911	      bogus endian macros
48912	     #endif
48913
48914  ;
48915  return 0;
48916}
48917_ACEOF
48918if ac_fn_cxx_try_compile "$LINENO"; then :
48919  # It does; now see whether it defined to _BIG_ENDIAN or not.
48920	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48921/* end confdefs.h.  */
48922#include <limits.h>
48923
48924int
48925main ()
48926{
48927#ifndef _BIG_ENDIAN
48928		 not big endian
48929		#endif
48930
48931  ;
48932  return 0;
48933}
48934_ACEOF
48935if ac_fn_cxx_try_compile "$LINENO"; then :
48936  ac_cv_c_bigendian=yes
48937else
48938  ac_cv_c_bigendian=no
48939fi
48940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48941fi
48942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48943    fi
48944    if test $ac_cv_c_bigendian = unknown; then
48945      # Compile a test program.
48946      if test "$cross_compiling" = yes; then :
48947  # Try to guess by grepping values from an object file.
48948	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48949/* end confdefs.h.  */
48950short int ascii_mm[] =
48951		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48952		short int ascii_ii[] =
48953		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48954		int use_ascii (int i) {
48955		  return ascii_mm[i] + ascii_ii[i];
48956		}
48957		short int ebcdic_ii[] =
48958		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48959		short int ebcdic_mm[] =
48960		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48961		int use_ebcdic (int i) {
48962		  return ebcdic_mm[i] + ebcdic_ii[i];
48963		}
48964		extern int foo;
48965
48966int
48967main ()
48968{
48969return use_ascii (foo) == use_ebcdic (foo);
48970  ;
48971  return 0;
48972}
48973_ACEOF
48974if ac_fn_cxx_try_compile "$LINENO"; then :
48975  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48976	      ac_cv_c_bigendian=yes
48977	    fi
48978	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48979	      if test "$ac_cv_c_bigendian" = unknown; then
48980		ac_cv_c_bigendian=no
48981	      else
48982		# finding both strings is unlikely to happen, but who knows?
48983		ac_cv_c_bigendian=unknown
48984	      fi
48985	    fi
48986fi
48987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48988else
48989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48990/* end confdefs.h.  */
48991$ac_includes_default
48992int
48993main ()
48994{
48995
48996	     /* Are we little or big endian?  From Harbison&Steele.  */
48997	     union
48998	     {
48999	       long int l;
49000	       char c[sizeof (long int)];
49001	     } u;
49002	     u.l = 1;
49003	     return u.c[sizeof (long int) - 1] == 1;
49004
49005  ;
49006  return 0;
49007}
49008_ACEOF
49009if ac_fn_cxx_try_run "$LINENO"; then :
49010  ac_cv_c_bigendian=no
49011else
49012  ac_cv_c_bigendian=yes
49013fi
49014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49015  conftest.$ac_objext conftest.beam conftest.$ac_ext
49016fi
49017
49018    fi
49019fi
49020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49021$as_echo "$ac_cv_c_bigendian" >&6; }
49022 case $ac_cv_c_bigendian in #(
49023   yes)
49024     ENDIAN="big";; #(
49025   no)
49026     ENDIAN="little" ;; #(
49027   universal)
49028     ENDIAN="universal_endianness"
49029     ;; #(
49030   *)
49031     ENDIAN="unknown" ;;
49032 esac
49033
49034
49035  if test "x$ENDIAN" = xuniversal_endianness; then
49036    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49037  fi
49038  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49039    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
49040  fi
49041
49042
49043# Configure flags for the tools
49044
49045  ###############################################################################
49046  #
49047  # How to compile shared libraries.
49048  #
49049
49050  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49051    PICFLAG="-fPIC"
49052    C_FLAG_REORDER=''
49053    CXX_FLAG_REORDER=''
49054
49055    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49056      # Linking is different on MacOSX
49057      if test "x$STATIC_BUILD" = xtrue; then
49058        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49059      else
49060        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49061        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49062      fi
49063      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49064      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49065      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49066      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49067    else
49068      # Default works for linux, might work on other platforms as well.
49069      SHARED_LIBRARY_FLAGS='-shared'
49070      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49071      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49072      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49073      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49074    fi
49075  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49076    C_FLAG_REORDER=''
49077    CXX_FLAG_REORDER=''
49078
49079    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49080      # Linking is different on MacOSX
49081      PICFLAG=''
49082      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49083      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49084      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49085      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49086      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49087
49088      if test "x$STATIC_BUILD" = xfalse; then
49089        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49090      fi
49091    else
49092      # Default works for linux, might work on other platforms as well.
49093      PICFLAG='-fPIC'
49094      SHARED_LIBRARY_FLAGS='-shared'
49095      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49096      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49097      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49098
49099      # arm specific settings
49100      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49101        # '-Wl,-z,origin' isn't used on arm.
49102        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49103      else
49104        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49105      fi
49106
49107    fi
49108  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49109    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49110      PICFLAG="-xcode=pic32"
49111    else
49112      PICFLAG="-KPIC"
49113    fi
49114    C_FLAG_REORDER='-xF'
49115    CXX_FLAG_REORDER='-xF'
49116    SHARED_LIBRARY_FLAGS="-G"
49117    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49118    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49119    SET_SHARED_LIBRARY_NAME='-h $1'
49120    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49121  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49122    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49123    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49124    # will have to patch this single instruction with a call to some out-of-order code which
49125    # does the load from the TOC. This is of course slow. But in that case we also would have
49126    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49127    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49128    # can be patched directly by the linker and does not require a jump to out-of-order code.
49129    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49130    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49131    # loads for accessing a global variable). But there are rumors that this may be seen as a
49132    # 'performance feature' because of improved code locality of the symbols used in a
49133    # compilation unit.
49134    PICFLAG="-qpic"
49135    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49136    C_FLAG_REORDER=''
49137    CXX_FLAG_REORDER=''
49138    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49139    SET_EXECUTABLE_ORIGIN=""
49140    SET_SHARED_LIBRARY_ORIGIN=''
49141    SET_SHARED_LIBRARY_NAME=''
49142    SET_SHARED_LIBRARY_MAPFILE=''
49143  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49144    PICFLAG=""
49145    C_FLAG_REORDER=''
49146    CXX_FLAG_REORDER=''
49147    SHARED_LIBRARY_FLAGS="-dll"
49148    SET_EXECUTABLE_ORIGIN=''
49149    SET_SHARED_LIBRARY_ORIGIN=''
49150    SET_SHARED_LIBRARY_NAME=''
49151    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49152  fi
49153
49154
49155
49156
49157
49158
49159
49160
49161
49162  # The (cross) compiler is now configured, we can now test capabilities
49163  # of the target platform.
49164
49165
49166
49167  ###############################################################################
49168  #
49169  # Setup the opt flags for different compilers
49170  # and different operating systems.
49171  #
49172
49173  # FIXME: this was indirectly the old default, but just inherited.
49174  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49175  #   C_FLAG_DEPS="-MMD -MF"
49176  # fi
49177
49178  # Generate make dependency files
49179  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49180    C_FLAG_DEPS="-MMD -MF"
49181  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49182    C_FLAG_DEPS="-MMD -MF"
49183  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49184    C_FLAG_DEPS="-xMMD -xMF"
49185  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49186    C_FLAG_DEPS="-qmakedep=gcc -MF"
49187  fi
49188  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49189
49190
49191
49192  # Debug symbols
49193  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49194    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49195      # reduce from default "-g2" option to save space
49196      CFLAGS_DEBUG_SYMBOLS="-g1"
49197      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49198    else
49199      CFLAGS_DEBUG_SYMBOLS="-g"
49200      CXXFLAGS_DEBUG_SYMBOLS="-g"
49201    fi
49202  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49203    CFLAGS_DEBUG_SYMBOLS="-g"
49204    CXXFLAGS_DEBUG_SYMBOLS="-g"
49205  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49206    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49207    # -g0 enables debug symbols without disabling inlining.
49208    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49209  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49210    CFLAGS_DEBUG_SYMBOLS="-g"
49211    CXXFLAGS_DEBUG_SYMBOLS="-g"
49212  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49213    CFLAGS_DEBUG_SYMBOLS="-Zi"
49214    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49215  fi
49216
49217
49218
49219  # Debug symbols for JVM_CFLAGS
49220  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49221    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49222    if test "x$DEBUG_LEVEL" = xslowdebug; then
49223      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49224    else
49225      # -g0 does not disable inlining, which -g does.
49226      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49227    fi
49228  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49229    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49230  else
49231    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49232  fi
49233
49234
49235  # bounds, memory and behavior checking options
49236  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49237    case $DEBUG_LEVEL in
49238    release )
49239      # no adjustment
49240      ;;
49241    fastdebug )
49242      # no adjustment
49243      ;;
49244    slowdebug )
49245      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49246      # get's added conditionally on whether we produce debug symbols or not.
49247      # This is most likely not really correct.
49248
49249      # Add runtime stack smashing and undefined behavior checks.
49250      # Not all versions of gcc support -fstack-protector
49251      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294    # Execute function body
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343    # Execute function body
49344
49345  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49346$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49347  supports=yes
49348
49349  saved_cflags="$CFLAGS"
49350  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49351  ac_ext=c
49352ac_cpp='$CPP $CPPFLAGS'
49353ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49354ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49355ac_compiler_gnu=$ac_cv_c_compiler_gnu
49356
49357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49358/* end confdefs.h.  */
49359int i;
49360_ACEOF
49361if ac_fn_c_try_compile "$LINENO"; then :
49362
49363else
49364  supports=no
49365fi
49366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49367  ac_ext=cpp
49368ac_cpp='$CXXCPP $CPPFLAGS'
49369ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49370ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49371ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49372
49373  CFLAGS="$saved_cflags"
49374
49375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49376$as_echo "$supports" >&6; }
49377  if test "x$supports" = "xyes" ; then
49378    :
49379    C_COMP_SUPPORTS="yes"
49380  else
49381    :
49382    C_COMP_SUPPORTS="no"
49383  fi
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443    # Execute function body
49444
49445  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49446$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49447  supports=yes
49448
49449  saved_cxxflags="$CXXFLAGS"
49450  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49451  ac_ext=cpp
49452ac_cpp='$CXXCPP $CPPFLAGS'
49453ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49454ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49455ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49456
49457  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49458/* end confdefs.h.  */
49459int i;
49460_ACEOF
49461if ac_fn_cxx_try_compile "$LINENO"; then :
49462
49463else
49464  supports=no
49465fi
49466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49467  ac_ext=cpp
49468ac_cpp='$CXXCPP $CPPFLAGS'
49469ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49470ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49471ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49472
49473  CXXFLAGS="$saved_cxxflags"
49474
49475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49476$as_echo "$supports" >&6; }
49477  if test "x$supports" = "xyes" ; then
49478    :
49479    CXX_COMP_SUPPORTS="yes"
49480  else
49481    :
49482    CXX_COMP_SUPPORTS="no"
49483  fi
49484
49485
49486
49487
49488
49489
49490
49491
49492
49493
49494
49495
49496
49497  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49498$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49499  supports=no
49500  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49501
49502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49503$as_echo "$supports" >&6; }
49504  if test "x$supports" = "xyes" ; then
49505    :
49506
49507  else
49508    :
49509    STACK_PROTECTOR_CFLAG=""
49510  fi
49511
49512
49513
49514
49515
49516
49517
49518      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49519      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49520      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49521        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49522      fi
49523      ;;
49524    esac
49525  fi
49526
49527  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49528    if test "x$DEBUG_LEVEL" != xrelease; then
49529      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49530        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49531      fi
49532    fi
49533  fi
49534
49535  # Optimization levels
49536  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49537    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49538
49539    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49540      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49541      C_O_FLAG_HIGHEST_JVM="-xO4"
49542      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49543      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49544      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49545      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49546      C_O_FLAG_DEBUG_JVM=""
49547      C_O_FLAG_NONE="-xregs=no%frameptr"
49548      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49549      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49550      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49551      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49552      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49553      CXX_O_FLAG_DEBUG_JVM=""
49554      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49555      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49556        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49557        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49558      fi
49559    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49560      C_O_FLAG_HIGHEST_JVM="-xO4"
49561      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49562      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49563      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49564      C_O_FLAG_DEBUG=""
49565      C_O_FLAG_DEBUG_JVM=""
49566      C_O_FLAG_NONE=""
49567      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49568      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49569      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49570      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49571      CXX_O_FLAG_DEBUG=""
49572      CXX_O_FLAG_DEBUG_JVM=""
49573      CXX_O_FLAG_NONE=""
49574    fi
49575  else
49576    # The remaining toolchains share opt flags between CC and CXX;
49577    # setup for C and duplicate afterwards.
49578    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49579      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49580        # On MacOSX we optimize for size, something
49581        # we should do for all platforms?
49582        C_O_FLAG_HIGHEST_JVM="-Os"
49583        C_O_FLAG_HIGHEST="-Os"
49584        C_O_FLAG_HI="-Os"
49585        C_O_FLAG_NORM="-Os"
49586        C_O_FLAG_SIZE="-Os"
49587      else
49588        C_O_FLAG_HIGHEST_JVM="-O3"
49589        C_O_FLAG_HIGHEST="-O3"
49590        C_O_FLAG_HI="-O3"
49591        C_O_FLAG_NORM="-O2"
49592        C_O_FLAG_SIZE="-Os"
49593      fi
49594      C_O_FLAG_DEBUG="-O0"
49595      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49596        C_O_FLAG_DEBUG_JVM=""
49597      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49598        C_O_FLAG_DEBUG_JVM="-O0"
49599      fi
49600      C_O_FLAG_NONE="-O0"
49601    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49602      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49603        # On MacOSX we optimize for size, something
49604        # we should do for all platforms?
49605        C_O_FLAG_HIGHEST_JVM="-Os"
49606        C_O_FLAG_HIGHEST="-Os"
49607        C_O_FLAG_HI="-Os"
49608        C_O_FLAG_NORM="-Os"
49609        C_O_FLAG_SIZE="-Os"
49610      else
49611        C_O_FLAG_HIGHEST_JVM="-O3"
49612        C_O_FLAG_HIGHEST="-O3"
49613        C_O_FLAG_HI="-O3"
49614        C_O_FLAG_NORM="-O2"
49615        C_O_FLAG_SIZE="-Os"
49616      fi
49617      C_O_FLAG_DEBUG="-O0"
49618      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49619        C_O_FLAG_DEBUG_JVM=""
49620      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49621        C_O_FLAG_DEBUG_JVM="-O0"
49622      fi
49623      C_O_FLAG_NONE="-O0"
49624    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49625      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49626      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49627      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49628      C_O_FLAG_NORM="-O2"
49629      C_O_FLAG_DEBUG="-qnoopt"
49630      # FIXME: Value below not verified.
49631      C_O_FLAG_DEBUG_JVM=""
49632      C_O_FLAG_NONE="-qnoopt"
49633    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49634      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49635      C_O_FLAG_HIGHEST="-O2"
49636      C_O_FLAG_HI="-O1"
49637      C_O_FLAG_NORM="-O1"
49638      C_O_FLAG_DEBUG="-Od"
49639      C_O_FLAG_DEBUG_JVM=""
49640      C_O_FLAG_NONE="-Od"
49641      C_O_FLAG_SIZE="-Os"
49642    fi
49643    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49644    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49645    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49646    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49647    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49648    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49649    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49650    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49651  fi
49652
49653  # Adjust optimization flags according to debug level.
49654  case $DEBUG_LEVEL in
49655    release )
49656      # no adjustment
49657      ;;
49658    fastdebug )
49659      # Not quite so much optimization
49660      C_O_FLAG_HI="$C_O_FLAG_NORM"
49661      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49662      ;;
49663    slowdebug )
49664      # Disable optimization
49665      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49666      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49667      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49668      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49669      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49670      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49671      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49672      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49673      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49674      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49675      ;;
49676  esac
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697# Check whether --with-abi-profile was given.
49698if test "${with_abi_profile+set}" = set; then :
49699  withval=$with_abi_profile;
49700fi
49701
49702
49703  if test "x$with_abi_profile" != x; then
49704    if test "x$OPENJDK_TARGET_CPU" != xarm && \
49705        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
49706      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
49707    fi
49708
49709    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
49710    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
49711$as_echo_n "checking for ABI profle... " >&6; }
49712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
49713$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
49714
49715    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
49716      ARM_FLOAT_TYPE=vfp-sflt
49717      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49718    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
49719      ARM_FLOAT_TYPE=vfp-hflt
49720      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49721    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
49722      ARM_FLOAT_TYPE=sflt
49723      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49724    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
49725      ARM_FLOAT_TYPE=vfp-sflt
49726      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49727    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
49728      ARM_FLOAT_TYPE=vfp-hflt
49729      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
49730    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
49731      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49732      ARM_FLOAT_TYPE=
49733      ARM_ARCH_TYPE_FLAGS=
49734    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
49735      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49736      ARM_FLOAT_TYPE=
49737      ARM_ARCH_TYPE_FLAGS=
49738    else
49739      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
49740    fi
49741
49742    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
49743      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
49744    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
49745      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
49746    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
49747      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
49748    fi
49749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
49750$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
49751    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
49752$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
49753
49754    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
49755$as_echo_n "checking for arch type flags... " >&6; }
49756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
49757$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
49758
49759    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
49760    # autoconf target triplet.
49761     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
49762    # Sanity check that it is a known ABI.
49763    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
49764        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
49765        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
49766          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
49767$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
49768    fi
49769    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
49770$as_echo_n "checking for ABI property name... " >&6; }
49771    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
49772$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
49773
49774
49775    # Pass these on to the open part of configure as if they were set using
49776    # --with-extra-c[xx]flags.
49777    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49778    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49779    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
49780    # FIXME: This should not really be set using extra_cflags.
49781    if test "x$OPENJDK_TARGET_CPU" = xarm; then
49782        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
49783        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
49784    fi
49785    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
49786    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
49787    # And pass the architecture flags to the linker as well
49788    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
49789  fi
49790
49791  # When building with an abi profile, the name of that profile is appended on the
49792  # bundle platform, which is used in bundle names.
49793  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
49794    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
49795  fi
49796
49797
49798  # Special extras...
49799  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49800    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49801      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49802      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49803    fi
49804    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49805    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49806  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49807    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49808    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49809  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49810    CXXSTD_CXXFLAG="-std=gnu++98"
49811
49812
49813
49814
49815
49816
49817
49818
49819
49820
49821
49822
49823
49824
49825
49826
49827
49828
49829
49830
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853    # Execute function body
49854
49855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49856$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49857  supports=yes
49858
49859  saved_cxxflags="$CXXFLAGS"
49860  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49861  ac_ext=cpp
49862ac_cpp='$CXXCPP $CPPFLAGS'
49863ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49864ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49865ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49866
49867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49868/* end confdefs.h.  */
49869int i;
49870_ACEOF
49871if ac_fn_cxx_try_compile "$LINENO"; then :
49872
49873else
49874  supports=no
49875fi
49876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49877  ac_ext=cpp
49878ac_cpp='$CXXCPP $CPPFLAGS'
49879ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49880ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49881ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49882
49883  CXXFLAGS="$saved_cxxflags"
49884
49885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49886$as_echo "$supports" >&6; }
49887  if test "x$supports" = "xyes" ; then
49888    :
49889
49890  else
49891    :
49892    CXXSTD_CXXFLAG=""
49893  fi
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49907    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49908
49909  fi
49910  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49911    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49912    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49913  fi
49914
49915  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49916  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49917  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49918
49919  ###############################################################################
49920  #
49921  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49922  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49923  #
49924
49925  # Setup compiler/platform specific flags into
49926  #    CFLAGS_JDK    - C Compiler flags
49927  #    CXXFLAGS_JDK  - C++ Compiler flags
49928  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49929  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49930    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49931    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49932    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49933    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49934      # Force compatibility with i586 on 32 bit intel platforms.
49935      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49936      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49937    fi
49938    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49939        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49940    case $OPENJDK_TARGET_CPU_ARCH in
49941      arm )
49942        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49943        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49944        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
49945        ;;
49946      ppc )
49947        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49948        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49949        ;;
49950      s390 )
49951        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49952        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49953        ;;
49954      * )
49955        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49956        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49957        ;;
49958    esac
49959
49960
49961
49962
49963
49964
49965
49966
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002
50003
50004
50005
50006
50007
50008
50009
50010
50011
50012
50013    # Execute function body
50014
50015  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50016  REFERENCE_VERSION=6
50017
50018  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50019    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50020  fi
50021
50022  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50023    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50024  fi
50025
50026  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50027  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50028
50029  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50030    :
50031
50032  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50033  # runs afoul of the more aggressive versions of these optimisations.
50034  # Notably, value range propagation now assumes that the this pointer of C++
50035  # member functions is non-null.
50036  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50037        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50038        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50039$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50040  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50041  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50042
50043  else
50044    :
50045
50046  fi
50047
50048
50049
50050
50051
50052
50053
50054
50055
50056
50057
50058
50059
50060
50061  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50062    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50063
50064    # Restrict the debug information created by Clang to avoid
50065    # too big object files and speed the build up a little bit
50066    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50067    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50068    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50069      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50070        # Force compatibility with i586 on 32 bit intel platforms.
50071        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50072        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50073      fi
50074      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50075      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50076          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50077      case $OPENJDK_TARGET_CPU_ARCH in
50078        ppc )
50079          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50080          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50081          ;;
50082        * )
50083          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50084          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50085          ;;
50086      esac
50087    fi
50088  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50089    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50090    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50091    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50092      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50093    fi
50094
50095    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50096    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50097  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50098    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50099    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50100    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50101  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50102    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50103        -MD -Zc:wchar_t- -W3 -wd4800 \
50104        -DWIN32_LEAN_AND_MEAN \
50105        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50106        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50107        -DWIN32 -DIAL"
50108    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50109      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50110    else
50111      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50112    fi
50113    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50114    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50115    # studio.
50116    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50117      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50118      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50119      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50120    fi
50121  fi
50122
50123  ###############################################################################
50124
50125  # Adjust flags according to debug level.
50126  case $DEBUG_LEVEL in
50127    fastdebug | slowdebug )
50128      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50129      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50130      ;;
50131    release )
50132      ;;
50133    * )
50134      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50135      ;;
50136  esac
50137
50138  # Set some common defines. These works for all compilers, but assume
50139  # -D is universally accepted.
50140
50141  # Setup endianness
50142  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50143    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50144    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50145    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50146    #   Note: -Dmacro         is the same as    #define macro 1
50147    #         -Dmacro=        is the same as    #define macro
50148    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50149      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50150    else
50151      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50152    fi
50153  else
50154    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50155    # are defined in the system?
50156    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50157      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50158    else
50159      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50160    fi
50161  fi
50162
50163  # Setup target OS define. Use OS target name but in upper case.
50164  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50165  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50166
50167  # Setup target CPU
50168  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50169      $OPENJDK_TARGET_ADD_LP64 \
50170      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50171
50172  # Setup debug/release defines
50173  if test "x$DEBUG_LEVEL" = xrelease; then
50174    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50175    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50176      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50177    fi
50178  else
50179    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50180  fi
50181
50182  # Set some additional per-OS defines.
50183  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50184    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50185    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50186        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50187  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50188    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50189    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50190        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50191  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50192    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50193    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50194    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50195    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50196        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50197        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50198        -fno-omit-frame-pointer"
50199  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50200    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50201    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50202    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50203        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50204        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50205  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50206    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50207  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50208    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50209    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50210  fi
50211
50212  # Set some additional per-CPU defines.
50213  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50214    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50215  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50216    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50217  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50218    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50219      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50220      # fixes `relocation truncated to fit' error for gcc 4.1.
50221      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50222      # Use ppc64 instructions, but schedule for power5
50223      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50224    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50225      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50226    fi
50227  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50228    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50229      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50230      # Little endian machine uses ELFv2 ABI.
50231      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50232      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50233      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50234    fi
50235  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50236    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50237      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50238    fi
50239  fi
50240
50241  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50242    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50243  fi
50244
50245  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50246    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50247      # Solaris does not have _LP64=1 in the old build.
50248      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50249      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50250    fi
50251  fi
50252
50253  # Set JVM_CFLAGS warning handling
50254  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50255    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50256        -Wunused-value -Woverloaded-virtual"
50257
50258    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269
50270
50271
50272
50273
50274
50275
50276
50277
50278
50279
50280
50281
50282
50283
50284
50285
50286
50287
50288
50289
50290
50291
50292
50293
50294
50295
50296
50297
50298
50299
50300
50301
50302
50303
50304
50305
50306
50307
50308
50309
50310
50311
50312
50313    # Execute function body
50314
50315  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50316  REFERENCE_VERSION=4.8
50317
50318  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50319    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50320  fi
50321
50322  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50323    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50324  fi
50325
50326  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50327  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50328
50329  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50330    :
50331
50332            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50333            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50334
50335
50336  else
50337    :
50338
50339  fi
50340
50341
50342
50343
50344
50345
50346
50347
50348
50349
50350
50351
50352
50353
50354    fi
50355    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50356      # Non-zero builds have stricter warnings
50357      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50358    else
50359      if test "x$TOOLCHAIN_TYPE" = xclang; then
50360        # Some versions of llvm do not like -Wundef
50361        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50362      fi
50363    fi
50364  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50365    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50366        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50367  fi
50368
50369  # Additional macosx handling
50370  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50371    # Setting these parameters makes it an error to link to macosx APIs that are
50372    # newer than the given OS version and makes the linked binaries compatible
50373    # even if built on a newer version of the OS.
50374    # The expected format is X.Y.Z
50375    MACOSX_VERSION_MIN=10.7.0
50376
50377
50378    # The macro takes the version with no dots, ex: 1070
50379    # Let the flags variables get resolved in make for easier override on make
50380    # command line.
50381    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50382    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50383  fi
50384
50385  # Setup some hard coded includes
50386  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50387      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50388      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50389      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50390      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50391      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50392      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50393
50394  # The shared libraries are compiled using the picflag.
50395  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50396      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50397  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50398      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50399
50400  # Executable flags
50401  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50402  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50403
50404
50405
50406
50407
50408
50409  # Setup LDFLAGS et al.
50410  #
50411
50412  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50413    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50414    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50415    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50416    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50417      LDFLAGS_SAFESH="-safeseh"
50418      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50419      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50420      # NOTE: Old build added -machine. Probably not needed.
50421      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50422    else
50423      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50424    fi
50425  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50426      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50427      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50428        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50429        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50430    fi
50431  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50432    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50433    # We have previously set HAS_GNU_HASH if this is the case
50434    if test -n "$HAS_GNU_HASH"; then
50435      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50436      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50437      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50438    fi
50439      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50440        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50441    fi
50442    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50443      # And since we now know that the linker is gnu, then add -z defs, to forbid
50444      # undefined symbols in object files.
50445      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50446      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50447      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50448      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50449      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50450      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50451        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50452      fi
50453      case $DEBUG_LEVEL in
50454        release )
50455          # tell linker to optimize libraries.
50456          # Should this be supplied to the OSS linker as well?
50457          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50458          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50459          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50460          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50461            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50462          fi
50463          ;;
50464        slowdebug )
50465          # Hotspot always let the linker optimize
50466          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50467          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50468            # do relocations at load
50469            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50470            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50471            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50472          fi
50473          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50474            # mark relocations read only
50475            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50476            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50477            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50478          fi
50479          ;;
50480        fastdebug )
50481          # Hotspot always let the linker optimize
50482          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50483          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50484            # mark relocations read only
50485            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50486            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50487            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50488          fi
50489          ;;
50490        * )
50491          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50492          ;;
50493        esac
50494    fi
50495  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50496    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50497    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50498    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50499    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50500    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50501    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50502      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50503    fi
50504  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50505    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50506    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50507    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50508  fi
50509
50510  # Customize LDFLAGS for executables
50511
50512  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50513
50514  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50515    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50516      LDFLAGS_STACK_SIZE=1048576
50517    else
50518      LDFLAGS_STACK_SIZE=327680
50519    fi
50520    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50521  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50522    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50523  fi
50524
50525  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50526
50527  # Customize LDFLAGS for libs
50528  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50529
50530  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50531  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50532    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50533        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50534    JDKLIB_LIBS=""
50535  else
50536    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50537        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50538
50539    if test "xTARGET" = "xTARGET"; then
50540      # On some platforms (mac) the linker warns about non existing -L dirs.
50541      # For any of the variants server, client or minimal, the dir matches the
50542      # variant name. The "main" variant should be used for linking. For the
50543      # rest, the dir is just server.
50544      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50545          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50546        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50547            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50548      else
50549        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50550            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50551      fi
50552    elif test "xTARGET" = "xBUILD"; then
50553      # When building a buildjdk, it's always only the server variant
50554      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50555          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50556    fi
50557
50558    JDKLIB_LIBS="-ljava -ljvm"
50559    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50560      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50561    fi
50562
50563  fi
50564
50565LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50566
50567  # Set JVM_LIBS (per os)
50568  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50569    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50570  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50571    # FIXME: This hard-coded path is not really proper.
50572    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50573      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50574    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50575      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50576    fi
50577    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50578        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50579  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50580    JVM_LIBS="$JVM_LIBS -lm"
50581  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50582    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50583  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50584    JVM_LIBS="$JVM_LIBS -lm"
50585  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50586    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50587        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50588        wsock32.lib winmm.lib version.lib psapi.lib"
50589    fi
50590
50591  # Set JVM_ASFLAGS
50592  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50593    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50594      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50595    fi
50596  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50597    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50598  fi
50599
50600  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50601
50602
50603
50604
50605
50606
50607
50608
50609
50610
50611
50612
50613
50614
50615
50616  # Special extras...
50617  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50618    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50619      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50620      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50621    fi
50622    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50623    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50624  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50625    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50626    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50627  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50628    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50629
50630
50631
50632
50633
50634
50635
50636
50637
50638
50639
50640
50641
50642
50643
50644
50645
50646
50647
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671    # Execute function body
50672
50673  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50674$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50675  supports=yes
50676
50677  saved_cxxflags="$CXXFLAGS"
50678  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50679  ac_ext=cpp
50680ac_cpp='$CXXCPP $CPPFLAGS'
50681ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50682ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50683ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50684
50685  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50686/* end confdefs.h.  */
50687int i;
50688_ACEOF
50689if ac_fn_cxx_try_compile "$LINENO"; then :
50690
50691else
50692  supports=no
50693fi
50694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50695  ac_ext=cpp
50696ac_cpp='$CXXCPP $CPPFLAGS'
50697ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50698ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50699ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50700
50701  CXXFLAGS="$saved_cxxflags"
50702
50703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50704$as_echo "$supports" >&6; }
50705  if test "x$supports" = "xyes" ; then
50706    :
50707
50708  else
50709    :
50710    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50711  fi
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50725    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50726
50727  fi
50728  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50729    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50730    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50731  fi
50732
50733  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50734  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50735  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50736
50737  ###############################################################################
50738  #
50739  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50740  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50741  #
50742
50743  # Setup compiler/platform specific flags into
50744  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50745  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50746  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50747  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50748    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50749    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50750    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50751    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50752      # Force compatibility with i586 on 32 bit intel platforms.
50753      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50754      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50755    fi
50756    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50757        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50758    case $OPENJDK_BUILD_CPU_ARCH in
50759      arm )
50760        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50761        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50762        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
50763        ;;
50764      ppc )
50765        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50766        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50767        ;;
50768      s390 )
50769        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50770        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50771        ;;
50772      * )
50773        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50774        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50775        ;;
50776    esac
50777
50778
50779
50780
50781
50782
50783
50784
50785
50786
50787
50788
50789
50790
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    # Execute function body
50832
50833  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50834  REFERENCE_VERSION=6
50835
50836  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50837    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50838  fi
50839
50840  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50841    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50842  fi
50843
50844  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50845  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50846
50847  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50848    :
50849
50850  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50851  # runs afoul of the more aggressive versions of these optimisations.
50852  # Notably, value range propagation now assumes that the this pointer of C++
50853  # member functions is non-null.
50854  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50855        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50856        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50857$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50858  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50859  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50860
50861  else
50862    :
50863
50864  fi
50865
50866
50867
50868
50869
50870
50871
50872
50873
50874
50875
50876
50877
50878
50879  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50880    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50881
50882    # Restrict the debug information created by Clang to avoid
50883    # too big object files and speed the build up a little bit
50884    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50885    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50886    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50887      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50888        # Force compatibility with i586 on 32 bit intel platforms.
50889        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50890        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50891      fi
50892      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50893      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50894          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50895      case $OPENJDK_BUILD_CPU_ARCH in
50896        ppc )
50897          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50898          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50899          ;;
50900        * )
50901          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50902          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50903          ;;
50904      esac
50905    fi
50906  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50907    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50908    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50909    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50910      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50911    fi
50912
50913    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50914    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50915  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50916    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50917    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50918    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50919  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50920    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50921        -MD -Zc:wchar_t- -W3 -wd4800 \
50922        -DWIN32_LEAN_AND_MEAN \
50923        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50924        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50925        -DWIN32 -DIAL"
50926    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50927      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50928    else
50929      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50930    fi
50931    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50932    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50933    # studio.
50934    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50935      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50936      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50937      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50938    fi
50939  fi
50940
50941  ###############################################################################
50942
50943  # Adjust flags according to debug level.
50944  case $DEBUG_LEVEL in
50945    fastdebug | slowdebug )
50946      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50947      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50948      ;;
50949    release )
50950      ;;
50951    * )
50952      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50953      ;;
50954  esac
50955
50956  # Set some common defines. These works for all compilers, but assume
50957  # -D is universally accepted.
50958
50959  # Setup endianness
50960  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50961    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50962    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50963    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50964    #   Note: -Dmacro         is the same as    #define macro 1
50965    #         -Dmacro=        is the same as    #define macro
50966    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50967      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50968    else
50969      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50970    fi
50971  else
50972    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50973    # are defined in the system?
50974    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50975      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50976    else
50977      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50978    fi
50979  fi
50980
50981  # Setup target OS define. Use OS target name but in upper case.
50982  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50983  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50984
50985  # Setup target CPU
50986  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50987      $OPENJDK_BUILD_ADD_LP64 \
50988      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50989
50990  # Setup debug/release defines
50991  if test "x$DEBUG_LEVEL" = xrelease; then
50992    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50993    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50994      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50995    fi
50996  else
50997    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50998  fi
50999
51000  # Set some additional per-OS defines.
51001  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51002    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51003    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51004        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51005  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51006    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51007    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51008        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51009  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51010    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51011    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51012    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51013    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51014        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51015        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51016        -fno-omit-frame-pointer"
51017  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51018    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51019    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51020    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51021        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51022        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51023  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51024    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51025  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51026    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51027    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51028  fi
51029
51030  # Set some additional per-CPU defines.
51031  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51032    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51033  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51034    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51035  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51036    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51037      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51038      # fixes `relocation truncated to fit' error for gcc 4.1.
51039      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51040      # Use ppc64 instructions, but schedule for power5
51041      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51042    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51043      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51044    fi
51045  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51046    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51047      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51048      # Little endian machine uses ELFv2 ABI.
51049      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51050      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51051      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51052    fi
51053  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51054    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51055      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51056    fi
51057  fi
51058
51059  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51060    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51061  fi
51062
51063  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51064    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51065      # Solaris does not have _LP64=1 in the old build.
51066      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51067      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51068    fi
51069  fi
51070
51071  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51072  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51073    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51074        -Wunused-value -Woverloaded-virtual"
51075
51076    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51077
51078
51079
51080
51081
51082
51083
51084
51085
51086
51087
51088
51089
51090
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    # Execute function body
51132
51133  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51134  REFERENCE_VERSION=4.8
51135
51136  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51137    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51138  fi
51139
51140  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51141    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51142  fi
51143
51144  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51145  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51146
51147  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51148    :
51149
51150            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51151            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51152
51153
51154  else
51155    :
51156
51157  fi
51158
51159
51160
51161
51162
51163
51164
51165
51166
51167
51168
51169
51170
51171
51172    fi
51173    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51174      # Non-zero builds have stricter warnings
51175      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51176    else
51177      if test "x$TOOLCHAIN_TYPE" = xclang; then
51178        # Some versions of llvm do not like -Wundef
51179        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51180      fi
51181    fi
51182  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51183    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51184        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51185  fi
51186
51187  # Additional macosx handling
51188  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51189    # Setting these parameters makes it an error to link to macosx APIs that are
51190    # newer than the given OS version and makes the linked binaries compatible
51191    # even if built on a newer version of the OS.
51192    # The expected format is X.Y.Z
51193    MACOSX_VERSION_MIN=10.7.0
51194
51195
51196    # The macro takes the version with no dots, ex: 1070
51197    # Let the flags variables get resolved in make for easier override on make
51198    # command line.
51199    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)"
51200    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51201  fi
51202
51203  # Setup some hard coded includes
51204  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51205      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51206      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51207      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51208      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51209      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51210      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51211
51212  # The shared libraries are compiled using the picflag.
51213  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51214      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51215  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51216      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51217
51218  # Executable flags
51219  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51220  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51221
51222
51223
51224
51225
51226
51227  # Setup LDFLAGS et al.
51228  #
51229
51230  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51231    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51232    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51233    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51234    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51235      LDFLAGS_SAFESH="-safeseh"
51236      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51237      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51238      # NOTE: Old build added -machine. Probably not needed.
51239      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51240    else
51241      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51242    fi
51243  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51244      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51245      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51246        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51247        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51248    fi
51249  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51250    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51251    # We have previously set HAS_GNU_HASH if this is the case
51252    if test -n "$HAS_GNU_HASH"; then
51253      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51254      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51255      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51256    fi
51257      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51258        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51259    fi
51260    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51261      # And since we now know that the linker is gnu, then add -z defs, to forbid
51262      # undefined symbols in object files.
51263      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51264      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51265      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51266      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51267      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51268      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51269        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51270      fi
51271      case $DEBUG_LEVEL in
51272        release )
51273          # tell linker to optimize libraries.
51274          # Should this be supplied to the OSS linker as well?
51275          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51276          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51277          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51278          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51279            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51280          fi
51281          ;;
51282        slowdebug )
51283          # Hotspot always let the linker optimize
51284          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51285          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51286            # do relocations at load
51287            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51288            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51289            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51290          fi
51291          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51292            # mark relocations read only
51293            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51294            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51295            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51296          fi
51297          ;;
51298        fastdebug )
51299          # Hotspot always let the linker optimize
51300          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51301          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51302            # mark relocations read only
51303            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51304            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51305            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51306          fi
51307          ;;
51308        * )
51309          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51310          ;;
51311        esac
51312    fi
51313  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51314    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51315    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51316    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51317    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51318    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51319    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51320      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51321    fi
51322  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51323    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51324    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51325    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51326  fi
51327
51328  # Customize LDFLAGS for executables
51329
51330  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51331
51332  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51333    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51334      LDFLAGS_STACK_SIZE=1048576
51335    else
51336      LDFLAGS_STACK_SIZE=327680
51337    fi
51338    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51339  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51340    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51341  fi
51342
51343  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51344
51345  # Customize LDFLAGS for libs
51346  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51347
51348  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51349  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51350    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51351        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51352    OPENJDK_BUILD_JDKLIB_LIBS=""
51353  else
51354    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51355        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51356
51357    if test "xBUILD" = "xTARGET"; then
51358      # On some platforms (mac) the linker warns about non existing -L dirs.
51359      # For any of the variants server, client or minimal, the dir matches the
51360      # variant name. The "main" variant should be used for linking. For the
51361      # rest, the dir is just server.
51362      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51363          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51364        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51365            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51366      else
51367        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51368            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51369      fi
51370    elif test "xBUILD" = "xBUILD"; then
51371      # When building a buildjdk, it's always only the server variant
51372      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51373          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51374    fi
51375
51376    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51377    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51378      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51379    fi
51380
51381  fi
51382
51383OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51384
51385  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51386  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51387    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51388  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51389    # FIXME: This hard-coded path is not really proper.
51390    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51391      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51392    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51393      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51394    fi
51395    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51396        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51397  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51398    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51399  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51400    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51401  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51402    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51403  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51404    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51405        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51406        wsock32.lib winmm.lib version.lib psapi.lib"
51407    fi
51408
51409  # Set OPENJDK_BUILD_JVM_ASFLAGS
51410  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51411    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51412      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51413    fi
51414  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51415    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51416  fi
51417
51418  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434  # Tests are only ever compiled for TARGET
51435  # Flags for compiling test libraries
51436  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51437  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51438
51439  # Flags for compiling test executables
51440  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51441  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51442
51443
51444
51445
51446
51447
51448  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51449  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51450
51451
51452
51453
51454
51455
51456  # Check that the compiler supports -mX (or -qX on AIX) flags
51457  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
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    # Execute function body
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
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    # Execute function body
51555
51556  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51557$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51558  supports=yes
51559
51560  saved_cflags="$CFLAGS"
51561  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51562  ac_ext=c
51563ac_cpp='$CPP $CPPFLAGS'
51564ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51565ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51566ac_compiler_gnu=$ac_cv_c_compiler_gnu
51567
51568  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51569/* end confdefs.h.  */
51570int i;
51571_ACEOF
51572if ac_fn_c_try_compile "$LINENO"; then :
51573
51574else
51575  supports=no
51576fi
51577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51578  ac_ext=cpp
51579ac_cpp='$CXXCPP $CPPFLAGS'
51580ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51581ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51582ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51583
51584  CFLAGS="$saved_cflags"
51585
51586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51587$as_echo "$supports" >&6; }
51588  if test "x$supports" = "xyes" ; then
51589    :
51590    C_COMP_SUPPORTS="yes"
51591  else
51592    :
51593    C_COMP_SUPPORTS="no"
51594  fi
51595
51596
51597
51598
51599
51600
51601
51602
51603
51604
51605
51606
51607
51608
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    # Execute function body
51655
51656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51657$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51658  supports=yes
51659
51660  saved_cxxflags="$CXXFLAGS"
51661  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51662  ac_ext=cpp
51663ac_cpp='$CXXCPP $CPPFLAGS'
51664ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51665ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51666ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51667
51668  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51669/* end confdefs.h.  */
51670int i;
51671_ACEOF
51672if ac_fn_cxx_try_compile "$LINENO"; then :
51673
51674else
51675  supports=no
51676fi
51677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51678  ac_ext=cpp
51679ac_cpp='$CXXCPP $CPPFLAGS'
51680ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51681ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51682ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51683
51684  CXXFLAGS="$saved_cxxflags"
51685
51686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51687$as_echo "$supports" >&6; }
51688  if test "x$supports" = "xyes" ; then
51689    :
51690    CXX_COMP_SUPPORTS="yes"
51691  else
51692    :
51693    CXX_COMP_SUPPORTS="no"
51694  fi
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51709$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51710  supports=no
51711  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51712
51713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51714$as_echo "$supports" >&6; }
51715  if test "x$supports" = "xyes" ; then
51716    :
51717    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51718  else
51719    :
51720    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51721  fi
51722
51723
51724
51725
51726
51727
51728
51729
51730  # Check whether --enable-warnings-as-errors was given.
51731if test "${enable_warnings_as_errors+set}" = set; then :
51732  enableval=$enable_warnings_as_errors;
51733fi
51734
51735
51736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51737$as_echo_n "checking if native warnings are errors... " >&6; }
51738  if test "x$enable_warnings_as_errors" = "xyes"; then
51739    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
51740$as_echo "yes (explicitly set)" >&6; }
51741    WARNINGS_AS_ERRORS=true
51742  elif test "x$enable_warnings_as_errors" = "xno"; then
51743    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51744$as_echo "no" >&6; }
51745    WARNINGS_AS_ERRORS=false
51746  elif test "x$enable_warnings_as_errors" = "x"; then
51747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51748$as_echo "yes (default)" >&6; }
51749    WARNINGS_AS_ERRORS=true
51750  else
51751    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51752  fi
51753
51754
51755
51756  case "${TOOLCHAIN_TYPE}" in
51757    microsoft)
51758      DISABLE_WARNING_PREFIX="-wd"
51759      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51760      ;;
51761    solstudio)
51762      DISABLE_WARNING_PREFIX="-erroff="
51763      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51764      ;;
51765    gcc)
51766      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814    # Execute function body
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838
51839
51840
51841
51842
51843
51844
51845
51846
51847
51848
51849
51850
51851
51852
51853
51854
51855
51856
51857
51858
51859
51860
51861
51862
51863    # Execute function body
51864
51865  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51866$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51867  supports=yes
51868
51869  saved_cflags="$CFLAGS"
51870  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51871  ac_ext=c
51872ac_cpp='$CPP $CPPFLAGS'
51873ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51874ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51875ac_compiler_gnu=$ac_cv_c_compiler_gnu
51876
51877  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51878/* end confdefs.h.  */
51879int i;
51880_ACEOF
51881if ac_fn_c_try_compile "$LINENO"; then :
51882
51883else
51884  supports=no
51885fi
51886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51887  ac_ext=cpp
51888ac_cpp='$CXXCPP $CPPFLAGS'
51889ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51890ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51891ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51892
51893  CFLAGS="$saved_cflags"
51894
51895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51896$as_echo "$supports" >&6; }
51897  if test "x$supports" = "xyes" ; then
51898    :
51899    C_COMP_SUPPORTS="yes"
51900  else
51901    :
51902    C_COMP_SUPPORTS="no"
51903  fi
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963    # Execute function body
51964
51965  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51966$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51967  supports=yes
51968
51969  saved_cxxflags="$CXXFLAGS"
51970  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
51971  ac_ext=cpp
51972ac_cpp='$CXXCPP $CPPFLAGS'
51973ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51974ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51975ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51976
51977  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51978/* end confdefs.h.  */
51979int i;
51980_ACEOF
51981if ac_fn_cxx_try_compile "$LINENO"; then :
51982
51983else
51984  supports=no
51985fi
51986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51987  ac_ext=cpp
51988ac_cpp='$CXXCPP $CPPFLAGS'
51989ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51990ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51991ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51992
51993  CXXFLAGS="$saved_cxxflags"
51994
51995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51996$as_echo "$supports" >&6; }
51997  if test "x$supports" = "xyes" ; then
51998    :
51999    CXX_COMP_SUPPORTS="yes"
52000  else
52001    :
52002    CXX_COMP_SUPPORTS="no"
52003  fi
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52018$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52019  supports=no
52020  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52021
52022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52023$as_echo "$supports" >&6; }
52024  if test "x$supports" = "xyes" ; then
52025    :
52026    GCC_CAN_DISABLE_WARNINGS=true
52027  else
52028    :
52029    GCC_CAN_DISABLE_WARNINGS=false
52030
52031  fi
52032
52033
52034
52035
52036
52037
52038      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52039        DISABLE_WARNING_PREFIX="-Wno-"
52040      else
52041        DISABLE_WARNING_PREFIX=
52042      fi
52043      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52044      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52045      # CFLAGS since any target specific flags will likely not work with the
52046      # build compiler
52047      CC_OLD="$CC"
52048      CXX_OLD="$CXX"
52049      CC="$BUILD_CC"
52050      CXX="$BUILD_CXX"
52051      CFLAGS_OLD="$CFLAGS"
52052      CFLAGS=""
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
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    # Execute function body
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
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    # Execute function body
52150
52151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52152$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52153  supports=yes
52154
52155  saved_cflags="$CFLAGS"
52156  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52157  ac_ext=c
52158ac_cpp='$CPP $CPPFLAGS'
52159ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52160ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52161ac_compiler_gnu=$ac_cv_c_compiler_gnu
52162
52163  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52164/* end confdefs.h.  */
52165int i;
52166_ACEOF
52167if ac_fn_c_try_compile "$LINENO"; then :
52168
52169else
52170  supports=no
52171fi
52172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52173  ac_ext=cpp
52174ac_cpp='$CXXCPP $CPPFLAGS'
52175ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52176ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52177ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52178
52179  CFLAGS="$saved_cflags"
52180
52181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52182$as_echo "$supports" >&6; }
52183  if test "x$supports" = "xyes" ; then
52184    :
52185    C_COMP_SUPPORTS="yes"
52186  else
52187    :
52188    C_COMP_SUPPORTS="no"
52189  fi
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
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    # Execute function body
52250
52251  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52252$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52253  supports=yes
52254
52255  saved_cxxflags="$CXXFLAGS"
52256  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52257  ac_ext=cpp
52258ac_cpp='$CXXCPP $CPPFLAGS'
52259ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52260ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52261ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52262
52263  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52264/* end confdefs.h.  */
52265int i;
52266_ACEOF
52267if ac_fn_cxx_try_compile "$LINENO"; then :
52268
52269else
52270  supports=no
52271fi
52272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52273  ac_ext=cpp
52274ac_cpp='$CXXCPP $CPPFLAGS'
52275ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52276ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52277ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52278
52279  CXXFLAGS="$saved_cxxflags"
52280
52281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52282$as_echo "$supports" >&6; }
52283  if test "x$supports" = "xyes" ; then
52284    :
52285    CXX_COMP_SUPPORTS="yes"
52286  else
52287    :
52288    CXX_COMP_SUPPORTS="no"
52289  fi
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52304$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52305  supports=no
52306  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52307
52308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52309$as_echo "$supports" >&6; }
52310  if test "x$supports" = "xyes" ; then
52311    :
52312    BUILD_CC_CAN_DISABLE_WARNINGS=true
52313  else
52314    :
52315    BUILD_CC_CAN_DISABLE_WARNINGS=false
52316
52317  fi
52318
52319
52320
52321
52322
52323
52324      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52325        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52326      else
52327        BUILD_CC_DISABLE_WARNING_PREFIX=
52328      fi
52329      CC="$CC_OLD"
52330      CXX="$CXX_OLD"
52331      CFLAGS="$CFLAGS_OLD"
52332      ;;
52333    clang)
52334      DISABLE_WARNING_PREFIX="-Wno-"
52335      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52336      ;;
52337    xlc)
52338      DISABLE_WARNING_PREFIX="-qsuppress="
52339      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52340      ;;
52341  esac
52342
52343
52344
52345
52346
52347# Setup debug symbols (need objcopy from the toolchain for that)
52348
52349  #
52350  # NATIVE_DEBUG_SYMBOLS
52351  # This must be done after the toolchain is setup, since we're looking at objcopy.
52352  #
52353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52354$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52355
52356# Check whether --with-native-debug-symbols was given.
52357if test "${with_native_debug_symbols+set}" = set; then :
52358  withval=$with_native_debug_symbols;
52359        if test "x$OPENJDK_TARGET_OS" = xaix; then
52360          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52361            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52362          fi
52363        fi
52364
52365else
52366
52367        if test "x$OPENJDK_TARGET_OS" = xaix; then
52368          # AIX doesn't support 'zipped' so use 'internal' as default
52369          with_native_debug_symbols="internal"
52370        else
52371          if test "x$STATIC_BUILD" = xtrue; then
52372            with_native_debug_symbols="none"
52373          else
52374            with_native_debug_symbols="zipped"
52375          fi
52376        fi
52377
52378fi
52379
52380  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52382$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52383
52384  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52385
52386    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52387      if test "x$OBJCOPY" = x; then
52388        # enabling of enable-debug-symbols and can't find objcopy
52389        # this is an error
52390        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52391      fi
52392    fi
52393
52394    COMPILE_WITH_DEBUG_SYMBOLS=true
52395    COPY_DEBUG_SYMBOLS=true
52396    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52397  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52398    COMPILE_WITH_DEBUG_SYMBOLS=false
52399    COPY_DEBUG_SYMBOLS=false
52400    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52401  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52402    COMPILE_WITH_DEBUG_SYMBOLS=true
52403    COPY_DEBUG_SYMBOLS=false
52404    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52405  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52406
52407    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52408      if test "x$OBJCOPY" = x; then
52409        # enabling of enable-debug-symbols and can't find objcopy
52410        # this is an error
52411        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52412      fi
52413    fi
52414
52415    COMPILE_WITH_DEBUG_SYMBOLS=true
52416    COPY_DEBUG_SYMBOLS=true
52417    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52418  else
52419    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52420  fi
52421
52422  # --enable-debug-symbols is deprecated.
52423  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52424
52425  # Check whether --enable-debug-symbols was given.
52426if test "${enable_debug_symbols+set}" = set; then :
52427  enableval=$enable_debug_symbols;
52428fi
52429
52430  if test "x$enable_debug_symbols" != x; then
52431    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52432$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52433
52434    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52435      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52436$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52437    fi
52438
52439  fi
52440
52441
52442  # --enable-zip-debug-info is deprecated.
52443  # Please use --with-native-debug-symbols=zipped .
52444
52445  # Check whether --enable-zip-debug-info was given.
52446if test "${enable_zip_debug_info+set}" = set; then :
52447  enableval=$enable_zip_debug_info;
52448fi
52449
52450  if test "x$enable_zip_debug_info" != x; then
52451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52452$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52453
52454    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52455      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52456$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52457    fi
52458
52459  fi
52460
52461
52462
52463
52464
52465
52466
52467  # Check whether --enable-native-coverage was given.
52468if test "${enable_native_coverage+set}" = set; then :
52469  enableval=$enable_native_coverage;
52470fi
52471
52472  GCOV_ENABLED="false"
52473  if test "x$enable_native_coverage" = "xyes"; then
52474    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52475      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52476$as_echo_n "checking if native coverage is enabled... " >&6; }
52477      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52478$as_echo "yes" >&6; }
52479      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52480      GCOV_LDFLAGS="-fprofile-arcs"
52481      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
52482      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
52483      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52484      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52485      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52486      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52487      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52488      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52489      GCOV_ENABLED="true"
52490    else
52491      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52492    fi
52493  elif test "x$enable_native_coverage" = "xno"; then
52494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52495$as_echo_n "checking if native coverage is enabled... " >&6; }
52496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52497$as_echo "no" >&6; }
52498  elif test "x$enable_native_coverage" != "x"; then
52499    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52500  fi
52501
52502
52503
52504
52505# Need toolchain to setup dtrace
52506
52507  # Test for dtrace dependencies
52508  # Check whether --enable-dtrace was given.
52509if test "${enable_dtrace+set}" = set; then :
52510  enableval=$enable_dtrace;
52511fi
52512
52513
52514  DTRACE_DEP_MISSING=false
52515
52516  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52517$as_echo_n "checking for dtrace tool... " >&6; }
52518  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52519    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52520$as_echo "$DTRACE" >&6; }
52521  else
52522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52523$as_echo "not found, cannot build dtrace" >&6; }
52524    DTRACE_DEP_MISSING=true
52525  fi
52526
52527  for ac_header in sys/sdt.h
52528do :
52529  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52530if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52531  cat >>confdefs.h <<_ACEOF
52532#define HAVE_SYS_SDT_H 1
52533_ACEOF
52534 DTRACE_HEADERS_OK=yes
52535else
52536  DTRACE_HEADERS_OK=no
52537fi
52538
52539done
52540
52541  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52542    DTRACE_DEP_MISSING=true
52543  fi
52544
52545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52546$as_echo_n "checking if dtrace should be built... " >&6; }
52547  if test "x$enable_dtrace" = "xyes"; then
52548    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52549      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52550$as_echo "no, missing dependencies" >&6; }
52551
52552  # Print a helpful message on how to acquire the necessary build dependency.
52553  # dtrace is the help tag: freetype, cups, alsa etc
52554  MISSING_DEPENDENCY=dtrace
52555
52556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52557    cygwin_help $MISSING_DEPENDENCY
52558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52559    msys_help $MISSING_DEPENDENCY
52560  else
52561    PKGHANDLER_COMMAND=
52562
52563    case $PKGHANDLER in
52564      apt-get)
52565        apt_help     $MISSING_DEPENDENCY ;;
52566      yum)
52567        yum_help     $MISSING_DEPENDENCY ;;
52568      brew)
52569        brew_help    $MISSING_DEPENDENCY ;;
52570      port)
52571        port_help    $MISSING_DEPENDENCY ;;
52572      pkgutil)
52573        pkgutil_help $MISSING_DEPENDENCY ;;
52574      pkgadd)
52575        pkgadd_help  $MISSING_DEPENDENCY ;;
52576    esac
52577
52578    if test "x$PKGHANDLER_COMMAND" != x; then
52579      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52580    fi
52581  fi
52582
52583      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52584    else
52585      INCLUDE_DTRACE=true
52586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52587$as_echo "yes, forced" >&6; }
52588    fi
52589  elif test "x$enable_dtrace" = "xno"; then
52590    INCLUDE_DTRACE=false
52591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52592$as_echo "no, forced" >&6; }
52593  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52594    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52595      INCLUDE_DTRACE=false
52596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52597$as_echo "no, missing dependencies" >&6; }
52598    else
52599      INCLUDE_DTRACE=true
52600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52601$as_echo "yes, dependencies present" >&6; }
52602    fi
52603  else
52604    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52605  fi
52606
52607
52608  # Check whether --enable-aot was given.
52609if test "${enable_aot+set}" = set; then :
52610  enableval=$enable_aot;
52611fi
52612
52613
52614  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
52615    ENABLE_AOT="true"
52616  elif test "x$enable_aot" = "xyes"; then
52617    ENABLE_AOT="true"
52618  elif test "x$enable_aot" = "xno"; then
52619    ENABLE_AOT="false"
52620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
52621$as_echo_n "checking if aot should be enabled... " >&6; }
52622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52623$as_echo "no, forced" >&6; }
52624  else
52625    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
52626  fi
52627
52628  if test "x$ENABLE_AOT" = "xtrue"; then
52629    # Only enable AOT on linux-X64.
52630    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
52631      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
52632        if test -e "$HOTSPOT_TOPDIR/src/jdk.vm.compiler"; then
52633          ENABLE_AOT="true"
52634        else
52635          ENABLE_AOT="false"
52636          if test "x$enable_aot" = "xyes"; then
52637            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
52638          fi
52639        fi
52640      else
52641        ENABLE_AOT="false"
52642        if test "x$enable_aot" = "xyes"; then
52643          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
52644        fi
52645      fi
52646    else
52647      ENABLE_AOT="false"
52648      if test "x$enable_aot" = "xyes"; then
52649        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
52650      fi
52651    fi
52652  fi
52653
52654
52655
52656
52657  # Check whether --enable-hotspot-gtest was given.
52658if test "${enable_hotspot_gtest+set}" = set; then :
52659  enableval=$enable_hotspot_gtest;
52660fi
52661
52662
52663  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52664    GTEST_DIR_EXISTS="true"
52665  else
52666    GTEST_DIR_EXISTS="false"
52667  fi
52668
52669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52670$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52671  if test "x$enable_hotspot_gtest" = "xyes"; then
52672    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52674$as_echo "yes, forced" >&6; }
52675      BUILD_GTEST="true"
52676    else
52677      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52678    fi
52679  elif test "x$enable_hotspot_gtest" = "xno"; then
52680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52681$as_echo "no, forced" >&6; }
52682    BUILD_GTEST="false"
52683  elif test "x$enable_hotspot_gtest" = "x"; then
52684    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52686$as_echo "yes" >&6; }
52687      BUILD_GTEST="true"
52688    else
52689      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52690$as_echo "no" >&6; }
52691      BUILD_GTEST="false"
52692    fi
52693  else
52694    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52695  fi
52696
52697
52698
52699
52700###############################################################################
52701#
52702# Check dependencies for external and internal libraries.
52703#
52704###############################################################################
52705
52706# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52707
52708  # When using cygwin or msys, we need a wrapper binary that renames
52709  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52710  # @files and rewrites these too! This wrapper binary is
52711  # called fixpath.
52712  FIXPATH=
52713  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52714    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52715$as_echo_n "checking if fixpath can be created... " >&6; }
52716    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52717    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52718    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52719    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52720      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52721      FIXPATH="$FIXPATH_BIN -c"
52722    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52723      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52724      # @ was chosen as separator to minimize risk of other tools messing around with it
52725      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52726          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52727      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52728      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52729    fi
52730    FIXPATH_SRC_W="$FIXPATH_SRC"
52731    FIXPATH_BIN_W="$FIXPATH_BIN"
52732
52733  unix_path="$FIXPATH_SRC_W"
52734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52735    windows_path=`$CYGPATH -m "$unix_path"`
52736    FIXPATH_SRC_W="$windows_path"
52737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52738    windows_path=`cmd //c echo $unix_path`
52739    FIXPATH_SRC_W="$windows_path"
52740  fi
52741
52742
52743  unix_path="$FIXPATH_BIN_W"
52744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52745    windows_path=`$CYGPATH -m "$unix_path"`
52746    FIXPATH_BIN_W="$windows_path"
52747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52748    windows_path=`cmd //c echo $unix_path`
52749    FIXPATH_BIN_W="$windows_path"
52750  fi
52751
52752    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52753    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52754    cd $FIXPATH_DIR
52755    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52756    cd $CURDIR
52757
52758    if test ! -x $FIXPATH_BIN; then
52759      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52760$as_echo "no" >&6; }
52761      cat $FIXPATH_DIR/fixpath1.log
52762      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52763    fi
52764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52765$as_echo "yes" >&6; }
52766    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52767$as_echo_n "checking if fixpath.exe works... " >&6; }
52768    cd $FIXPATH_DIR
52769    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52770        > $FIXPATH_DIR/fixpath2.log 2>&1
52771    cd $CURDIR
52772    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52774$as_echo "no" >&6; }
52775      cat $FIXPATH_DIR/fixpath2.log
52776      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52777    fi
52778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52779$as_echo "yes" >&6; }
52780
52781    FIXPATH_DETACH_FLAG="--detach"
52782  fi
52783
52784
52785
52786
52787
52788
52789  # Check if X11 is needed
52790  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52791    # No X11 support on windows or macosx
52792    NEEDS_LIB_X11=false
52793  else
52794    # All other instances need X11, even if building headless only, libawt still
52795    # needs X11 headers.
52796    NEEDS_LIB_X11=true
52797  fi
52798
52799  # Check if cups is needed
52800  if test "x$OPENJDK_TARGET_OS" = xwindows; then
52801    # Windows have a separate print system
52802    NEEDS_LIB_CUPS=false
52803  else
52804    NEEDS_LIB_CUPS=true
52805  fi
52806
52807  # A custom hook may have set this already
52808  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
52809    NEEDS_LIB_FREETYPE=true
52810  fi
52811
52812  # Check if alsa is needed
52813  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52814    NEEDS_LIB_ALSA=true
52815  else
52816    NEEDS_LIB_ALSA=false
52817  fi
52818
52819  # Check if ffi is needed
52820  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52821    NEEDS_LIB_FFI=true
52822  else
52823    NEEDS_LIB_FFI=false
52824  fi
52825
52826
52827  # statically link libstdc++ before C++ ABI is stablized on Linux unless
52828  # dynamic build is configured on command line.
52829
52830# Check whether --with-stdc++lib was given.
52831if test "${with_stdc__lib+set}" = set; then :
52832  withval=$with_stdc__lib;
52833        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
52834                && test "x$with_stdc__lib" != xdefault; then
52835          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
52836        fi
52837
52838else
52839  with_stdc__lib=default
52840
52841fi
52842
52843
52844  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52845    # Test if stdc++ can be linked statically.
52846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
52847$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
52848    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
52849    ac_ext=cpp
52850ac_cpp='$CXXCPP $CPPFLAGS'
52851ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52852ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52853ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52854
52855    OLD_LIBS="$LIBS"
52856    LIBS="$STATIC_STDCXX_FLAGS"
52857    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52858/* end confdefs.h.  */
52859
52860int
52861main ()
52862{
52863return 0;
52864  ;
52865  return 0;
52866}
52867_ACEOF
52868if ac_fn_cxx_try_link "$LINENO"; then :
52869  has_static_libstdcxx=yes
52870else
52871  has_static_libstdcxx=no
52872fi
52873rm -f core conftest.err conftest.$ac_objext \
52874    conftest$ac_exeext conftest.$ac_ext
52875    LIBS="$OLD_LIBS"
52876    ac_ext=cpp
52877ac_cpp='$CXXCPP $CPPFLAGS'
52878ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52879ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52880ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52881
52882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
52883$as_echo "$has_static_libstdcxx" >&6; }
52884
52885    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
52886      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
52887    fi
52888
52889    # If dynamic was requested, it's available since it would fail above otherwise.
52890    # If dynamic wasn't requested, go with static unless it isn't available.
52891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
52892$as_echo_n "checking how to link with libstdc++... " >&6; }
52893    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
52894        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52895      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
52896$as_echo "dynamic" >&6; }
52897    else
52898      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
52899      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
52900      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52901      # just use the same setting as for the TARGET toolchain.
52902      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
52903      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
52904$as_echo "static" >&6; }
52905    fi
52906  fi
52907
52908  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
52909  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
52910    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
52911  fi
52912
52913
52914
52915  # Setup Windows runtime dlls
52916  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52917
52918
52919# Check whether --with-msvcr-dll was given.
52920if test "${with_msvcr_dll+set}" = set; then :
52921  withval=$with_msvcr_dll;
52922fi
52923
52924
52925  if test "x$with_msvcr_dll" != x; then
52926    # If given explicitly by user, do not probe. If not present, fail directly.
52927
52928  DLL_NAME="$MSVCR_NAME"
52929  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
52930  METHOD="--with-msvcr-dll"
52931  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52932    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52933$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52934
52935    # Need to check if the found msvcr is correct architecture
52936    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52937$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52938    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52939    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52940      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52941      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52942      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52943        CORRECT_MSVCR_ARCH="PE32 executable"
52944      else
52945        CORRECT_MSVCR_ARCH="PE32+ executable"
52946      fi
52947    else
52948      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52949        CORRECT_MSVCR_ARCH=386
52950      else
52951        CORRECT_MSVCR_ARCH=x86-64
52952      fi
52953    fi
52954    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52955      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52956$as_echo "ok" >&6; }
52957      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52958
52959  # Only process if variable expands to non-empty
52960
52961  if test "x$MSVC_DLL" != x; then
52962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52963
52964  # Input might be given as Windows format, start by converting to
52965  # unix format.
52966  path="$MSVC_DLL"
52967  new_path=`$CYGPATH -u "$path"`
52968
52969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52972  # "foo.exe" is OK but "foo" is an error.
52973  #
52974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52975  # It is also a way to make sure we got the proper file name for the real test later on.
52976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52977  if test "x$test_shortpath" = x; then
52978    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52979$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52980    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52981  fi
52982
52983  # Call helper function which possibly converts this using DOS-style short mode.
52984  # If so, the updated path is stored in $new_path.
52985
52986  input_path="$new_path"
52987  # Check if we need to convert this using DOS-style short mode. If the path
52988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52989  # take no chances and rewrite it.
52990  # Note: m4 eats our [], so we need to use [ and ] instead.
52991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52992  if test "x$has_forbidden_chars" != x; then
52993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52997      # Going to short mode and back again did indeed matter. Since short mode is
52998      # case insensitive, let's make it lowercase to improve readability.
52999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53000      # Now convert it back to Unix-style (cygpath)
53001      input_path=`$CYGPATH -u "$shortmode_path"`
53002      new_path="$input_path"
53003    fi
53004  fi
53005
53006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53007  if test "x$test_cygdrive_prefix" = x; then
53008    # As a simple fix, exclude /usr/bin since it's not a real path.
53009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53011      # a path prefixed by /cygdrive for fixpath to work.
53012      new_path="$CYGWIN_ROOT_PATH$input_path"
53013    fi
53014  fi
53015
53016
53017  if test "x$path" != "x$new_path"; then
53018    MSVC_DLL="$new_path"
53019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53020$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53021  fi
53022
53023    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53024
53025  path="$MSVC_DLL"
53026  has_colon=`$ECHO $path | $GREP ^.:`
53027  new_path="$path"
53028  if test "x$has_colon" = x; then
53029    # Not in mixed or Windows style, start by that.
53030    new_path=`cmd //c echo $path`
53031  fi
53032
53033
53034  input_path="$new_path"
53035  # Check if we need to convert this using DOS-style short mode. If the path
53036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53037  # take no chances and rewrite it.
53038  # Note: m4 eats our [], so we need to use [ and ] instead.
53039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53040  if test "x$has_forbidden_chars" != x; then
53041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53043  fi
53044
53045
53046  windows_path="$new_path"
53047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53048    unix_path=`$CYGPATH -u "$windows_path"`
53049    new_path="$unix_path"
53050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53052    new_path="$unix_path"
53053  fi
53054
53055  if test "x$path" != "x$new_path"; then
53056    MSVC_DLL="$new_path"
53057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53058$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53059  fi
53060
53061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53063
53064    else
53065      # We're on a unix platform. Hooray! :)
53066      path="$MSVC_DLL"
53067      has_space=`$ECHO "$path" | $GREP " "`
53068      if test "x$has_space" != x; then
53069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53070$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53071        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53072      fi
53073
53074      # Use eval to expand a potential ~
53075      eval path="$path"
53076      if test ! -f "$path" && test ! -d "$path"; then
53077        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53078      fi
53079
53080      if test -d "$path"; then
53081        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53082      else
53083        dir="`$DIRNAME "$path"`"
53084        base="`$BASENAME "$path"`"
53085        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53086      fi
53087    fi
53088  fi
53089
53090      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53091$as_echo_n "checking for $DLL_NAME... " >&6; }
53092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53093$as_echo "$MSVC_DLL" >&6; }
53094    else
53095      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53096$as_echo "incorrect, ignoring" >&6; }
53097      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53098$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53099    fi
53100  fi
53101
53102    if test "x$MSVC_DLL" = x; then
53103      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53104    fi
53105    MSVCR_DLL="$MSVC_DLL"
53106  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53107
53108  DLL_NAME="$MSVCR_NAME"
53109  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53110  METHOD="devkit"
53111  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53112    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53113$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53114
53115    # Need to check if the found msvcr is correct architecture
53116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53117$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53118    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53119    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53120      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53121      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53122      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53123        CORRECT_MSVCR_ARCH="PE32 executable"
53124      else
53125        CORRECT_MSVCR_ARCH="PE32+ executable"
53126      fi
53127    else
53128      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53129        CORRECT_MSVCR_ARCH=386
53130      else
53131        CORRECT_MSVCR_ARCH=x86-64
53132      fi
53133    fi
53134    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53136$as_echo "ok" >&6; }
53137      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53138
53139  # Only process if variable expands to non-empty
53140
53141  if test "x$MSVC_DLL" != x; then
53142    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53143
53144  # Input might be given as Windows format, start by converting to
53145  # unix format.
53146  path="$MSVC_DLL"
53147  new_path=`$CYGPATH -u "$path"`
53148
53149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53152  # "foo.exe" is OK but "foo" is an error.
53153  #
53154  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53155  # It is also a way to make sure we got the proper file name for the real test later on.
53156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53157  if test "x$test_shortpath" = x; then
53158    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53159$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53160    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53161  fi
53162
53163  # Call helper function which possibly converts this using DOS-style short mode.
53164  # If so, the updated path is stored in $new_path.
53165
53166  input_path="$new_path"
53167  # Check if we need to convert this using DOS-style short mode. If the path
53168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53169  # take no chances and rewrite it.
53170  # Note: m4 eats our [], so we need to use [ and ] instead.
53171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53172  if test "x$has_forbidden_chars" != x; then
53173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53174    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53175    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53176    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53177      # Going to short mode and back again did indeed matter. Since short mode is
53178      # case insensitive, let's make it lowercase to improve readability.
53179      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53180      # Now convert it back to Unix-style (cygpath)
53181      input_path=`$CYGPATH -u "$shortmode_path"`
53182      new_path="$input_path"
53183    fi
53184  fi
53185
53186  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53187  if test "x$test_cygdrive_prefix" = x; then
53188    # As a simple fix, exclude /usr/bin since it's not a real path.
53189    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53190      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53191      # a path prefixed by /cygdrive for fixpath to work.
53192      new_path="$CYGWIN_ROOT_PATH$input_path"
53193    fi
53194  fi
53195
53196
53197  if test "x$path" != "x$new_path"; then
53198    MSVC_DLL="$new_path"
53199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53200$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53201  fi
53202
53203    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53204
53205  path="$MSVC_DLL"
53206  has_colon=`$ECHO $path | $GREP ^.:`
53207  new_path="$path"
53208  if test "x$has_colon" = x; then
53209    # Not in mixed or Windows style, start by that.
53210    new_path=`cmd //c echo $path`
53211  fi
53212
53213
53214  input_path="$new_path"
53215  # Check if we need to convert this using DOS-style short mode. If the path
53216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53217  # take no chances and rewrite it.
53218  # Note: m4 eats our [], so we need to use [ and ] instead.
53219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53220  if test "x$has_forbidden_chars" != x; then
53221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53223  fi
53224
53225
53226  windows_path="$new_path"
53227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53228    unix_path=`$CYGPATH -u "$windows_path"`
53229    new_path="$unix_path"
53230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53232    new_path="$unix_path"
53233  fi
53234
53235  if test "x$path" != "x$new_path"; then
53236    MSVC_DLL="$new_path"
53237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53238$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53239  fi
53240
53241  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53242  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53243
53244    else
53245      # We're on a unix platform. Hooray! :)
53246      path="$MSVC_DLL"
53247      has_space=`$ECHO "$path" | $GREP " "`
53248      if test "x$has_space" != x; then
53249        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53250$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53251        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53252      fi
53253
53254      # Use eval to expand a potential ~
53255      eval path="$path"
53256      if test ! -f "$path" && test ! -d "$path"; then
53257        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53258      fi
53259
53260      if test -d "$path"; then
53261        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53262      else
53263        dir="`$DIRNAME "$path"`"
53264        base="`$BASENAME "$path"`"
53265        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53266      fi
53267    fi
53268  fi
53269
53270      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53271$as_echo_n "checking for $DLL_NAME... " >&6; }
53272      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53273$as_echo "$MSVC_DLL" >&6; }
53274    else
53275      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53276$as_echo "incorrect, ignoring" >&6; }
53277      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53278$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53279    fi
53280  fi
53281
53282    if test "x$MSVC_DLL" = x; then
53283      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53284    fi
53285    MSVCR_DLL="$MSVC_DLL"
53286  else
53287
53288  DLL_NAME="${MSVCR_NAME}"
53289  MSVC_DLL=
53290
53291  if test "x$MSVC_DLL" = x; then
53292    # Probe: Using well-known location from Visual Studio 10.0
53293    if test "x$VCINSTALLDIR" != x; then
53294      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53295
53296  windows_path="$CYGWIN_VC_INSTALL_DIR"
53297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53298    unix_path=`$CYGPATH -u "$windows_path"`
53299    CYGWIN_VC_INSTALL_DIR="$unix_path"
53300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53302    CYGWIN_VC_INSTALL_DIR="$unix_path"
53303  fi
53304
53305      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53306        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53307      else
53308        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53309      fi
53310      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53311
53312  DLL_NAME="$DLL_NAME"
53313  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53314  METHOD="well-known location in VCINSTALLDIR"
53315  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53316    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53317$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53318
53319    # Need to check if the found msvcr is correct architecture
53320    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53321$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53322    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53323    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53324      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53325      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53326      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53327        CORRECT_MSVCR_ARCH="PE32 executable"
53328      else
53329        CORRECT_MSVCR_ARCH="PE32+ executable"
53330      fi
53331    else
53332      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53333        CORRECT_MSVCR_ARCH=386
53334      else
53335        CORRECT_MSVCR_ARCH=x86-64
53336      fi
53337    fi
53338    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53339      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53340$as_echo "ok" >&6; }
53341      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53342
53343  # Only process if variable expands to non-empty
53344
53345  if test "x$MSVC_DLL" != x; then
53346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53347
53348  # Input might be given as Windows format, start by converting to
53349  # unix format.
53350  path="$MSVC_DLL"
53351  new_path=`$CYGPATH -u "$path"`
53352
53353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53356  # "foo.exe" is OK but "foo" is an error.
53357  #
53358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53359  # It is also a way to make sure we got the proper file name for the real test later on.
53360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53361  if test "x$test_shortpath" = x; then
53362    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53363$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53364    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53365  fi
53366
53367  # Call helper function which possibly converts this using DOS-style short mode.
53368  # If so, the updated path is stored in $new_path.
53369
53370  input_path="$new_path"
53371  # Check if we need to convert this using DOS-style short mode. If the path
53372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53373  # take no chances and rewrite it.
53374  # Note: m4 eats our [], so we need to use [ and ] instead.
53375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53376  if test "x$has_forbidden_chars" != x; then
53377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53381      # Going to short mode and back again did indeed matter. Since short mode is
53382      # case insensitive, let's make it lowercase to improve readability.
53383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53384      # Now convert it back to Unix-style (cygpath)
53385      input_path=`$CYGPATH -u "$shortmode_path"`
53386      new_path="$input_path"
53387    fi
53388  fi
53389
53390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53391  if test "x$test_cygdrive_prefix" = x; then
53392    # As a simple fix, exclude /usr/bin since it's not a real path.
53393    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53395      # a path prefixed by /cygdrive for fixpath to work.
53396      new_path="$CYGWIN_ROOT_PATH$input_path"
53397    fi
53398  fi
53399
53400
53401  if test "x$path" != "x$new_path"; then
53402    MSVC_DLL="$new_path"
53403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53404$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53405  fi
53406
53407    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53408
53409  path="$MSVC_DLL"
53410  has_colon=`$ECHO $path | $GREP ^.:`
53411  new_path="$path"
53412  if test "x$has_colon" = x; then
53413    # Not in mixed or Windows style, start by that.
53414    new_path=`cmd //c echo $path`
53415  fi
53416
53417
53418  input_path="$new_path"
53419  # Check if we need to convert this using DOS-style short mode. If the path
53420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53421  # take no chances and rewrite it.
53422  # Note: m4 eats our [], so we need to use [ and ] instead.
53423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53424  if test "x$has_forbidden_chars" != x; then
53425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53427  fi
53428
53429
53430  windows_path="$new_path"
53431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53432    unix_path=`$CYGPATH -u "$windows_path"`
53433    new_path="$unix_path"
53434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53436    new_path="$unix_path"
53437  fi
53438
53439  if test "x$path" != "x$new_path"; then
53440    MSVC_DLL="$new_path"
53441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53442$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53443  fi
53444
53445  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53446  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53447
53448    else
53449      # We're on a unix platform. Hooray! :)
53450      path="$MSVC_DLL"
53451      has_space=`$ECHO "$path" | $GREP " "`
53452      if test "x$has_space" != x; then
53453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53454$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53455        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53456      fi
53457
53458      # Use eval to expand a potential ~
53459      eval path="$path"
53460      if test ! -f "$path" && test ! -d "$path"; then
53461        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53462      fi
53463
53464      if test -d "$path"; then
53465        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53466      else
53467        dir="`$DIRNAME "$path"`"
53468        base="`$BASENAME "$path"`"
53469        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53470      fi
53471    fi
53472  fi
53473
53474      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53475$as_echo_n "checking for $DLL_NAME... " >&6; }
53476      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53477$as_echo "$MSVC_DLL" >&6; }
53478    else
53479      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53480$as_echo "incorrect, ignoring" >&6; }
53481      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53482$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53483    fi
53484  fi
53485
53486    fi
53487  fi
53488
53489  if test "x$MSVC_DLL" = x; then
53490    # Probe: Check in the Boot JDK directory.
53491    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53492
53493  DLL_NAME="$DLL_NAME"
53494  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53495  METHOD="well-known location in Boot JDK"
53496  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53497    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53498$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53499
53500    # Need to check if the found msvcr is correct architecture
53501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53502$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53503    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53504    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53505      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53506      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53507      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53508        CORRECT_MSVCR_ARCH="PE32 executable"
53509      else
53510        CORRECT_MSVCR_ARCH="PE32+ executable"
53511      fi
53512    else
53513      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53514        CORRECT_MSVCR_ARCH=386
53515      else
53516        CORRECT_MSVCR_ARCH=x86-64
53517      fi
53518    fi
53519    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53520      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53521$as_echo "ok" >&6; }
53522      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53523
53524  # Only process if variable expands to non-empty
53525
53526  if test "x$MSVC_DLL" != x; then
53527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53528
53529  # Input might be given as Windows format, start by converting to
53530  # unix format.
53531  path="$MSVC_DLL"
53532  new_path=`$CYGPATH -u "$path"`
53533
53534  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53535  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53536  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53537  # "foo.exe" is OK but "foo" is an error.
53538  #
53539  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53540  # It is also a way to make sure we got the proper file name for the real test later on.
53541  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53542  if test "x$test_shortpath" = x; then
53543    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53544$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53545    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53546  fi
53547
53548  # Call helper function which possibly converts this using DOS-style short mode.
53549  # If so, the updated path is stored in $new_path.
53550
53551  input_path="$new_path"
53552  # Check if we need to convert this using DOS-style short mode. If the path
53553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53554  # take no chances and rewrite it.
53555  # Note: m4 eats our [], so we need to use [ and ] instead.
53556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53557  if test "x$has_forbidden_chars" != x; then
53558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53559    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53562      # Going to short mode and back again did indeed matter. Since short mode is
53563      # case insensitive, let's make it lowercase to improve readability.
53564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53565      # Now convert it back to Unix-style (cygpath)
53566      input_path=`$CYGPATH -u "$shortmode_path"`
53567      new_path="$input_path"
53568    fi
53569  fi
53570
53571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53572  if test "x$test_cygdrive_prefix" = x; then
53573    # As a simple fix, exclude /usr/bin since it's not a real path.
53574    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53576      # a path prefixed by /cygdrive for fixpath to work.
53577      new_path="$CYGWIN_ROOT_PATH$input_path"
53578    fi
53579  fi
53580
53581
53582  if test "x$path" != "x$new_path"; then
53583    MSVC_DLL="$new_path"
53584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53585$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53586  fi
53587
53588    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53589
53590  path="$MSVC_DLL"
53591  has_colon=`$ECHO $path | $GREP ^.:`
53592  new_path="$path"
53593  if test "x$has_colon" = x; then
53594    # Not in mixed or Windows style, start by that.
53595    new_path=`cmd //c echo $path`
53596  fi
53597
53598
53599  input_path="$new_path"
53600  # Check if we need to convert this using DOS-style short mode. If the path
53601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53602  # take no chances and rewrite it.
53603  # Note: m4 eats our [], so we need to use [ and ] instead.
53604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53605  if test "x$has_forbidden_chars" != x; then
53606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53607    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53608  fi
53609
53610
53611  windows_path="$new_path"
53612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53613    unix_path=`$CYGPATH -u "$windows_path"`
53614    new_path="$unix_path"
53615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53617    new_path="$unix_path"
53618  fi
53619
53620  if test "x$path" != "x$new_path"; then
53621    MSVC_DLL="$new_path"
53622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53623$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53624  fi
53625
53626  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53627  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53628
53629    else
53630      # We're on a unix platform. Hooray! :)
53631      path="$MSVC_DLL"
53632      has_space=`$ECHO "$path" | $GREP " "`
53633      if test "x$has_space" != x; then
53634        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53635$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53636        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53637      fi
53638
53639      # Use eval to expand a potential ~
53640      eval path="$path"
53641      if test ! -f "$path" && test ! -d "$path"; then
53642        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53643      fi
53644
53645      if test -d "$path"; then
53646        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53647      else
53648        dir="`$DIRNAME "$path"`"
53649        base="`$BASENAME "$path"`"
53650        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53651      fi
53652    fi
53653  fi
53654
53655      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53656$as_echo_n "checking for $DLL_NAME... " >&6; }
53657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53658$as_echo "$MSVC_DLL" >&6; }
53659    else
53660      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53661$as_echo "incorrect, ignoring" >&6; }
53662      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53663$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53664    fi
53665  fi
53666
53667  fi
53668
53669  if test "x$MSVC_DLL" = x; then
53670    # Probe: Look in the Windows system32 directory
53671    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53672
53673  windows_path="$CYGWIN_SYSTEMROOT"
53674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53675    unix_path=`$CYGPATH -u "$windows_path"`
53676    CYGWIN_SYSTEMROOT="$unix_path"
53677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53679    CYGWIN_SYSTEMROOT="$unix_path"
53680  fi
53681
53682    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53683
53684  DLL_NAME="$DLL_NAME"
53685  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53686  METHOD="well-known location in SYSTEMROOT"
53687  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53688    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53689$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53690
53691    # Need to check if the found msvcr is correct architecture
53692    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53693$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53694    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53696      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53697      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53698      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53699        CORRECT_MSVCR_ARCH="PE32 executable"
53700      else
53701        CORRECT_MSVCR_ARCH="PE32+ executable"
53702      fi
53703    else
53704      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53705        CORRECT_MSVCR_ARCH=386
53706      else
53707        CORRECT_MSVCR_ARCH=x86-64
53708      fi
53709    fi
53710    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53711      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53712$as_echo "ok" >&6; }
53713      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53714
53715  # Only process if variable expands to non-empty
53716
53717  if test "x$MSVC_DLL" != x; then
53718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53719
53720  # Input might be given as Windows format, start by converting to
53721  # unix format.
53722  path="$MSVC_DLL"
53723  new_path=`$CYGPATH -u "$path"`
53724
53725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53728  # "foo.exe" is OK but "foo" is an error.
53729  #
53730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53731  # It is also a way to make sure we got the proper file name for the real test later on.
53732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53733  if test "x$test_shortpath" = x; then
53734    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53735$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53736    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53737  fi
53738
53739  # Call helper function which possibly converts this using DOS-style short mode.
53740  # If so, the updated path is stored in $new_path.
53741
53742  input_path="$new_path"
53743  # Check if we need to convert this using DOS-style short mode. If the path
53744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53745  # take no chances and rewrite it.
53746  # Note: m4 eats our [], so we need to use [ and ] instead.
53747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53748  if test "x$has_forbidden_chars" != x; then
53749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53753      # Going to short mode and back again did indeed matter. Since short mode is
53754      # case insensitive, let's make it lowercase to improve readability.
53755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53756      # Now convert it back to Unix-style (cygpath)
53757      input_path=`$CYGPATH -u "$shortmode_path"`
53758      new_path="$input_path"
53759    fi
53760  fi
53761
53762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53763  if test "x$test_cygdrive_prefix" = x; then
53764    # As a simple fix, exclude /usr/bin since it's not a real path.
53765    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53767      # a path prefixed by /cygdrive for fixpath to work.
53768      new_path="$CYGWIN_ROOT_PATH$input_path"
53769    fi
53770  fi
53771
53772
53773  if test "x$path" != "x$new_path"; then
53774    MSVC_DLL="$new_path"
53775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53776$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53777  fi
53778
53779    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53780
53781  path="$MSVC_DLL"
53782  has_colon=`$ECHO $path | $GREP ^.:`
53783  new_path="$path"
53784  if test "x$has_colon" = x; then
53785    # Not in mixed or Windows style, start by that.
53786    new_path=`cmd //c echo $path`
53787  fi
53788
53789
53790  input_path="$new_path"
53791  # Check if we need to convert this using DOS-style short mode. If the path
53792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53793  # take no chances and rewrite it.
53794  # Note: m4 eats our [], so we need to use [ and ] instead.
53795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53796  if test "x$has_forbidden_chars" != x; then
53797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53798    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53799  fi
53800
53801
53802  windows_path="$new_path"
53803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53804    unix_path=`$CYGPATH -u "$windows_path"`
53805    new_path="$unix_path"
53806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53808    new_path="$unix_path"
53809  fi
53810
53811  if test "x$path" != "x$new_path"; then
53812    MSVC_DLL="$new_path"
53813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53814$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53815  fi
53816
53817  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53818  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53819
53820    else
53821      # We're on a unix platform. Hooray! :)
53822      path="$MSVC_DLL"
53823      has_space=`$ECHO "$path" | $GREP " "`
53824      if test "x$has_space" != x; then
53825        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53826$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53827        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53828      fi
53829
53830      # Use eval to expand a potential ~
53831      eval path="$path"
53832      if test ! -f "$path" && test ! -d "$path"; then
53833        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53834      fi
53835
53836      if test -d "$path"; then
53837        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53838      else
53839        dir="`$DIRNAME "$path"`"
53840        base="`$BASENAME "$path"`"
53841        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53842      fi
53843    fi
53844  fi
53845
53846      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53847$as_echo_n "checking for $DLL_NAME... " >&6; }
53848      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53849$as_echo "$MSVC_DLL" >&6; }
53850    else
53851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53852$as_echo "incorrect, ignoring" >&6; }
53853      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53854$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53855    fi
53856  fi
53857
53858  fi
53859
53860  if test "x$MSVC_DLL" = x; then
53861    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
53862    if test "x$VS100COMNTOOLS" != x; then
53863      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
53864
53865  windows_path="$CYGWIN_VS_TOOLS_DIR"
53866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53867    unix_path=`$CYGPATH -u "$windows_path"`
53868    CYGWIN_VS_TOOLS_DIR="$unix_path"
53869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53871    CYGWIN_VS_TOOLS_DIR="$unix_path"
53872  fi
53873
53874      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53875        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53876	    | $GREP -i /x64/ | $HEAD --lines 1`
53877      else
53878        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53879	    | $GREP -i /x86/ | $HEAD --lines 1`
53880      fi
53881
53882  DLL_NAME="$DLL_NAME"
53883  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53884  METHOD="search of VS100COMNTOOLS"
53885  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53886    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53887$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53888
53889    # Need to check if the found msvcr is correct architecture
53890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53891$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53892    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53893    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53894      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53895      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53896      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53897        CORRECT_MSVCR_ARCH="PE32 executable"
53898      else
53899        CORRECT_MSVCR_ARCH="PE32+ executable"
53900      fi
53901    else
53902      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53903        CORRECT_MSVCR_ARCH=386
53904      else
53905        CORRECT_MSVCR_ARCH=x86-64
53906      fi
53907    fi
53908    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53909      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53910$as_echo "ok" >&6; }
53911      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53912
53913  # Only process if variable expands to non-empty
53914
53915  if test "x$MSVC_DLL" != x; then
53916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53917
53918  # Input might be given as Windows format, start by converting to
53919  # unix format.
53920  path="$MSVC_DLL"
53921  new_path=`$CYGPATH -u "$path"`
53922
53923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53926  # "foo.exe" is OK but "foo" is an error.
53927  #
53928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53929  # It is also a way to make sure we got the proper file name for the real test later on.
53930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53931  if test "x$test_shortpath" = x; then
53932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53933$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53934    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53935  fi
53936
53937  # Call helper function which possibly converts this using DOS-style short mode.
53938  # If so, the updated path is stored in $new_path.
53939
53940  input_path="$new_path"
53941  # Check if we need to convert this using DOS-style short mode. If the path
53942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53943  # take no chances and rewrite it.
53944  # Note: m4 eats our [], so we need to use [ and ] instead.
53945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53946  if test "x$has_forbidden_chars" != x; then
53947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53951      # Going to short mode and back again did indeed matter. Since short mode is
53952      # case insensitive, let's make it lowercase to improve readability.
53953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53954      # Now convert it back to Unix-style (cygpath)
53955      input_path=`$CYGPATH -u "$shortmode_path"`
53956      new_path="$input_path"
53957    fi
53958  fi
53959
53960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53961  if test "x$test_cygdrive_prefix" = x; then
53962    # As a simple fix, exclude /usr/bin since it's not a real path.
53963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53965      # a path prefixed by /cygdrive for fixpath to work.
53966      new_path="$CYGWIN_ROOT_PATH$input_path"
53967    fi
53968  fi
53969
53970
53971  if test "x$path" != "x$new_path"; then
53972    MSVC_DLL="$new_path"
53973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53974$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53975  fi
53976
53977    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53978
53979  path="$MSVC_DLL"
53980  has_colon=`$ECHO $path | $GREP ^.:`
53981  new_path="$path"
53982  if test "x$has_colon" = x; then
53983    # Not in mixed or Windows style, start by that.
53984    new_path=`cmd //c echo $path`
53985  fi
53986
53987
53988  input_path="$new_path"
53989  # Check if we need to convert this using DOS-style short mode. If the path
53990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53991  # take no chances and rewrite it.
53992  # Note: m4 eats our [], so we need to use [ and ] instead.
53993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53994  if test "x$has_forbidden_chars" != x; then
53995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53997  fi
53998
53999
54000  windows_path="$new_path"
54001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54002    unix_path=`$CYGPATH -u "$windows_path"`
54003    new_path="$unix_path"
54004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54006    new_path="$unix_path"
54007  fi
54008
54009  if test "x$path" != "x$new_path"; then
54010    MSVC_DLL="$new_path"
54011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54012$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54013  fi
54014
54015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54017
54018    else
54019      # We're on a unix platform. Hooray! :)
54020      path="$MSVC_DLL"
54021      has_space=`$ECHO "$path" | $GREP " "`
54022      if test "x$has_space" != x; then
54023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54024$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54025        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54026      fi
54027
54028      # Use eval to expand a potential ~
54029      eval path="$path"
54030      if test ! -f "$path" && test ! -d "$path"; then
54031        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54032      fi
54033
54034      if test -d "$path"; then
54035        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54036      else
54037        dir="`$DIRNAME "$path"`"
54038        base="`$BASENAME "$path"`"
54039        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54040      fi
54041    fi
54042  fi
54043
54044      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54045$as_echo_n "checking for $DLL_NAME... " >&6; }
54046      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54047$as_echo "$MSVC_DLL" >&6; }
54048    else
54049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54050$as_echo "incorrect, ignoring" >&6; }
54051      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54052$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54053    fi
54054  fi
54055
54056    fi
54057  fi
54058
54059  if test "x$MSVC_DLL" = x; then
54060    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54061    # (This was the original behaviour; kept since it might turn something up)
54062    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54063      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54064        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54065	    | $GREP x64 | $HEAD --lines 1`
54066      else
54067        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54068	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54069        if test "x$POSSIBLE_MSVC_DLL" = x; then
54070          # We're grasping at straws now...
54071          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54072	      | $HEAD --lines 1`
54073        fi
54074      fi
54075
54076
54077  DLL_NAME="$DLL_NAME"
54078  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54079  METHOD="search of VCINSTALLDIR"
54080  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54081    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54082$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54083
54084    # Need to check if the found msvcr is correct architecture
54085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54086$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54087    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54089      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54090      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54091      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54092        CORRECT_MSVCR_ARCH="PE32 executable"
54093      else
54094        CORRECT_MSVCR_ARCH="PE32+ executable"
54095      fi
54096    else
54097      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54098        CORRECT_MSVCR_ARCH=386
54099      else
54100        CORRECT_MSVCR_ARCH=x86-64
54101      fi
54102    fi
54103    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54105$as_echo "ok" >&6; }
54106      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54107
54108  # Only process if variable expands to non-empty
54109
54110  if test "x$MSVC_DLL" != x; then
54111    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54112
54113  # Input might be given as Windows format, start by converting to
54114  # unix format.
54115  path="$MSVC_DLL"
54116  new_path=`$CYGPATH -u "$path"`
54117
54118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54121  # "foo.exe" is OK but "foo" is an error.
54122  #
54123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54124  # It is also a way to make sure we got the proper file name for the real test later on.
54125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54126  if test "x$test_shortpath" = x; then
54127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54128$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54129    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54130  fi
54131
54132  # Call helper function which possibly converts this using DOS-style short mode.
54133  # If so, the updated path is stored in $new_path.
54134
54135  input_path="$new_path"
54136  # Check if we need to convert this using DOS-style short mode. If the path
54137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54138  # take no chances and rewrite it.
54139  # Note: m4 eats our [], so we need to use [ and ] instead.
54140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54141  if test "x$has_forbidden_chars" != x; then
54142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54146      # Going to short mode and back again did indeed matter. Since short mode is
54147      # case insensitive, let's make it lowercase to improve readability.
54148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54149      # Now convert it back to Unix-style (cygpath)
54150      input_path=`$CYGPATH -u "$shortmode_path"`
54151      new_path="$input_path"
54152    fi
54153  fi
54154
54155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54156  if test "x$test_cygdrive_prefix" = x; then
54157    # As a simple fix, exclude /usr/bin since it's not a real path.
54158    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54160      # a path prefixed by /cygdrive for fixpath to work.
54161      new_path="$CYGWIN_ROOT_PATH$input_path"
54162    fi
54163  fi
54164
54165
54166  if test "x$path" != "x$new_path"; then
54167    MSVC_DLL="$new_path"
54168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54169$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54170  fi
54171
54172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54173
54174  path="$MSVC_DLL"
54175  has_colon=`$ECHO $path | $GREP ^.:`
54176  new_path="$path"
54177  if test "x$has_colon" = x; then
54178    # Not in mixed or Windows style, start by that.
54179    new_path=`cmd //c echo $path`
54180  fi
54181
54182
54183  input_path="$new_path"
54184  # Check if we need to convert this using DOS-style short mode. If the path
54185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54186  # take no chances and rewrite it.
54187  # Note: m4 eats our [], so we need to use [ and ] instead.
54188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54189  if test "x$has_forbidden_chars" != x; then
54190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54192  fi
54193
54194
54195  windows_path="$new_path"
54196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54197    unix_path=`$CYGPATH -u "$windows_path"`
54198    new_path="$unix_path"
54199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54201    new_path="$unix_path"
54202  fi
54203
54204  if test "x$path" != "x$new_path"; then
54205    MSVC_DLL="$new_path"
54206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54207$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54208  fi
54209
54210  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54211  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54212
54213    else
54214      # We're on a unix platform. Hooray! :)
54215      path="$MSVC_DLL"
54216      has_space=`$ECHO "$path" | $GREP " "`
54217      if test "x$has_space" != x; then
54218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54219$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54220        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54221      fi
54222
54223      # Use eval to expand a potential ~
54224      eval path="$path"
54225      if test ! -f "$path" && test ! -d "$path"; then
54226        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54227      fi
54228
54229      if test -d "$path"; then
54230        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54231      else
54232        dir="`$DIRNAME "$path"`"
54233        base="`$BASENAME "$path"`"
54234        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54235      fi
54236    fi
54237  fi
54238
54239      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54240$as_echo_n "checking for $DLL_NAME... " >&6; }
54241      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54242$as_echo "$MSVC_DLL" >&6; }
54243    else
54244      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54245$as_echo "incorrect, ignoring" >&6; }
54246      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54247$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54248    fi
54249  fi
54250
54251    fi
54252  fi
54253
54254  if test "x$MSVC_DLL" = x; then
54255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54256$as_echo_n "checking for $DLL_NAME... " >&6; }
54257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54258$as_echo "no" >&6; }
54259    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54260  fi
54261
54262    MSVCR_DLL="$MSVC_DLL"
54263  fi
54264
54265
54266
54267# Check whether --with-msvcp-dll was given.
54268if test "${with_msvcp_dll+set}" = set; then :
54269  withval=$with_msvcp_dll;
54270fi
54271
54272
54273  if test "x$MSVCP_NAME" != "x"; then
54274    if test "x$with_msvcp_dll" != x; then
54275      # If given explicitly by user, do not probe. If not present, fail directly.
54276
54277  DLL_NAME="$MSVCP_NAME"
54278  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54279  METHOD="--with-msvcp-dll"
54280  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54281    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54282$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54283
54284    # Need to check if the found msvcr is correct architecture
54285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54286$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54287    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54289      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54290      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54291      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54292        CORRECT_MSVCR_ARCH="PE32 executable"
54293      else
54294        CORRECT_MSVCR_ARCH="PE32+ executable"
54295      fi
54296    else
54297      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54298        CORRECT_MSVCR_ARCH=386
54299      else
54300        CORRECT_MSVCR_ARCH=x86-64
54301      fi
54302    fi
54303    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54304      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54305$as_echo "ok" >&6; }
54306      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54307
54308  # Only process if variable expands to non-empty
54309
54310  if test "x$MSVC_DLL" != x; then
54311    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54312
54313  # Input might be given as Windows format, start by converting to
54314  # unix format.
54315  path="$MSVC_DLL"
54316  new_path=`$CYGPATH -u "$path"`
54317
54318  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54319  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54320  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54321  # "foo.exe" is OK but "foo" is an error.
54322  #
54323  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54324  # It is also a way to make sure we got the proper file name for the real test later on.
54325  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54326  if test "x$test_shortpath" = x; then
54327    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54328$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54329    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54330  fi
54331
54332  # Call helper function which possibly converts this using DOS-style short mode.
54333  # If so, the updated path is stored in $new_path.
54334
54335  input_path="$new_path"
54336  # Check if we need to convert this using DOS-style short mode. If the path
54337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54338  # take no chances and rewrite it.
54339  # Note: m4 eats our [], so we need to use [ and ] instead.
54340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54341  if test "x$has_forbidden_chars" != x; then
54342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54346      # Going to short mode and back again did indeed matter. Since short mode is
54347      # case insensitive, let's make it lowercase to improve readability.
54348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54349      # Now convert it back to Unix-style (cygpath)
54350      input_path=`$CYGPATH -u "$shortmode_path"`
54351      new_path="$input_path"
54352    fi
54353  fi
54354
54355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54356  if test "x$test_cygdrive_prefix" = x; then
54357    # As a simple fix, exclude /usr/bin since it's not a real path.
54358    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54360      # a path prefixed by /cygdrive for fixpath to work.
54361      new_path="$CYGWIN_ROOT_PATH$input_path"
54362    fi
54363  fi
54364
54365
54366  if test "x$path" != "x$new_path"; then
54367    MSVC_DLL="$new_path"
54368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54369$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54370  fi
54371
54372    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54373
54374  path="$MSVC_DLL"
54375  has_colon=`$ECHO $path | $GREP ^.:`
54376  new_path="$path"
54377  if test "x$has_colon" = x; then
54378    # Not in mixed or Windows style, start by that.
54379    new_path=`cmd //c echo $path`
54380  fi
54381
54382
54383  input_path="$new_path"
54384  # Check if we need to convert this using DOS-style short mode. If the path
54385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54386  # take no chances and rewrite it.
54387  # Note: m4 eats our [], so we need to use [ and ] instead.
54388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54389  if test "x$has_forbidden_chars" != x; then
54390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54392  fi
54393
54394
54395  windows_path="$new_path"
54396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54397    unix_path=`$CYGPATH -u "$windows_path"`
54398    new_path="$unix_path"
54399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54401    new_path="$unix_path"
54402  fi
54403
54404  if test "x$path" != "x$new_path"; then
54405    MSVC_DLL="$new_path"
54406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54407$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54408  fi
54409
54410  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54411  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54412
54413    else
54414      # We're on a unix platform. Hooray! :)
54415      path="$MSVC_DLL"
54416      has_space=`$ECHO "$path" | $GREP " "`
54417      if test "x$has_space" != x; then
54418        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54419$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54420        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54421      fi
54422
54423      # Use eval to expand a potential ~
54424      eval path="$path"
54425      if test ! -f "$path" && test ! -d "$path"; then
54426        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54427      fi
54428
54429      if test -d "$path"; then
54430        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54431      else
54432        dir="`$DIRNAME "$path"`"
54433        base="`$BASENAME "$path"`"
54434        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54435      fi
54436    fi
54437  fi
54438
54439      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54440$as_echo_n "checking for $DLL_NAME... " >&6; }
54441      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54442$as_echo "$MSVC_DLL" >&6; }
54443    else
54444      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54445$as_echo "incorrect, ignoring" >&6; }
54446      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54447$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54448    fi
54449  fi
54450
54451      if test "x$MSVC_DLL" = x; then
54452        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54453      fi
54454      MSVCP_DLL="$MSVC_DLL"
54455    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54456
54457  DLL_NAME="$MSVCP_NAME"
54458  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54459  METHOD="devkit"
54460  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54461    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54462$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54463
54464    # Need to check if the found msvcr is correct architecture
54465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54466$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54467    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54468    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54469      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54470      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54471      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54472        CORRECT_MSVCR_ARCH="PE32 executable"
54473      else
54474        CORRECT_MSVCR_ARCH="PE32+ executable"
54475      fi
54476    else
54477      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54478        CORRECT_MSVCR_ARCH=386
54479      else
54480        CORRECT_MSVCR_ARCH=x86-64
54481      fi
54482    fi
54483    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54485$as_echo "ok" >&6; }
54486      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54487
54488  # Only process if variable expands to non-empty
54489
54490  if test "x$MSVC_DLL" != x; then
54491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54492
54493  # Input might be given as Windows format, start by converting to
54494  # unix format.
54495  path="$MSVC_DLL"
54496  new_path=`$CYGPATH -u "$path"`
54497
54498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54501  # "foo.exe" is OK but "foo" is an error.
54502  #
54503  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54504  # It is also a way to make sure we got the proper file name for the real test later on.
54505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54506  if test "x$test_shortpath" = x; then
54507    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54508$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54509    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54510  fi
54511
54512  # Call helper function which possibly converts this using DOS-style short mode.
54513  # If so, the updated path is stored in $new_path.
54514
54515  input_path="$new_path"
54516  # Check if we need to convert this using DOS-style short mode. If the path
54517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54518  # take no chances and rewrite it.
54519  # Note: m4 eats our [], so we need to use [ and ] instead.
54520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54521  if test "x$has_forbidden_chars" != x; then
54522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54526      # Going to short mode and back again did indeed matter. Since short mode is
54527      # case insensitive, let's make it lowercase to improve readability.
54528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54529      # Now convert it back to Unix-style (cygpath)
54530      input_path=`$CYGPATH -u "$shortmode_path"`
54531      new_path="$input_path"
54532    fi
54533  fi
54534
54535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54536  if test "x$test_cygdrive_prefix" = x; then
54537    # As a simple fix, exclude /usr/bin since it's not a real path.
54538    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54540      # a path prefixed by /cygdrive for fixpath to work.
54541      new_path="$CYGWIN_ROOT_PATH$input_path"
54542    fi
54543  fi
54544
54545
54546  if test "x$path" != "x$new_path"; then
54547    MSVC_DLL="$new_path"
54548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54549$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54550  fi
54551
54552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54553
54554  path="$MSVC_DLL"
54555  has_colon=`$ECHO $path | $GREP ^.:`
54556  new_path="$path"
54557  if test "x$has_colon" = x; then
54558    # Not in mixed or Windows style, start by that.
54559    new_path=`cmd //c echo $path`
54560  fi
54561
54562
54563  input_path="$new_path"
54564  # Check if we need to convert this using DOS-style short mode. If the path
54565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54566  # take no chances and rewrite it.
54567  # Note: m4 eats our [], so we need to use [ and ] instead.
54568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54569  if test "x$has_forbidden_chars" != x; then
54570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54572  fi
54573
54574
54575  windows_path="$new_path"
54576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54577    unix_path=`$CYGPATH -u "$windows_path"`
54578    new_path="$unix_path"
54579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54581    new_path="$unix_path"
54582  fi
54583
54584  if test "x$path" != "x$new_path"; then
54585    MSVC_DLL="$new_path"
54586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54587$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54588  fi
54589
54590  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54591  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54592
54593    else
54594      # We're on a unix platform. Hooray! :)
54595      path="$MSVC_DLL"
54596      has_space=`$ECHO "$path" | $GREP " "`
54597      if test "x$has_space" != x; then
54598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54599$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54600        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54601      fi
54602
54603      # Use eval to expand a potential ~
54604      eval path="$path"
54605      if test ! -f "$path" && test ! -d "$path"; then
54606        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54607      fi
54608
54609      if test -d "$path"; then
54610        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54611      else
54612        dir="`$DIRNAME "$path"`"
54613        base="`$BASENAME "$path"`"
54614        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54615      fi
54616    fi
54617  fi
54618
54619      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54620$as_echo_n "checking for $DLL_NAME... " >&6; }
54621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54622$as_echo "$MSVC_DLL" >&6; }
54623    else
54624      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54625$as_echo "incorrect, ignoring" >&6; }
54626      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54627$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54628    fi
54629  fi
54630
54631      if test "x$MSVC_DLL" = x; then
54632        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54633      fi
54634      MSVCP_DLL="$MSVC_DLL"
54635    else
54636
54637  DLL_NAME="${MSVCP_NAME}"
54638  MSVC_DLL=
54639
54640  if test "x$MSVC_DLL" = x; then
54641    # Probe: Using well-known location from Visual Studio 10.0
54642    if test "x$VCINSTALLDIR" != x; then
54643      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54644
54645  windows_path="$CYGWIN_VC_INSTALL_DIR"
54646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54647    unix_path=`$CYGPATH -u "$windows_path"`
54648    CYGWIN_VC_INSTALL_DIR="$unix_path"
54649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54651    CYGWIN_VC_INSTALL_DIR="$unix_path"
54652  fi
54653
54654      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54655        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54656      else
54657        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54658      fi
54659      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54660
54661  DLL_NAME="$DLL_NAME"
54662  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54663  METHOD="well-known location in VCINSTALLDIR"
54664  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54665    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54666$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54667
54668    # Need to check if the found msvcr is correct architecture
54669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54670$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54671    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54672    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54673      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54674      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54675      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54676        CORRECT_MSVCR_ARCH="PE32 executable"
54677      else
54678        CORRECT_MSVCR_ARCH="PE32+ executable"
54679      fi
54680    else
54681      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54682        CORRECT_MSVCR_ARCH=386
54683      else
54684        CORRECT_MSVCR_ARCH=x86-64
54685      fi
54686    fi
54687    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54688      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54689$as_echo "ok" >&6; }
54690      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54691
54692  # Only process if variable expands to non-empty
54693
54694  if test "x$MSVC_DLL" != x; then
54695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54696
54697  # Input might be given as Windows format, start by converting to
54698  # unix format.
54699  path="$MSVC_DLL"
54700  new_path=`$CYGPATH -u "$path"`
54701
54702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54705  # "foo.exe" is OK but "foo" is an error.
54706  #
54707  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54708  # It is also a way to make sure we got the proper file name for the real test later on.
54709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54710  if test "x$test_shortpath" = x; then
54711    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54712$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54713    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54714  fi
54715
54716  # Call helper function which possibly converts this using DOS-style short mode.
54717  # If so, the updated path is stored in $new_path.
54718
54719  input_path="$new_path"
54720  # Check if we need to convert this using DOS-style short mode. If the path
54721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54722  # take no chances and rewrite it.
54723  # Note: m4 eats our [], so we need to use [ and ] instead.
54724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54725  if test "x$has_forbidden_chars" != x; then
54726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54730      # Going to short mode and back again did indeed matter. Since short mode is
54731      # case insensitive, let's make it lowercase to improve readability.
54732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54733      # Now convert it back to Unix-style (cygpath)
54734      input_path=`$CYGPATH -u "$shortmode_path"`
54735      new_path="$input_path"
54736    fi
54737  fi
54738
54739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54740  if test "x$test_cygdrive_prefix" = x; then
54741    # As a simple fix, exclude /usr/bin since it's not a real path.
54742    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54744      # a path prefixed by /cygdrive for fixpath to work.
54745      new_path="$CYGWIN_ROOT_PATH$input_path"
54746    fi
54747  fi
54748
54749
54750  if test "x$path" != "x$new_path"; then
54751    MSVC_DLL="$new_path"
54752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54753$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54754  fi
54755
54756    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54757
54758  path="$MSVC_DLL"
54759  has_colon=`$ECHO $path | $GREP ^.:`
54760  new_path="$path"
54761  if test "x$has_colon" = x; then
54762    # Not in mixed or Windows style, start by that.
54763    new_path=`cmd //c echo $path`
54764  fi
54765
54766
54767  input_path="$new_path"
54768  # Check if we need to convert this using DOS-style short mode. If the path
54769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54770  # take no chances and rewrite it.
54771  # Note: m4 eats our [], so we need to use [ and ] instead.
54772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54773  if test "x$has_forbidden_chars" != x; then
54774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54776  fi
54777
54778
54779  windows_path="$new_path"
54780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54781    unix_path=`$CYGPATH -u "$windows_path"`
54782    new_path="$unix_path"
54783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54785    new_path="$unix_path"
54786  fi
54787
54788  if test "x$path" != "x$new_path"; then
54789    MSVC_DLL="$new_path"
54790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54791$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54792  fi
54793
54794  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54795  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54796
54797    else
54798      # We're on a unix platform. Hooray! :)
54799      path="$MSVC_DLL"
54800      has_space=`$ECHO "$path" | $GREP " "`
54801      if test "x$has_space" != x; then
54802        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54803$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54804        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54805      fi
54806
54807      # Use eval to expand a potential ~
54808      eval path="$path"
54809      if test ! -f "$path" && test ! -d "$path"; then
54810        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54811      fi
54812
54813      if test -d "$path"; then
54814        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54815      else
54816        dir="`$DIRNAME "$path"`"
54817        base="`$BASENAME "$path"`"
54818        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54819      fi
54820    fi
54821  fi
54822
54823      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54824$as_echo_n "checking for $DLL_NAME... " >&6; }
54825      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54826$as_echo "$MSVC_DLL" >&6; }
54827    else
54828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54829$as_echo "incorrect, ignoring" >&6; }
54830      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54831$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54832    fi
54833  fi
54834
54835    fi
54836  fi
54837
54838  if test "x$MSVC_DLL" = x; then
54839    # Probe: Check in the Boot JDK directory.
54840    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54841
54842  DLL_NAME="$DLL_NAME"
54843  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54844  METHOD="well-known location in Boot JDK"
54845  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54846    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54847$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54848
54849    # Need to check if the found msvcr is correct architecture
54850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54851$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54852    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54854      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54855      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54856      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54857        CORRECT_MSVCR_ARCH="PE32 executable"
54858      else
54859        CORRECT_MSVCR_ARCH="PE32+ executable"
54860      fi
54861    else
54862      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54863        CORRECT_MSVCR_ARCH=386
54864      else
54865        CORRECT_MSVCR_ARCH=x86-64
54866      fi
54867    fi
54868    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54870$as_echo "ok" >&6; }
54871      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54872
54873  # Only process if variable expands to non-empty
54874
54875  if test "x$MSVC_DLL" != x; then
54876    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54877
54878  # Input might be given as Windows format, start by converting to
54879  # unix format.
54880  path="$MSVC_DLL"
54881  new_path=`$CYGPATH -u "$path"`
54882
54883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54886  # "foo.exe" is OK but "foo" is an error.
54887  #
54888  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54889  # It is also a way to make sure we got the proper file name for the real test later on.
54890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54891  if test "x$test_shortpath" = x; then
54892    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54893$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54894    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54895  fi
54896
54897  # Call helper function which possibly converts this using DOS-style short mode.
54898  # If so, the updated path is stored in $new_path.
54899
54900  input_path="$new_path"
54901  # Check if we need to convert this using DOS-style short mode. If the path
54902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54903  # take no chances and rewrite it.
54904  # Note: m4 eats our [], so we need to use [ and ] instead.
54905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54906  if test "x$has_forbidden_chars" != x; then
54907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54911      # Going to short mode and back again did indeed matter. Since short mode is
54912      # case insensitive, let's make it lowercase to improve readability.
54913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54914      # Now convert it back to Unix-style (cygpath)
54915      input_path=`$CYGPATH -u "$shortmode_path"`
54916      new_path="$input_path"
54917    fi
54918  fi
54919
54920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54921  if test "x$test_cygdrive_prefix" = x; then
54922    # As a simple fix, exclude /usr/bin since it's not a real path.
54923    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54925      # a path prefixed by /cygdrive for fixpath to work.
54926      new_path="$CYGWIN_ROOT_PATH$input_path"
54927    fi
54928  fi
54929
54930
54931  if test "x$path" != "x$new_path"; then
54932    MSVC_DLL="$new_path"
54933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54934$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54935  fi
54936
54937    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54938
54939  path="$MSVC_DLL"
54940  has_colon=`$ECHO $path | $GREP ^.:`
54941  new_path="$path"
54942  if test "x$has_colon" = x; then
54943    # Not in mixed or Windows style, start by that.
54944    new_path=`cmd //c echo $path`
54945  fi
54946
54947
54948  input_path="$new_path"
54949  # Check if we need to convert this using DOS-style short mode. If the path
54950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54951  # take no chances and rewrite it.
54952  # Note: m4 eats our [], so we need to use [ and ] instead.
54953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54954  if test "x$has_forbidden_chars" != x; then
54955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54957  fi
54958
54959
54960  windows_path="$new_path"
54961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54962    unix_path=`$CYGPATH -u "$windows_path"`
54963    new_path="$unix_path"
54964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54966    new_path="$unix_path"
54967  fi
54968
54969  if test "x$path" != "x$new_path"; then
54970    MSVC_DLL="$new_path"
54971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54972$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54973  fi
54974
54975  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54976  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54977
54978    else
54979      # We're on a unix platform. Hooray! :)
54980      path="$MSVC_DLL"
54981      has_space=`$ECHO "$path" | $GREP " "`
54982      if test "x$has_space" != x; then
54983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54984$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54985        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54986      fi
54987
54988      # Use eval to expand a potential ~
54989      eval path="$path"
54990      if test ! -f "$path" && test ! -d "$path"; then
54991        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54992      fi
54993
54994      if test -d "$path"; then
54995        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54996      else
54997        dir="`$DIRNAME "$path"`"
54998        base="`$BASENAME "$path"`"
54999        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55000      fi
55001    fi
55002  fi
55003
55004      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55005$as_echo_n "checking for $DLL_NAME... " >&6; }
55006      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55007$as_echo "$MSVC_DLL" >&6; }
55008    else
55009      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55010$as_echo "incorrect, ignoring" >&6; }
55011      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55012$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55013    fi
55014  fi
55015
55016  fi
55017
55018  if test "x$MSVC_DLL" = x; then
55019    # Probe: Look in the Windows system32 directory
55020    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55021
55022  windows_path="$CYGWIN_SYSTEMROOT"
55023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55024    unix_path=`$CYGPATH -u "$windows_path"`
55025    CYGWIN_SYSTEMROOT="$unix_path"
55026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55028    CYGWIN_SYSTEMROOT="$unix_path"
55029  fi
55030
55031    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55032
55033  DLL_NAME="$DLL_NAME"
55034  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55035  METHOD="well-known location in SYSTEMROOT"
55036  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55037    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55038$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55039
55040    # Need to check if the found msvcr is correct architecture
55041    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55042$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55043    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55045      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55046      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55047      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55048        CORRECT_MSVCR_ARCH="PE32 executable"
55049      else
55050        CORRECT_MSVCR_ARCH="PE32+ executable"
55051      fi
55052    else
55053      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55054        CORRECT_MSVCR_ARCH=386
55055      else
55056        CORRECT_MSVCR_ARCH=x86-64
55057      fi
55058    fi
55059    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55060      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55061$as_echo "ok" >&6; }
55062      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55063
55064  # Only process if variable expands to non-empty
55065
55066  if test "x$MSVC_DLL" != x; then
55067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55068
55069  # Input might be given as Windows format, start by converting to
55070  # unix format.
55071  path="$MSVC_DLL"
55072  new_path=`$CYGPATH -u "$path"`
55073
55074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55077  # "foo.exe" is OK but "foo" is an error.
55078  #
55079  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55080  # It is also a way to make sure we got the proper file name for the real test later on.
55081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55082  if test "x$test_shortpath" = x; then
55083    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55084$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55085    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55086  fi
55087
55088  # Call helper function which possibly converts this using DOS-style short mode.
55089  # If so, the updated path is stored in $new_path.
55090
55091  input_path="$new_path"
55092  # Check if we need to convert this using DOS-style short mode. If the path
55093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55094  # take no chances and rewrite it.
55095  # Note: m4 eats our [], so we need to use [ and ] instead.
55096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55097  if test "x$has_forbidden_chars" != x; then
55098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55102      # Going to short mode and back again did indeed matter. Since short mode is
55103      # case insensitive, let's make it lowercase to improve readability.
55104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55105      # Now convert it back to Unix-style (cygpath)
55106      input_path=`$CYGPATH -u "$shortmode_path"`
55107      new_path="$input_path"
55108    fi
55109  fi
55110
55111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55112  if test "x$test_cygdrive_prefix" = x; then
55113    # As a simple fix, exclude /usr/bin since it's not a real path.
55114    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55116      # a path prefixed by /cygdrive for fixpath to work.
55117      new_path="$CYGWIN_ROOT_PATH$input_path"
55118    fi
55119  fi
55120
55121
55122  if test "x$path" != "x$new_path"; then
55123    MSVC_DLL="$new_path"
55124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55125$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55126  fi
55127
55128    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55129
55130  path="$MSVC_DLL"
55131  has_colon=`$ECHO $path | $GREP ^.:`
55132  new_path="$path"
55133  if test "x$has_colon" = x; then
55134    # Not in mixed or Windows style, start by that.
55135    new_path=`cmd //c echo $path`
55136  fi
55137
55138
55139  input_path="$new_path"
55140  # Check if we need to convert this using DOS-style short mode. If the path
55141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55142  # take no chances and rewrite it.
55143  # Note: m4 eats our [], so we need to use [ and ] instead.
55144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55145  if test "x$has_forbidden_chars" != x; then
55146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55147    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55148  fi
55149
55150
55151  windows_path="$new_path"
55152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55153    unix_path=`$CYGPATH -u "$windows_path"`
55154    new_path="$unix_path"
55155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55157    new_path="$unix_path"
55158  fi
55159
55160  if test "x$path" != "x$new_path"; then
55161    MSVC_DLL="$new_path"
55162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55163$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55164  fi
55165
55166  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55167  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55168
55169    else
55170      # We're on a unix platform. Hooray! :)
55171      path="$MSVC_DLL"
55172      has_space=`$ECHO "$path" | $GREP " "`
55173      if test "x$has_space" != x; then
55174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55175$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55176        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55177      fi
55178
55179      # Use eval to expand a potential ~
55180      eval path="$path"
55181      if test ! -f "$path" && test ! -d "$path"; then
55182        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55183      fi
55184
55185      if test -d "$path"; then
55186        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55187      else
55188        dir="`$DIRNAME "$path"`"
55189        base="`$BASENAME "$path"`"
55190        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55191      fi
55192    fi
55193  fi
55194
55195      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55196$as_echo_n "checking for $DLL_NAME... " >&6; }
55197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55198$as_echo "$MSVC_DLL" >&6; }
55199    else
55200      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55201$as_echo "incorrect, ignoring" >&6; }
55202      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55203$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55204    fi
55205  fi
55206
55207  fi
55208
55209  if test "x$MSVC_DLL" = x; then
55210    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55211    if test "x$VS100COMNTOOLS" != x; then
55212      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55213
55214  windows_path="$CYGWIN_VS_TOOLS_DIR"
55215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55216    unix_path=`$CYGPATH -u "$windows_path"`
55217    CYGWIN_VS_TOOLS_DIR="$unix_path"
55218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55220    CYGWIN_VS_TOOLS_DIR="$unix_path"
55221  fi
55222
55223      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55224        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55225	    | $GREP -i /x64/ | $HEAD --lines 1`
55226      else
55227        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55228	    | $GREP -i /x86/ | $HEAD --lines 1`
55229      fi
55230
55231  DLL_NAME="$DLL_NAME"
55232  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55233  METHOD="search of VS100COMNTOOLS"
55234  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55235    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55236$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55237
55238    # Need to check if the found msvcr is correct architecture
55239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55240$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55241    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55243      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55244      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55245      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55246        CORRECT_MSVCR_ARCH="PE32 executable"
55247      else
55248        CORRECT_MSVCR_ARCH="PE32+ executable"
55249      fi
55250    else
55251      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55252        CORRECT_MSVCR_ARCH=386
55253      else
55254        CORRECT_MSVCR_ARCH=x86-64
55255      fi
55256    fi
55257    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55258      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55259$as_echo "ok" >&6; }
55260      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55261
55262  # Only process if variable expands to non-empty
55263
55264  if test "x$MSVC_DLL" != x; then
55265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55266
55267  # Input might be given as Windows format, start by converting to
55268  # unix format.
55269  path="$MSVC_DLL"
55270  new_path=`$CYGPATH -u "$path"`
55271
55272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55275  # "foo.exe" is OK but "foo" is an error.
55276  #
55277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55278  # It is also a way to make sure we got the proper file name for the real test later on.
55279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55280  if test "x$test_shortpath" = x; then
55281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55282$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55283    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55284  fi
55285
55286  # Call helper function which possibly converts this using DOS-style short mode.
55287  # If so, the updated path is stored in $new_path.
55288
55289  input_path="$new_path"
55290  # Check if we need to convert this using DOS-style short mode. If the path
55291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55292  # take no chances and rewrite it.
55293  # Note: m4 eats our [], so we need to use [ and ] instead.
55294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55295  if test "x$has_forbidden_chars" != x; then
55296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55300      # Going to short mode and back again did indeed matter. Since short mode is
55301      # case insensitive, let's make it lowercase to improve readability.
55302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55303      # Now convert it back to Unix-style (cygpath)
55304      input_path=`$CYGPATH -u "$shortmode_path"`
55305      new_path="$input_path"
55306    fi
55307  fi
55308
55309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55310  if test "x$test_cygdrive_prefix" = x; then
55311    # As a simple fix, exclude /usr/bin since it's not a real path.
55312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55314      # a path prefixed by /cygdrive for fixpath to work.
55315      new_path="$CYGWIN_ROOT_PATH$input_path"
55316    fi
55317  fi
55318
55319
55320  if test "x$path" != "x$new_path"; then
55321    MSVC_DLL="$new_path"
55322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55323$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55324  fi
55325
55326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55327
55328  path="$MSVC_DLL"
55329  has_colon=`$ECHO $path | $GREP ^.:`
55330  new_path="$path"
55331  if test "x$has_colon" = x; then
55332    # Not in mixed or Windows style, start by that.
55333    new_path=`cmd //c echo $path`
55334  fi
55335
55336
55337  input_path="$new_path"
55338  # Check if we need to convert this using DOS-style short mode. If the path
55339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55340  # take no chances and rewrite it.
55341  # Note: m4 eats our [], so we need to use [ and ] instead.
55342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55343  if test "x$has_forbidden_chars" != x; then
55344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55346  fi
55347
55348
55349  windows_path="$new_path"
55350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55351    unix_path=`$CYGPATH -u "$windows_path"`
55352    new_path="$unix_path"
55353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55355    new_path="$unix_path"
55356  fi
55357
55358  if test "x$path" != "x$new_path"; then
55359    MSVC_DLL="$new_path"
55360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55361$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55362  fi
55363
55364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55366
55367    else
55368      # We're on a unix platform. Hooray! :)
55369      path="$MSVC_DLL"
55370      has_space=`$ECHO "$path" | $GREP " "`
55371      if test "x$has_space" != x; then
55372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55373$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55374        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55375      fi
55376
55377      # Use eval to expand a potential ~
55378      eval path="$path"
55379      if test ! -f "$path" && test ! -d "$path"; then
55380        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55381      fi
55382
55383      if test -d "$path"; then
55384        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55385      else
55386        dir="`$DIRNAME "$path"`"
55387        base="`$BASENAME "$path"`"
55388        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55389      fi
55390    fi
55391  fi
55392
55393      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55394$as_echo_n "checking for $DLL_NAME... " >&6; }
55395      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55396$as_echo "$MSVC_DLL" >&6; }
55397    else
55398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55399$as_echo "incorrect, ignoring" >&6; }
55400      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55401$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55402    fi
55403  fi
55404
55405    fi
55406  fi
55407
55408  if test "x$MSVC_DLL" = x; then
55409    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55410    # (This was the original behaviour; kept since it might turn something up)
55411    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55412      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55413        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55414	    | $GREP x64 | $HEAD --lines 1`
55415      else
55416        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55417	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55418        if test "x$POSSIBLE_MSVC_DLL" = x; then
55419          # We're grasping at straws now...
55420          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55421	      | $HEAD --lines 1`
55422        fi
55423      fi
55424
55425
55426  DLL_NAME="$DLL_NAME"
55427  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55428  METHOD="search of VCINSTALLDIR"
55429  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55430    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55431$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55432
55433    # Need to check if the found msvcr is correct architecture
55434    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55435$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55436    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55438      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55439      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55440      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55441        CORRECT_MSVCR_ARCH="PE32 executable"
55442      else
55443        CORRECT_MSVCR_ARCH="PE32+ executable"
55444      fi
55445    else
55446      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55447        CORRECT_MSVCR_ARCH=386
55448      else
55449        CORRECT_MSVCR_ARCH=x86-64
55450      fi
55451    fi
55452    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55454$as_echo "ok" >&6; }
55455      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55456
55457  # Only process if variable expands to non-empty
55458
55459  if test "x$MSVC_DLL" != x; then
55460    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55461
55462  # Input might be given as Windows format, start by converting to
55463  # unix format.
55464  path="$MSVC_DLL"
55465  new_path=`$CYGPATH -u "$path"`
55466
55467  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55468  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55469  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55470  # "foo.exe" is OK but "foo" is an error.
55471  #
55472  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55473  # It is also a way to make sure we got the proper file name for the real test later on.
55474  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55475  if test "x$test_shortpath" = x; then
55476    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55477$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55478    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55479  fi
55480
55481  # Call helper function which possibly converts this using DOS-style short mode.
55482  # If so, the updated path is stored in $new_path.
55483
55484  input_path="$new_path"
55485  # Check if we need to convert this using DOS-style short mode. If the path
55486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55487  # take no chances and rewrite it.
55488  # Note: m4 eats our [], so we need to use [ and ] instead.
55489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55490  if test "x$has_forbidden_chars" != x; then
55491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55495      # Going to short mode and back again did indeed matter. Since short mode is
55496      # case insensitive, let's make it lowercase to improve readability.
55497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55498      # Now convert it back to Unix-style (cygpath)
55499      input_path=`$CYGPATH -u "$shortmode_path"`
55500      new_path="$input_path"
55501    fi
55502  fi
55503
55504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55505  if test "x$test_cygdrive_prefix" = x; then
55506    # As a simple fix, exclude /usr/bin since it's not a real path.
55507    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55509      # a path prefixed by /cygdrive for fixpath to work.
55510      new_path="$CYGWIN_ROOT_PATH$input_path"
55511    fi
55512  fi
55513
55514
55515  if test "x$path" != "x$new_path"; then
55516    MSVC_DLL="$new_path"
55517    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55518$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55519  fi
55520
55521    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55522
55523  path="$MSVC_DLL"
55524  has_colon=`$ECHO $path | $GREP ^.:`
55525  new_path="$path"
55526  if test "x$has_colon" = x; then
55527    # Not in mixed or Windows style, start by that.
55528    new_path=`cmd //c echo $path`
55529  fi
55530
55531
55532  input_path="$new_path"
55533  # Check if we need to convert this using DOS-style short mode. If the path
55534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55535  # take no chances and rewrite it.
55536  # Note: m4 eats our [], so we need to use [ and ] instead.
55537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55538  if test "x$has_forbidden_chars" != x; then
55539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55541  fi
55542
55543
55544  windows_path="$new_path"
55545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55546    unix_path=`$CYGPATH -u "$windows_path"`
55547    new_path="$unix_path"
55548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55550    new_path="$unix_path"
55551  fi
55552
55553  if test "x$path" != "x$new_path"; then
55554    MSVC_DLL="$new_path"
55555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55556$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55557  fi
55558
55559  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55560  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55561
55562    else
55563      # We're on a unix platform. Hooray! :)
55564      path="$MSVC_DLL"
55565      has_space=`$ECHO "$path" | $GREP " "`
55566      if test "x$has_space" != x; then
55567        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55568$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55569        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55570      fi
55571
55572      # Use eval to expand a potential ~
55573      eval path="$path"
55574      if test ! -f "$path" && test ! -d "$path"; then
55575        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55576      fi
55577
55578      if test -d "$path"; then
55579        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55580      else
55581        dir="`$DIRNAME "$path"`"
55582        base="`$BASENAME "$path"`"
55583        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55584      fi
55585    fi
55586  fi
55587
55588      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55589$as_echo_n "checking for $DLL_NAME... " >&6; }
55590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55591$as_echo "$MSVC_DLL" >&6; }
55592    else
55593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55594$as_echo "incorrect, ignoring" >&6; }
55595      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55596$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55597    fi
55598  fi
55599
55600    fi
55601  fi
55602
55603  if test "x$MSVC_DLL" = x; then
55604    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55605$as_echo_n "checking for $DLL_NAME... " >&6; }
55606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55607$as_echo "no" >&6; }
55608    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55609  fi
55610
55611      MSVCP_DLL="$MSVC_DLL"
55612    fi
55613
55614  fi
55615
55616  fi
55617
55618
55619  if test "x$NEEDS_LIB_X11" = xfalse; then
55620    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55621      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55622$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55623    fi
55624    X_CFLAGS=
55625    X_LIBS=
55626  else
55627
55628    if test "x${with_x}" = xno; then
55629      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55630    fi
55631
55632    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55633      # The user has specified a X11 base directory. Use it for includes and
55634      # libraries, unless explicitly overridden.
55635      if test "x$x_includes" = xNONE; then
55636        x_includes="${with_x}/include"
55637      fi
55638      if test "x$x_libraries" = xNONE; then
55639        x_libraries="${with_x}/lib"
55640      fi
55641    else
55642      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55643      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55644      # --x-libraries for the sysroot, if that seems to be correct.
55645      if test "x$SYSROOT" != "x"; then
55646        if test "x$x_includes" = xNONE; then
55647          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55648            x_includes="$SYSROOT/usr/X11R6/include"
55649          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55650            x_includes="$SYSROOT/usr/include"
55651          fi
55652        fi
55653        if test "x$x_libraries" = xNONE; then
55654          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55655            x_libraries="$SYSROOT/usr/X11R6/lib"
55656          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55657            x_libraries="$SYSROOT/usr/lib64"
55658          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55659            x_libraries="$SYSROOT/usr/lib"
55660          fi
55661        fi
55662      fi
55663    fi
55664
55665    # Now let autoconf do it's magic
55666    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55667$as_echo_n "checking for X... " >&6; }
55668
55669
55670# Check whether --with-x was given.
55671if test "${with_x+set}" = set; then :
55672  withval=$with_x;
55673fi
55674
55675# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55676if test "x$with_x" = xno; then
55677  # The user explicitly disabled X.
55678  have_x=disabled
55679else
55680  case $x_includes,$x_libraries in #(
55681    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55682    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55683  $as_echo_n "(cached) " >&6
55684else
55685  # One or both of the vars are not set, and there is no cached value.
55686ac_x_includes=no ac_x_libraries=no
55687rm -f -r conftest.dir
55688if mkdir conftest.dir; then
55689  cd conftest.dir
55690  cat >Imakefile <<'_ACEOF'
55691incroot:
55692	@echo incroot='${INCROOT}'
55693usrlibdir:
55694	@echo usrlibdir='${USRLIBDIR}'
55695libdir:
55696	@echo libdir='${LIBDIR}'
55697_ACEOF
55698  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55699    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55700    for ac_var in incroot usrlibdir libdir; do
55701      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55702    done
55703    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55704    for ac_extension in a so sl dylib la dll; do
55705      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55706	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55707	ac_im_usrlibdir=$ac_im_libdir; break
55708      fi
55709    done
55710    # Screen out bogus values from the imake configuration.  They are
55711    # bogus both because they are the default anyway, and because
55712    # using them would break gcc on systems where it needs fixed includes.
55713    case $ac_im_incroot in
55714	/usr/include) ac_x_includes= ;;
55715	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55716    esac
55717    case $ac_im_usrlibdir in
55718	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55719	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55720    esac
55721  fi
55722  cd ..
55723  rm -f -r conftest.dir
55724fi
55725
55726# Standard set of common directories for X headers.
55727# Check X11 before X11Rn because it is often a symlink to the current release.
55728ac_x_header_dirs='
55729/usr/X11/include
55730/usr/X11R7/include
55731/usr/X11R6/include
55732/usr/X11R5/include
55733/usr/X11R4/include
55734
55735/usr/include/X11
55736/usr/include/X11R7
55737/usr/include/X11R6
55738/usr/include/X11R5
55739/usr/include/X11R4
55740
55741/usr/local/X11/include
55742/usr/local/X11R7/include
55743/usr/local/X11R6/include
55744/usr/local/X11R5/include
55745/usr/local/X11R4/include
55746
55747/usr/local/include/X11
55748/usr/local/include/X11R7
55749/usr/local/include/X11R6
55750/usr/local/include/X11R5
55751/usr/local/include/X11R4
55752
55753/usr/X386/include
55754/usr/x386/include
55755/usr/XFree86/include/X11
55756
55757/usr/include
55758/usr/local/include
55759/usr/unsupported/include
55760/usr/athena/include
55761/usr/local/x11r5/include
55762/usr/lpp/Xamples/include
55763
55764/usr/openwin/include
55765/usr/openwin/share/include'
55766
55767if test "$ac_x_includes" = no; then
55768  # Guess where to find include files, by looking for Xlib.h.
55769  # First, try using that file with no special directory specified.
55770  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55771/* end confdefs.h.  */
55772#include <X11/Xlib.h>
55773_ACEOF
55774if ac_fn_cxx_try_cpp "$LINENO"; then :
55775  # We can compile using X headers with no special include directory.
55776ac_x_includes=
55777else
55778  for ac_dir in $ac_x_header_dirs; do
55779  if test -r "$ac_dir/X11/Xlib.h"; then
55780    ac_x_includes=$ac_dir
55781    break
55782  fi
55783done
55784fi
55785rm -f conftest.err conftest.i conftest.$ac_ext
55786fi # $ac_x_includes = no
55787
55788if test "$ac_x_libraries" = no; then
55789  # Check for the libraries.
55790  # See if we find them without any special options.
55791  # Don't add to $LIBS permanently.
55792  ac_save_LIBS=$LIBS
55793  LIBS="-lX11 $LIBS"
55794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55795/* end confdefs.h.  */
55796#include <X11/Xlib.h>
55797int
55798main ()
55799{
55800XrmInitialize ()
55801  ;
55802  return 0;
55803}
55804_ACEOF
55805if ac_fn_cxx_try_link "$LINENO"; then :
55806  LIBS=$ac_save_LIBS
55807# We can link X programs with no special library path.
55808ac_x_libraries=
55809else
55810  LIBS=$ac_save_LIBS
55811for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
55812do
55813  # Don't even attempt the hair of trying to link an X program!
55814  for ac_extension in a so sl dylib la dll; do
55815    if test -r "$ac_dir/libX11.$ac_extension"; then
55816      ac_x_libraries=$ac_dir
55817      break 2
55818    fi
55819  done
55820done
55821fi
55822rm -f core conftest.err conftest.$ac_objext \
55823    conftest$ac_exeext conftest.$ac_ext
55824fi # $ac_x_libraries = no
55825
55826case $ac_x_includes,$ac_x_libraries in #(
55827  no,* | *,no | *\'*)
55828    # Didn't find X, or a directory has "'" in its name.
55829    ac_cv_have_x="have_x=no";; #(
55830  *)
55831    # Record where we found X for the cache.
55832    ac_cv_have_x="have_x=yes\
55833	ac_x_includes='$ac_x_includes'\
55834	ac_x_libraries='$ac_x_libraries'"
55835esac
55836fi
55837;; #(
55838    *) have_x=yes;;
55839  esac
55840  eval "$ac_cv_have_x"
55841fi # $with_x != no
55842
55843if test "$have_x" != yes; then
55844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
55845$as_echo "$have_x" >&6; }
55846  no_x=yes
55847else
55848  # If each of the values was on the command line, it overrides each guess.
55849  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
55850  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
55851  # Update the cache value to reflect the command line values.
55852  ac_cv_have_x="have_x=yes\
55853	ac_x_includes='$x_includes'\
55854	ac_x_libraries='$x_libraries'"
55855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
55856$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
55857fi
55858
55859    if test "$no_x" = yes; then
55860  # Not all programs may use this symbol, but it does not hurt to define it.
55861
55862$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
55863
55864  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
55865else
55866  if test -n "$x_includes"; then
55867    X_CFLAGS="$X_CFLAGS -I$x_includes"
55868  fi
55869
55870  # It would also be nice to do this for all -L options, not just this one.
55871  if test -n "$x_libraries"; then
55872    X_LIBS="$X_LIBS -L$x_libraries"
55873    # For Solaris; some versions of Sun CC require a space after -R and
55874    # others require no space.  Words are not sufficient . . . .
55875    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
55876$as_echo_n "checking whether -R must be followed by a space... " >&6; }
55877    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
55878    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
55879    ac_cxx_werror_flag=yes
55880    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55881/* end confdefs.h.  */
55882
55883int
55884main ()
55885{
55886
55887  ;
55888  return 0;
55889}
55890_ACEOF
55891if ac_fn_cxx_try_link "$LINENO"; then :
55892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55893$as_echo "no" >&6; }
55894       X_LIBS="$X_LIBS -R$x_libraries"
55895else
55896  LIBS="$ac_xsave_LIBS -R $x_libraries"
55897       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55898/* end confdefs.h.  */
55899
55900int
55901main ()
55902{
55903
55904  ;
55905  return 0;
55906}
55907_ACEOF
55908if ac_fn_cxx_try_link "$LINENO"; then :
55909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55910$as_echo "yes" >&6; }
55911	  X_LIBS="$X_LIBS -R $x_libraries"
55912else
55913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
55914$as_echo "neither works" >&6; }
55915fi
55916rm -f core conftest.err conftest.$ac_objext \
55917    conftest$ac_exeext conftest.$ac_ext
55918fi
55919rm -f core conftest.err conftest.$ac_objext \
55920    conftest$ac_exeext conftest.$ac_ext
55921    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
55922    LIBS=$ac_xsave_LIBS
55923  fi
55924
55925  # Check for system-dependent libraries X programs must link with.
55926  # Do this before checking for the system-independent R6 libraries
55927  # (-lICE), since we may need -lsocket or whatever for X linking.
55928
55929  if test "$ISC" = yes; then
55930    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
55931  else
55932    # Martyn Johnson says this is needed for Ultrix, if the X
55933    # libraries were built with DECnet support.  And Karl Berry says
55934    # the Alpha needs dnet_stub (dnet does not exist).
55935    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
55936    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55937/* end confdefs.h.  */
55938
55939/* Override any GCC internal prototype to avoid an error.
55940   Use char because int might match the return type of a GCC
55941   builtin and then its argument prototype would still apply.  */
55942#ifdef __cplusplus
55943extern "C"
55944#endif
55945char XOpenDisplay ();
55946int
55947main ()
55948{
55949return XOpenDisplay ();
55950  ;
55951  return 0;
55952}
55953_ACEOF
55954if ac_fn_cxx_try_link "$LINENO"; then :
55955
55956else
55957  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
55958$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
55959if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
55960  $as_echo_n "(cached) " >&6
55961else
55962  ac_check_lib_save_LIBS=$LIBS
55963LIBS="-ldnet  $LIBS"
55964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55965/* end confdefs.h.  */
55966
55967/* Override any GCC internal prototype to avoid an error.
55968   Use char because int might match the return type of a GCC
55969   builtin and then its argument prototype would still apply.  */
55970#ifdef __cplusplus
55971extern "C"
55972#endif
55973char dnet_ntoa ();
55974int
55975main ()
55976{
55977return dnet_ntoa ();
55978  ;
55979  return 0;
55980}
55981_ACEOF
55982if ac_fn_cxx_try_link "$LINENO"; then :
55983  ac_cv_lib_dnet_dnet_ntoa=yes
55984else
55985  ac_cv_lib_dnet_dnet_ntoa=no
55986fi
55987rm -f core conftest.err conftest.$ac_objext \
55988    conftest$ac_exeext conftest.$ac_ext
55989LIBS=$ac_check_lib_save_LIBS
55990fi
55991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
55992$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
55993if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
55994  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
55995fi
55996
55997    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
55998      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
55999$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56000if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56001  $as_echo_n "(cached) " >&6
56002else
56003  ac_check_lib_save_LIBS=$LIBS
56004LIBS="-ldnet_stub  $LIBS"
56005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56006/* end confdefs.h.  */
56007
56008/* Override any GCC internal prototype to avoid an error.
56009   Use char because int might match the return type of a GCC
56010   builtin and then its argument prototype would still apply.  */
56011#ifdef __cplusplus
56012extern "C"
56013#endif
56014char dnet_ntoa ();
56015int
56016main ()
56017{
56018return dnet_ntoa ();
56019  ;
56020  return 0;
56021}
56022_ACEOF
56023if ac_fn_cxx_try_link "$LINENO"; then :
56024  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56025else
56026  ac_cv_lib_dnet_stub_dnet_ntoa=no
56027fi
56028rm -f core conftest.err conftest.$ac_objext \
56029    conftest$ac_exeext conftest.$ac_ext
56030LIBS=$ac_check_lib_save_LIBS
56031fi
56032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56033$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56034if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56035  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56036fi
56037
56038    fi
56039fi
56040rm -f core conftest.err conftest.$ac_objext \
56041    conftest$ac_exeext conftest.$ac_ext
56042    LIBS="$ac_xsave_LIBS"
56043
56044    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56045    # to get the SysV transport functions.
56046    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56047    # needs -lnsl.
56048    # The nsl library prevents programs from opening the X display
56049    # on Irix 5.2, according to T.E. Dickey.
56050    # The functions gethostbyname, getservbyname, and inet_addr are
56051    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56052    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56053if test "x$ac_cv_func_gethostbyname" = xyes; then :
56054
56055fi
56056
56057    if test $ac_cv_func_gethostbyname = no; then
56058      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56059$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56060if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56061  $as_echo_n "(cached) " >&6
56062else
56063  ac_check_lib_save_LIBS=$LIBS
56064LIBS="-lnsl  $LIBS"
56065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56066/* end confdefs.h.  */
56067
56068/* Override any GCC internal prototype to avoid an error.
56069   Use char because int might match the return type of a GCC
56070   builtin and then its argument prototype would still apply.  */
56071#ifdef __cplusplus
56072extern "C"
56073#endif
56074char gethostbyname ();
56075int
56076main ()
56077{
56078return gethostbyname ();
56079  ;
56080  return 0;
56081}
56082_ACEOF
56083if ac_fn_cxx_try_link "$LINENO"; then :
56084  ac_cv_lib_nsl_gethostbyname=yes
56085else
56086  ac_cv_lib_nsl_gethostbyname=no
56087fi
56088rm -f core conftest.err conftest.$ac_objext \
56089    conftest$ac_exeext conftest.$ac_ext
56090LIBS=$ac_check_lib_save_LIBS
56091fi
56092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56093$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56094if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56095  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56096fi
56097
56098      if test $ac_cv_lib_nsl_gethostbyname = no; then
56099	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56100$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56101if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56102  $as_echo_n "(cached) " >&6
56103else
56104  ac_check_lib_save_LIBS=$LIBS
56105LIBS="-lbsd  $LIBS"
56106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56107/* end confdefs.h.  */
56108
56109/* Override any GCC internal prototype to avoid an error.
56110   Use char because int might match the return type of a GCC
56111   builtin and then its argument prototype would still apply.  */
56112#ifdef __cplusplus
56113extern "C"
56114#endif
56115char gethostbyname ();
56116int
56117main ()
56118{
56119return gethostbyname ();
56120  ;
56121  return 0;
56122}
56123_ACEOF
56124if ac_fn_cxx_try_link "$LINENO"; then :
56125  ac_cv_lib_bsd_gethostbyname=yes
56126else
56127  ac_cv_lib_bsd_gethostbyname=no
56128fi
56129rm -f core conftest.err conftest.$ac_objext \
56130    conftest$ac_exeext conftest.$ac_ext
56131LIBS=$ac_check_lib_save_LIBS
56132fi
56133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56134$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56135if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56136  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56137fi
56138
56139      fi
56140    fi
56141
56142    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56143    # socket/setsockopt and other routines are undefined under SCO ODT
56144    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56145    # on later versions), says Simon Leinen: it contains gethostby*
56146    # variants that don't use the name server (or something).  -lsocket
56147    # must be given before -lnsl if both are needed.  We assume that
56148    # if connect needs -lnsl, so does gethostbyname.
56149    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56150if test "x$ac_cv_func_connect" = xyes; then :
56151
56152fi
56153
56154    if test $ac_cv_func_connect = no; then
56155      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56156$as_echo_n "checking for connect in -lsocket... " >&6; }
56157if ${ac_cv_lib_socket_connect+:} false; then :
56158  $as_echo_n "(cached) " >&6
56159else
56160  ac_check_lib_save_LIBS=$LIBS
56161LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56163/* end confdefs.h.  */
56164
56165/* Override any GCC internal prototype to avoid an error.
56166   Use char because int might match the return type of a GCC
56167   builtin and then its argument prototype would still apply.  */
56168#ifdef __cplusplus
56169extern "C"
56170#endif
56171char connect ();
56172int
56173main ()
56174{
56175return connect ();
56176  ;
56177  return 0;
56178}
56179_ACEOF
56180if ac_fn_cxx_try_link "$LINENO"; then :
56181  ac_cv_lib_socket_connect=yes
56182else
56183  ac_cv_lib_socket_connect=no
56184fi
56185rm -f core conftest.err conftest.$ac_objext \
56186    conftest$ac_exeext conftest.$ac_ext
56187LIBS=$ac_check_lib_save_LIBS
56188fi
56189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56190$as_echo "$ac_cv_lib_socket_connect" >&6; }
56191if test "x$ac_cv_lib_socket_connect" = xyes; then :
56192  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56193fi
56194
56195    fi
56196
56197    # Guillermo Gomez says -lposix is necessary on A/UX.
56198    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56199if test "x$ac_cv_func_remove" = xyes; then :
56200
56201fi
56202
56203    if test $ac_cv_func_remove = no; then
56204      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56205$as_echo_n "checking for remove in -lposix... " >&6; }
56206if ${ac_cv_lib_posix_remove+:} false; then :
56207  $as_echo_n "(cached) " >&6
56208else
56209  ac_check_lib_save_LIBS=$LIBS
56210LIBS="-lposix  $LIBS"
56211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56212/* end confdefs.h.  */
56213
56214/* Override any GCC internal prototype to avoid an error.
56215   Use char because int might match the return type of a GCC
56216   builtin and then its argument prototype would still apply.  */
56217#ifdef __cplusplus
56218extern "C"
56219#endif
56220char remove ();
56221int
56222main ()
56223{
56224return remove ();
56225  ;
56226  return 0;
56227}
56228_ACEOF
56229if ac_fn_cxx_try_link "$LINENO"; then :
56230  ac_cv_lib_posix_remove=yes
56231else
56232  ac_cv_lib_posix_remove=no
56233fi
56234rm -f core conftest.err conftest.$ac_objext \
56235    conftest$ac_exeext conftest.$ac_ext
56236LIBS=$ac_check_lib_save_LIBS
56237fi
56238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56239$as_echo "$ac_cv_lib_posix_remove" >&6; }
56240if test "x$ac_cv_lib_posix_remove" = xyes; then :
56241  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56242fi
56243
56244    fi
56245
56246    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56247    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56248if test "x$ac_cv_func_shmat" = xyes; then :
56249
56250fi
56251
56252    if test $ac_cv_func_shmat = no; then
56253      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56254$as_echo_n "checking for shmat in -lipc... " >&6; }
56255if ${ac_cv_lib_ipc_shmat+:} false; then :
56256  $as_echo_n "(cached) " >&6
56257else
56258  ac_check_lib_save_LIBS=$LIBS
56259LIBS="-lipc  $LIBS"
56260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56261/* end confdefs.h.  */
56262
56263/* Override any GCC internal prototype to avoid an error.
56264   Use char because int might match the return type of a GCC
56265   builtin and then its argument prototype would still apply.  */
56266#ifdef __cplusplus
56267extern "C"
56268#endif
56269char shmat ();
56270int
56271main ()
56272{
56273return shmat ();
56274  ;
56275  return 0;
56276}
56277_ACEOF
56278if ac_fn_cxx_try_link "$LINENO"; then :
56279  ac_cv_lib_ipc_shmat=yes
56280else
56281  ac_cv_lib_ipc_shmat=no
56282fi
56283rm -f core conftest.err conftest.$ac_objext \
56284    conftest$ac_exeext conftest.$ac_ext
56285LIBS=$ac_check_lib_save_LIBS
56286fi
56287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56288$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56289if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56290  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56291fi
56292
56293    fi
56294  fi
56295
56296  # Check for libraries that X11R6 Xt/Xaw programs need.
56297  ac_save_LDFLAGS=$LDFLAGS
56298  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56299  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56300  # check for ICE first), but we must link in the order -lSM -lICE or
56301  # we get undefined symbols.  So assume we have SM if we have ICE.
56302  # These have to be linked with before -lX11, unlike the other
56303  # libraries we check for below, so use a different variable.
56304  # John Interrante, Karl Berry
56305  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56306$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56307if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56308  $as_echo_n "(cached) " >&6
56309else
56310  ac_check_lib_save_LIBS=$LIBS
56311LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56313/* end confdefs.h.  */
56314
56315/* Override any GCC internal prototype to avoid an error.
56316   Use char because int might match the return type of a GCC
56317   builtin and then its argument prototype would still apply.  */
56318#ifdef __cplusplus
56319extern "C"
56320#endif
56321char IceConnectionNumber ();
56322int
56323main ()
56324{
56325return IceConnectionNumber ();
56326  ;
56327  return 0;
56328}
56329_ACEOF
56330if ac_fn_cxx_try_link "$LINENO"; then :
56331  ac_cv_lib_ICE_IceConnectionNumber=yes
56332else
56333  ac_cv_lib_ICE_IceConnectionNumber=no
56334fi
56335rm -f core conftest.err conftest.$ac_objext \
56336    conftest$ac_exeext conftest.$ac_ext
56337LIBS=$ac_check_lib_save_LIBS
56338fi
56339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56340$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56341if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56342  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56343fi
56344
56345  LDFLAGS=$ac_save_LDFLAGS
56346
56347fi
56348
56349
56350    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56351    # this doesn't make sense so we remove it.
56352    if test "x$COMPILE_TYPE" = xcross; then
56353      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56354    fi
56355
56356    if test "x$no_x" = xyes; then
56357
56358  # Print a helpful message on how to acquire the necessary build dependency.
56359  # x11 is the help tag: freetype, cups, alsa etc
56360  MISSING_DEPENDENCY=x11
56361
56362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56363    cygwin_help $MISSING_DEPENDENCY
56364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56365    msys_help $MISSING_DEPENDENCY
56366  else
56367    PKGHANDLER_COMMAND=
56368
56369    case $PKGHANDLER in
56370      apt-get)
56371        apt_help     $MISSING_DEPENDENCY ;;
56372      yum)
56373        yum_help     $MISSING_DEPENDENCY ;;
56374      brew)
56375        brew_help    $MISSING_DEPENDENCY ;;
56376      port)
56377        port_help    $MISSING_DEPENDENCY ;;
56378      pkgutil)
56379        pkgutil_help $MISSING_DEPENDENCY ;;
56380      pkgadd)
56381        pkgadd_help  $MISSING_DEPENDENCY ;;
56382    esac
56383
56384    if test "x$PKGHANDLER_COMMAND" != x; then
56385      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56386    fi
56387  fi
56388
56389      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56390    fi
56391
56392    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56393      OPENWIN_HOME="/usr/openwin"
56394      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56395      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56396          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56397    fi
56398
56399    ac_ext=c
56400ac_cpp='$CPP $CPPFLAGS'
56401ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56402ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56403ac_compiler_gnu=$ac_cv_c_compiler_gnu
56404
56405    OLD_CFLAGS="$CFLAGS"
56406    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56407
56408    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56409    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56410do :
56411  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56412ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56413          # include <X11/Xlib.h>
56414          # include <X11/Xutil.h>
56415
56416
56417"
56418if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56419  cat >>confdefs.h <<_ACEOF
56420#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56421_ACEOF
56422 X11_HEADERS_OK=yes
56423else
56424  X11_HEADERS_OK=no; break
56425fi
56426
56427done
56428
56429
56430    if test "x$X11_HEADERS_OK" = xno; then
56431
56432  # Print a helpful message on how to acquire the necessary build dependency.
56433  # x11 is the help tag: freetype, cups, alsa etc
56434  MISSING_DEPENDENCY=x11
56435
56436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56437    cygwin_help $MISSING_DEPENDENCY
56438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56439    msys_help $MISSING_DEPENDENCY
56440  else
56441    PKGHANDLER_COMMAND=
56442
56443    case $PKGHANDLER in
56444      apt-get)
56445        apt_help     $MISSING_DEPENDENCY ;;
56446      yum)
56447        yum_help     $MISSING_DEPENDENCY ;;
56448      brew)
56449        brew_help    $MISSING_DEPENDENCY ;;
56450      port)
56451        port_help    $MISSING_DEPENDENCY ;;
56452      pkgutil)
56453        pkgutil_help $MISSING_DEPENDENCY ;;
56454      pkgadd)
56455        pkgadd_help  $MISSING_DEPENDENCY ;;
56456    esac
56457
56458    if test "x$PKGHANDLER_COMMAND" != x; then
56459      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56460    fi
56461  fi
56462
56463      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56464    fi
56465
56466    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56467    # defined in libawt_xawt.
56468    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56469$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56470    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56471/* end confdefs.h.  */
56472#include <X11/extensions/Xrender.h>
56473int
56474main ()
56475{
56476XLinearGradient x;
56477  ;
56478  return 0;
56479}
56480_ACEOF
56481if ac_fn_c_try_compile "$LINENO"; then :
56482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56483$as_echo "yes" >&6; }
56484else
56485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56486$as_echo "no" >&6; }
56487         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56488fi
56489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56490
56491    CFLAGS="$OLD_CFLAGS"
56492    ac_ext=cpp
56493ac_cpp='$CXXCPP $CPPFLAGS'
56494ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56495ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56496ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56497
56498  fi # NEEDS_LIB_X11
56499
56500
56501
56502
56503
56504
56505# Check whether --with-cups was given.
56506if test "${with_cups+set}" = set; then :
56507  withval=$with_cups;
56508fi
56509
56510
56511# Check whether --with-cups-include was given.
56512if test "${with_cups_include+set}" = set; then :
56513  withval=$with_cups_include;
56514fi
56515
56516
56517  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56518    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56519        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56520      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56521$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56522    fi
56523    CUPS_CFLAGS=
56524  else
56525    CUPS_FOUND=no
56526
56527    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56528      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56529    fi
56530
56531    if test "x${with_cups}" != x; then
56532      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56533$as_echo_n "checking for cups headers... " >&6; }
56534      if test -s "${with_cups}/include/cups/cups.h"; then
56535        CUPS_CFLAGS="-I${with_cups}/include"
56536        CUPS_FOUND=yes
56537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56538$as_echo "$CUPS_FOUND" >&6; }
56539      else
56540        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56541      fi
56542    fi
56543    if test "x${with_cups_include}" != x; then
56544      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56545$as_echo_n "checking for cups headers... " >&6; }
56546      if test -s "${with_cups_include}/cups/cups.h"; then
56547        CUPS_CFLAGS="-I${with_cups_include}"
56548        CUPS_FOUND=yes
56549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56550$as_echo "$CUPS_FOUND" >&6; }
56551      else
56552        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56553      fi
56554    fi
56555    if test "x$CUPS_FOUND" = xno; then
56556      # Are the cups headers installed in the default /usr/include location?
56557      for ac_header in cups/cups.h cups/ppd.h
56558do :
56559  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56560ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56561if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56562  cat >>confdefs.h <<_ACEOF
56563#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56564_ACEOF
56565
56566          CUPS_FOUND=yes
56567          CUPS_CFLAGS=
56568          DEFAULT_CUPS=yes
56569
56570fi
56571
56572done
56573
56574    fi
56575    if test "x$CUPS_FOUND" = xno; then
56576
56577  # Print a helpful message on how to acquire the necessary build dependency.
56578  # cups is the help tag: freetype, cups, alsa etc
56579  MISSING_DEPENDENCY=cups
56580
56581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56582    cygwin_help $MISSING_DEPENDENCY
56583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56584    msys_help $MISSING_DEPENDENCY
56585  else
56586    PKGHANDLER_COMMAND=
56587
56588    case $PKGHANDLER in
56589      apt-get)
56590        apt_help     $MISSING_DEPENDENCY ;;
56591      yum)
56592        yum_help     $MISSING_DEPENDENCY ;;
56593      brew)
56594        brew_help    $MISSING_DEPENDENCY ;;
56595      port)
56596        port_help    $MISSING_DEPENDENCY ;;
56597      pkgutil)
56598        pkgutil_help $MISSING_DEPENDENCY ;;
56599      pkgadd)
56600        pkgadd_help  $MISSING_DEPENDENCY ;;
56601    esac
56602
56603    if test "x$PKGHANDLER_COMMAND" != x; then
56604      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56605    fi
56606  fi
56607
56608      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56609    fi
56610  fi
56611
56612
56613
56614
56615
56616# Check whether --with-freetype was given.
56617if test "${with_freetype+set}" = set; then :
56618  withval=$with_freetype;
56619fi
56620
56621
56622# Check whether --with-freetype-include was given.
56623if test "${with_freetype_include+set}" = set; then :
56624  withval=$with_freetype_include;
56625fi
56626
56627
56628# Check whether --with-freetype-lib was given.
56629if test "${with_freetype_lib+set}" = set; then :
56630  withval=$with_freetype_lib;
56631fi
56632
56633
56634# Check whether --with-freetype-src was given.
56635if test "${with_freetype_src+set}" = set; then :
56636  withval=$with_freetype_src;
56637fi
56638
56639  # Check whether --enable-freetype-bundling was given.
56640if test "${enable_freetype_bundling+set}" = set; then :
56641  enableval=$enable_freetype_bundling;
56642fi
56643
56644
56645  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56646  FREETYPE_BASE_NAME=freetype
56647  FREETYPE_CFLAGS=
56648  FREETYPE_LIBS=
56649  FREETYPE_BUNDLE_LIB_PATH=
56650
56651  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56652    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56653        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56654        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56655        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56656      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56657$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56658    fi
56659    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56660      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56661$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56662    fi
56663  else
56664    # freetype is needed to build; go get it!
56665
56666    BUNDLE_FREETYPE="$enable_freetype_bundling"
56667
56668    if  test "x$with_freetype_src" != x; then
56669      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56670        # Try to build freetype if --with-freetype-src was given on Windows
56671
56672  FREETYPE_SRC_PATH="$with_freetype_src"
56673  BUILD_FREETYPE=yes
56674
56675  # Check if the freetype sources are acessible..
56676  if ! test -d $FREETYPE_SRC_PATH; then
56677    { $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
56678$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56679    BUILD_FREETYPE=no
56680  fi
56681  # ..and contain a vc2010 project file
56682  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56683  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56684    { $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
56685$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56686    BUILD_FREETYPE=no
56687  fi
56688  # Now check if configure found a version of 'msbuild.exe'
56689  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56690    { $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
56691$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;}
56692    BUILD_FREETYPE=no
56693  fi
56694
56695  # Ready to go..
56696  if test "x$BUILD_FREETYPE" = xyes; then
56697    # msbuild requires trailing slashes for output directories
56698    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56699    freetype_lib_path_unix="$freetype_lib_path"
56700    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56701
56702  unix_path="$vcxproj_path"
56703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56704    windows_path=`$CYGPATH -m "$unix_path"`
56705    vcxproj_path="$windows_path"
56706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56707    windows_path=`cmd //c echo $unix_path`
56708    vcxproj_path="$windows_path"
56709  fi
56710
56711
56712  unix_path="$freetype_lib_path"
56713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56714    windows_path=`$CYGPATH -m "$unix_path"`
56715    freetype_lib_path="$windows_path"
56716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56717    windows_path=`cmd //c echo $unix_path`
56718    freetype_lib_path="$windows_path"
56719  fi
56720
56721
56722  unix_path="$freetype_obj_path"
56723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56724    windows_path=`$CYGPATH -m "$unix_path"`
56725    freetype_obj_path="$windows_path"
56726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56727    windows_path=`cmd //c echo $unix_path`
56728    freetype_obj_path="$windows_path"
56729  fi
56730
56731    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56732      freetype_platform=x64
56733    else
56734      freetype_platform=win32
56735    fi
56736
56737    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56738    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56739    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56740    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56741    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56742$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56743
56744    # First we try to build the freetype.dll
56745    $ECHO -e "@echo off\n"\
56746        "$MSBUILD $vcxproj_path "\
56747        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56748        "/p:Configuration=\"Release Multithreaded\" "\
56749        "/p:Platform=$freetype_platform "\
56750        "/p:ConfigurationType=DynamicLibrary "\
56751        "/p:TargetName=freetype "\
56752        "/p:OutDir=\"$freetype_lib_path\" "\
56753        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56754    cmd /c freetype.bat
56755
56756    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56757      # If that succeeds we also build freetype.lib
56758      $ECHO -e "@echo off\n"\
56759          "$MSBUILD $vcxproj_path "\
56760          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56761          "/p:Configuration=\"Release Multithreaded\" "\
56762          "/p:Platform=$freetype_platform "\
56763          "/p:ConfigurationType=StaticLibrary "\
56764          "/p:TargetName=freetype "\
56765          "/p:OutDir=\"$freetype_lib_path\" "\
56766          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56767      cmd /c freetype.bat
56768
56769      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56770        # Once we build both, lib and dll, set freetype lib and include path appropriately
56771        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56772        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56773        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56774$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56775      else
56776        BUILD_FREETYPE=no
56777      fi
56778    else
56779      BUILD_FREETYPE=no
56780    fi
56781  fi
56782
56783        if test "x$BUILD_FREETYPE" = xyes; then
56784          # Okay, we built it. Check that it works.
56785
56786  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56787  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56788  METHOD="--with-freetype-src"
56789
56790  # Let's start with an optimistic view of the world :-)
56791  FOUND_FREETYPE=yes
56792
56793  # First look for the canonical freetype main include file ft2build.h.
56794  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56795    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56796    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56797    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56798      # Fail.
56799      FOUND_FREETYPE=no
56800    fi
56801  fi
56802
56803  if test "x$FOUND_FREETYPE" = xyes; then
56804    # Include file found, let's continue the sanity check.
56805    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56806$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56807
56808    # Reset to default value
56809    FREETYPE_BASE_NAME=freetype
56810    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56811    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56812      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56813          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56814        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56815        # for the .6 version explicitly.
56816        FREETYPE_BASE_NAME=freetype.6
56817        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56818        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56819$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56820      else
56821        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56822$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56823        FOUND_FREETYPE=no
56824      fi
56825    else
56826      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56827        # On Windows, we will need both .lib and .dll file.
56828        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56829          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56830$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56831          FOUND_FREETYPE=no
56832        fi
56833      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56834          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56835        # Found lib in isa dir, use that instead.
56836        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56837        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56838$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56839      fi
56840    fi
56841  fi
56842
56843  if test "x$FOUND_FREETYPE" = xyes; then
56844
56845  # Only process if variable expands to non-empty
56846
56847  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56848    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56849
56850  # Input might be given as Windows format, start by converting to
56851  # unix format.
56852  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56853  new_path=`$CYGPATH -u "$path"`
56854
56855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56858  # "foo.exe" is OK but "foo" is an error.
56859  #
56860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56861  # It is also a way to make sure we got the proper file name for the real test later on.
56862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56863  if test "x$test_shortpath" = x; then
56864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56865$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56866    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56867  fi
56868
56869  # Call helper function which possibly converts this using DOS-style short mode.
56870  # If so, the updated path is stored in $new_path.
56871
56872  input_path="$new_path"
56873  # Check if we need to convert this using DOS-style short mode. If the path
56874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56875  # take no chances and rewrite it.
56876  # Note: m4 eats our [], so we need to use [ and ] instead.
56877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56878  if test "x$has_forbidden_chars" != x; then
56879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56883      # Going to short mode and back again did indeed matter. Since short mode is
56884      # case insensitive, let's make it lowercase to improve readability.
56885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56886      # Now convert it back to Unix-style (cygpath)
56887      input_path=`$CYGPATH -u "$shortmode_path"`
56888      new_path="$input_path"
56889    fi
56890  fi
56891
56892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56893  if test "x$test_cygdrive_prefix" = x; then
56894    # As a simple fix, exclude /usr/bin since it's not a real path.
56895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56897      # a path prefixed by /cygdrive for fixpath to work.
56898      new_path="$CYGWIN_ROOT_PATH$input_path"
56899    fi
56900  fi
56901
56902
56903  if test "x$path" != "x$new_path"; then
56904    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56906$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56907  fi
56908
56909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56910
56911  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56912  has_colon=`$ECHO $path | $GREP ^.:`
56913  new_path="$path"
56914  if test "x$has_colon" = x; then
56915    # Not in mixed or Windows style, start by that.
56916    new_path=`cmd //c echo $path`
56917  fi
56918
56919
56920  input_path="$new_path"
56921  # Check if we need to convert this using DOS-style short mode. If the path
56922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56923  # take no chances and rewrite it.
56924  # Note: m4 eats our [], so we need to use [ and ] instead.
56925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56926  if test "x$has_forbidden_chars" != x; then
56927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56929  fi
56930
56931
56932  windows_path="$new_path"
56933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56934    unix_path=`$CYGPATH -u "$windows_path"`
56935    new_path="$unix_path"
56936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56938    new_path="$unix_path"
56939  fi
56940
56941  if test "x$path" != "x$new_path"; then
56942    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56944$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56945  fi
56946
56947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56949
56950    else
56951      # We're on a unix platform. Hooray! :)
56952      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56953      has_space=`$ECHO "$path" | $GREP " "`
56954      if test "x$has_space" != x; then
56955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56956$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56957        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56958      fi
56959
56960      # Use eval to expand a potential ~
56961      eval path="$path"
56962      if test ! -f "$path" && test ! -d "$path"; then
56963        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56964      fi
56965
56966      if test -d "$path"; then
56967        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56968      else
56969        dir="`$DIRNAME "$path"`"
56970        base="`$BASENAME "$path"`"
56971        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56972      fi
56973    fi
56974  fi
56975
56976
56977  # Only process if variable expands to non-empty
56978
56979  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56981
56982  # Input might be given as Windows format, start by converting to
56983  # unix format.
56984  path="$POTENTIAL_FREETYPE_LIB_PATH"
56985  new_path=`$CYGPATH -u "$path"`
56986
56987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56990  # "foo.exe" is OK but "foo" is an error.
56991  #
56992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56993  # It is also a way to make sure we got the proper file name for the real test later on.
56994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56995  if test "x$test_shortpath" = x; then
56996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56997$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56998    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56999  fi
57000
57001  # Call helper function which possibly converts this using DOS-style short mode.
57002  # If so, the updated path is stored in $new_path.
57003
57004  input_path="$new_path"
57005  # Check if we need to convert this using DOS-style short mode. If the path
57006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57007  # take no chances and rewrite it.
57008  # Note: m4 eats our [], so we need to use [ and ] instead.
57009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57010  if test "x$has_forbidden_chars" != x; then
57011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57015      # Going to short mode and back again did indeed matter. Since short mode is
57016      # case insensitive, let's make it lowercase to improve readability.
57017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57018      # Now convert it back to Unix-style (cygpath)
57019      input_path=`$CYGPATH -u "$shortmode_path"`
57020      new_path="$input_path"
57021    fi
57022  fi
57023
57024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57025  if test "x$test_cygdrive_prefix" = x; then
57026    # As a simple fix, exclude /usr/bin since it's not a real path.
57027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57029      # a path prefixed by /cygdrive for fixpath to work.
57030      new_path="$CYGWIN_ROOT_PATH$input_path"
57031    fi
57032  fi
57033
57034
57035  if test "x$path" != "x$new_path"; then
57036    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57038$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57039  fi
57040
57041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57042
57043  path="$POTENTIAL_FREETYPE_LIB_PATH"
57044  has_colon=`$ECHO $path | $GREP ^.:`
57045  new_path="$path"
57046  if test "x$has_colon" = x; then
57047    # Not in mixed or Windows style, start by that.
57048    new_path=`cmd //c echo $path`
57049  fi
57050
57051
57052  input_path="$new_path"
57053  # Check if we need to convert this using DOS-style short mode. If the path
57054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57055  # take no chances and rewrite it.
57056  # Note: m4 eats our [], so we need to use [ and ] instead.
57057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57058  if test "x$has_forbidden_chars" != x; then
57059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57061  fi
57062
57063
57064  windows_path="$new_path"
57065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57066    unix_path=`$CYGPATH -u "$windows_path"`
57067    new_path="$unix_path"
57068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57070    new_path="$unix_path"
57071  fi
57072
57073  if test "x$path" != "x$new_path"; then
57074    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57076$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57077  fi
57078
57079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57081
57082    else
57083      # We're on a unix platform. Hooray! :)
57084      path="$POTENTIAL_FREETYPE_LIB_PATH"
57085      has_space=`$ECHO "$path" | $GREP " "`
57086      if test "x$has_space" != x; then
57087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57088$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57089        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57090      fi
57091
57092      # Use eval to expand a potential ~
57093      eval path="$path"
57094      if test ! -f "$path" && test ! -d "$path"; then
57095        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57096      fi
57097
57098      if test -d "$path"; then
57099        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57100      else
57101        dir="`$DIRNAME "$path"`"
57102        base="`$BASENAME "$path"`"
57103        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57104      fi
57105    fi
57106  fi
57107
57108
57109    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57110    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57111$as_echo_n "checking for freetype includes... " >&6; }
57112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57113$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57114    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57116$as_echo_n "checking for freetype libraries... " >&6; }
57117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57118$as_echo "$FREETYPE_LIB_PATH" >&6; }
57119  fi
57120
57121          if test "x$FOUND_FREETYPE" != xyes; then
57122            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57123          fi
57124        else
57125          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57126$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57127          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57128        fi
57129      else
57130        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57131$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57132      fi
57133    fi
57134
57135    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57136      # User has specified settings
57137
57138      if test "x$BUNDLE_FREETYPE" = x; then
57139        # If not specified, default is to bundle freetype
57140        BUNDLE_FREETYPE=yes
57141      fi
57142
57143      if test "x$with_freetype" != x; then
57144        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57145        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57146      fi
57147
57148      # Allow --with-freetype-lib and --with-freetype-include to override
57149      if test "x$with_freetype_include" != x; then
57150        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57151      fi
57152      if test "x$with_freetype_lib" != x; then
57153        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57154      fi
57155
57156      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57157        # Okay, we got it. Check that it works.
57158
57159  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57160  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57161  METHOD="--with-freetype"
57162
57163  # Let's start with an optimistic view of the world :-)
57164  FOUND_FREETYPE=yes
57165
57166  # First look for the canonical freetype main include file ft2build.h.
57167  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57168    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57169    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57170    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57171      # Fail.
57172      FOUND_FREETYPE=no
57173    fi
57174  fi
57175
57176  if test "x$FOUND_FREETYPE" = xyes; then
57177    # Include file found, let's continue the sanity check.
57178    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57179$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57180
57181    # Reset to default value
57182    FREETYPE_BASE_NAME=freetype
57183    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57184    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57185      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57186          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57187        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57188        # for the .6 version explicitly.
57189        FREETYPE_BASE_NAME=freetype.6
57190        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57191        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57192$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57193      else
57194        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57195$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57196        FOUND_FREETYPE=no
57197      fi
57198    else
57199      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57200        # On Windows, we will need both .lib and .dll file.
57201        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57202          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57203$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57204          FOUND_FREETYPE=no
57205        fi
57206      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57207          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57208        # Found lib in isa dir, use that instead.
57209        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57210        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57211$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57212      fi
57213    fi
57214  fi
57215
57216  if test "x$FOUND_FREETYPE" = xyes; then
57217
57218  # Only process if variable expands to non-empty
57219
57220  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57221    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57222
57223  # Input might be given as Windows format, start by converting to
57224  # unix format.
57225  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57226  new_path=`$CYGPATH -u "$path"`
57227
57228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57231  # "foo.exe" is OK but "foo" is an error.
57232  #
57233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57234  # It is also a way to make sure we got the proper file name for the real test later on.
57235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57236  if test "x$test_shortpath" = x; then
57237    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57238$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57239    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57240  fi
57241
57242  # Call helper function which possibly converts this using DOS-style short mode.
57243  # If so, the updated path is stored in $new_path.
57244
57245  input_path="$new_path"
57246  # Check if we need to convert this using DOS-style short mode. If the path
57247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57248  # take no chances and rewrite it.
57249  # Note: m4 eats our [], so we need to use [ and ] instead.
57250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57251  if test "x$has_forbidden_chars" != x; then
57252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57256      # Going to short mode and back again did indeed matter. Since short mode is
57257      # case insensitive, let's make it lowercase to improve readability.
57258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57259      # Now convert it back to Unix-style (cygpath)
57260      input_path=`$CYGPATH -u "$shortmode_path"`
57261      new_path="$input_path"
57262    fi
57263  fi
57264
57265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57266  if test "x$test_cygdrive_prefix" = x; then
57267    # As a simple fix, exclude /usr/bin since it's not a real path.
57268    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57270      # a path prefixed by /cygdrive for fixpath to work.
57271      new_path="$CYGWIN_ROOT_PATH$input_path"
57272    fi
57273  fi
57274
57275
57276  if test "x$path" != "x$new_path"; then
57277    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57279$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57280  fi
57281
57282    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57283
57284  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57285  has_colon=`$ECHO $path | $GREP ^.:`
57286  new_path="$path"
57287  if test "x$has_colon" = x; then
57288    # Not in mixed or Windows style, start by that.
57289    new_path=`cmd //c echo $path`
57290  fi
57291
57292
57293  input_path="$new_path"
57294  # Check if we need to convert this using DOS-style short mode. If the path
57295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57296  # take no chances and rewrite it.
57297  # Note: m4 eats our [], so we need to use [ and ] instead.
57298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57299  if test "x$has_forbidden_chars" != x; then
57300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57302  fi
57303
57304
57305  windows_path="$new_path"
57306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57307    unix_path=`$CYGPATH -u "$windows_path"`
57308    new_path="$unix_path"
57309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57311    new_path="$unix_path"
57312  fi
57313
57314  if test "x$path" != "x$new_path"; then
57315    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57317$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57318  fi
57319
57320  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57321  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57322
57323    else
57324      # We're on a unix platform. Hooray! :)
57325      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57326      has_space=`$ECHO "$path" | $GREP " "`
57327      if test "x$has_space" != x; then
57328        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57329$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57330        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57331      fi
57332
57333      # Use eval to expand a potential ~
57334      eval path="$path"
57335      if test ! -f "$path" && test ! -d "$path"; then
57336        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57337      fi
57338
57339      if test -d "$path"; then
57340        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57341      else
57342        dir="`$DIRNAME "$path"`"
57343        base="`$BASENAME "$path"`"
57344        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57345      fi
57346    fi
57347  fi
57348
57349
57350  # Only process if variable expands to non-empty
57351
57352  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57354
57355  # Input might be given as Windows format, start by converting to
57356  # unix format.
57357  path="$POTENTIAL_FREETYPE_LIB_PATH"
57358  new_path=`$CYGPATH -u "$path"`
57359
57360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57363  # "foo.exe" is OK but "foo" is an error.
57364  #
57365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57366  # It is also a way to make sure we got the proper file name for the real test later on.
57367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57368  if test "x$test_shortpath" = x; then
57369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57370$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57371    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57372  fi
57373
57374  # Call helper function which possibly converts this using DOS-style short mode.
57375  # If so, the updated path is stored in $new_path.
57376
57377  input_path="$new_path"
57378  # Check if we need to convert this using DOS-style short mode. If the path
57379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57380  # take no chances and rewrite it.
57381  # Note: m4 eats our [], so we need to use [ and ] instead.
57382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57383  if test "x$has_forbidden_chars" != x; then
57384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57388      # Going to short mode and back again did indeed matter. Since short mode is
57389      # case insensitive, let's make it lowercase to improve readability.
57390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57391      # Now convert it back to Unix-style (cygpath)
57392      input_path=`$CYGPATH -u "$shortmode_path"`
57393      new_path="$input_path"
57394    fi
57395  fi
57396
57397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57398  if test "x$test_cygdrive_prefix" = x; then
57399    # As a simple fix, exclude /usr/bin since it's not a real path.
57400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57402      # a path prefixed by /cygdrive for fixpath to work.
57403      new_path="$CYGWIN_ROOT_PATH$input_path"
57404    fi
57405  fi
57406
57407
57408  if test "x$path" != "x$new_path"; then
57409    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57411$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57412  fi
57413
57414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57415
57416  path="$POTENTIAL_FREETYPE_LIB_PATH"
57417  has_colon=`$ECHO $path | $GREP ^.:`
57418  new_path="$path"
57419  if test "x$has_colon" = x; then
57420    # Not in mixed or Windows style, start by that.
57421    new_path=`cmd //c echo $path`
57422  fi
57423
57424
57425  input_path="$new_path"
57426  # Check if we need to convert this using DOS-style short mode. If the path
57427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57428  # take no chances and rewrite it.
57429  # Note: m4 eats our [], so we need to use [ and ] instead.
57430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57431  if test "x$has_forbidden_chars" != x; then
57432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57434  fi
57435
57436
57437  windows_path="$new_path"
57438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57439    unix_path=`$CYGPATH -u "$windows_path"`
57440    new_path="$unix_path"
57441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57443    new_path="$unix_path"
57444  fi
57445
57446  if test "x$path" != "x$new_path"; then
57447    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57449$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57450  fi
57451
57452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57454
57455    else
57456      # We're on a unix platform. Hooray! :)
57457      path="$POTENTIAL_FREETYPE_LIB_PATH"
57458      has_space=`$ECHO "$path" | $GREP " "`
57459      if test "x$has_space" != x; then
57460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57461$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57462        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57463      fi
57464
57465      # Use eval to expand a potential ~
57466      eval path="$path"
57467      if test ! -f "$path" && test ! -d "$path"; then
57468        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57469      fi
57470
57471      if test -d "$path"; then
57472        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57473      else
57474        dir="`$DIRNAME "$path"`"
57475        base="`$BASENAME "$path"`"
57476        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57477      fi
57478    fi
57479  fi
57480
57481
57482    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57483    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57484$as_echo_n "checking for freetype includes... " >&6; }
57485    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57486$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57487    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57489$as_echo_n "checking for freetype libraries... " >&6; }
57490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57491$as_echo "$FREETYPE_LIB_PATH" >&6; }
57492  fi
57493
57494        if test "x$FOUND_FREETYPE" != xyes; then
57495          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57496        fi
57497      else
57498        # User specified only one of lib or include. This is an error.
57499        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57500          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57501$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57502          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57503        else
57504          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57505$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57506          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57507        fi
57508      fi
57509    else
57510      # User did not specify settings, but we need freetype. Try to locate it.
57511
57512      if test "x$BUNDLE_FREETYPE" = x; then
57513        # If not specified, default is to bundle freetype only on windows
57514        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57515          BUNDLE_FREETYPE=yes
57516        else
57517          BUNDLE_FREETYPE=no
57518        fi
57519      fi
57520
57521      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57522      if test "x$SYSROOT" = x; then
57523        if test "x$FOUND_FREETYPE" != xyes; then
57524          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57525          if test "x$PKG_CONFIG" != x; then
57526
57527pkg_failed=no
57528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57529$as_echo_n "checking for FREETYPE... " >&6; }
57530
57531if test -n "$FREETYPE_CFLAGS"; then
57532    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57533 elif test -n "$PKG_CONFIG"; then
57534    if test -n "$PKG_CONFIG" && \
57535    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57536  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57537  ac_status=$?
57538  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57539  test $ac_status = 0; }; then
57540  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57541else
57542  pkg_failed=yes
57543fi
57544 else
57545    pkg_failed=untried
57546fi
57547if test -n "$FREETYPE_LIBS"; then
57548    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57549 elif test -n "$PKG_CONFIG"; then
57550    if test -n "$PKG_CONFIG" && \
57551    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57552  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57553  ac_status=$?
57554  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57555  test $ac_status = 0; }; then
57556  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57557else
57558  pkg_failed=yes
57559fi
57560 else
57561    pkg_failed=untried
57562fi
57563
57564
57565
57566if test $pkg_failed = yes; then
57567
57568if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57569        _pkg_short_errors_supported=yes
57570else
57571        _pkg_short_errors_supported=no
57572fi
57573        if test $_pkg_short_errors_supported = yes; then
57574	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57575        else
57576	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57577        fi
57578	# Put the nasty error message in config.log where it belongs
57579	echo "$FREETYPE_PKG_ERRORS" >&5
57580
57581	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57582$as_echo "no" >&6; }
57583                FOUND_FREETYPE=no
57584elif test $pkg_failed = untried; then
57585	FOUND_FREETYPE=no
57586else
57587	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57588	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57590$as_echo "yes" >&6; }
57591	FOUND_FREETYPE=yes
57592fi
57593            if test "x$FOUND_FREETYPE" = xyes; then
57594              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57595              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57596              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57597              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57598                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57599              fi
57600              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57601              if test "x$BUNDLE_FREETYPE" = xyes; then
57602                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57603$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57604                FOUND_FREETYPE=no
57605              else
57606                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57607$as_echo_n "checking for freetype... " >&6; }
57608                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57609$as_echo "yes (using pkg-config)" >&6; }
57610              fi
57611            fi
57612          fi
57613        fi
57614      fi
57615
57616      if test "x$FOUND_FREETYPE" != xyes; then
57617        # Check in well-known locations
57618        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57619          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57620
57621  windows_path="$FREETYPE_BASE_DIR"
57622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57623    unix_path=`$CYGPATH -u "$windows_path"`
57624    FREETYPE_BASE_DIR="$unix_path"
57625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57627    FREETYPE_BASE_DIR="$unix_path"
57628  fi
57629
57630
57631  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57632  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57633  METHOD="well-known location"
57634
57635  # Let's start with an optimistic view of the world :-)
57636  FOUND_FREETYPE=yes
57637
57638  # First look for the canonical freetype main include file ft2build.h.
57639  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57640    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57641    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57642    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57643      # Fail.
57644      FOUND_FREETYPE=no
57645    fi
57646  fi
57647
57648  if test "x$FOUND_FREETYPE" = xyes; then
57649    # Include file found, let's continue the sanity check.
57650    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57651$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57652
57653    # Reset to default value
57654    FREETYPE_BASE_NAME=freetype
57655    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57656    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57657      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57658          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57659        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57660        # for the .6 version explicitly.
57661        FREETYPE_BASE_NAME=freetype.6
57662        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57663        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57664$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57665      else
57666        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57667$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57668        FOUND_FREETYPE=no
57669      fi
57670    else
57671      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57672        # On Windows, we will need both .lib and .dll file.
57673        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57674          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57675$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57676          FOUND_FREETYPE=no
57677        fi
57678      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57679          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57680        # Found lib in isa dir, use that instead.
57681        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57682        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57683$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57684      fi
57685    fi
57686  fi
57687
57688  if test "x$FOUND_FREETYPE" = xyes; then
57689
57690  # Only process if variable expands to non-empty
57691
57692  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57693    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57694
57695  # Input might be given as Windows format, start by converting to
57696  # unix format.
57697  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57698  new_path=`$CYGPATH -u "$path"`
57699
57700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57703  # "foo.exe" is OK but "foo" is an error.
57704  #
57705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57706  # It is also a way to make sure we got the proper file name for the real test later on.
57707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57708  if test "x$test_shortpath" = x; then
57709    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57710$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57711    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57712  fi
57713
57714  # Call helper function which possibly converts this using DOS-style short mode.
57715  # If so, the updated path is stored in $new_path.
57716
57717  input_path="$new_path"
57718  # Check if we need to convert this using DOS-style short mode. If the path
57719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57720  # take no chances and rewrite it.
57721  # Note: m4 eats our [], so we need to use [ and ] instead.
57722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57723  if test "x$has_forbidden_chars" != x; then
57724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57728      # Going to short mode and back again did indeed matter. Since short mode is
57729      # case insensitive, let's make it lowercase to improve readability.
57730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57731      # Now convert it back to Unix-style (cygpath)
57732      input_path=`$CYGPATH -u "$shortmode_path"`
57733      new_path="$input_path"
57734    fi
57735  fi
57736
57737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57738  if test "x$test_cygdrive_prefix" = x; then
57739    # As a simple fix, exclude /usr/bin since it's not a real path.
57740    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57742      # a path prefixed by /cygdrive for fixpath to work.
57743      new_path="$CYGWIN_ROOT_PATH$input_path"
57744    fi
57745  fi
57746
57747
57748  if test "x$path" != "x$new_path"; then
57749    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57751$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57752  fi
57753
57754    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57755
57756  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57757  has_colon=`$ECHO $path | $GREP ^.:`
57758  new_path="$path"
57759  if test "x$has_colon" = x; then
57760    # Not in mixed or Windows style, start by that.
57761    new_path=`cmd //c echo $path`
57762  fi
57763
57764
57765  input_path="$new_path"
57766  # Check if we need to convert this using DOS-style short mode. If the path
57767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57768  # take no chances and rewrite it.
57769  # Note: m4 eats our [], so we need to use [ and ] instead.
57770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57771  if test "x$has_forbidden_chars" != x; then
57772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57774  fi
57775
57776
57777  windows_path="$new_path"
57778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57779    unix_path=`$CYGPATH -u "$windows_path"`
57780    new_path="$unix_path"
57781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57783    new_path="$unix_path"
57784  fi
57785
57786  if test "x$path" != "x$new_path"; then
57787    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57789$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57790  fi
57791
57792  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57793  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57794
57795    else
57796      # We're on a unix platform. Hooray! :)
57797      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57798      has_space=`$ECHO "$path" | $GREP " "`
57799      if test "x$has_space" != x; then
57800        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57801$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57802        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57803      fi
57804
57805      # Use eval to expand a potential ~
57806      eval path="$path"
57807      if test ! -f "$path" && test ! -d "$path"; then
57808        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57809      fi
57810
57811      if test -d "$path"; then
57812        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57813      else
57814        dir="`$DIRNAME "$path"`"
57815        base="`$BASENAME "$path"`"
57816        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57817      fi
57818    fi
57819  fi
57820
57821
57822  # Only process if variable expands to non-empty
57823
57824  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57825    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57826
57827  # Input might be given as Windows format, start by converting to
57828  # unix format.
57829  path="$POTENTIAL_FREETYPE_LIB_PATH"
57830  new_path=`$CYGPATH -u "$path"`
57831
57832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57835  # "foo.exe" is OK but "foo" is an error.
57836  #
57837  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57838  # It is also a way to make sure we got the proper file name for the real test later on.
57839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57840  if test "x$test_shortpath" = x; then
57841    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57842$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57843    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57844  fi
57845
57846  # Call helper function which possibly converts this using DOS-style short mode.
57847  # If so, the updated path is stored in $new_path.
57848
57849  input_path="$new_path"
57850  # Check if we need to convert this using DOS-style short mode. If the path
57851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57852  # take no chances and rewrite it.
57853  # Note: m4 eats our [], so we need to use [ and ] instead.
57854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57855  if test "x$has_forbidden_chars" != x; then
57856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57860      # Going to short mode and back again did indeed matter. Since short mode is
57861      # case insensitive, let's make it lowercase to improve readability.
57862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57863      # Now convert it back to Unix-style (cygpath)
57864      input_path=`$CYGPATH -u "$shortmode_path"`
57865      new_path="$input_path"
57866    fi
57867  fi
57868
57869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57870  if test "x$test_cygdrive_prefix" = x; then
57871    # As a simple fix, exclude /usr/bin since it's not a real path.
57872    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57874      # a path prefixed by /cygdrive for fixpath to work.
57875      new_path="$CYGWIN_ROOT_PATH$input_path"
57876    fi
57877  fi
57878
57879
57880  if test "x$path" != "x$new_path"; then
57881    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57883$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57884  fi
57885
57886    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57887
57888  path="$POTENTIAL_FREETYPE_LIB_PATH"
57889  has_colon=`$ECHO $path | $GREP ^.:`
57890  new_path="$path"
57891  if test "x$has_colon" = x; then
57892    # Not in mixed or Windows style, start by that.
57893    new_path=`cmd //c echo $path`
57894  fi
57895
57896
57897  input_path="$new_path"
57898  # Check if we need to convert this using DOS-style short mode. If the path
57899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57900  # take no chances and rewrite it.
57901  # Note: m4 eats our [], so we need to use [ and ] instead.
57902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57903  if test "x$has_forbidden_chars" != x; then
57904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57906  fi
57907
57908
57909  windows_path="$new_path"
57910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57911    unix_path=`$CYGPATH -u "$windows_path"`
57912    new_path="$unix_path"
57913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57915    new_path="$unix_path"
57916  fi
57917
57918  if test "x$path" != "x$new_path"; then
57919    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57921$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57922  fi
57923
57924  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57925  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57926
57927    else
57928      # We're on a unix platform. Hooray! :)
57929      path="$POTENTIAL_FREETYPE_LIB_PATH"
57930      has_space=`$ECHO "$path" | $GREP " "`
57931      if test "x$has_space" != x; then
57932        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57933$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57934        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57935      fi
57936
57937      # Use eval to expand a potential ~
57938      eval path="$path"
57939      if test ! -f "$path" && test ! -d "$path"; then
57940        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57941      fi
57942
57943      if test -d "$path"; then
57944        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57945      else
57946        dir="`$DIRNAME "$path"`"
57947        base="`$BASENAME "$path"`"
57948        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57949      fi
57950    fi
57951  fi
57952
57953
57954    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57956$as_echo_n "checking for freetype includes... " >&6; }
57957    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57958$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57959    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57961$as_echo_n "checking for freetype libraries... " >&6; }
57962    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57963$as_echo "$FREETYPE_LIB_PATH" >&6; }
57964  fi
57965
57966          if test "x$FOUND_FREETYPE" != xyes; then
57967            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
57968
57969  windows_path="$FREETYPE_BASE_DIR"
57970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57971    unix_path=`$CYGPATH -u "$windows_path"`
57972    FREETYPE_BASE_DIR="$unix_path"
57973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57975    FREETYPE_BASE_DIR="$unix_path"
57976  fi
57977
57978
57979  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57980  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57981  METHOD="well-known location"
57982
57983  # Let's start with an optimistic view of the world :-)
57984  FOUND_FREETYPE=yes
57985
57986  # First look for the canonical freetype main include file ft2build.h.
57987  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57988    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57989    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57990    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57991      # Fail.
57992      FOUND_FREETYPE=no
57993    fi
57994  fi
57995
57996  if test "x$FOUND_FREETYPE" = xyes; then
57997    # Include file found, let's continue the sanity check.
57998    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57999$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58000
58001    # Reset to default value
58002    FREETYPE_BASE_NAME=freetype
58003    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58004    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58005      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58006          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58007        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58008        # for the .6 version explicitly.
58009        FREETYPE_BASE_NAME=freetype.6
58010        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58011        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58012$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58013      else
58014        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58015$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58016        FOUND_FREETYPE=no
58017      fi
58018    else
58019      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58020        # On Windows, we will need both .lib and .dll file.
58021        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58022          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58023$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58024          FOUND_FREETYPE=no
58025        fi
58026      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58027          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58028        # Found lib in isa dir, use that instead.
58029        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58030        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58031$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58032      fi
58033    fi
58034  fi
58035
58036  if test "x$FOUND_FREETYPE" = xyes; then
58037
58038  # Only process if variable expands to non-empty
58039
58040  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58041    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58042
58043  # Input might be given as Windows format, start by converting to
58044  # unix format.
58045  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58046  new_path=`$CYGPATH -u "$path"`
58047
58048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58051  # "foo.exe" is OK but "foo" is an error.
58052  #
58053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58054  # It is also a way to make sure we got the proper file name for the real test later on.
58055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58056  if test "x$test_shortpath" = x; then
58057    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58058$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58059    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58060  fi
58061
58062  # Call helper function which possibly converts this using DOS-style short mode.
58063  # If so, the updated path is stored in $new_path.
58064
58065  input_path="$new_path"
58066  # Check if we need to convert this using DOS-style short mode. If the path
58067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58068  # take no chances and rewrite it.
58069  # Note: m4 eats our [], so we need to use [ and ] instead.
58070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58071  if test "x$has_forbidden_chars" != x; then
58072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58076      # Going to short mode and back again did indeed matter. Since short mode is
58077      # case insensitive, let's make it lowercase to improve readability.
58078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58079      # Now convert it back to Unix-style (cygpath)
58080      input_path=`$CYGPATH -u "$shortmode_path"`
58081      new_path="$input_path"
58082    fi
58083  fi
58084
58085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58086  if test "x$test_cygdrive_prefix" = x; then
58087    # As a simple fix, exclude /usr/bin since it's not a real path.
58088    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58090      # a path prefixed by /cygdrive for fixpath to work.
58091      new_path="$CYGWIN_ROOT_PATH$input_path"
58092    fi
58093  fi
58094
58095
58096  if test "x$path" != "x$new_path"; then
58097    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58099$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58100  fi
58101
58102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58103
58104  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58105  has_colon=`$ECHO $path | $GREP ^.:`
58106  new_path="$path"
58107  if test "x$has_colon" = x; then
58108    # Not in mixed or Windows style, start by that.
58109    new_path=`cmd //c echo $path`
58110  fi
58111
58112
58113  input_path="$new_path"
58114  # Check if we need to convert this using DOS-style short mode. If the path
58115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58116  # take no chances and rewrite it.
58117  # Note: m4 eats our [], so we need to use [ and ] instead.
58118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58119  if test "x$has_forbidden_chars" != x; then
58120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58122  fi
58123
58124
58125  windows_path="$new_path"
58126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58127    unix_path=`$CYGPATH -u "$windows_path"`
58128    new_path="$unix_path"
58129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58131    new_path="$unix_path"
58132  fi
58133
58134  if test "x$path" != "x$new_path"; then
58135    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58137$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58138  fi
58139
58140  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58141  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58142
58143    else
58144      # We're on a unix platform. Hooray! :)
58145      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58146      has_space=`$ECHO "$path" | $GREP " "`
58147      if test "x$has_space" != x; then
58148        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58149$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58150        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58151      fi
58152
58153      # Use eval to expand a potential ~
58154      eval path="$path"
58155      if test ! -f "$path" && test ! -d "$path"; then
58156        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58157      fi
58158
58159      if test -d "$path"; then
58160        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58161      else
58162        dir="`$DIRNAME "$path"`"
58163        base="`$BASENAME "$path"`"
58164        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58165      fi
58166    fi
58167  fi
58168
58169
58170  # Only process if variable expands to non-empty
58171
58172  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58173    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58174
58175  # Input might be given as Windows format, start by converting to
58176  # unix format.
58177  path="$POTENTIAL_FREETYPE_LIB_PATH"
58178  new_path=`$CYGPATH -u "$path"`
58179
58180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58183  # "foo.exe" is OK but "foo" is an error.
58184  #
58185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58186  # It is also a way to make sure we got the proper file name for the real test later on.
58187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58188  if test "x$test_shortpath" = x; then
58189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58190$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58191    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58192  fi
58193
58194  # Call helper function which possibly converts this using DOS-style short mode.
58195  # If so, the updated path is stored in $new_path.
58196
58197  input_path="$new_path"
58198  # Check if we need to convert this using DOS-style short mode. If the path
58199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58200  # take no chances and rewrite it.
58201  # Note: m4 eats our [], so we need to use [ and ] instead.
58202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58203  if test "x$has_forbidden_chars" != x; then
58204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58208      # Going to short mode and back again did indeed matter. Since short mode is
58209      # case insensitive, let's make it lowercase to improve readability.
58210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58211      # Now convert it back to Unix-style (cygpath)
58212      input_path=`$CYGPATH -u "$shortmode_path"`
58213      new_path="$input_path"
58214    fi
58215  fi
58216
58217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58218  if test "x$test_cygdrive_prefix" = x; then
58219    # As a simple fix, exclude /usr/bin since it's not a real path.
58220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58222      # a path prefixed by /cygdrive for fixpath to work.
58223      new_path="$CYGWIN_ROOT_PATH$input_path"
58224    fi
58225  fi
58226
58227
58228  if test "x$path" != "x$new_path"; then
58229    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58231$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58232  fi
58233
58234    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58235
58236  path="$POTENTIAL_FREETYPE_LIB_PATH"
58237  has_colon=`$ECHO $path | $GREP ^.:`
58238  new_path="$path"
58239  if test "x$has_colon" = x; then
58240    # Not in mixed or Windows style, start by that.
58241    new_path=`cmd //c echo $path`
58242  fi
58243
58244
58245  input_path="$new_path"
58246  # Check if we need to convert this using DOS-style short mode. If the path
58247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58248  # take no chances and rewrite it.
58249  # Note: m4 eats our [], so we need to use [ and ] instead.
58250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58251  if test "x$has_forbidden_chars" != x; then
58252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58254  fi
58255
58256
58257  windows_path="$new_path"
58258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58259    unix_path=`$CYGPATH -u "$windows_path"`
58260    new_path="$unix_path"
58261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58263    new_path="$unix_path"
58264  fi
58265
58266  if test "x$path" != "x$new_path"; then
58267    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58269$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58270  fi
58271
58272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58274
58275    else
58276      # We're on a unix platform. Hooray! :)
58277      path="$POTENTIAL_FREETYPE_LIB_PATH"
58278      has_space=`$ECHO "$path" | $GREP " "`
58279      if test "x$has_space" != x; then
58280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58281$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58282        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58283      fi
58284
58285      # Use eval to expand a potential ~
58286      eval path="$path"
58287      if test ! -f "$path" && test ! -d "$path"; then
58288        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58289      fi
58290
58291      if test -d "$path"; then
58292        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58293      else
58294        dir="`$DIRNAME "$path"`"
58295        base="`$BASENAME "$path"`"
58296        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58297      fi
58298    fi
58299  fi
58300
58301
58302    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58304$as_echo_n "checking for freetype includes... " >&6; }
58305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58306$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58307    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58308    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58309$as_echo_n "checking for freetype libraries... " >&6; }
58310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58311$as_echo "$FREETYPE_LIB_PATH" >&6; }
58312  fi
58313
58314          fi
58315          if test "x$FOUND_FREETYPE" != xyes; then
58316            FREETYPE_BASE_DIR="$HOME/freetype"
58317
58318  windows_path="$FREETYPE_BASE_DIR"
58319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58320    unix_path=`$CYGPATH -u "$windows_path"`
58321    FREETYPE_BASE_DIR="$unix_path"
58322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58324    FREETYPE_BASE_DIR="$unix_path"
58325  fi
58326
58327            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58328
58329  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58330  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58331  METHOD="well-known location"
58332
58333  # Let's start with an optimistic view of the world :-)
58334  FOUND_FREETYPE=yes
58335
58336  # First look for the canonical freetype main include file ft2build.h.
58337  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58338    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58339    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58340    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58341      # Fail.
58342      FOUND_FREETYPE=no
58343    fi
58344  fi
58345
58346  if test "x$FOUND_FREETYPE" = xyes; then
58347    # Include file found, let's continue the sanity check.
58348    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58349$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58350
58351    # Reset to default value
58352    FREETYPE_BASE_NAME=freetype
58353    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58354    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58355      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58356          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58357        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58358        # for the .6 version explicitly.
58359        FREETYPE_BASE_NAME=freetype.6
58360        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58361        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58362$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58363      else
58364        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58365$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58366        FOUND_FREETYPE=no
58367      fi
58368    else
58369      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58370        # On Windows, we will need both .lib and .dll file.
58371        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58372          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58373$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58374          FOUND_FREETYPE=no
58375        fi
58376      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58377          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58378        # Found lib in isa dir, use that instead.
58379        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58380        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58381$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58382      fi
58383    fi
58384  fi
58385
58386  if test "x$FOUND_FREETYPE" = xyes; then
58387
58388  # Only process if variable expands to non-empty
58389
58390  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58392
58393  # Input might be given as Windows format, start by converting to
58394  # unix format.
58395  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58396  new_path=`$CYGPATH -u "$path"`
58397
58398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58401  # "foo.exe" is OK but "foo" is an error.
58402  #
58403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58404  # It is also a way to make sure we got the proper file name for the real test later on.
58405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58406  if test "x$test_shortpath" = x; then
58407    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58408$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58409    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58410  fi
58411
58412  # Call helper function which possibly converts this using DOS-style short mode.
58413  # If so, the updated path is stored in $new_path.
58414
58415  input_path="$new_path"
58416  # Check if we need to convert this using DOS-style short mode. If the path
58417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58418  # take no chances and rewrite it.
58419  # Note: m4 eats our [], so we need to use [ and ] instead.
58420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58421  if test "x$has_forbidden_chars" != x; then
58422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58426      # Going to short mode and back again did indeed matter. Since short mode is
58427      # case insensitive, let's make it lowercase to improve readability.
58428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58429      # Now convert it back to Unix-style (cygpath)
58430      input_path=`$CYGPATH -u "$shortmode_path"`
58431      new_path="$input_path"
58432    fi
58433  fi
58434
58435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58436  if test "x$test_cygdrive_prefix" = x; then
58437    # As a simple fix, exclude /usr/bin since it's not a real path.
58438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58440      # a path prefixed by /cygdrive for fixpath to work.
58441      new_path="$CYGWIN_ROOT_PATH$input_path"
58442    fi
58443  fi
58444
58445
58446  if test "x$path" != "x$new_path"; then
58447    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58449$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58450  fi
58451
58452    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58453
58454  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58455  has_colon=`$ECHO $path | $GREP ^.:`
58456  new_path="$path"
58457  if test "x$has_colon" = x; then
58458    # Not in mixed or Windows style, start by that.
58459    new_path=`cmd //c echo $path`
58460  fi
58461
58462
58463  input_path="$new_path"
58464  # Check if we need to convert this using DOS-style short mode. If the path
58465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58466  # take no chances and rewrite it.
58467  # Note: m4 eats our [], so we need to use [ and ] instead.
58468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58469  if test "x$has_forbidden_chars" != x; then
58470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58472  fi
58473
58474
58475  windows_path="$new_path"
58476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58477    unix_path=`$CYGPATH -u "$windows_path"`
58478    new_path="$unix_path"
58479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58481    new_path="$unix_path"
58482  fi
58483
58484  if test "x$path" != "x$new_path"; then
58485    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58487$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58488  fi
58489
58490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58492
58493    else
58494      # We're on a unix platform. Hooray! :)
58495      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58496      has_space=`$ECHO "$path" | $GREP " "`
58497      if test "x$has_space" != x; then
58498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58499$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58500        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58501      fi
58502
58503      # Use eval to expand a potential ~
58504      eval path="$path"
58505      if test ! -f "$path" && test ! -d "$path"; then
58506        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58507      fi
58508
58509      if test -d "$path"; then
58510        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58511      else
58512        dir="`$DIRNAME "$path"`"
58513        base="`$BASENAME "$path"`"
58514        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58515      fi
58516    fi
58517  fi
58518
58519
58520  # Only process if variable expands to non-empty
58521
58522  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58523    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58524
58525  # Input might be given as Windows format, start by converting to
58526  # unix format.
58527  path="$POTENTIAL_FREETYPE_LIB_PATH"
58528  new_path=`$CYGPATH -u "$path"`
58529
58530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58533  # "foo.exe" is OK but "foo" is an error.
58534  #
58535  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58536  # It is also a way to make sure we got the proper file name for the real test later on.
58537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58538  if test "x$test_shortpath" = x; then
58539    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58540$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58541    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58542  fi
58543
58544  # Call helper function which possibly converts this using DOS-style short mode.
58545  # If so, the updated path is stored in $new_path.
58546
58547  input_path="$new_path"
58548  # Check if we need to convert this using DOS-style short mode. If the path
58549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58550  # take no chances and rewrite it.
58551  # Note: m4 eats our [], so we need to use [ and ] instead.
58552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58553  if test "x$has_forbidden_chars" != x; then
58554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58558      # Going to short mode and back again did indeed matter. Since short mode is
58559      # case insensitive, let's make it lowercase to improve readability.
58560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58561      # Now convert it back to Unix-style (cygpath)
58562      input_path=`$CYGPATH -u "$shortmode_path"`
58563      new_path="$input_path"
58564    fi
58565  fi
58566
58567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58568  if test "x$test_cygdrive_prefix" = x; then
58569    # As a simple fix, exclude /usr/bin since it's not a real path.
58570    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58572      # a path prefixed by /cygdrive for fixpath to work.
58573      new_path="$CYGWIN_ROOT_PATH$input_path"
58574    fi
58575  fi
58576
58577
58578  if test "x$path" != "x$new_path"; then
58579    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58581$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58582  fi
58583
58584    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58585
58586  path="$POTENTIAL_FREETYPE_LIB_PATH"
58587  has_colon=`$ECHO $path | $GREP ^.:`
58588  new_path="$path"
58589  if test "x$has_colon" = x; then
58590    # Not in mixed or Windows style, start by that.
58591    new_path=`cmd //c echo $path`
58592  fi
58593
58594
58595  input_path="$new_path"
58596  # Check if we need to convert this using DOS-style short mode. If the path
58597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58598  # take no chances and rewrite it.
58599  # Note: m4 eats our [], so we need to use [ and ] instead.
58600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58601  if test "x$has_forbidden_chars" != x; then
58602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58604  fi
58605
58606
58607  windows_path="$new_path"
58608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58609    unix_path=`$CYGPATH -u "$windows_path"`
58610    new_path="$unix_path"
58611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58613    new_path="$unix_path"
58614  fi
58615
58616  if test "x$path" != "x$new_path"; then
58617    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58619$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58620  fi
58621
58622  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58623  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58624
58625    else
58626      # We're on a unix platform. Hooray! :)
58627      path="$POTENTIAL_FREETYPE_LIB_PATH"
58628      has_space=`$ECHO "$path" | $GREP " "`
58629      if test "x$has_space" != x; then
58630        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58631$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58632        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58633      fi
58634
58635      # Use eval to expand a potential ~
58636      eval path="$path"
58637      if test ! -f "$path" && test ! -d "$path"; then
58638        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58639      fi
58640
58641      if test -d "$path"; then
58642        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58643      else
58644        dir="`$DIRNAME "$path"`"
58645        base="`$BASENAME "$path"`"
58646        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58647      fi
58648    fi
58649  fi
58650
58651
58652    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58653    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58654$as_echo_n "checking for freetype includes... " >&6; }
58655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58656$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58657    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58658    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58659$as_echo_n "checking for freetype libraries... " >&6; }
58660    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58661$as_echo "$FREETYPE_LIB_PATH" >&6; }
58662  fi
58663
58664            else
58665
58666  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58667  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58668  METHOD="well-known location"
58669
58670  # Let's start with an optimistic view of the world :-)
58671  FOUND_FREETYPE=yes
58672
58673  # First look for the canonical freetype main include file ft2build.h.
58674  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58675    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58676    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58677    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58678      # Fail.
58679      FOUND_FREETYPE=no
58680    fi
58681  fi
58682
58683  if test "x$FOUND_FREETYPE" = xyes; then
58684    # Include file found, let's continue the sanity check.
58685    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58686$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58687
58688    # Reset to default value
58689    FREETYPE_BASE_NAME=freetype
58690    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58691    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58692      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58693          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58694        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58695        # for the .6 version explicitly.
58696        FREETYPE_BASE_NAME=freetype.6
58697        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58698        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58699$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58700      else
58701        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58702$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58703        FOUND_FREETYPE=no
58704      fi
58705    else
58706      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58707        # On Windows, we will need both .lib and .dll file.
58708        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58709          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58710$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58711          FOUND_FREETYPE=no
58712        fi
58713      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58714          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58715        # Found lib in isa dir, use that instead.
58716        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58717        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58718$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58719      fi
58720    fi
58721  fi
58722
58723  if test "x$FOUND_FREETYPE" = xyes; then
58724
58725  # Only process if variable expands to non-empty
58726
58727  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58729
58730  # Input might be given as Windows format, start by converting to
58731  # unix format.
58732  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58733  new_path=`$CYGPATH -u "$path"`
58734
58735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58738  # "foo.exe" is OK but "foo" is an error.
58739  #
58740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58741  # It is also a way to make sure we got the proper file name for the real test later on.
58742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58743  if test "x$test_shortpath" = x; then
58744    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58745$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58746    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58747  fi
58748
58749  # Call helper function which possibly converts this using DOS-style short mode.
58750  # If so, the updated path is stored in $new_path.
58751
58752  input_path="$new_path"
58753  # Check if we need to convert this using DOS-style short mode. If the path
58754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58755  # take no chances and rewrite it.
58756  # Note: m4 eats our [], so we need to use [ and ] instead.
58757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58758  if test "x$has_forbidden_chars" != x; then
58759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58763      # Going to short mode and back again did indeed matter. Since short mode is
58764      # case insensitive, let's make it lowercase to improve readability.
58765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58766      # Now convert it back to Unix-style (cygpath)
58767      input_path=`$CYGPATH -u "$shortmode_path"`
58768      new_path="$input_path"
58769    fi
58770  fi
58771
58772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58773  if test "x$test_cygdrive_prefix" = x; then
58774    # As a simple fix, exclude /usr/bin since it's not a real path.
58775    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58777      # a path prefixed by /cygdrive for fixpath to work.
58778      new_path="$CYGWIN_ROOT_PATH$input_path"
58779    fi
58780  fi
58781
58782
58783  if test "x$path" != "x$new_path"; then
58784    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58786$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58787  fi
58788
58789    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58790
58791  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58792  has_colon=`$ECHO $path | $GREP ^.:`
58793  new_path="$path"
58794  if test "x$has_colon" = x; then
58795    # Not in mixed or Windows style, start by that.
58796    new_path=`cmd //c echo $path`
58797  fi
58798
58799
58800  input_path="$new_path"
58801  # Check if we need to convert this using DOS-style short mode. If the path
58802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58803  # take no chances and rewrite it.
58804  # Note: m4 eats our [], so we need to use [ and ] instead.
58805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58806  if test "x$has_forbidden_chars" != x; then
58807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58809  fi
58810
58811
58812  windows_path="$new_path"
58813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58814    unix_path=`$CYGPATH -u "$windows_path"`
58815    new_path="$unix_path"
58816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58818    new_path="$unix_path"
58819  fi
58820
58821  if test "x$path" != "x$new_path"; then
58822    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58824$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58825  fi
58826
58827  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58828  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58829
58830    else
58831      # We're on a unix platform. Hooray! :)
58832      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58833      has_space=`$ECHO "$path" | $GREP " "`
58834      if test "x$has_space" != x; then
58835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58836$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58837        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58838      fi
58839
58840      # Use eval to expand a potential ~
58841      eval path="$path"
58842      if test ! -f "$path" && test ! -d "$path"; then
58843        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58844      fi
58845
58846      if test -d "$path"; then
58847        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58848      else
58849        dir="`$DIRNAME "$path"`"
58850        base="`$BASENAME "$path"`"
58851        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58852      fi
58853    fi
58854  fi
58855
58856
58857  # Only process if variable expands to non-empty
58858
58859  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58860    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58861
58862  # Input might be given as Windows format, start by converting to
58863  # unix format.
58864  path="$POTENTIAL_FREETYPE_LIB_PATH"
58865  new_path=`$CYGPATH -u "$path"`
58866
58867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58870  # "foo.exe" is OK but "foo" is an error.
58871  #
58872  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58873  # It is also a way to make sure we got the proper file name for the real test later on.
58874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58875  if test "x$test_shortpath" = x; then
58876    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58877$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58878    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58879  fi
58880
58881  # Call helper function which possibly converts this using DOS-style short mode.
58882  # If so, the updated path is stored in $new_path.
58883
58884  input_path="$new_path"
58885  # Check if we need to convert this using DOS-style short mode. If the path
58886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58887  # take no chances and rewrite it.
58888  # Note: m4 eats our [], so we need to use [ and ] instead.
58889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58890  if test "x$has_forbidden_chars" != x; then
58891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58892    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58893    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58894    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58895      # Going to short mode and back again did indeed matter. Since short mode is
58896      # case insensitive, let's make it lowercase to improve readability.
58897      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58898      # Now convert it back to Unix-style (cygpath)
58899      input_path=`$CYGPATH -u "$shortmode_path"`
58900      new_path="$input_path"
58901    fi
58902  fi
58903
58904  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58905  if test "x$test_cygdrive_prefix" = x; then
58906    # As a simple fix, exclude /usr/bin since it's not a real path.
58907    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58908      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58909      # a path prefixed by /cygdrive for fixpath to work.
58910      new_path="$CYGWIN_ROOT_PATH$input_path"
58911    fi
58912  fi
58913
58914
58915  if test "x$path" != "x$new_path"; then
58916    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58918$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58919  fi
58920
58921    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58922
58923  path="$POTENTIAL_FREETYPE_LIB_PATH"
58924  has_colon=`$ECHO $path | $GREP ^.:`
58925  new_path="$path"
58926  if test "x$has_colon" = x; then
58927    # Not in mixed or Windows style, start by that.
58928    new_path=`cmd //c echo $path`
58929  fi
58930
58931
58932  input_path="$new_path"
58933  # Check if we need to convert this using DOS-style short mode. If the path
58934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58935  # take no chances and rewrite it.
58936  # Note: m4 eats our [], so we need to use [ and ] instead.
58937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58938  if test "x$has_forbidden_chars" != x; then
58939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58941  fi
58942
58943
58944  windows_path="$new_path"
58945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58946    unix_path=`$CYGPATH -u "$windows_path"`
58947    new_path="$unix_path"
58948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58950    new_path="$unix_path"
58951  fi
58952
58953  if test "x$path" != "x$new_path"; then
58954    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58956$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58957  fi
58958
58959  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58960  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58961
58962    else
58963      # We're on a unix platform. Hooray! :)
58964      path="$POTENTIAL_FREETYPE_LIB_PATH"
58965      has_space=`$ECHO "$path" | $GREP " "`
58966      if test "x$has_space" != x; then
58967        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58968$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58969        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58970      fi
58971
58972      # Use eval to expand a potential ~
58973      eval path="$path"
58974      if test ! -f "$path" && test ! -d "$path"; then
58975        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58976      fi
58977
58978      if test -d "$path"; then
58979        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58980      else
58981        dir="`$DIRNAME "$path"`"
58982        base="`$BASENAME "$path"`"
58983        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58984      fi
58985    fi
58986  fi
58987
58988
58989    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58990    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58991$as_echo_n "checking for freetype includes... " >&6; }
58992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58993$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58994    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58996$as_echo_n "checking for freetype libraries... " >&6; }
58997    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58998$as_echo "$FREETYPE_LIB_PATH" >&6; }
58999  fi
59000
59001            fi
59002            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59003                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59004              # Source is available, as a last resort try to build freetype in default location
59005
59006  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59007  BUILD_FREETYPE=yes
59008
59009  # Check if the freetype sources are acessible..
59010  if ! test -d $FREETYPE_SRC_PATH; then
59011    { $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
59012$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59013    BUILD_FREETYPE=no
59014  fi
59015  # ..and contain a vc2010 project file
59016  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59017  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59018    { $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
59019$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59020    BUILD_FREETYPE=no
59021  fi
59022  # Now check if configure found a version of 'msbuild.exe'
59023  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59024    { $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
59025$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;}
59026    BUILD_FREETYPE=no
59027  fi
59028
59029  # Ready to go..
59030  if test "x$BUILD_FREETYPE" = xyes; then
59031    # msbuild requires trailing slashes for output directories
59032    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59033    freetype_lib_path_unix="$freetype_lib_path"
59034    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59035
59036  unix_path="$vcxproj_path"
59037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59038    windows_path=`$CYGPATH -m "$unix_path"`
59039    vcxproj_path="$windows_path"
59040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59041    windows_path=`cmd //c echo $unix_path`
59042    vcxproj_path="$windows_path"
59043  fi
59044
59045
59046  unix_path="$freetype_lib_path"
59047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59048    windows_path=`$CYGPATH -m "$unix_path"`
59049    freetype_lib_path="$windows_path"
59050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59051    windows_path=`cmd //c echo $unix_path`
59052    freetype_lib_path="$windows_path"
59053  fi
59054
59055
59056  unix_path="$freetype_obj_path"
59057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59058    windows_path=`$CYGPATH -m "$unix_path"`
59059    freetype_obj_path="$windows_path"
59060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59061    windows_path=`cmd //c echo $unix_path`
59062    freetype_obj_path="$windows_path"
59063  fi
59064
59065    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59066      freetype_platform=x64
59067    else
59068      freetype_platform=win32
59069    fi
59070
59071    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59072    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59073    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59074    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59075    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59076$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59077
59078    # First we try to build the freetype.dll
59079    $ECHO -e "@echo off\n"\
59080        "$MSBUILD $vcxproj_path "\
59081        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59082        "/p:Configuration=\"Release Multithreaded\" "\
59083        "/p:Platform=$freetype_platform "\
59084        "/p:ConfigurationType=DynamicLibrary "\
59085        "/p:TargetName=freetype "\
59086        "/p:OutDir=\"$freetype_lib_path\" "\
59087        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59088    cmd /c freetype.bat
59089
59090    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59091      # If that succeeds we also build freetype.lib
59092      $ECHO -e "@echo off\n"\
59093          "$MSBUILD $vcxproj_path "\
59094          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59095          "/p:Configuration=\"Release Multithreaded\" "\
59096          "/p:Platform=$freetype_platform "\
59097          "/p:ConfigurationType=StaticLibrary "\
59098          "/p:TargetName=freetype "\
59099          "/p:OutDir=\"$freetype_lib_path\" "\
59100          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59101      cmd /c freetype.bat
59102
59103      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59104        # Once we build both, lib and dll, set freetype lib and include path appropriately
59105        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59106        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59107        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59108$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59109      else
59110        BUILD_FREETYPE=no
59111      fi
59112    else
59113      BUILD_FREETYPE=no
59114    fi
59115  fi
59116
59117              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59118
59119  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59120  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59121  METHOD="well-known location"
59122
59123  # Let's start with an optimistic view of the world :-)
59124  FOUND_FREETYPE=yes
59125
59126  # First look for the canonical freetype main include file ft2build.h.
59127  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59128    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59129    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59130    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59131      # Fail.
59132      FOUND_FREETYPE=no
59133    fi
59134  fi
59135
59136  if test "x$FOUND_FREETYPE" = xyes; then
59137    # Include file found, let's continue the sanity check.
59138    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59139$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59140
59141    # Reset to default value
59142    FREETYPE_BASE_NAME=freetype
59143    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59144    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59145      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59146          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59147        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59148        # for the .6 version explicitly.
59149        FREETYPE_BASE_NAME=freetype.6
59150        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59151        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59152$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59153      else
59154        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59155$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59156        FOUND_FREETYPE=no
59157      fi
59158    else
59159      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59160        # On Windows, we will need both .lib and .dll file.
59161        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59162          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59163$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59164          FOUND_FREETYPE=no
59165        fi
59166      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59167          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59168        # Found lib in isa dir, use that instead.
59169        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59170        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59171$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59172      fi
59173    fi
59174  fi
59175
59176  if test "x$FOUND_FREETYPE" = xyes; then
59177
59178  # Only process if variable expands to non-empty
59179
59180  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59182
59183  # Input might be given as Windows format, start by converting to
59184  # unix format.
59185  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59186  new_path=`$CYGPATH -u "$path"`
59187
59188  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59189  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59190  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59191  # "foo.exe" is OK but "foo" is an error.
59192  #
59193  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59194  # It is also a way to make sure we got the proper file name for the real test later on.
59195  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59196  if test "x$test_shortpath" = x; then
59197    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59198$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59199    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59200  fi
59201
59202  # Call helper function which possibly converts this using DOS-style short mode.
59203  # If so, the updated path is stored in $new_path.
59204
59205  input_path="$new_path"
59206  # Check if we need to convert this using DOS-style short mode. If the path
59207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59208  # take no chances and rewrite it.
59209  # Note: m4 eats our [], so we need to use [ and ] instead.
59210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59211  if test "x$has_forbidden_chars" != x; then
59212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59213    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59214    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59215    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59216      # Going to short mode and back again did indeed matter. Since short mode is
59217      # case insensitive, let's make it lowercase to improve readability.
59218      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59219      # Now convert it back to Unix-style (cygpath)
59220      input_path=`$CYGPATH -u "$shortmode_path"`
59221      new_path="$input_path"
59222    fi
59223  fi
59224
59225  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59226  if test "x$test_cygdrive_prefix" = x; then
59227    # As a simple fix, exclude /usr/bin since it's not a real path.
59228    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59229      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59230      # a path prefixed by /cygdrive for fixpath to work.
59231      new_path="$CYGWIN_ROOT_PATH$input_path"
59232    fi
59233  fi
59234
59235
59236  if test "x$path" != "x$new_path"; then
59237    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59238    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59239$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59240  fi
59241
59242    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59243
59244  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59245  has_colon=`$ECHO $path | $GREP ^.:`
59246  new_path="$path"
59247  if test "x$has_colon" = x; then
59248    # Not in mixed or Windows style, start by that.
59249    new_path=`cmd //c echo $path`
59250  fi
59251
59252
59253  input_path="$new_path"
59254  # Check if we need to convert this using DOS-style short mode. If the path
59255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59256  # take no chances and rewrite it.
59257  # Note: m4 eats our [], so we need to use [ and ] instead.
59258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59259  if test "x$has_forbidden_chars" != x; then
59260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59262  fi
59263
59264
59265  windows_path="$new_path"
59266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59267    unix_path=`$CYGPATH -u "$windows_path"`
59268    new_path="$unix_path"
59269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59271    new_path="$unix_path"
59272  fi
59273
59274  if test "x$path" != "x$new_path"; then
59275    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59277$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59278  fi
59279
59280  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59281  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59282
59283    else
59284      # We're on a unix platform. Hooray! :)
59285      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59286      has_space=`$ECHO "$path" | $GREP " "`
59287      if test "x$has_space" != x; then
59288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59289$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59290        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59291      fi
59292
59293      # Use eval to expand a potential ~
59294      eval path="$path"
59295      if test ! -f "$path" && test ! -d "$path"; then
59296        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59297      fi
59298
59299      if test -d "$path"; then
59300        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59301      else
59302        dir="`$DIRNAME "$path"`"
59303        base="`$BASENAME "$path"`"
59304        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59305      fi
59306    fi
59307  fi
59308
59309
59310  # Only process if variable expands to non-empty
59311
59312  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59313    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59314
59315  # Input might be given as Windows format, start by converting to
59316  # unix format.
59317  path="$POTENTIAL_FREETYPE_LIB_PATH"
59318  new_path=`$CYGPATH -u "$path"`
59319
59320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59323  # "foo.exe" is OK but "foo" is an error.
59324  #
59325  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59326  # It is also a way to make sure we got the proper file name for the real test later on.
59327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59328  if test "x$test_shortpath" = x; then
59329    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59330$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59331    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59332  fi
59333
59334  # Call helper function which possibly converts this using DOS-style short mode.
59335  # If so, the updated path is stored in $new_path.
59336
59337  input_path="$new_path"
59338  # Check if we need to convert this using DOS-style short mode. If the path
59339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59340  # take no chances and rewrite it.
59341  # Note: m4 eats our [], so we need to use [ and ] instead.
59342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59343  if test "x$has_forbidden_chars" != x; then
59344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59348      # Going to short mode and back again did indeed matter. Since short mode is
59349      # case insensitive, let's make it lowercase to improve readability.
59350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59351      # Now convert it back to Unix-style (cygpath)
59352      input_path=`$CYGPATH -u "$shortmode_path"`
59353      new_path="$input_path"
59354    fi
59355  fi
59356
59357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59358  if test "x$test_cygdrive_prefix" = x; then
59359    # As a simple fix, exclude /usr/bin since it's not a real path.
59360    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59362      # a path prefixed by /cygdrive for fixpath to work.
59363      new_path="$CYGWIN_ROOT_PATH$input_path"
59364    fi
59365  fi
59366
59367
59368  if test "x$path" != "x$new_path"; then
59369    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59371$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59372  fi
59373
59374    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59375
59376  path="$POTENTIAL_FREETYPE_LIB_PATH"
59377  has_colon=`$ECHO $path | $GREP ^.:`
59378  new_path="$path"
59379  if test "x$has_colon" = x; then
59380    # Not in mixed or Windows style, start by that.
59381    new_path=`cmd //c echo $path`
59382  fi
59383
59384
59385  input_path="$new_path"
59386  # Check if we need to convert this using DOS-style short mode. If the path
59387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59388  # take no chances and rewrite it.
59389  # Note: m4 eats our [], so we need to use [ and ] instead.
59390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59391  if test "x$has_forbidden_chars" != x; then
59392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59394  fi
59395
59396
59397  windows_path="$new_path"
59398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59399    unix_path=`$CYGPATH -u "$windows_path"`
59400    new_path="$unix_path"
59401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59403    new_path="$unix_path"
59404  fi
59405
59406  if test "x$path" != "x$new_path"; then
59407    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59409$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59410  fi
59411
59412  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59413  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59414
59415    else
59416      # We're on a unix platform. Hooray! :)
59417      path="$POTENTIAL_FREETYPE_LIB_PATH"
59418      has_space=`$ECHO "$path" | $GREP " "`
59419      if test "x$has_space" != x; then
59420        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59421$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59422        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59423      fi
59424
59425      # Use eval to expand a potential ~
59426      eval path="$path"
59427      if test ! -f "$path" && test ! -d "$path"; then
59428        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59429      fi
59430
59431      if test -d "$path"; then
59432        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59433      else
59434        dir="`$DIRNAME "$path"`"
59435        base="`$BASENAME "$path"`"
59436        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59437      fi
59438    fi
59439  fi
59440
59441
59442    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59443    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59444$as_echo_n "checking for freetype includes... " >&6; }
59445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59446$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59447    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59449$as_echo_n "checking for freetype libraries... " >&6; }
59450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59451$as_echo "$FREETYPE_LIB_PATH" >&6; }
59452  fi
59453
59454              else
59455
59456  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59457  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59458  METHOD="well-known location"
59459
59460  # Let's start with an optimistic view of the world :-)
59461  FOUND_FREETYPE=yes
59462
59463  # First look for the canonical freetype main include file ft2build.h.
59464  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59465    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59466    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59467    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59468      # Fail.
59469      FOUND_FREETYPE=no
59470    fi
59471  fi
59472
59473  if test "x$FOUND_FREETYPE" = xyes; then
59474    # Include file found, let's continue the sanity check.
59475    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59476$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59477
59478    # Reset to default value
59479    FREETYPE_BASE_NAME=freetype
59480    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59481    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59482      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59483          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59484        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59485        # for the .6 version explicitly.
59486        FREETYPE_BASE_NAME=freetype.6
59487        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59488        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59489$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59490      else
59491        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59492$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59493        FOUND_FREETYPE=no
59494      fi
59495    else
59496      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59497        # On Windows, we will need both .lib and .dll file.
59498        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59499          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59500$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59501          FOUND_FREETYPE=no
59502        fi
59503      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59504          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59505        # Found lib in isa dir, use that instead.
59506        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59507        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59508$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59509      fi
59510    fi
59511  fi
59512
59513  if test "x$FOUND_FREETYPE" = xyes; then
59514
59515  # Only process if variable expands to non-empty
59516
59517  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59519
59520  # Input might be given as Windows format, start by converting to
59521  # unix format.
59522  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59523  new_path=`$CYGPATH -u "$path"`
59524
59525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59528  # "foo.exe" is OK but "foo" is an error.
59529  #
59530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59531  # It is also a way to make sure we got the proper file name for the real test later on.
59532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59533  if test "x$test_shortpath" = x; then
59534    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59535$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59536    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59537  fi
59538
59539  # Call helper function which possibly converts this using DOS-style short mode.
59540  # If so, the updated path is stored in $new_path.
59541
59542  input_path="$new_path"
59543  # Check if we need to convert this using DOS-style short mode. If the path
59544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59545  # take no chances and rewrite it.
59546  # Note: m4 eats our [], so we need to use [ and ] instead.
59547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59548  if test "x$has_forbidden_chars" != x; then
59549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59553      # Going to short mode and back again did indeed matter. Since short mode is
59554      # case insensitive, let's make it lowercase to improve readability.
59555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59556      # Now convert it back to Unix-style (cygpath)
59557      input_path=`$CYGPATH -u "$shortmode_path"`
59558      new_path="$input_path"
59559    fi
59560  fi
59561
59562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59563  if test "x$test_cygdrive_prefix" = x; then
59564    # As a simple fix, exclude /usr/bin since it's not a real path.
59565    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59567      # a path prefixed by /cygdrive for fixpath to work.
59568      new_path="$CYGWIN_ROOT_PATH$input_path"
59569    fi
59570  fi
59571
59572
59573  if test "x$path" != "x$new_path"; then
59574    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59576$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59577  fi
59578
59579    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59580
59581  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59582  has_colon=`$ECHO $path | $GREP ^.:`
59583  new_path="$path"
59584  if test "x$has_colon" = x; then
59585    # Not in mixed or Windows style, start by that.
59586    new_path=`cmd //c echo $path`
59587  fi
59588
59589
59590  input_path="$new_path"
59591  # Check if we need to convert this using DOS-style short mode. If the path
59592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59593  # take no chances and rewrite it.
59594  # Note: m4 eats our [], so we need to use [ and ] instead.
59595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59596  if test "x$has_forbidden_chars" != x; then
59597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59599  fi
59600
59601
59602  windows_path="$new_path"
59603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59604    unix_path=`$CYGPATH -u "$windows_path"`
59605    new_path="$unix_path"
59606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59608    new_path="$unix_path"
59609  fi
59610
59611  if test "x$path" != "x$new_path"; then
59612    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59614$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59615  fi
59616
59617  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59618  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59619
59620    else
59621      # We're on a unix platform. Hooray! :)
59622      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59623      has_space=`$ECHO "$path" | $GREP " "`
59624      if test "x$has_space" != x; then
59625        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59626$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59627        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59628      fi
59629
59630      # Use eval to expand a potential ~
59631      eval path="$path"
59632      if test ! -f "$path" && test ! -d "$path"; then
59633        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59634      fi
59635
59636      if test -d "$path"; then
59637        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59638      else
59639        dir="`$DIRNAME "$path"`"
59640        base="`$BASENAME "$path"`"
59641        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59642      fi
59643    fi
59644  fi
59645
59646
59647  # Only process if variable expands to non-empty
59648
59649  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59650    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59651
59652  # Input might be given as Windows format, start by converting to
59653  # unix format.
59654  path="$POTENTIAL_FREETYPE_LIB_PATH"
59655  new_path=`$CYGPATH -u "$path"`
59656
59657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59660  # "foo.exe" is OK but "foo" is an error.
59661  #
59662  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59663  # It is also a way to make sure we got the proper file name for the real test later on.
59664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59665  if test "x$test_shortpath" = x; then
59666    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59667$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59668    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59669  fi
59670
59671  # Call helper function which possibly converts this using DOS-style short mode.
59672  # If so, the updated path is stored in $new_path.
59673
59674  input_path="$new_path"
59675  # Check if we need to convert this using DOS-style short mode. If the path
59676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59677  # take no chances and rewrite it.
59678  # Note: m4 eats our [], so we need to use [ and ] instead.
59679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59680  if test "x$has_forbidden_chars" != x; then
59681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59682    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59683    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59684    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59685      # Going to short mode and back again did indeed matter. Since short mode is
59686      # case insensitive, let's make it lowercase to improve readability.
59687      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59688      # Now convert it back to Unix-style (cygpath)
59689      input_path=`$CYGPATH -u "$shortmode_path"`
59690      new_path="$input_path"
59691    fi
59692  fi
59693
59694  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59695  if test "x$test_cygdrive_prefix" = x; then
59696    # As a simple fix, exclude /usr/bin since it's not a real path.
59697    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59698      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59699      # a path prefixed by /cygdrive for fixpath to work.
59700      new_path="$CYGWIN_ROOT_PATH$input_path"
59701    fi
59702  fi
59703
59704
59705  if test "x$path" != "x$new_path"; then
59706    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59708$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59709  fi
59710
59711    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59712
59713  path="$POTENTIAL_FREETYPE_LIB_PATH"
59714  has_colon=`$ECHO $path | $GREP ^.:`
59715  new_path="$path"
59716  if test "x$has_colon" = x; then
59717    # Not in mixed or Windows style, start by that.
59718    new_path=`cmd //c echo $path`
59719  fi
59720
59721
59722  input_path="$new_path"
59723  # Check if we need to convert this using DOS-style short mode. If the path
59724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59725  # take no chances and rewrite it.
59726  # Note: m4 eats our [], so we need to use [ and ] instead.
59727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59728  if test "x$has_forbidden_chars" != x; then
59729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59731  fi
59732
59733
59734  windows_path="$new_path"
59735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59736    unix_path=`$CYGPATH -u "$windows_path"`
59737    new_path="$unix_path"
59738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59740    new_path="$unix_path"
59741  fi
59742
59743  if test "x$path" != "x$new_path"; then
59744    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59746$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59747  fi
59748
59749  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59750  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59751
59752    else
59753      # We're on a unix platform. Hooray! :)
59754      path="$POTENTIAL_FREETYPE_LIB_PATH"
59755      has_space=`$ECHO "$path" | $GREP " "`
59756      if test "x$has_space" != x; then
59757        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59758$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59759        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59760      fi
59761
59762      # Use eval to expand a potential ~
59763      eval path="$path"
59764      if test ! -f "$path" && test ! -d "$path"; then
59765        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59766      fi
59767
59768      if test -d "$path"; then
59769        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59770      else
59771        dir="`$DIRNAME "$path"`"
59772        base="`$BASENAME "$path"`"
59773        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59774      fi
59775    fi
59776  fi
59777
59778
59779    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59780    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59781$as_echo_n "checking for freetype includes... " >&6; }
59782    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59783$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59784    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59786$as_echo_n "checking for freetype libraries... " >&6; }
59787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59788$as_echo "$FREETYPE_LIB_PATH" >&6; }
59789  fi
59790
59791              fi
59792            fi
59793          fi
59794        else
59795          FREETYPE_BASE_DIR="$SYSROOT/usr"
59796
59797  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59798  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59799  METHOD="well-known location"
59800
59801  # Let's start with an optimistic view of the world :-)
59802  FOUND_FREETYPE=yes
59803
59804  # First look for the canonical freetype main include file ft2build.h.
59805  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59806    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59807    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59808    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59809      # Fail.
59810      FOUND_FREETYPE=no
59811    fi
59812  fi
59813
59814  if test "x$FOUND_FREETYPE" = xyes; then
59815    # Include file found, let's continue the sanity check.
59816    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59817$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59818
59819    # Reset to default value
59820    FREETYPE_BASE_NAME=freetype
59821    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59822    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59823      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59824          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59825        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59826        # for the .6 version explicitly.
59827        FREETYPE_BASE_NAME=freetype.6
59828        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59829        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59830$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59831      else
59832        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59833$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59834        FOUND_FREETYPE=no
59835      fi
59836    else
59837      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59838        # On Windows, we will need both .lib and .dll file.
59839        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59840          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59841$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59842          FOUND_FREETYPE=no
59843        fi
59844      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59845          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59846        # Found lib in isa dir, use that instead.
59847        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59848        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59849$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59850      fi
59851    fi
59852  fi
59853
59854  if test "x$FOUND_FREETYPE" = xyes; then
59855
59856  # Only process if variable expands to non-empty
59857
59858  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59860
59861  # Input might be given as Windows format, start by converting to
59862  # unix format.
59863  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59864  new_path=`$CYGPATH -u "$path"`
59865
59866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59869  # "foo.exe" is OK but "foo" is an error.
59870  #
59871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59872  # It is also a way to make sure we got the proper file name for the real test later on.
59873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59874  if test "x$test_shortpath" = x; then
59875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59876$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59877    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59878  fi
59879
59880  # Call helper function which possibly converts this using DOS-style short mode.
59881  # If so, the updated path is stored in $new_path.
59882
59883  input_path="$new_path"
59884  # Check if we need to convert this using DOS-style short mode. If the path
59885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59886  # take no chances and rewrite it.
59887  # Note: m4 eats our [], so we need to use [ and ] instead.
59888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59889  if test "x$has_forbidden_chars" != x; then
59890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59894      # Going to short mode and back again did indeed matter. Since short mode is
59895      # case insensitive, let's make it lowercase to improve readability.
59896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59897      # Now convert it back to Unix-style (cygpath)
59898      input_path=`$CYGPATH -u "$shortmode_path"`
59899      new_path="$input_path"
59900    fi
59901  fi
59902
59903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59904  if test "x$test_cygdrive_prefix" = x; then
59905    # As a simple fix, exclude /usr/bin since it's not a real path.
59906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59908      # a path prefixed by /cygdrive for fixpath to work.
59909      new_path="$CYGWIN_ROOT_PATH$input_path"
59910    fi
59911  fi
59912
59913
59914  if test "x$path" != "x$new_path"; then
59915    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59917$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59918  fi
59919
59920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59921
59922  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59923  has_colon=`$ECHO $path | $GREP ^.:`
59924  new_path="$path"
59925  if test "x$has_colon" = x; then
59926    # Not in mixed or Windows style, start by that.
59927    new_path=`cmd //c echo $path`
59928  fi
59929
59930
59931  input_path="$new_path"
59932  # Check if we need to convert this using DOS-style short mode. If the path
59933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59934  # take no chances and rewrite it.
59935  # Note: m4 eats our [], so we need to use [ and ] instead.
59936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59937  if test "x$has_forbidden_chars" != x; then
59938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59940  fi
59941
59942
59943  windows_path="$new_path"
59944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59945    unix_path=`$CYGPATH -u "$windows_path"`
59946    new_path="$unix_path"
59947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59949    new_path="$unix_path"
59950  fi
59951
59952  if test "x$path" != "x$new_path"; then
59953    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59955$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59956  fi
59957
59958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59960
59961    else
59962      # We're on a unix platform. Hooray! :)
59963      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59964      has_space=`$ECHO "$path" | $GREP " "`
59965      if test "x$has_space" != x; then
59966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59967$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59968        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59969      fi
59970
59971      # Use eval to expand a potential ~
59972      eval path="$path"
59973      if test ! -f "$path" && test ! -d "$path"; then
59974        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59975      fi
59976
59977      if test -d "$path"; then
59978        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59979      else
59980        dir="`$DIRNAME "$path"`"
59981        base="`$BASENAME "$path"`"
59982        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59983      fi
59984    fi
59985  fi
59986
59987
59988  # Only process if variable expands to non-empty
59989
59990  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59991    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59992
59993  # Input might be given as Windows format, start by converting to
59994  # unix format.
59995  path="$POTENTIAL_FREETYPE_LIB_PATH"
59996  new_path=`$CYGPATH -u "$path"`
59997
59998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60001  # "foo.exe" is OK but "foo" is an error.
60002  #
60003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60004  # It is also a way to make sure we got the proper file name for the real test later on.
60005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60006  if test "x$test_shortpath" = x; then
60007    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60008$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60009    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60010  fi
60011
60012  # Call helper function which possibly converts this using DOS-style short mode.
60013  # If so, the updated path is stored in $new_path.
60014
60015  input_path="$new_path"
60016  # Check if we need to convert this using DOS-style short mode. If the path
60017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60018  # take no chances and rewrite it.
60019  # Note: m4 eats our [], so we need to use [ and ] instead.
60020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60021  if test "x$has_forbidden_chars" != x; then
60022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60026      # Going to short mode and back again did indeed matter. Since short mode is
60027      # case insensitive, let's make it lowercase to improve readability.
60028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60029      # Now convert it back to Unix-style (cygpath)
60030      input_path=`$CYGPATH -u "$shortmode_path"`
60031      new_path="$input_path"
60032    fi
60033  fi
60034
60035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60036  if test "x$test_cygdrive_prefix" = x; then
60037    # As a simple fix, exclude /usr/bin since it's not a real path.
60038    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60040      # a path prefixed by /cygdrive for fixpath to work.
60041      new_path="$CYGWIN_ROOT_PATH$input_path"
60042    fi
60043  fi
60044
60045
60046  if test "x$path" != "x$new_path"; then
60047    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60049$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60050  fi
60051
60052    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60053
60054  path="$POTENTIAL_FREETYPE_LIB_PATH"
60055  has_colon=`$ECHO $path | $GREP ^.:`
60056  new_path="$path"
60057  if test "x$has_colon" = x; then
60058    # Not in mixed or Windows style, start by that.
60059    new_path=`cmd //c echo $path`
60060  fi
60061
60062
60063  input_path="$new_path"
60064  # Check if we need to convert this using DOS-style short mode. If the path
60065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60066  # take no chances and rewrite it.
60067  # Note: m4 eats our [], so we need to use [ and ] instead.
60068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60069  if test "x$has_forbidden_chars" != x; then
60070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60072  fi
60073
60074
60075  windows_path="$new_path"
60076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60077    unix_path=`$CYGPATH -u "$windows_path"`
60078    new_path="$unix_path"
60079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60081    new_path="$unix_path"
60082  fi
60083
60084  if test "x$path" != "x$new_path"; then
60085    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60087$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60088  fi
60089
60090  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60091  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60092
60093    else
60094      # We're on a unix platform. Hooray! :)
60095      path="$POTENTIAL_FREETYPE_LIB_PATH"
60096      has_space=`$ECHO "$path" | $GREP " "`
60097      if test "x$has_space" != x; then
60098        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60099$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60100        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60101      fi
60102
60103      # Use eval to expand a potential ~
60104      eval path="$path"
60105      if test ! -f "$path" && test ! -d "$path"; then
60106        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60107      fi
60108
60109      if test -d "$path"; then
60110        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60111      else
60112        dir="`$DIRNAME "$path"`"
60113        base="`$BASENAME "$path"`"
60114        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60115      fi
60116    fi
60117  fi
60118
60119
60120    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60121    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60122$as_echo_n "checking for freetype includes... " >&6; }
60123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60124$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60125    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60126    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60127$as_echo_n "checking for freetype libraries... " >&6; }
60128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60129$as_echo "$FREETYPE_LIB_PATH" >&6; }
60130  fi
60131
60132
60133          if test "x$FOUND_FREETYPE" != xyes; then
60134            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60135
60136  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60137  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60138  METHOD="well-known location"
60139
60140  # Let's start with an optimistic view of the world :-)
60141  FOUND_FREETYPE=yes
60142
60143  # First look for the canonical freetype main include file ft2build.h.
60144  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60145    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60146    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60147    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60148      # Fail.
60149      FOUND_FREETYPE=no
60150    fi
60151  fi
60152
60153  if test "x$FOUND_FREETYPE" = xyes; then
60154    # Include file found, let's continue the sanity check.
60155    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60156$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60157
60158    # Reset to default value
60159    FREETYPE_BASE_NAME=freetype
60160    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60161    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60162      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60163          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60164        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60165        # for the .6 version explicitly.
60166        FREETYPE_BASE_NAME=freetype.6
60167        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60168        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60169$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60170      else
60171        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60172$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60173        FOUND_FREETYPE=no
60174      fi
60175    else
60176      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60177        # On Windows, we will need both .lib and .dll file.
60178        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60179          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60180$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60181          FOUND_FREETYPE=no
60182        fi
60183      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60184          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60185        # Found lib in isa dir, use that instead.
60186        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60187        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60188$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60189      fi
60190    fi
60191  fi
60192
60193  if test "x$FOUND_FREETYPE" = xyes; then
60194
60195  # Only process if variable expands to non-empty
60196
60197  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60199
60200  # Input might be given as Windows format, start by converting to
60201  # unix format.
60202  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60203  new_path=`$CYGPATH -u "$path"`
60204
60205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60208  # "foo.exe" is OK but "foo" is an error.
60209  #
60210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60211  # It is also a way to make sure we got the proper file name for the real test later on.
60212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60213  if test "x$test_shortpath" = x; then
60214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60215$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60216    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60217  fi
60218
60219  # Call helper function which possibly converts this using DOS-style short mode.
60220  # If so, the updated path is stored in $new_path.
60221
60222  input_path="$new_path"
60223  # Check if we need to convert this using DOS-style short mode. If the path
60224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60225  # take no chances and rewrite it.
60226  # Note: m4 eats our [], so we need to use [ and ] instead.
60227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60228  if test "x$has_forbidden_chars" != x; then
60229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60233      # Going to short mode and back again did indeed matter. Since short mode is
60234      # case insensitive, let's make it lowercase to improve readability.
60235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60236      # Now convert it back to Unix-style (cygpath)
60237      input_path=`$CYGPATH -u "$shortmode_path"`
60238      new_path="$input_path"
60239    fi
60240  fi
60241
60242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60243  if test "x$test_cygdrive_prefix" = x; then
60244    # As a simple fix, exclude /usr/bin since it's not a real path.
60245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60247      # a path prefixed by /cygdrive for fixpath to work.
60248      new_path="$CYGWIN_ROOT_PATH$input_path"
60249    fi
60250  fi
60251
60252
60253  if test "x$path" != "x$new_path"; then
60254    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60256$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60257  fi
60258
60259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60260
60261  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60262  has_colon=`$ECHO $path | $GREP ^.:`
60263  new_path="$path"
60264  if test "x$has_colon" = x; then
60265    # Not in mixed or Windows style, start by that.
60266    new_path=`cmd //c echo $path`
60267  fi
60268
60269
60270  input_path="$new_path"
60271  # Check if we need to convert this using DOS-style short mode. If the path
60272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60273  # take no chances and rewrite it.
60274  # Note: m4 eats our [], so we need to use [ and ] instead.
60275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60276  if test "x$has_forbidden_chars" != x; then
60277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60279  fi
60280
60281
60282  windows_path="$new_path"
60283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60284    unix_path=`$CYGPATH -u "$windows_path"`
60285    new_path="$unix_path"
60286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60288    new_path="$unix_path"
60289  fi
60290
60291  if test "x$path" != "x$new_path"; then
60292    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60294$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60295  fi
60296
60297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60299
60300    else
60301      # We're on a unix platform. Hooray! :)
60302      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60303      has_space=`$ECHO "$path" | $GREP " "`
60304      if test "x$has_space" != x; then
60305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60306$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60308      fi
60309
60310      # Use eval to expand a potential ~
60311      eval path="$path"
60312      if test ! -f "$path" && test ! -d "$path"; then
60313        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60314      fi
60315
60316      if test -d "$path"; then
60317        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60318      else
60319        dir="`$DIRNAME "$path"`"
60320        base="`$BASENAME "$path"`"
60321        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60322      fi
60323    fi
60324  fi
60325
60326
60327  # Only process if variable expands to non-empty
60328
60329  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60330    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60331
60332  # Input might be given as Windows format, start by converting to
60333  # unix format.
60334  path="$POTENTIAL_FREETYPE_LIB_PATH"
60335  new_path=`$CYGPATH -u "$path"`
60336
60337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60340  # "foo.exe" is OK but "foo" is an error.
60341  #
60342  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60343  # It is also a way to make sure we got the proper file name for the real test later on.
60344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60345  if test "x$test_shortpath" = x; then
60346    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60347$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60348    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60349  fi
60350
60351  # Call helper function which possibly converts this using DOS-style short mode.
60352  # If so, the updated path is stored in $new_path.
60353
60354  input_path="$new_path"
60355  # Check if we need to convert this using DOS-style short mode. If the path
60356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60357  # take no chances and rewrite it.
60358  # Note: m4 eats our [], so we need to use [ and ] instead.
60359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60360  if test "x$has_forbidden_chars" != x; then
60361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60365      # Going to short mode and back again did indeed matter. Since short mode is
60366      # case insensitive, let's make it lowercase to improve readability.
60367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60368      # Now convert it back to Unix-style (cygpath)
60369      input_path=`$CYGPATH -u "$shortmode_path"`
60370      new_path="$input_path"
60371    fi
60372  fi
60373
60374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60375  if test "x$test_cygdrive_prefix" = x; then
60376    # As a simple fix, exclude /usr/bin since it's not a real path.
60377    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60379      # a path prefixed by /cygdrive for fixpath to work.
60380      new_path="$CYGWIN_ROOT_PATH$input_path"
60381    fi
60382  fi
60383
60384
60385  if test "x$path" != "x$new_path"; then
60386    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60388$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60389  fi
60390
60391    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60392
60393  path="$POTENTIAL_FREETYPE_LIB_PATH"
60394  has_colon=`$ECHO $path | $GREP ^.:`
60395  new_path="$path"
60396  if test "x$has_colon" = x; then
60397    # Not in mixed or Windows style, start by that.
60398    new_path=`cmd //c echo $path`
60399  fi
60400
60401
60402  input_path="$new_path"
60403  # Check if we need to convert this using DOS-style short mode. If the path
60404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60405  # take no chances and rewrite it.
60406  # Note: m4 eats our [], so we need to use [ and ] instead.
60407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60408  if test "x$has_forbidden_chars" != x; then
60409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60411  fi
60412
60413
60414  windows_path="$new_path"
60415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60416    unix_path=`$CYGPATH -u "$windows_path"`
60417    new_path="$unix_path"
60418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60420    new_path="$unix_path"
60421  fi
60422
60423  if test "x$path" != "x$new_path"; then
60424    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60426$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60427  fi
60428
60429  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60430  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60431
60432    else
60433      # We're on a unix platform. Hooray! :)
60434      path="$POTENTIAL_FREETYPE_LIB_PATH"
60435      has_space=`$ECHO "$path" | $GREP " "`
60436      if test "x$has_space" != x; then
60437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60438$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60439        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60440      fi
60441
60442      # Use eval to expand a potential ~
60443      eval path="$path"
60444      if test ! -f "$path" && test ! -d "$path"; then
60445        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60446      fi
60447
60448      if test -d "$path"; then
60449        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60450      else
60451        dir="`$DIRNAME "$path"`"
60452        base="`$BASENAME "$path"`"
60453        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60454      fi
60455    fi
60456  fi
60457
60458
60459    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60460    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60461$as_echo_n "checking for freetype includes... " >&6; }
60462    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60463$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60464    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60466$as_echo_n "checking for freetype libraries... " >&6; }
60467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60468$as_echo "$FREETYPE_LIB_PATH" >&6; }
60469  fi
60470
60471          fi
60472          if test "x$FOUND_FREETYPE" != xyes; then
60473            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
60474
60475  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60476  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60477  METHOD="well-known location"
60478
60479  # Let's start with an optimistic view of the world :-)
60480  FOUND_FREETYPE=yes
60481
60482  # First look for the canonical freetype main include file ft2build.h.
60483  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60484    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60485    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60486    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60487      # Fail.
60488      FOUND_FREETYPE=no
60489    fi
60490  fi
60491
60492  if test "x$FOUND_FREETYPE" = xyes; then
60493    # Include file found, let's continue the sanity check.
60494    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60495$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60496
60497    # Reset to default value
60498    FREETYPE_BASE_NAME=freetype
60499    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60500    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60501      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60502          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60503        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60504        # for the .6 version explicitly.
60505        FREETYPE_BASE_NAME=freetype.6
60506        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60507        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60508$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60509      else
60510        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60511$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60512        FOUND_FREETYPE=no
60513      fi
60514    else
60515      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60516        # On Windows, we will need both .lib and .dll file.
60517        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60518          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60519$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60520          FOUND_FREETYPE=no
60521        fi
60522      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60523          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60524        # Found lib in isa dir, use that instead.
60525        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60526        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60527$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60528      fi
60529    fi
60530  fi
60531
60532  if test "x$FOUND_FREETYPE" = xyes; then
60533
60534  # Only process if variable expands to non-empty
60535
60536  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60538
60539  # Input might be given as Windows format, start by converting to
60540  # unix format.
60541  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60542  new_path=`$CYGPATH -u "$path"`
60543
60544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60547  # "foo.exe" is OK but "foo" is an error.
60548  #
60549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60550  # It is also a way to make sure we got the proper file name for the real test later on.
60551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60552  if test "x$test_shortpath" = x; then
60553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60554$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60555    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60556  fi
60557
60558  # Call helper function which possibly converts this using DOS-style short mode.
60559  # If so, the updated path is stored in $new_path.
60560
60561  input_path="$new_path"
60562  # Check if we need to convert this using DOS-style short mode. If the path
60563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60564  # take no chances and rewrite it.
60565  # Note: m4 eats our [], so we need to use [ and ] instead.
60566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60567  if test "x$has_forbidden_chars" != x; then
60568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60572      # Going to short mode and back again did indeed matter. Since short mode is
60573      # case insensitive, let's make it lowercase to improve readability.
60574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60575      # Now convert it back to Unix-style (cygpath)
60576      input_path=`$CYGPATH -u "$shortmode_path"`
60577      new_path="$input_path"
60578    fi
60579  fi
60580
60581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60582  if test "x$test_cygdrive_prefix" = x; then
60583    # As a simple fix, exclude /usr/bin since it's not a real path.
60584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60586      # a path prefixed by /cygdrive for fixpath to work.
60587      new_path="$CYGWIN_ROOT_PATH$input_path"
60588    fi
60589  fi
60590
60591
60592  if test "x$path" != "x$new_path"; then
60593    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60595$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60596  fi
60597
60598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60599
60600  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60601  has_colon=`$ECHO $path | $GREP ^.:`
60602  new_path="$path"
60603  if test "x$has_colon" = x; then
60604    # Not in mixed or Windows style, start by that.
60605    new_path=`cmd //c echo $path`
60606  fi
60607
60608
60609  input_path="$new_path"
60610  # Check if we need to convert this using DOS-style short mode. If the path
60611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60612  # take no chances and rewrite it.
60613  # Note: m4 eats our [], so we need to use [ and ] instead.
60614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60615  if test "x$has_forbidden_chars" != x; then
60616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60618  fi
60619
60620
60621  windows_path="$new_path"
60622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60623    unix_path=`$CYGPATH -u "$windows_path"`
60624    new_path="$unix_path"
60625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60627    new_path="$unix_path"
60628  fi
60629
60630  if test "x$path" != "x$new_path"; then
60631    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60633$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60634  fi
60635
60636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60638
60639    else
60640      # We're on a unix platform. Hooray! :)
60641      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60642      has_space=`$ECHO "$path" | $GREP " "`
60643      if test "x$has_space" != x; then
60644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60645$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60646        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60647      fi
60648
60649      # Use eval to expand a potential ~
60650      eval path="$path"
60651      if test ! -f "$path" && test ! -d "$path"; then
60652        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60653      fi
60654
60655      if test -d "$path"; then
60656        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60657      else
60658        dir="`$DIRNAME "$path"`"
60659        base="`$BASENAME "$path"`"
60660        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60661      fi
60662    fi
60663  fi
60664
60665
60666  # Only process if variable expands to non-empty
60667
60668  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60669    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60670
60671  # Input might be given as Windows format, start by converting to
60672  # unix format.
60673  path="$POTENTIAL_FREETYPE_LIB_PATH"
60674  new_path=`$CYGPATH -u "$path"`
60675
60676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60679  # "foo.exe" is OK but "foo" is an error.
60680  #
60681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60682  # It is also a way to make sure we got the proper file name for the real test later on.
60683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60684  if test "x$test_shortpath" = x; then
60685    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60686$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60687    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60688  fi
60689
60690  # Call helper function which possibly converts this using DOS-style short mode.
60691  # If so, the updated path is stored in $new_path.
60692
60693  input_path="$new_path"
60694  # Check if we need to convert this using DOS-style short mode. If the path
60695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60696  # take no chances and rewrite it.
60697  # Note: m4 eats our [], so we need to use [ and ] instead.
60698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60699  if test "x$has_forbidden_chars" != x; then
60700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60704      # Going to short mode and back again did indeed matter. Since short mode is
60705      # case insensitive, let's make it lowercase to improve readability.
60706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60707      # Now convert it back to Unix-style (cygpath)
60708      input_path=`$CYGPATH -u "$shortmode_path"`
60709      new_path="$input_path"
60710    fi
60711  fi
60712
60713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60714  if test "x$test_cygdrive_prefix" = x; then
60715    # As a simple fix, exclude /usr/bin since it's not a real path.
60716    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60718      # a path prefixed by /cygdrive for fixpath to work.
60719      new_path="$CYGWIN_ROOT_PATH$input_path"
60720    fi
60721  fi
60722
60723
60724  if test "x$path" != "x$new_path"; then
60725    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60727$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60728  fi
60729
60730    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60731
60732  path="$POTENTIAL_FREETYPE_LIB_PATH"
60733  has_colon=`$ECHO $path | $GREP ^.:`
60734  new_path="$path"
60735  if test "x$has_colon" = x; then
60736    # Not in mixed or Windows style, start by that.
60737    new_path=`cmd //c echo $path`
60738  fi
60739
60740
60741  input_path="$new_path"
60742  # Check if we need to convert this using DOS-style short mode. If the path
60743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60744  # take no chances and rewrite it.
60745  # Note: m4 eats our [], so we need to use [ and ] instead.
60746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60747  if test "x$has_forbidden_chars" != x; then
60748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60750  fi
60751
60752
60753  windows_path="$new_path"
60754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60755    unix_path=`$CYGPATH -u "$windows_path"`
60756    new_path="$unix_path"
60757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60759    new_path="$unix_path"
60760  fi
60761
60762  if test "x$path" != "x$new_path"; then
60763    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60765$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60766  fi
60767
60768  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60769  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60770
60771    else
60772      # We're on a unix platform. Hooray! :)
60773      path="$POTENTIAL_FREETYPE_LIB_PATH"
60774      has_space=`$ECHO "$path" | $GREP " "`
60775      if test "x$has_space" != x; then
60776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60777$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60778        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60779      fi
60780
60781      # Use eval to expand a potential ~
60782      eval path="$path"
60783      if test ! -f "$path" && test ! -d "$path"; then
60784        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60785      fi
60786
60787      if test -d "$path"; then
60788        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60789      else
60790        dir="`$DIRNAME "$path"`"
60791        base="`$BASENAME "$path"`"
60792        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60793      fi
60794    fi
60795  fi
60796
60797
60798    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60800$as_echo_n "checking for freetype includes... " >&6; }
60801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60802$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60803    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60804    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60805$as_echo_n "checking for freetype libraries... " >&6; }
60806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60807$as_echo "$FREETYPE_LIB_PATH" >&6; }
60808  fi
60809
60810          fi
60811
60812          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60813            if test "x$FOUND_FREETYPE" != xyes; then
60814              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60815              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60816
60817  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60818  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60819  METHOD="well-known location"
60820
60821  # Let's start with an optimistic view of the world :-)
60822  FOUND_FREETYPE=yes
60823
60824  # First look for the canonical freetype main include file ft2build.h.
60825  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60826    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60827    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60828    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60829      # Fail.
60830      FOUND_FREETYPE=no
60831    fi
60832  fi
60833
60834  if test "x$FOUND_FREETYPE" = xyes; then
60835    # Include file found, let's continue the sanity check.
60836    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60837$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60838
60839    # Reset to default value
60840    FREETYPE_BASE_NAME=freetype
60841    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60842    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60843      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60844          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60845        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60846        # for the .6 version explicitly.
60847        FREETYPE_BASE_NAME=freetype.6
60848        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60849        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60850$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60851      else
60852        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60853$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60854        FOUND_FREETYPE=no
60855      fi
60856    else
60857      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60858        # On Windows, we will need both .lib and .dll file.
60859        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60860          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60861$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60862          FOUND_FREETYPE=no
60863        fi
60864      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60865          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60866        # Found lib in isa dir, use that instead.
60867        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60868        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60869$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60870      fi
60871    fi
60872  fi
60873
60874  if test "x$FOUND_FREETYPE" = xyes; then
60875
60876  # Only process if variable expands to non-empty
60877
60878  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60879    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60880
60881  # Input might be given as Windows format, start by converting to
60882  # unix format.
60883  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60884  new_path=`$CYGPATH -u "$path"`
60885
60886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60889  # "foo.exe" is OK but "foo" is an error.
60890  #
60891  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60892  # It is also a way to make sure we got the proper file name for the real test later on.
60893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60894  if test "x$test_shortpath" = x; then
60895    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60896$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60897    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60898  fi
60899
60900  # Call helper function which possibly converts this using DOS-style short mode.
60901  # If so, the updated path is stored in $new_path.
60902
60903  input_path="$new_path"
60904  # Check if we need to convert this using DOS-style short mode. If the path
60905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60906  # take no chances and rewrite it.
60907  # Note: m4 eats our [], so we need to use [ and ] instead.
60908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60909  if test "x$has_forbidden_chars" != x; then
60910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60914      # Going to short mode and back again did indeed matter. Since short mode is
60915      # case insensitive, let's make it lowercase to improve readability.
60916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60917      # Now convert it back to Unix-style (cygpath)
60918      input_path=`$CYGPATH -u "$shortmode_path"`
60919      new_path="$input_path"
60920    fi
60921  fi
60922
60923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60924  if test "x$test_cygdrive_prefix" = x; then
60925    # As a simple fix, exclude /usr/bin since it's not a real path.
60926    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60928      # a path prefixed by /cygdrive for fixpath to work.
60929      new_path="$CYGWIN_ROOT_PATH$input_path"
60930    fi
60931  fi
60932
60933
60934  if test "x$path" != "x$new_path"; then
60935    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60937$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60938  fi
60939
60940    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60941
60942  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60943  has_colon=`$ECHO $path | $GREP ^.:`
60944  new_path="$path"
60945  if test "x$has_colon" = x; then
60946    # Not in mixed or Windows style, start by that.
60947    new_path=`cmd //c echo $path`
60948  fi
60949
60950
60951  input_path="$new_path"
60952  # Check if we need to convert this using DOS-style short mode. If the path
60953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60954  # take no chances and rewrite it.
60955  # Note: m4 eats our [], so we need to use [ and ] instead.
60956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60957  if test "x$has_forbidden_chars" != x; then
60958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60960  fi
60961
60962
60963  windows_path="$new_path"
60964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60965    unix_path=`$CYGPATH -u "$windows_path"`
60966    new_path="$unix_path"
60967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60969    new_path="$unix_path"
60970  fi
60971
60972  if test "x$path" != "x$new_path"; then
60973    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60975$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60976  fi
60977
60978  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60979  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60980
60981    else
60982      # We're on a unix platform. Hooray! :)
60983      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60984      has_space=`$ECHO "$path" | $GREP " "`
60985      if test "x$has_space" != x; then
60986        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60987$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60988        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60989      fi
60990
60991      # Use eval to expand a potential ~
60992      eval path="$path"
60993      if test ! -f "$path" && test ! -d "$path"; then
60994        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60995      fi
60996
60997      if test -d "$path"; then
60998        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60999      else
61000        dir="`$DIRNAME "$path"`"
61001        base="`$BASENAME "$path"`"
61002        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61003      fi
61004    fi
61005  fi
61006
61007
61008  # Only process if variable expands to non-empty
61009
61010  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61011    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61012
61013  # Input might be given as Windows format, start by converting to
61014  # unix format.
61015  path="$POTENTIAL_FREETYPE_LIB_PATH"
61016  new_path=`$CYGPATH -u "$path"`
61017
61018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61021  # "foo.exe" is OK but "foo" is an error.
61022  #
61023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61024  # It is also a way to make sure we got the proper file name for the real test later on.
61025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61026  if test "x$test_shortpath" = x; then
61027    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61028$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61029    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61030  fi
61031
61032  # Call helper function which possibly converts this using DOS-style short mode.
61033  # If so, the updated path is stored in $new_path.
61034
61035  input_path="$new_path"
61036  # Check if we need to convert this using DOS-style short mode. If the path
61037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61038  # take no chances and rewrite it.
61039  # Note: m4 eats our [], so we need to use [ and ] instead.
61040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61041  if test "x$has_forbidden_chars" != x; then
61042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61046      # Going to short mode and back again did indeed matter. Since short mode is
61047      # case insensitive, let's make it lowercase to improve readability.
61048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61049      # Now convert it back to Unix-style (cygpath)
61050      input_path=`$CYGPATH -u "$shortmode_path"`
61051      new_path="$input_path"
61052    fi
61053  fi
61054
61055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61056  if test "x$test_cygdrive_prefix" = x; then
61057    # As a simple fix, exclude /usr/bin since it's not a real path.
61058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61060      # a path prefixed by /cygdrive for fixpath to work.
61061      new_path="$CYGWIN_ROOT_PATH$input_path"
61062    fi
61063  fi
61064
61065
61066  if test "x$path" != "x$new_path"; then
61067    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61069$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61070  fi
61071
61072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61073
61074  path="$POTENTIAL_FREETYPE_LIB_PATH"
61075  has_colon=`$ECHO $path | $GREP ^.:`
61076  new_path="$path"
61077  if test "x$has_colon" = x; then
61078    # Not in mixed or Windows style, start by that.
61079    new_path=`cmd //c echo $path`
61080  fi
61081
61082
61083  input_path="$new_path"
61084  # Check if we need to convert this using DOS-style short mode. If the path
61085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61086  # take no chances and rewrite it.
61087  # Note: m4 eats our [], so we need to use [ and ] instead.
61088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61089  if test "x$has_forbidden_chars" != x; then
61090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61092  fi
61093
61094
61095  windows_path="$new_path"
61096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61097    unix_path=`$CYGPATH -u "$windows_path"`
61098    new_path="$unix_path"
61099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61101    new_path="$unix_path"
61102  fi
61103
61104  if test "x$path" != "x$new_path"; then
61105    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61107$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61108  fi
61109
61110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61112
61113    else
61114      # We're on a unix platform. Hooray! :)
61115      path="$POTENTIAL_FREETYPE_LIB_PATH"
61116      has_space=`$ECHO "$path" | $GREP " "`
61117      if test "x$has_space" != x; then
61118        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61119$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61120        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61121      fi
61122
61123      # Use eval to expand a potential ~
61124      eval path="$path"
61125      if test ! -f "$path" && test ! -d "$path"; then
61126        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61127      fi
61128
61129      if test -d "$path"; then
61130        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61131      else
61132        dir="`$DIRNAME "$path"`"
61133        base="`$BASENAME "$path"`"
61134        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61135      fi
61136    fi
61137  fi
61138
61139
61140    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61142$as_echo_n "checking for freetype includes... " >&6; }
61143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61144$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61145    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61147$as_echo_n "checking for freetype libraries... " >&6; }
61148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61149$as_echo "$FREETYPE_LIB_PATH" >&6; }
61150  fi
61151
61152            fi
61153          fi
61154
61155          if test "x$FOUND_FREETYPE" != xyes; then
61156            FREETYPE_BASE_DIR="$SYSROOT/usr"
61157            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61158
61159  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61160  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61161  METHOD="well-known location"
61162
61163  # Let's start with an optimistic view of the world :-)
61164  FOUND_FREETYPE=yes
61165
61166  # First look for the canonical freetype main include file ft2build.h.
61167  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61168    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61169    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61170    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61171      # Fail.
61172      FOUND_FREETYPE=no
61173    fi
61174  fi
61175
61176  if test "x$FOUND_FREETYPE" = xyes; then
61177    # Include file found, let's continue the sanity check.
61178    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61179$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61180
61181    # Reset to default value
61182    FREETYPE_BASE_NAME=freetype
61183    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61184    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61185      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61186          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61187        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61188        # for the .6 version explicitly.
61189        FREETYPE_BASE_NAME=freetype.6
61190        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61191        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61192$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61193      else
61194        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61195$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61196        FOUND_FREETYPE=no
61197      fi
61198    else
61199      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61200        # On Windows, we will need both .lib and .dll file.
61201        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61202          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61203$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61204          FOUND_FREETYPE=no
61205        fi
61206      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61207          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61208        # Found lib in isa dir, use that instead.
61209        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61210        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61211$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61212      fi
61213    fi
61214  fi
61215
61216  if test "x$FOUND_FREETYPE" = xyes; then
61217
61218  # Only process if variable expands to non-empty
61219
61220  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61221    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61222
61223  # Input might be given as Windows format, start by converting to
61224  # unix format.
61225  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61226  new_path=`$CYGPATH -u "$path"`
61227
61228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61231  # "foo.exe" is OK but "foo" is an error.
61232  #
61233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61234  # It is also a way to make sure we got the proper file name for the real test later on.
61235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61236  if test "x$test_shortpath" = x; then
61237    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61238$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61239    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61240  fi
61241
61242  # Call helper function which possibly converts this using DOS-style short mode.
61243  # If so, the updated path is stored in $new_path.
61244
61245  input_path="$new_path"
61246  # Check if we need to convert this using DOS-style short mode. If the path
61247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61248  # take no chances and rewrite it.
61249  # Note: m4 eats our [], so we need to use [ and ] instead.
61250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61251  if test "x$has_forbidden_chars" != x; then
61252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61256      # Going to short mode and back again did indeed matter. Since short mode is
61257      # case insensitive, let's make it lowercase to improve readability.
61258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61259      # Now convert it back to Unix-style (cygpath)
61260      input_path=`$CYGPATH -u "$shortmode_path"`
61261      new_path="$input_path"
61262    fi
61263  fi
61264
61265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61266  if test "x$test_cygdrive_prefix" = x; then
61267    # As a simple fix, exclude /usr/bin since it's not a real path.
61268    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61270      # a path prefixed by /cygdrive for fixpath to work.
61271      new_path="$CYGWIN_ROOT_PATH$input_path"
61272    fi
61273  fi
61274
61275
61276  if test "x$path" != "x$new_path"; then
61277    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61279$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61280  fi
61281
61282    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61283
61284  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61285  has_colon=`$ECHO $path | $GREP ^.:`
61286  new_path="$path"
61287  if test "x$has_colon" = x; then
61288    # Not in mixed or Windows style, start by that.
61289    new_path=`cmd //c echo $path`
61290  fi
61291
61292
61293  input_path="$new_path"
61294  # Check if we need to convert this using DOS-style short mode. If the path
61295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61296  # take no chances and rewrite it.
61297  # Note: m4 eats our [], so we need to use [ and ] instead.
61298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61299  if test "x$has_forbidden_chars" != x; then
61300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61302  fi
61303
61304
61305  windows_path="$new_path"
61306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61307    unix_path=`$CYGPATH -u "$windows_path"`
61308    new_path="$unix_path"
61309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61311    new_path="$unix_path"
61312  fi
61313
61314  if test "x$path" != "x$new_path"; then
61315    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61317$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61318  fi
61319
61320  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61321  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61322
61323    else
61324      # We're on a unix platform. Hooray! :)
61325      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61326      has_space=`$ECHO "$path" | $GREP " "`
61327      if test "x$has_space" != x; then
61328        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61329$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61330        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61331      fi
61332
61333      # Use eval to expand a potential ~
61334      eval path="$path"
61335      if test ! -f "$path" && test ! -d "$path"; then
61336        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61337      fi
61338
61339      if test -d "$path"; then
61340        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61341      else
61342        dir="`$DIRNAME "$path"`"
61343        base="`$BASENAME "$path"`"
61344        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61345      fi
61346    fi
61347  fi
61348
61349
61350  # Only process if variable expands to non-empty
61351
61352  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61354
61355  # Input might be given as Windows format, start by converting to
61356  # unix format.
61357  path="$POTENTIAL_FREETYPE_LIB_PATH"
61358  new_path=`$CYGPATH -u "$path"`
61359
61360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61363  # "foo.exe" is OK but "foo" is an error.
61364  #
61365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61366  # It is also a way to make sure we got the proper file name for the real test later on.
61367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61368  if test "x$test_shortpath" = x; then
61369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61370$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61371    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61372  fi
61373
61374  # Call helper function which possibly converts this using DOS-style short mode.
61375  # If so, the updated path is stored in $new_path.
61376
61377  input_path="$new_path"
61378  # Check if we need to convert this using DOS-style short mode. If the path
61379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61380  # take no chances and rewrite it.
61381  # Note: m4 eats our [], so we need to use [ and ] instead.
61382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61383  if test "x$has_forbidden_chars" != x; then
61384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61388      # Going to short mode and back again did indeed matter. Since short mode is
61389      # case insensitive, let's make it lowercase to improve readability.
61390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61391      # Now convert it back to Unix-style (cygpath)
61392      input_path=`$CYGPATH -u "$shortmode_path"`
61393      new_path="$input_path"
61394    fi
61395  fi
61396
61397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61398  if test "x$test_cygdrive_prefix" = x; then
61399    # As a simple fix, exclude /usr/bin since it's not a real path.
61400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61402      # a path prefixed by /cygdrive for fixpath to work.
61403      new_path="$CYGWIN_ROOT_PATH$input_path"
61404    fi
61405  fi
61406
61407
61408  if test "x$path" != "x$new_path"; then
61409    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61411$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61412  fi
61413
61414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61415
61416  path="$POTENTIAL_FREETYPE_LIB_PATH"
61417  has_colon=`$ECHO $path | $GREP ^.:`
61418  new_path="$path"
61419  if test "x$has_colon" = x; then
61420    # Not in mixed or Windows style, start by that.
61421    new_path=`cmd //c echo $path`
61422  fi
61423
61424
61425  input_path="$new_path"
61426  # Check if we need to convert this using DOS-style short mode. If the path
61427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61428  # take no chances and rewrite it.
61429  # Note: m4 eats our [], so we need to use [ and ] instead.
61430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61431  if test "x$has_forbidden_chars" != x; then
61432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61434  fi
61435
61436
61437  windows_path="$new_path"
61438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61439    unix_path=`$CYGPATH -u "$windows_path"`
61440    new_path="$unix_path"
61441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61443    new_path="$unix_path"
61444  fi
61445
61446  if test "x$path" != "x$new_path"; then
61447    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61449$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61450  fi
61451
61452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61454
61455    else
61456      # We're on a unix platform. Hooray! :)
61457      path="$POTENTIAL_FREETYPE_LIB_PATH"
61458      has_space=`$ECHO "$path" | $GREP " "`
61459      if test "x$has_space" != x; then
61460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61461$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61462        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61463      fi
61464
61465      # Use eval to expand a potential ~
61466      eval path="$path"
61467      if test ! -f "$path" && test ! -d "$path"; then
61468        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61469      fi
61470
61471      if test -d "$path"; then
61472        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61473      else
61474        dir="`$DIRNAME "$path"`"
61475        base="`$BASENAME "$path"`"
61476        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61477      fi
61478    fi
61479  fi
61480
61481
61482    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61483    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61484$as_echo_n "checking for freetype includes... " >&6; }
61485    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61486$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61487    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61489$as_echo_n "checking for freetype libraries... " >&6; }
61490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61491$as_echo "$FREETYPE_LIB_PATH" >&6; }
61492  fi
61493
61494            else
61495
61496  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61497  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61498  METHOD="well-known location"
61499
61500  # Let's start with an optimistic view of the world :-)
61501  FOUND_FREETYPE=yes
61502
61503  # First look for the canonical freetype main include file ft2build.h.
61504  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61505    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61506    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61507    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61508      # Fail.
61509      FOUND_FREETYPE=no
61510    fi
61511  fi
61512
61513  if test "x$FOUND_FREETYPE" = xyes; then
61514    # Include file found, let's continue the sanity check.
61515    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61516$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61517
61518    # Reset to default value
61519    FREETYPE_BASE_NAME=freetype
61520    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61521    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61522      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61523          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61524        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61525        # for the .6 version explicitly.
61526        FREETYPE_BASE_NAME=freetype.6
61527        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61528        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61529$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61530      else
61531        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61532$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61533        FOUND_FREETYPE=no
61534      fi
61535    else
61536      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61537        # On Windows, we will need both .lib and .dll file.
61538        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61539          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61540$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61541          FOUND_FREETYPE=no
61542        fi
61543      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61544          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61545        # Found lib in isa dir, use that instead.
61546        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61547        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61548$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61549      fi
61550    fi
61551  fi
61552
61553  if test "x$FOUND_FREETYPE" = xyes; then
61554
61555  # Only process if variable expands to non-empty
61556
61557  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61559
61560  # Input might be given as Windows format, start by converting to
61561  # unix format.
61562  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61563  new_path=`$CYGPATH -u "$path"`
61564
61565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61568  # "foo.exe" is OK but "foo" is an error.
61569  #
61570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61571  # It is also a way to make sure we got the proper file name for the real test later on.
61572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61573  if test "x$test_shortpath" = x; then
61574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61575$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61576    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61577  fi
61578
61579  # Call helper function which possibly converts this using DOS-style short mode.
61580  # If so, the updated path is stored in $new_path.
61581
61582  input_path="$new_path"
61583  # Check if we need to convert this using DOS-style short mode. If the path
61584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61585  # take no chances and rewrite it.
61586  # Note: m4 eats our [], so we need to use [ and ] instead.
61587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61588  if test "x$has_forbidden_chars" != x; then
61589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61593      # Going to short mode and back again did indeed matter. Since short mode is
61594      # case insensitive, let's make it lowercase to improve readability.
61595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61596      # Now convert it back to Unix-style (cygpath)
61597      input_path=`$CYGPATH -u "$shortmode_path"`
61598      new_path="$input_path"
61599    fi
61600  fi
61601
61602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61603  if test "x$test_cygdrive_prefix" = x; then
61604    # As a simple fix, exclude /usr/bin since it's not a real path.
61605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61607      # a path prefixed by /cygdrive for fixpath to work.
61608      new_path="$CYGWIN_ROOT_PATH$input_path"
61609    fi
61610  fi
61611
61612
61613  if test "x$path" != "x$new_path"; then
61614    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61616$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61617  fi
61618
61619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61620
61621  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61622  has_colon=`$ECHO $path | $GREP ^.:`
61623  new_path="$path"
61624  if test "x$has_colon" = x; then
61625    # Not in mixed or Windows style, start by that.
61626    new_path=`cmd //c echo $path`
61627  fi
61628
61629
61630  input_path="$new_path"
61631  # Check if we need to convert this using DOS-style short mode. If the path
61632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61633  # take no chances and rewrite it.
61634  # Note: m4 eats our [], so we need to use [ and ] instead.
61635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61636  if test "x$has_forbidden_chars" != x; then
61637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61639  fi
61640
61641
61642  windows_path="$new_path"
61643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61644    unix_path=`$CYGPATH -u "$windows_path"`
61645    new_path="$unix_path"
61646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61648    new_path="$unix_path"
61649  fi
61650
61651  if test "x$path" != "x$new_path"; then
61652    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61654$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61655  fi
61656
61657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61659
61660    else
61661      # We're on a unix platform. Hooray! :)
61662      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61663      has_space=`$ECHO "$path" | $GREP " "`
61664      if test "x$has_space" != x; then
61665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61666$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61668      fi
61669
61670      # Use eval to expand a potential ~
61671      eval path="$path"
61672      if test ! -f "$path" && test ! -d "$path"; then
61673        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61674      fi
61675
61676      if test -d "$path"; then
61677        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61678      else
61679        dir="`$DIRNAME "$path"`"
61680        base="`$BASENAME "$path"`"
61681        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61682      fi
61683    fi
61684  fi
61685
61686
61687  # Only process if variable expands to non-empty
61688
61689  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61690    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61691
61692  # Input might be given as Windows format, start by converting to
61693  # unix format.
61694  path="$POTENTIAL_FREETYPE_LIB_PATH"
61695  new_path=`$CYGPATH -u "$path"`
61696
61697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61700  # "foo.exe" is OK but "foo" is an error.
61701  #
61702  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61703  # It is also a way to make sure we got the proper file name for the real test later on.
61704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61705  if test "x$test_shortpath" = x; then
61706    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61707$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61708    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61709  fi
61710
61711  # Call helper function which possibly converts this using DOS-style short mode.
61712  # If so, the updated path is stored in $new_path.
61713
61714  input_path="$new_path"
61715  # Check if we need to convert this using DOS-style short mode. If the path
61716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61717  # take no chances and rewrite it.
61718  # Note: m4 eats our [], so we need to use [ and ] instead.
61719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61720  if test "x$has_forbidden_chars" != x; then
61721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61725      # Going to short mode and back again did indeed matter. Since short mode is
61726      # case insensitive, let's make it lowercase to improve readability.
61727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61728      # Now convert it back to Unix-style (cygpath)
61729      input_path=`$CYGPATH -u "$shortmode_path"`
61730      new_path="$input_path"
61731    fi
61732  fi
61733
61734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61735  if test "x$test_cygdrive_prefix" = x; then
61736    # As a simple fix, exclude /usr/bin since it's not a real path.
61737    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61739      # a path prefixed by /cygdrive for fixpath to work.
61740      new_path="$CYGWIN_ROOT_PATH$input_path"
61741    fi
61742  fi
61743
61744
61745  if test "x$path" != "x$new_path"; then
61746    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61748$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61749  fi
61750
61751    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61752
61753  path="$POTENTIAL_FREETYPE_LIB_PATH"
61754  has_colon=`$ECHO $path | $GREP ^.:`
61755  new_path="$path"
61756  if test "x$has_colon" = x; then
61757    # Not in mixed or Windows style, start by that.
61758    new_path=`cmd //c echo $path`
61759  fi
61760
61761
61762  input_path="$new_path"
61763  # Check if we need to convert this using DOS-style short mode. If the path
61764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61765  # take no chances and rewrite it.
61766  # Note: m4 eats our [], so we need to use [ and ] instead.
61767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61768  if test "x$has_forbidden_chars" != x; then
61769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61771  fi
61772
61773
61774  windows_path="$new_path"
61775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61776    unix_path=`$CYGPATH -u "$windows_path"`
61777    new_path="$unix_path"
61778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61780    new_path="$unix_path"
61781  fi
61782
61783  if test "x$path" != "x$new_path"; then
61784    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61786$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61787  fi
61788
61789  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61790  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61791
61792    else
61793      # We're on a unix platform. Hooray! :)
61794      path="$POTENTIAL_FREETYPE_LIB_PATH"
61795      has_space=`$ECHO "$path" | $GREP " "`
61796      if test "x$has_space" != x; then
61797        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61798$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61799        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61800      fi
61801
61802      # Use eval to expand a potential ~
61803      eval path="$path"
61804      if test ! -f "$path" && test ! -d "$path"; then
61805        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61806      fi
61807
61808      if test -d "$path"; then
61809        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61810      else
61811        dir="`$DIRNAME "$path"`"
61812        base="`$BASENAME "$path"`"
61813        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61814      fi
61815    fi
61816  fi
61817
61818
61819    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61820    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61821$as_echo_n "checking for freetype includes... " >&6; }
61822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61823$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61824    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61826$as_echo_n "checking for freetype libraries... " >&6; }
61827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61828$as_echo "$FREETYPE_LIB_PATH" >&6; }
61829  fi
61830
61831              if test "x$FOUND_FREETYPE" != xyes; then
61832
61833  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61834  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61835  METHOD="well-known location"
61836
61837  # Let's start with an optimistic view of the world :-)
61838  FOUND_FREETYPE=yes
61839
61840  # First look for the canonical freetype main include file ft2build.h.
61841  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61842    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61843    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61844    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61845      # Fail.
61846      FOUND_FREETYPE=no
61847    fi
61848  fi
61849
61850  if test "x$FOUND_FREETYPE" = xyes; then
61851    # Include file found, let's continue the sanity check.
61852    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61853$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61854
61855    # Reset to default value
61856    FREETYPE_BASE_NAME=freetype
61857    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61858    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61859      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61860          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61861        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61862        # for the .6 version explicitly.
61863        FREETYPE_BASE_NAME=freetype.6
61864        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61865        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61866$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61867      else
61868        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61869$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61870        FOUND_FREETYPE=no
61871      fi
61872    else
61873      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61874        # On Windows, we will need both .lib and .dll file.
61875        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61876          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61877$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61878          FOUND_FREETYPE=no
61879        fi
61880      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61881          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61882        # Found lib in isa dir, use that instead.
61883        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61884        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61885$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61886      fi
61887    fi
61888  fi
61889
61890  if test "x$FOUND_FREETYPE" = xyes; then
61891
61892  # Only process if variable expands to non-empty
61893
61894  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61895    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61896
61897  # Input might be given as Windows format, start by converting to
61898  # unix format.
61899  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61900  new_path=`$CYGPATH -u "$path"`
61901
61902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61905  # "foo.exe" is OK but "foo" is an error.
61906  #
61907  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61908  # It is also a way to make sure we got the proper file name for the real test later on.
61909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61910  if test "x$test_shortpath" = x; then
61911    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61912$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61913    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61914  fi
61915
61916  # Call helper function which possibly converts this using DOS-style short mode.
61917  # If so, the updated path is stored in $new_path.
61918
61919  input_path="$new_path"
61920  # Check if we need to convert this using DOS-style short mode. If the path
61921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61922  # take no chances and rewrite it.
61923  # Note: m4 eats our [], so we need to use [ and ] instead.
61924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61925  if test "x$has_forbidden_chars" != x; then
61926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61930      # Going to short mode and back again did indeed matter. Since short mode is
61931      # case insensitive, let's make it lowercase to improve readability.
61932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61933      # Now convert it back to Unix-style (cygpath)
61934      input_path=`$CYGPATH -u "$shortmode_path"`
61935      new_path="$input_path"
61936    fi
61937  fi
61938
61939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61940  if test "x$test_cygdrive_prefix" = x; then
61941    # As a simple fix, exclude /usr/bin since it's not a real path.
61942    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61944      # a path prefixed by /cygdrive for fixpath to work.
61945      new_path="$CYGWIN_ROOT_PATH$input_path"
61946    fi
61947  fi
61948
61949
61950  if test "x$path" != "x$new_path"; then
61951    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61953$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61954  fi
61955
61956    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61957
61958  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61959  has_colon=`$ECHO $path | $GREP ^.:`
61960  new_path="$path"
61961  if test "x$has_colon" = x; then
61962    # Not in mixed or Windows style, start by that.
61963    new_path=`cmd //c echo $path`
61964  fi
61965
61966
61967  input_path="$new_path"
61968  # Check if we need to convert this using DOS-style short mode. If the path
61969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61970  # take no chances and rewrite it.
61971  # Note: m4 eats our [], so we need to use [ and ] instead.
61972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61973  if test "x$has_forbidden_chars" != x; then
61974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61976  fi
61977
61978
61979  windows_path="$new_path"
61980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61981    unix_path=`$CYGPATH -u "$windows_path"`
61982    new_path="$unix_path"
61983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61985    new_path="$unix_path"
61986  fi
61987
61988  if test "x$path" != "x$new_path"; then
61989    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61991$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61992  fi
61993
61994  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61995  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61996
61997    else
61998      # We're on a unix platform. Hooray! :)
61999      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62000      has_space=`$ECHO "$path" | $GREP " "`
62001      if test "x$has_space" != x; then
62002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62003$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62004        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62005      fi
62006
62007      # Use eval to expand a potential ~
62008      eval path="$path"
62009      if test ! -f "$path" && test ! -d "$path"; then
62010        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62011      fi
62012
62013      if test -d "$path"; then
62014        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62015      else
62016        dir="`$DIRNAME "$path"`"
62017        base="`$BASENAME "$path"`"
62018        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62019      fi
62020    fi
62021  fi
62022
62023
62024  # Only process if variable expands to non-empty
62025
62026  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62027    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62028
62029  # Input might be given as Windows format, start by converting to
62030  # unix format.
62031  path="$POTENTIAL_FREETYPE_LIB_PATH"
62032  new_path=`$CYGPATH -u "$path"`
62033
62034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62037  # "foo.exe" is OK but "foo" is an error.
62038  #
62039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62040  # It is also a way to make sure we got the proper file name for the real test later on.
62041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62042  if test "x$test_shortpath" = x; then
62043    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62044$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62045    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62046  fi
62047
62048  # Call helper function which possibly converts this using DOS-style short mode.
62049  # If so, the updated path is stored in $new_path.
62050
62051  input_path="$new_path"
62052  # Check if we need to convert this using DOS-style short mode. If the path
62053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62054  # take no chances and rewrite it.
62055  # Note: m4 eats our [], so we need to use [ and ] instead.
62056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62057  if test "x$has_forbidden_chars" != x; then
62058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62062      # Going to short mode and back again did indeed matter. Since short mode is
62063      # case insensitive, let's make it lowercase to improve readability.
62064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62065      # Now convert it back to Unix-style (cygpath)
62066      input_path=`$CYGPATH -u "$shortmode_path"`
62067      new_path="$input_path"
62068    fi
62069  fi
62070
62071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62072  if test "x$test_cygdrive_prefix" = x; then
62073    # As a simple fix, exclude /usr/bin since it's not a real path.
62074    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62076      # a path prefixed by /cygdrive for fixpath to work.
62077      new_path="$CYGWIN_ROOT_PATH$input_path"
62078    fi
62079  fi
62080
62081
62082  if test "x$path" != "x$new_path"; then
62083    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62085$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62086  fi
62087
62088    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62089
62090  path="$POTENTIAL_FREETYPE_LIB_PATH"
62091  has_colon=`$ECHO $path | $GREP ^.:`
62092  new_path="$path"
62093  if test "x$has_colon" = x; then
62094    # Not in mixed or Windows style, start by that.
62095    new_path=`cmd //c echo $path`
62096  fi
62097
62098
62099  input_path="$new_path"
62100  # Check if we need to convert this using DOS-style short mode. If the path
62101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62102  # take no chances and rewrite it.
62103  # Note: m4 eats our [], so we need to use [ and ] instead.
62104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62105  if test "x$has_forbidden_chars" != x; then
62106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62108  fi
62109
62110
62111  windows_path="$new_path"
62112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62113    unix_path=`$CYGPATH -u "$windows_path"`
62114    new_path="$unix_path"
62115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62117    new_path="$unix_path"
62118  fi
62119
62120  if test "x$path" != "x$new_path"; then
62121    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62123$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62124  fi
62125
62126  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62127  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62128
62129    else
62130      # We're on a unix platform. Hooray! :)
62131      path="$POTENTIAL_FREETYPE_LIB_PATH"
62132      has_space=`$ECHO "$path" | $GREP " "`
62133      if test "x$has_space" != x; then
62134        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62135$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62136        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62137      fi
62138
62139      # Use eval to expand a potential ~
62140      eval path="$path"
62141      if test ! -f "$path" && test ! -d "$path"; then
62142        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62143      fi
62144
62145      if test -d "$path"; then
62146        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62147      else
62148        dir="`$DIRNAME "$path"`"
62149        base="`$BASENAME "$path"`"
62150        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62151      fi
62152    fi
62153  fi
62154
62155
62156    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62158$as_echo_n "checking for freetype includes... " >&6; }
62159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62160$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62161    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62163$as_echo_n "checking for freetype libraries... " >&6; }
62164    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62165$as_echo "$FREETYPE_LIB_PATH" >&6; }
62166  fi
62167
62168              fi
62169            fi
62170          fi
62171        fi
62172      fi # end check in well-known locations
62173
62174      if test "x$FOUND_FREETYPE" != xyes; then
62175
62176  # Print a helpful message on how to acquire the necessary build dependency.
62177  # freetype is the help tag: freetype, cups, alsa etc
62178  MISSING_DEPENDENCY=freetype
62179
62180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62181    cygwin_help $MISSING_DEPENDENCY
62182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62183    msys_help $MISSING_DEPENDENCY
62184  else
62185    PKGHANDLER_COMMAND=
62186
62187    case $PKGHANDLER in
62188      apt-get)
62189        apt_help     $MISSING_DEPENDENCY ;;
62190      yum)
62191        yum_help     $MISSING_DEPENDENCY ;;
62192      brew)
62193        brew_help    $MISSING_DEPENDENCY ;;
62194      port)
62195        port_help    $MISSING_DEPENDENCY ;;
62196      pkgutil)
62197        pkgutil_help $MISSING_DEPENDENCY ;;
62198      pkgadd)
62199        pkgadd_help  $MISSING_DEPENDENCY ;;
62200    esac
62201
62202    if test "x$PKGHANDLER_COMMAND" != x; then
62203      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62204    fi
62205  fi
62206
62207        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62208      fi
62209    fi # end user specified settings
62210
62211    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62212    if test "x$FREETYPE_CFLAGS" = x; then
62213
62214  # Only process if variable expands to non-empty
62215
62216  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62218
62219  # Input might be given as Windows format, start by converting to
62220  # unix format.
62221  path="$FREETYPE_INCLUDE_PATH"
62222  new_path=`$CYGPATH -u "$path"`
62223
62224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62227  # "foo.exe" is OK but "foo" is an error.
62228  #
62229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62230  # It is also a way to make sure we got the proper file name for the real test later on.
62231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62232  if test "x$test_shortpath" = x; then
62233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62234$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62235    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62236  fi
62237
62238  # Call helper function which possibly converts this using DOS-style short mode.
62239  # If so, the updated path is stored in $new_path.
62240
62241  input_path="$new_path"
62242  # Check if we need to convert this using DOS-style short mode. If the path
62243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62244  # take no chances and rewrite it.
62245  # Note: m4 eats our [], so we need to use [ and ] instead.
62246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62247  if test "x$has_forbidden_chars" != x; then
62248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62252      # Going to short mode and back again did indeed matter. Since short mode is
62253      # case insensitive, let's make it lowercase to improve readability.
62254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62255      # Now convert it back to Unix-style (cygpath)
62256      input_path=`$CYGPATH -u "$shortmode_path"`
62257      new_path="$input_path"
62258    fi
62259  fi
62260
62261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62262  if test "x$test_cygdrive_prefix" = x; then
62263    # As a simple fix, exclude /usr/bin since it's not a real path.
62264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62266      # a path prefixed by /cygdrive for fixpath to work.
62267      new_path="$CYGWIN_ROOT_PATH$input_path"
62268    fi
62269  fi
62270
62271
62272  if test "x$path" != "x$new_path"; then
62273    FREETYPE_INCLUDE_PATH="$new_path"
62274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62275$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62276  fi
62277
62278    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62279
62280  path="$FREETYPE_INCLUDE_PATH"
62281  has_colon=`$ECHO $path | $GREP ^.:`
62282  new_path="$path"
62283  if test "x$has_colon" = x; then
62284    # Not in mixed or Windows style, start by that.
62285    new_path=`cmd //c echo $path`
62286  fi
62287
62288
62289  input_path="$new_path"
62290  # Check if we need to convert this using DOS-style short mode. If the path
62291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62292  # take no chances and rewrite it.
62293  # Note: m4 eats our [], so we need to use [ and ] instead.
62294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62295  if test "x$has_forbidden_chars" != x; then
62296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62298  fi
62299
62300
62301  windows_path="$new_path"
62302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62303    unix_path=`$CYGPATH -u "$windows_path"`
62304    new_path="$unix_path"
62305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62307    new_path="$unix_path"
62308  fi
62309
62310  if test "x$path" != "x$new_path"; then
62311    FREETYPE_INCLUDE_PATH="$new_path"
62312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62313$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62314  fi
62315
62316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62318
62319    else
62320      # We're on a unix platform. Hooray! :)
62321      path="$FREETYPE_INCLUDE_PATH"
62322      has_space=`$ECHO "$path" | $GREP " "`
62323      if test "x$has_space" != x; then
62324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62325$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62326        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62327      fi
62328
62329      # Use eval to expand a potential ~
62330      eval path="$path"
62331      if test ! -f "$path" && test ! -d "$path"; then
62332        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62333      fi
62334
62335      if test -d "$path"; then
62336        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62337      else
62338        dir="`$DIRNAME "$path"`"
62339        base="`$BASENAME "$path"`"
62340        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62341      fi
62342    fi
62343  fi
62344
62345      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62346        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62347      else
62348        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62349      fi
62350    fi
62351
62352    if test "x$FREETYPE_LIBS" = x; then
62353
62354  # Only process if variable expands to non-empty
62355
62356  if test "x$FREETYPE_LIB_PATH" != x; then
62357    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62358
62359  # Input might be given as Windows format, start by converting to
62360  # unix format.
62361  path="$FREETYPE_LIB_PATH"
62362  new_path=`$CYGPATH -u "$path"`
62363
62364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62367  # "foo.exe" is OK but "foo" is an error.
62368  #
62369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62370  # It is also a way to make sure we got the proper file name for the real test later on.
62371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62372  if test "x$test_shortpath" = x; then
62373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62374$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62375    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62376  fi
62377
62378  # Call helper function which possibly converts this using DOS-style short mode.
62379  # If so, the updated path is stored in $new_path.
62380
62381  input_path="$new_path"
62382  # Check if we need to convert this using DOS-style short mode. If the path
62383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62384  # take no chances and rewrite it.
62385  # Note: m4 eats our [], so we need to use [ and ] instead.
62386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62387  if test "x$has_forbidden_chars" != x; then
62388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62392      # Going to short mode and back again did indeed matter. Since short mode is
62393      # case insensitive, let's make it lowercase to improve readability.
62394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62395      # Now convert it back to Unix-style (cygpath)
62396      input_path=`$CYGPATH -u "$shortmode_path"`
62397      new_path="$input_path"
62398    fi
62399  fi
62400
62401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62402  if test "x$test_cygdrive_prefix" = x; then
62403    # As a simple fix, exclude /usr/bin since it's not a real path.
62404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62406      # a path prefixed by /cygdrive for fixpath to work.
62407      new_path="$CYGWIN_ROOT_PATH$input_path"
62408    fi
62409  fi
62410
62411
62412  if test "x$path" != "x$new_path"; then
62413    FREETYPE_LIB_PATH="$new_path"
62414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62415$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62416  fi
62417
62418    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62419
62420  path="$FREETYPE_LIB_PATH"
62421  has_colon=`$ECHO $path | $GREP ^.:`
62422  new_path="$path"
62423  if test "x$has_colon" = x; then
62424    # Not in mixed or Windows style, start by that.
62425    new_path=`cmd //c echo $path`
62426  fi
62427
62428
62429  input_path="$new_path"
62430  # Check if we need to convert this using DOS-style short mode. If the path
62431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62432  # take no chances and rewrite it.
62433  # Note: m4 eats our [], so we need to use [ and ] instead.
62434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62435  if test "x$has_forbidden_chars" != x; then
62436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62438  fi
62439
62440
62441  windows_path="$new_path"
62442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62443    unix_path=`$CYGPATH -u "$windows_path"`
62444    new_path="$unix_path"
62445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62447    new_path="$unix_path"
62448  fi
62449
62450  if test "x$path" != "x$new_path"; then
62451    FREETYPE_LIB_PATH="$new_path"
62452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62453$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62454  fi
62455
62456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62458
62459    else
62460      # We're on a unix platform. Hooray! :)
62461      path="$FREETYPE_LIB_PATH"
62462      has_space=`$ECHO "$path" | $GREP " "`
62463      if test "x$has_space" != x; then
62464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62465$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62466        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62467      fi
62468
62469      # Use eval to expand a potential ~
62470      eval path="$path"
62471      if test ! -f "$path" && test ! -d "$path"; then
62472        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62473      fi
62474
62475      if test -d "$path"; then
62476        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62477      else
62478        dir="`$DIRNAME "$path"`"
62479        base="`$BASENAME "$path"`"
62480        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62481      fi
62482    fi
62483  fi
62484
62485      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62486        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62487      else
62488        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62489      fi
62490    fi
62491
62492    # Try to compile it
62493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62494$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62495    ac_ext=cpp
62496ac_cpp='$CXXCPP $CPPFLAGS'
62497ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62498ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62499ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62500
62501    PREV_CXXCFLAGS="$CXXFLAGS"
62502    PREV_LIBS="$LIBS"
62503    PREV_CXX="$CXX"
62504    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62505    LIBS="$LIBS $FREETYPE_LIBS"
62506    CXX="$FIXPATH $CXX"
62507    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62508/* end confdefs.h.  */
62509
62510          #include<ft2build.h>
62511          #include FT_FREETYPE_H
62512          int main () {
62513            FT_Init_FreeType(NULL);
62514            return 0;
62515          }
62516
62517_ACEOF
62518if ac_fn_cxx_try_link "$LINENO"; then :
62519
62520          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62521$as_echo "yes" >&6; }
62522
62523else
62524
62525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62526$as_echo "no" >&6; }
62527          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62528$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62529          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62530$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62531
62532
62533  # Print a helpful message on how to acquire the necessary build dependency.
62534  # freetype is the help tag: freetype, cups, alsa etc
62535  MISSING_DEPENDENCY=freetype
62536
62537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62538    cygwin_help $MISSING_DEPENDENCY
62539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62540    msys_help $MISSING_DEPENDENCY
62541  else
62542    PKGHANDLER_COMMAND=
62543
62544    case $PKGHANDLER in
62545      apt-get)
62546        apt_help     $MISSING_DEPENDENCY ;;
62547      yum)
62548        yum_help     $MISSING_DEPENDENCY ;;
62549      brew)
62550        brew_help    $MISSING_DEPENDENCY ;;
62551      port)
62552        port_help    $MISSING_DEPENDENCY ;;
62553      pkgutil)
62554        pkgutil_help $MISSING_DEPENDENCY ;;
62555      pkgadd)
62556        pkgadd_help  $MISSING_DEPENDENCY ;;
62557    esac
62558
62559    if test "x$PKGHANDLER_COMMAND" != x; then
62560      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62561    fi
62562  fi
62563
62564
62565          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62566
62567
62568fi
62569rm -f core conftest.err conftest.$ac_objext \
62570    conftest$ac_exeext conftest.$ac_ext
62571    CXXCFLAGS="$PREV_CXXFLAGS"
62572    LIBS="$PREV_LIBS"
62573    CXX="$PREV_CXX"
62574    ac_ext=cpp
62575ac_cpp='$CXXCPP $CPPFLAGS'
62576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62579
62580
62581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62582$as_echo_n "checking if we should bundle freetype... " >&6; }
62583    if test "x$BUNDLE_FREETYPE" = xyes; then
62584      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62585    fi
62586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62587$as_echo "$BUNDLE_FREETYPE" >&6; }
62588
62589  fi # end freetype needed
62590
62591
62592
62593
62594
62595
62596
62597# Check whether --with-alsa was given.
62598if test "${with_alsa+set}" = set; then :
62599  withval=$with_alsa;
62600fi
62601
62602
62603# Check whether --with-alsa-include was given.
62604if test "${with_alsa_include+set}" = set; then :
62605  withval=$with_alsa_include;
62606fi
62607
62608
62609# Check whether --with-alsa-lib was given.
62610if test "${with_alsa_lib+set}" = set; then :
62611  withval=$with_alsa_lib;
62612fi
62613
62614
62615  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62616    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62617        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62618        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62619      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62620$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62621    fi
62622    ALSA_CFLAGS=
62623    ALSA_LIBS=
62624  else
62625    ALSA_FOUND=no
62626
62627    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62628      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62629    fi
62630
62631    if test "x${with_alsa}" != x; then
62632      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62633      ALSA_CFLAGS="-I${with_alsa}/include"
62634      ALSA_FOUND=yes
62635    fi
62636    if test "x${with_alsa_include}" != x; then
62637      ALSA_CFLAGS="-I${with_alsa_include}"
62638      ALSA_FOUND=yes
62639    fi
62640    if test "x${with_alsa_lib}" != x; then
62641      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62642      ALSA_FOUND=yes
62643    fi
62644    # Do not try pkg-config if we have a sysroot set.
62645    if test "x$SYSROOT" = x; then
62646      if test "x$ALSA_FOUND" = xno; then
62647
62648pkg_failed=no
62649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62650$as_echo_n "checking for ALSA... " >&6; }
62651
62652if test -n "$ALSA_CFLAGS"; then
62653    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62654 elif test -n "$PKG_CONFIG"; then
62655    if test -n "$PKG_CONFIG" && \
62656    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62657  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62658  ac_status=$?
62659  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62660  test $ac_status = 0; }; then
62661  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62662else
62663  pkg_failed=yes
62664fi
62665 else
62666    pkg_failed=untried
62667fi
62668if test -n "$ALSA_LIBS"; then
62669    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62670 elif test -n "$PKG_CONFIG"; then
62671    if test -n "$PKG_CONFIG" && \
62672    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62673  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62674  ac_status=$?
62675  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62676  test $ac_status = 0; }; then
62677  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62678else
62679  pkg_failed=yes
62680fi
62681 else
62682    pkg_failed=untried
62683fi
62684
62685
62686
62687if test $pkg_failed = yes; then
62688
62689if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62690        _pkg_short_errors_supported=yes
62691else
62692        _pkg_short_errors_supported=no
62693fi
62694        if test $_pkg_short_errors_supported = yes; then
62695	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62696        else
62697	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62698        fi
62699	# Put the nasty error message in config.log where it belongs
62700	echo "$ALSA_PKG_ERRORS" >&5
62701
62702	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62703$as_echo "no" >&6; }
62704                ALSA_FOUND=no
62705elif test $pkg_failed = untried; then
62706	ALSA_FOUND=no
62707else
62708	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62709	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62711$as_echo "yes" >&6; }
62712	ALSA_FOUND=yes
62713fi
62714      fi
62715    fi
62716    if test "x$ALSA_FOUND" = xno; then
62717      for ac_header in alsa/asoundlib.h
62718do :
62719  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62720if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62721  cat >>confdefs.h <<_ACEOF
62722#define HAVE_ALSA_ASOUNDLIB_H 1
62723_ACEOF
62724
62725            ALSA_FOUND=yes
62726            ALSA_CFLAGS=-Iignoreme
62727            ALSA_LIBS=-lasound
62728            DEFAULT_ALSA=yes
62729
62730else
62731  ALSA_FOUND=no
62732
62733fi
62734
62735done
62736
62737    fi
62738    if test "x$ALSA_FOUND" = xno; then
62739
62740  # Print a helpful message on how to acquire the necessary build dependency.
62741  # alsa is the help tag: freetype, cups, alsa etc
62742  MISSING_DEPENDENCY=alsa
62743
62744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62745    cygwin_help $MISSING_DEPENDENCY
62746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62747    msys_help $MISSING_DEPENDENCY
62748  else
62749    PKGHANDLER_COMMAND=
62750
62751    case $PKGHANDLER in
62752      apt-get)
62753        apt_help     $MISSING_DEPENDENCY ;;
62754      yum)
62755        yum_help     $MISSING_DEPENDENCY ;;
62756      brew)
62757        brew_help    $MISSING_DEPENDENCY ;;
62758      port)
62759        port_help    $MISSING_DEPENDENCY ;;
62760      pkgutil)
62761        pkgutil_help $MISSING_DEPENDENCY ;;
62762      pkgadd)
62763        pkgadd_help  $MISSING_DEPENDENCY ;;
62764    esac
62765
62766    if test "x$PKGHANDLER_COMMAND" != x; then
62767      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62768    fi
62769  fi
62770
62771      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62772    fi
62773  fi
62774
62775
62776
62777
62778
62779
62780# Check whether --with-libffi was given.
62781if test "${with_libffi+set}" = set; then :
62782  withval=$with_libffi;
62783fi
62784
62785
62786# Check whether --with-libffi-include was given.
62787if test "${with_libffi_include+set}" = set; then :
62788  withval=$with_libffi_include;
62789fi
62790
62791
62792# Check whether --with-libffi-lib was given.
62793if test "${with_libffi_lib+set}" = set; then :
62794  withval=$with_libffi_lib;
62795fi
62796
62797  # Check whether --enable-libffi-bundling was given.
62798if test "${enable_libffi_bundling+set}" = set; then :
62799  enableval=$enable_libffi_bundling;
62800fi
62801
62802
62803  if test "x$NEEDS_LIB_FFI" = xfalse; then
62804    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62805        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62806        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62807      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62808$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62809    fi
62810    LIBFFI_CFLAGS=
62811    LIBFFI_LIBS=
62812  else
62813    LIBFFI_FOUND=no
62814
62815    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62816      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62817    fi
62818
62819    if test "x${with_libffi}" != x; then
62820      LIBFFI_LIB_PATH="${with_libffi}/lib"
62821      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62822      LIBFFI_CFLAGS="-I${with_libffi}/include"
62823      LIBFFI_FOUND=yes
62824    fi
62825    if test "x${with_libffi_include}" != x; then
62826      LIBFFI_CFLAGS="-I${with_libffi_include}"
62827      LIBFFI_FOUND=yes
62828    fi
62829    if test "x${with_libffi_lib}" != x; then
62830      LIBFFI_LIB_PATH="${with_libffi_lib}"
62831      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62832      LIBFFI_FOUND=yes
62833    fi
62834    # Do not try pkg-config if we have a sysroot set.
62835    if test "x$SYSROOT" = x; then
62836      if test "x$LIBFFI_FOUND" = xno; then
62837        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62838
62839pkg_failed=no
62840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62841$as_echo_n "checking for LIBFFI... " >&6; }
62842
62843if test -n "$LIBFFI_CFLAGS"; then
62844    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62845 elif test -n "$PKG_CONFIG"; then
62846    if test -n "$PKG_CONFIG" && \
62847    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62848  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62849  ac_status=$?
62850  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62851  test $ac_status = 0; }; then
62852  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62853else
62854  pkg_failed=yes
62855fi
62856 else
62857    pkg_failed=untried
62858fi
62859if test -n "$LIBFFI_LIBS"; then
62860    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62861 elif test -n "$PKG_CONFIG"; then
62862    if test -n "$PKG_CONFIG" && \
62863    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62864  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62865  ac_status=$?
62866  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62867  test $ac_status = 0; }; then
62868  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62869else
62870  pkg_failed=yes
62871fi
62872 else
62873    pkg_failed=untried
62874fi
62875
62876
62877
62878if test $pkg_failed = yes; then
62879
62880if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62881        _pkg_short_errors_supported=yes
62882else
62883        _pkg_short_errors_supported=no
62884fi
62885        if test $_pkg_short_errors_supported = yes; then
62886	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62887        else
62888	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62889        fi
62890	# Put the nasty error message in config.log where it belongs
62891	echo "$LIBFFI_PKG_ERRORS" >&5
62892
62893	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62894$as_echo "no" >&6; }
62895                LIBFFI_FOUND=no
62896elif test $pkg_failed = untried; then
62897	LIBFFI_FOUND=no
62898else
62899	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62900	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62902$as_echo "yes" >&6; }
62903	LIBFFI_FOUND=yes
62904fi
62905      fi
62906    fi
62907    if test "x$LIBFFI_FOUND" = xno; then
62908      for ac_header in ffi.h
62909do :
62910  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62911if test "x$ac_cv_header_ffi_h" = xyes; then :
62912  cat >>confdefs.h <<_ACEOF
62913#define HAVE_FFI_H 1
62914_ACEOF
62915
62916            LIBFFI_FOUND=yes
62917            LIBFFI_CFLAGS=
62918            LIBFFI_LIBS=-lffi
62919
62920else
62921  LIBFFI_FOUND=no
62922
62923fi
62924
62925done
62926
62927    fi
62928    if test "x$LIBFFI_FOUND" = xno; then
62929
62930  # Print a helpful message on how to acquire the necessary build dependency.
62931  # ffi is the help tag: freetype, cups, alsa etc
62932  MISSING_DEPENDENCY=ffi
62933
62934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62935    cygwin_help $MISSING_DEPENDENCY
62936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62937    msys_help $MISSING_DEPENDENCY
62938  else
62939    PKGHANDLER_COMMAND=
62940
62941    case $PKGHANDLER in
62942      apt-get)
62943        apt_help     $MISSING_DEPENDENCY ;;
62944      yum)
62945        yum_help     $MISSING_DEPENDENCY ;;
62946      brew)
62947        brew_help    $MISSING_DEPENDENCY ;;
62948      port)
62949        port_help    $MISSING_DEPENDENCY ;;
62950      pkgutil)
62951        pkgutil_help $MISSING_DEPENDENCY ;;
62952      pkgadd)
62953        pkgadd_help  $MISSING_DEPENDENCY ;;
62954    esac
62955
62956    if test "x$PKGHANDLER_COMMAND" != x; then
62957      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62958    fi
62959  fi
62960
62961      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62962    fi
62963
62964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62965$as_echo_n "checking if libffi works... " >&6; }
62966    ac_ext=c
62967ac_cpp='$CPP $CPPFLAGS'
62968ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62969ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62970ac_compiler_gnu=$ac_cv_c_compiler_gnu
62971
62972    OLD_CFLAGS="$CFLAGS"
62973    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62974    OLD_LIBS="$LIBS"
62975    LIBS="$LIBS $LIBFFI_LIBS"
62976    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62977/* end confdefs.h.  */
62978#include <ffi.h>
62979int
62980main ()
62981{
62982
62983          ffi_call(NULL, NULL, NULL, NULL);
62984          return 0;
62985
62986  ;
62987  return 0;
62988}
62989_ACEOF
62990if ac_fn_c_try_link "$LINENO"; then :
62991  LIBFFI_WORKS=yes
62992else
62993  LIBFFI_WORKS=no
62994
62995fi
62996rm -f core conftest.err conftest.$ac_objext \
62997    conftest$ac_exeext conftest.$ac_ext
62998    CFLAGS="$OLD_CFLAGS"
62999    LIBS="$OLD_LIBS"
63000    ac_ext=cpp
63001ac_cpp='$CXXCPP $CPPFLAGS'
63002ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63003ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63004ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63005
63006    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63007$as_echo "$LIBFFI_WORKS" >&6; }
63008
63009    if test "x$LIBFFI_WORKS" = xno; then
63010
63011  # Print a helpful message on how to acquire the necessary build dependency.
63012  # ffi is the help tag: freetype, cups, alsa etc
63013  MISSING_DEPENDENCY=ffi
63014
63015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63016    cygwin_help $MISSING_DEPENDENCY
63017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63018    msys_help $MISSING_DEPENDENCY
63019  else
63020    PKGHANDLER_COMMAND=
63021
63022    case $PKGHANDLER in
63023      apt-get)
63024        apt_help     $MISSING_DEPENDENCY ;;
63025      yum)
63026        yum_help     $MISSING_DEPENDENCY ;;
63027      brew)
63028        brew_help    $MISSING_DEPENDENCY ;;
63029      port)
63030        port_help    $MISSING_DEPENDENCY ;;
63031      pkgutil)
63032        pkgutil_help $MISSING_DEPENDENCY ;;
63033      pkgadd)
63034        pkgadd_help  $MISSING_DEPENDENCY ;;
63035    esac
63036
63037    if test "x$PKGHANDLER_COMMAND" != x; then
63038      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63039    fi
63040  fi
63041
63042      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63043    fi
63044
63045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63046$as_echo_n "checking if libffi should be bundled... " >&6; }
63047    if test "x$enable_libffi_bundling" = "x"; then
63048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63049$as_echo "no" >&6; }
63050      ENABLE_LIBFFI_BUNDLING=false
63051    elif  test "x$enable_libffi_bundling" = "xno"; then
63052      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63053$as_echo "no, forced" >&6; }
63054      ENABLE_LIBFFI_BUNDLING=false
63055    elif  test "x$enable_libffi_bundling" = "xyes"; then
63056      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63057$as_echo "yes, forced" >&6; }
63058      ENABLE_LIBFFI_BUNDLING=true
63059    else
63060      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63061    fi
63062
63063    # Find the libffi.so.X to bundle
63064    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63065      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63066$as_echo_n "checking for libffi lib file location... " >&6; }
63067      if test "x${LIBFFI_LIB_PATH}" != x; then
63068        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63069          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63070        else
63071          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63072        fi
63073      else
63074        # If we don't have an explicit path, look in a few obvious places
63075        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63076          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63077            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63078          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63079            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63080          else
63081            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63082          fi
63083        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63084          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63085            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63086          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63087            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63088          else
63089            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63090          fi
63091        else
63092          # Fallback on the default /usr/lib dir
63093          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63094            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63095          else
63096            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63097          fi
63098        fi
63099      fi
63100      # Make sure the wildcard is evaluated
63101      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63103$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63104    fi
63105  fi
63106
63107
63108
63109
63110
63111
63112
63113  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63114    # Extract the first word of "llvm-config", so it can be a program name with args.
63115set dummy llvm-config; ac_word=$2
63116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63117$as_echo_n "checking for $ac_word... " >&6; }
63118if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63119  $as_echo_n "(cached) " >&6
63120else
63121  if test -n "$LLVM_CONFIG"; then
63122  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63123else
63124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63125for as_dir in $PATH
63126do
63127  IFS=$as_save_IFS
63128  test -z "$as_dir" && as_dir=.
63129    for ac_exec_ext in '' $ac_executable_extensions; do
63130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63131    ac_cv_prog_LLVM_CONFIG="llvm-config"
63132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63133    break 2
63134  fi
63135done
63136  done
63137IFS=$as_save_IFS
63138
63139fi
63140fi
63141LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63142if test -n "$LLVM_CONFIG"; then
63143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63144$as_echo "$LLVM_CONFIG" >&6; }
63145else
63146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63147$as_echo "no" >&6; }
63148fi
63149
63150
63151
63152    if test "x$LLVM_CONFIG" != xllvm-config; then
63153      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63154    fi
63155
63156    llvm_components="jit mcjit engine nativecodegen native"
63157    unset LLVM_CFLAGS
63158    for flag in $("$LLVM_CONFIG" --cxxflags); do
63159      if echo "${flag}" | grep -q '^-[ID]'; then
63160        if test "${flag}" != "-D_DEBUG" ; then
63161          if test "${LLVM_CFLAGS}" != "" ; then
63162            LLVM_CFLAGS="${LLVM_CFLAGS} "
63163          fi
63164          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63165        fi
63166      fi
63167    done
63168    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63169    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63170
63171    unset LLVM_LDFLAGS
63172    for flag in $("${LLVM_CONFIG}" --ldflags); do
63173      if echo "${flag}" | grep -q '^-L'; then
63174        if test "${LLVM_LDFLAGS}" != ""; then
63175          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63176        fi
63177        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63178      fi
63179    done
63180
63181    unset LLVM_LIBS
63182    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63183      if echo "${flag}" | grep -q '^-l'; then
63184        if test "${LLVM_LIBS}" != ""; then
63185          LLVM_LIBS="${LLVM_LIBS} "
63186        fi
63187        LLVM_LIBS="${LLVM_LIBS}${flag}"
63188      fi
63189    done
63190
63191    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63192    # always properly detect -ltinfo
63193    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63194
63195
63196
63197
63198  fi
63199
63200
63201
63202# Check whether --with-libjpeg was given.
63203if test "${with_libjpeg+set}" = set; then :
63204  withval=$with_libjpeg;
63205fi
63206
63207
63208  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63209$as_echo_n "checking for which libjpeg to use... " >&6; }
63210  # default is bundled
63211  DEFAULT_LIBJPEG=bundled
63212  # if user didn't specify, use DEFAULT_LIBJPEG
63213  if test "x${with_libjpeg}" = "x"; then
63214    with_libjpeg=${DEFAULT_LIBJPEG}
63215  fi
63216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63217$as_echo "${with_libjpeg}" >&6; }
63218
63219  if test "x${with_libjpeg}" = "xbundled"; then
63220    USE_EXTERNAL_LIBJPEG=false
63221  elif test "x${with_libjpeg}" = "xsystem"; then
63222    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63223if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63224
63225else
63226   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63227fi
63228
63229
63230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63231$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63232if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63233  $as_echo_n "(cached) " >&6
63234else
63235  ac_check_lib_save_LIBS=$LIBS
63236LIBS="-ljpeg  $LIBS"
63237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63238/* end confdefs.h.  */
63239
63240/* Override any GCC internal prototype to avoid an error.
63241   Use char because int might match the return type of a GCC
63242   builtin and then its argument prototype would still apply.  */
63243#ifdef __cplusplus
63244extern "C"
63245#endif
63246char jpeg_CreateDecompress ();
63247int
63248main ()
63249{
63250return jpeg_CreateDecompress ();
63251  ;
63252  return 0;
63253}
63254_ACEOF
63255if ac_fn_cxx_try_link "$LINENO"; then :
63256  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63257else
63258  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63259fi
63260rm -f core conftest.err conftest.$ac_objext \
63261    conftest$ac_exeext conftest.$ac_ext
63262LIBS=$ac_check_lib_save_LIBS
63263fi
63264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63265$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63266if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63267  cat >>confdefs.h <<_ACEOF
63268#define HAVE_LIBJPEG 1
63269_ACEOF
63270
63271  LIBS="-ljpeg $LIBS"
63272
63273else
63274   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63275fi
63276
63277
63278    USE_EXTERNAL_LIBJPEG=true
63279  else
63280    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63281  fi
63282
63283
63284
63285
63286
63287# Check whether --with-giflib was given.
63288if test "${with_giflib+set}" = set; then :
63289  withval=$with_giflib;
63290fi
63291
63292
63293  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63294$as_echo_n "checking for which giflib to use... " >&6; }
63295  # default is bundled
63296  DEFAULT_GIFLIB=bundled
63297  # if user didn't specify, use DEFAULT_GIFLIB
63298  if test "x${with_giflib}" = "x"; then
63299    with_giflib=${DEFAULT_GIFLIB}
63300  fi
63301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63302$as_echo "${with_giflib}" >&6; }
63303
63304  if test "x${with_giflib}" = "xbundled"; then
63305    USE_EXTERNAL_LIBGIF=false
63306  elif test "x${with_giflib}" = "xsystem"; then
63307    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63308if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63309
63310else
63311   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63312fi
63313
63314
63315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63316$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63317if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63318  $as_echo_n "(cached) " >&6
63319else
63320  ac_check_lib_save_LIBS=$LIBS
63321LIBS="-lgif  $LIBS"
63322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63323/* end confdefs.h.  */
63324
63325/* Override any GCC internal prototype to avoid an error.
63326   Use char because int might match the return type of a GCC
63327   builtin and then its argument prototype would still apply.  */
63328#ifdef __cplusplus
63329extern "C"
63330#endif
63331char DGifGetCode ();
63332int
63333main ()
63334{
63335return DGifGetCode ();
63336  ;
63337  return 0;
63338}
63339_ACEOF
63340if ac_fn_cxx_try_link "$LINENO"; then :
63341  ac_cv_lib_gif_DGifGetCode=yes
63342else
63343  ac_cv_lib_gif_DGifGetCode=no
63344fi
63345rm -f core conftest.err conftest.$ac_objext \
63346    conftest$ac_exeext conftest.$ac_ext
63347LIBS=$ac_check_lib_save_LIBS
63348fi
63349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63350$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63351if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63352  cat >>confdefs.h <<_ACEOF
63353#define HAVE_LIBGIF 1
63354_ACEOF
63355
63356  LIBS="-lgif $LIBS"
63357
63358else
63359   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63360fi
63361
63362
63363    USE_EXTERNAL_LIBGIF=true
63364  else
63365    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63366  fi
63367
63368
63369
63370
63371
63372# Check whether --with-libpng was given.
63373if test "${with_libpng+set}" = set; then :
63374  withval=$with_libpng;
63375fi
63376
63377
63378  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63379$as_echo_n "checking for which libpng to use... " >&6; }
63380
63381  # default is bundled
63382  DEFAULT_LIBPNG=bundled
63383  # if user didn't specify, use DEFAULT_LIBPNG
63384  if test "x${with_libpng}" = "x"; then
63385    with_libpng=${DEFAULT_LIBPNG}
63386  fi
63387
63388  if test "x${with_libpng}" = "xbundled"; then
63389    USE_EXTERNAL_LIBPNG=false
63390    PNG_CFLAGS=""
63391    PNG_LIBS=""
63392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63393$as_echo "bundled" >&6; }
63394  elif test "x${with_libpng}" = "xsystem"; then
63395
63396pkg_failed=no
63397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63398$as_echo_n "checking for PNG... " >&6; }
63399
63400if test -n "$PNG_CFLAGS"; then
63401    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63402 elif test -n "$PKG_CONFIG"; then
63403    if test -n "$PKG_CONFIG" && \
63404    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63405  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63406  ac_status=$?
63407  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63408  test $ac_status = 0; }; then
63409  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63410else
63411  pkg_failed=yes
63412fi
63413 else
63414    pkg_failed=untried
63415fi
63416if test -n "$PNG_LIBS"; then
63417    pkg_cv_PNG_LIBS="$PNG_LIBS"
63418 elif test -n "$PKG_CONFIG"; then
63419    if test -n "$PKG_CONFIG" && \
63420    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63421  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63422  ac_status=$?
63423  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63424  test $ac_status = 0; }; then
63425  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63426else
63427  pkg_failed=yes
63428fi
63429 else
63430    pkg_failed=untried
63431fi
63432
63433
63434
63435if test $pkg_failed = yes; then
63436
63437if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63438        _pkg_short_errors_supported=yes
63439else
63440        _pkg_short_errors_supported=no
63441fi
63442        if test $_pkg_short_errors_supported = yes; then
63443	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63444        else
63445	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63446        fi
63447	# Put the nasty error message in config.log where it belongs
63448	echo "$PNG_PKG_ERRORS" >&5
63449
63450	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63451$as_echo "no" >&6; }
63452                LIBPNG_FOUND=no
63453elif test $pkg_failed = untried; then
63454	LIBPNG_FOUND=no
63455else
63456	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63457	PNG_LIBS=$pkg_cv_PNG_LIBS
63458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63459$as_echo "yes" >&6; }
63460	LIBPNG_FOUND=yes
63461fi
63462    if test "x${LIBPNG_FOUND}" = "xyes"; then
63463      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
63464      USE_EXTERNAL_LIBPNG=true
63465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63466$as_echo "system" >&6; }
63467    else
63468      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63469$as_echo "system not found" >&6; }
63470      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63471    fi
63472  else
63473    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63474  fi
63475
63476
63477
63478
63479
63480
63481
63482# Check whether --with-zlib was given.
63483if test "${with_zlib+set}" = set; then :
63484  withval=$with_zlib;
63485fi
63486
63487
63488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63489$as_echo_n "checking for compress in -lz... " >&6; }
63490if ${ac_cv_lib_z_compress+:} false; then :
63491  $as_echo_n "(cached) " >&6
63492else
63493  ac_check_lib_save_LIBS=$LIBS
63494LIBS="-lz  $LIBS"
63495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63496/* end confdefs.h.  */
63497
63498/* Override any GCC internal prototype to avoid an error.
63499   Use char because int might match the return type of a GCC
63500   builtin and then its argument prototype would still apply.  */
63501#ifdef __cplusplus
63502extern "C"
63503#endif
63504char compress ();
63505int
63506main ()
63507{
63508return compress ();
63509  ;
63510  return 0;
63511}
63512_ACEOF
63513if ac_fn_cxx_try_link "$LINENO"; then :
63514  ac_cv_lib_z_compress=yes
63515else
63516  ac_cv_lib_z_compress=no
63517fi
63518rm -f core conftest.err conftest.$ac_objext \
63519    conftest$ac_exeext conftest.$ac_ext
63520LIBS=$ac_check_lib_save_LIBS
63521fi
63522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63523$as_echo "$ac_cv_lib_z_compress" >&6; }
63524if test "x$ac_cv_lib_z_compress" = xyes; then :
63525   ZLIB_FOUND=yes
63526else
63527   ZLIB_FOUND=no
63528fi
63529
63530
63531  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63532$as_echo_n "checking for which zlib to use... " >&6; }
63533
63534  DEFAULT_ZLIB=system
63535  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63536    # On windows default is bundled...on others default is system
63537    DEFAULT_ZLIB=bundled
63538  fi
63539
63540  if test "x${ZLIB_FOUND}" != "xyes"; then
63541    # If we don't find any system...set default to bundled
63542    DEFAULT_ZLIB=bundled
63543  fi
63544
63545  # If user didn't specify, use DEFAULT_ZLIB
63546  if test "x${with_zlib}" = "x"; then
63547    with_zlib=${DEFAULT_ZLIB}
63548  fi
63549
63550  if test "x${with_zlib}" = "xbundled"; then
63551    USE_EXTERNAL_LIBZ=false
63552    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63553$as_echo "bundled" >&6; }
63554  elif test "x${with_zlib}" = "xsystem"; then
63555    if test "x${ZLIB_FOUND}" = "xyes"; then
63556      USE_EXTERNAL_LIBZ=true
63557      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63558$as_echo "system" >&6; }
63559    else
63560      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63561$as_echo "system not found" >&6; }
63562      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63563    fi
63564  else
63565    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63566  fi
63567
63568
63569
63570
63571
63572# Check whether --with-lcms was given.
63573if test "${with_lcms+set}" = set; then :
63574  withval=$with_lcms;
63575fi
63576
63577
63578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63579$as_echo_n "checking for which lcms to use... " >&6; }
63580
63581  DEFAULT_LCMS=bundled
63582  # If user didn't specify, use DEFAULT_LCMS
63583  if test "x${with_lcms}" = "x"; then
63584    with_lcms=${DEFAULT_LCMS}
63585  fi
63586
63587  if test "x${with_lcms}" = "xbundled"; then
63588    USE_EXTERNAL_LCMS=false
63589    LCMS_CFLAGS=""
63590    LCMS_LIBS=""
63591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63592$as_echo "bundled" >&6; }
63593  elif test "x${with_lcms}" = "xsystem"; then
63594    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63595$as_echo "system" >&6; }
63596
63597pkg_failed=no
63598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63599$as_echo_n "checking for LCMS... " >&6; }
63600
63601if test -n "$LCMS_CFLAGS"; then
63602    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63603 elif test -n "$PKG_CONFIG"; then
63604    if test -n "$PKG_CONFIG" && \
63605    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63606  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63607  ac_status=$?
63608  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63609  test $ac_status = 0; }; then
63610  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63611else
63612  pkg_failed=yes
63613fi
63614 else
63615    pkg_failed=untried
63616fi
63617if test -n "$LCMS_LIBS"; then
63618    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63619 elif test -n "$PKG_CONFIG"; then
63620    if test -n "$PKG_CONFIG" && \
63621    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63622  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63623  ac_status=$?
63624  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63625  test $ac_status = 0; }; then
63626  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63627else
63628  pkg_failed=yes
63629fi
63630 else
63631    pkg_failed=untried
63632fi
63633
63634
63635
63636if test $pkg_failed = yes; then
63637
63638if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63639        _pkg_short_errors_supported=yes
63640else
63641        _pkg_short_errors_supported=no
63642fi
63643        if test $_pkg_short_errors_supported = yes; then
63644	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63645        else
63646	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63647        fi
63648	# Put the nasty error message in config.log where it belongs
63649	echo "$LCMS_PKG_ERRORS" >&5
63650
63651	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63652$as_echo "no" >&6; }
63653                LCMS_FOUND=no
63654elif test $pkg_failed = untried; then
63655	LCMS_FOUND=no
63656else
63657	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63658	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63659        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63660$as_echo "yes" >&6; }
63661	LCMS_FOUND=yes
63662fi
63663    if test "x${LCMS_FOUND}" = "xyes"; then
63664      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
63665      USE_EXTERNAL_LCMS=true
63666    else
63667      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63668    fi
63669  else
63670    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63671  fi
63672
63673
63674
63675
63676
63677
63678
63679
63680
63681
63682
63683
63684
63685  # Setup libm (the maths library)
63686  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63687    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63688$as_echo_n "checking for cos in -lm... " >&6; }
63689if ${ac_cv_lib_m_cos+:} false; then :
63690  $as_echo_n "(cached) " >&6
63691else
63692  ac_check_lib_save_LIBS=$LIBS
63693LIBS="-lm  $LIBS"
63694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63695/* end confdefs.h.  */
63696
63697/* Override any GCC internal prototype to avoid an error.
63698   Use char because int might match the return type of a GCC
63699   builtin and then its argument prototype would still apply.  */
63700#ifdef __cplusplus
63701extern "C"
63702#endif
63703char cos ();
63704int
63705main ()
63706{
63707return cos ();
63708  ;
63709  return 0;
63710}
63711_ACEOF
63712if ac_fn_cxx_try_link "$LINENO"; then :
63713  ac_cv_lib_m_cos=yes
63714else
63715  ac_cv_lib_m_cos=no
63716fi
63717rm -f core conftest.err conftest.$ac_objext \
63718    conftest$ac_exeext conftest.$ac_ext
63719LIBS=$ac_check_lib_save_LIBS
63720fi
63721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63722$as_echo "$ac_cv_lib_m_cos" >&6; }
63723if test "x$ac_cv_lib_m_cos" = xyes; then :
63724  cat >>confdefs.h <<_ACEOF
63725#define HAVE_LIBM 1
63726_ACEOF
63727
63728  LIBS="-lm $LIBS"
63729
63730else
63731
63732        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63733$as_echo "$as_me: Maths library was not found" >&6;}
63734
63735fi
63736
63737    LIBM="-lm"
63738  else
63739    LIBM=""
63740  fi
63741
63742
63743  # Setup libdl (for dynamic library loading)
63744  save_LIBS="$LIBS"
63745  LIBS=""
63746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63747$as_echo_n "checking for dlopen in -ldl... " >&6; }
63748if ${ac_cv_lib_dl_dlopen+:} false; then :
63749  $as_echo_n "(cached) " >&6
63750else
63751  ac_check_lib_save_LIBS=$LIBS
63752LIBS="-ldl  $LIBS"
63753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63754/* end confdefs.h.  */
63755
63756/* Override any GCC internal prototype to avoid an error.
63757   Use char because int might match the return type of a GCC
63758   builtin and then its argument prototype would still apply.  */
63759#ifdef __cplusplus
63760extern "C"
63761#endif
63762char dlopen ();
63763int
63764main ()
63765{
63766return dlopen ();
63767  ;
63768  return 0;
63769}
63770_ACEOF
63771if ac_fn_cxx_try_link "$LINENO"; then :
63772  ac_cv_lib_dl_dlopen=yes
63773else
63774  ac_cv_lib_dl_dlopen=no
63775fi
63776rm -f core conftest.err conftest.$ac_objext \
63777    conftest$ac_exeext conftest.$ac_ext
63778LIBS=$ac_check_lib_save_LIBS
63779fi
63780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63781$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63782if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63783  cat >>confdefs.h <<_ACEOF
63784#define HAVE_LIBDL 1
63785_ACEOF
63786
63787  LIBS="-ldl $LIBS"
63788
63789fi
63790
63791  LIBDL="$LIBS"
63792
63793  LIBS="$save_LIBS"
63794
63795  # Deprecated libraries, keep the flags for backwards compatibility
63796  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63797
63798
63799# Check whether --with-dxsdk was given.
63800if test "${with_dxsdk+set}" = set; then :
63801  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63802$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63803fi
63804
63805
63806
63807
63808# Check whether --with-dxsdk-lib was given.
63809if test "${with_dxsdk_lib+set}" = set; then :
63810  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63811$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63812fi
63813
63814
63815
63816
63817# Check whether --with-dxsdk-include was given.
63818if test "${with_dxsdk_include+set}" = set; then :
63819  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63820$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63821fi
63822
63823
63824  fi
63825
63826  # Control if libzip can use mmap. Available for purposes of overriding.
63827  LIBZIP_CAN_USE_MMAP=true
63828
63829
63830
63831  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63832    # Find the root of the Solaris Studio installation from the compiler path
63833    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63834    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63835    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63836$as_echo_n "checking for libstlport.so.1... " >&6; }
63837    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63838      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63839      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63840    fi
63841    if test -f "$STLPORT_LIB"; then
63842      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63843$as_echo "yes, $STLPORT_LIB" >&6; }
63844
63845  # Only process if variable expands to non-empty
63846
63847  if test "x$STLPORT_LIB" != x; then
63848    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63849
63850  # Input might be given as Windows format, start by converting to
63851  # unix format.
63852  path="$STLPORT_LIB"
63853  new_path=`$CYGPATH -u "$path"`
63854
63855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63858  # "foo.exe" is OK but "foo" is an error.
63859  #
63860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63861  # It is also a way to make sure we got the proper file name for the real test later on.
63862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63863  if test "x$test_shortpath" = x; then
63864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63865$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63866    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63867  fi
63868
63869  # Call helper function which possibly converts this using DOS-style short mode.
63870  # If so, the updated path is stored in $new_path.
63871
63872  input_path="$new_path"
63873  # Check if we need to convert this using DOS-style short mode. If the path
63874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63875  # take no chances and rewrite it.
63876  # Note: m4 eats our [], so we need to use [ and ] instead.
63877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63878  if test "x$has_forbidden_chars" != x; then
63879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63883      # Going to short mode and back again did indeed matter. Since short mode is
63884      # case insensitive, let's make it lowercase to improve readability.
63885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63886      # Now convert it back to Unix-style (cygpath)
63887      input_path=`$CYGPATH -u "$shortmode_path"`
63888      new_path="$input_path"
63889    fi
63890  fi
63891
63892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63893  if test "x$test_cygdrive_prefix" = x; then
63894    # As a simple fix, exclude /usr/bin since it's not a real path.
63895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63897      # a path prefixed by /cygdrive for fixpath to work.
63898      new_path="$CYGWIN_ROOT_PATH$input_path"
63899    fi
63900  fi
63901
63902
63903  if test "x$path" != "x$new_path"; then
63904    STLPORT_LIB="$new_path"
63905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63906$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63907  fi
63908
63909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63910
63911  path="$STLPORT_LIB"
63912  has_colon=`$ECHO $path | $GREP ^.:`
63913  new_path="$path"
63914  if test "x$has_colon" = x; then
63915    # Not in mixed or Windows style, start by that.
63916    new_path=`cmd //c echo $path`
63917  fi
63918
63919
63920  input_path="$new_path"
63921  # Check if we need to convert this using DOS-style short mode. If the path
63922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63923  # take no chances and rewrite it.
63924  # Note: m4 eats our [], so we need to use [ and ] instead.
63925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63926  if test "x$has_forbidden_chars" != x; then
63927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63929  fi
63930
63931
63932  windows_path="$new_path"
63933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63934    unix_path=`$CYGPATH -u "$windows_path"`
63935    new_path="$unix_path"
63936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63938    new_path="$unix_path"
63939  fi
63940
63941  if test "x$path" != "x$new_path"; then
63942    STLPORT_LIB="$new_path"
63943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63944$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63945  fi
63946
63947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63949
63950    else
63951      # We're on a unix platform. Hooray! :)
63952      path="$STLPORT_LIB"
63953      has_space=`$ECHO "$path" | $GREP " "`
63954      if test "x$has_space" != x; then
63955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63956$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63957        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63958      fi
63959
63960      # Use eval to expand a potential ~
63961      eval path="$path"
63962      if test ! -f "$path" && test ! -d "$path"; then
63963        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63964      fi
63965
63966      if test -d "$path"; then
63967        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63968      else
63969        dir="`$DIRNAME "$path"`"
63970        base="`$BASENAME "$path"`"
63971        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63972      fi
63973    fi
63974  fi
63975
63976    else
63977      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63978$as_echo "no, not found at $STLPORT_LIB" >&6; }
63979      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63980    fi
63981
63982  fi
63983
63984
63985
63986# Check whether --with-libelf was given.
63987if test "${with_libelf+set}" = set; then :
63988  withval=$with_libelf;
63989fi
63990
63991
63992# Check whether --with-libelf-include was given.
63993if test "${with_libelf_include+set}" = set; then :
63994  withval=$with_libelf_include;
63995fi
63996
63997
63998# Check whether --with-libelf-lib was given.
63999if test "${with_libelf_lib+set}" = set; then :
64000  withval=$with_libelf_lib;
64001fi
64002
64003
64004  if test "x$ENABLE_AOT" = xfalse; then
64005    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
64006        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
64007        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
64008      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
64009$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
64010    fi
64011    LIBELF_CFLAGS=
64012    LIBELF_LIBS=
64013  else
64014    LIBELF_FOUND=no
64015
64016    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
64017      ENABLE_AOT="false"
64018      if test "x${enable_aot}" = xyes; then
64019        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
64020      fi
64021    else
64022      if test "x${with_libelf}" != x; then
64023        ELF_LIBS="-L${with_libelf}/lib -lelf"
64024        ELF_CFLAGS="-I${with_libelf}/include"
64025        LIBELF_FOUND=yes
64026      fi
64027      if test "x${with_libelf_include}" != x; then
64028        ELF_CFLAGS="-I${with_libelf_include}"
64029        LIBELF_FOUND=yes
64030      fi
64031      if test "x${with_libelf_lib}" != x; then
64032        ELF_LIBS="-L${with_libelf_lib} -lelf"
64033        LIBELF_FOUND=yes
64034      fi
64035      # Do not try pkg-config if we have a sysroot set.
64036      if test "x$SYSROOT" = x; then
64037        if test "x$LIBELF_FOUND" = xno; then
64038          # Figure out ELF_CFLAGS and ELF_LIBS
64039
64040pkg_failed=no
64041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
64042$as_echo_n "checking for ELF... " >&6; }
64043
64044if test -n "$ELF_CFLAGS"; then
64045    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
64046 elif test -n "$PKG_CONFIG"; then
64047    if test -n "$PKG_CONFIG" && \
64048    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64049  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64050  ac_status=$?
64051  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64052  test $ac_status = 0; }; then
64053  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64054else
64055  pkg_failed=yes
64056fi
64057 else
64058    pkg_failed=untried
64059fi
64060if test -n "$ELF_LIBS"; then
64061    pkg_cv_ELF_LIBS="$ELF_LIBS"
64062 elif test -n "$PKG_CONFIG"; then
64063    if test -n "$PKG_CONFIG" && \
64064    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64065  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64066  ac_status=$?
64067  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64068  test $ac_status = 0; }; then
64069  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64070else
64071  pkg_failed=yes
64072fi
64073 else
64074    pkg_failed=untried
64075fi
64076
64077
64078
64079if test $pkg_failed = yes; then
64080
64081if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64082        _pkg_short_errors_supported=yes
64083else
64084        _pkg_short_errors_supported=no
64085fi
64086        if test $_pkg_short_errors_supported = yes; then
64087	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64088        else
64089	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64090        fi
64091	# Put the nasty error message in config.log where it belongs
64092	echo "$ELF_PKG_ERRORS" >&5
64093
64094	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64095$as_echo "no" >&6; }
64096                LIBELF_FOUND=no
64097elif test $pkg_failed = untried; then
64098	LIBELF_FOUND=no
64099else
64100	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64101	ELF_LIBS=$pkg_cv_ELF_LIBS
64102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64103$as_echo "yes" >&6; }
64104	LIBELF_FOUND=yes
64105fi
64106        fi
64107      fi
64108      if test "x$LIBELF_FOUND" = xno; then
64109        for ac_header in libelf.h
64110do :
64111  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64112if test "x$ac_cv_header_libelf_h" = xyes; then :
64113  cat >>confdefs.h <<_ACEOF
64114#define HAVE_LIBELF_H 1
64115_ACEOF
64116
64117              LIBELF_FOUND=yes
64118              ELF_CFLAGS=
64119              ELF_LIBS=-lelf
64120
64121else
64122  LIBELF_FOUND=no
64123
64124fi
64125
64126done
64127
64128      fi
64129      if test "x$LIBELF_FOUND" = xno; then
64130        ENABLE_AOT="false"
64131
64132  # Print a helpful message on how to acquire the necessary build dependency.
64133  # elf is the help tag: freetype, cups, alsa etc
64134  MISSING_DEPENDENCY=elf
64135
64136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64137    cygwin_help $MISSING_DEPENDENCY
64138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64139    msys_help $MISSING_DEPENDENCY
64140  else
64141    PKGHANDLER_COMMAND=
64142
64143    case $PKGHANDLER in
64144      apt-get)
64145        apt_help     $MISSING_DEPENDENCY ;;
64146      yum)
64147        yum_help     $MISSING_DEPENDENCY ;;
64148      brew)
64149        brew_help    $MISSING_DEPENDENCY ;;
64150      port)
64151        port_help    $MISSING_DEPENDENCY ;;
64152      pkgutil)
64153        pkgutil_help $MISSING_DEPENDENCY ;;
64154      pkgadd)
64155        pkgadd_help  $MISSING_DEPENDENCY ;;
64156    esac
64157
64158    if test "x$PKGHANDLER_COMMAND" != x; then
64159      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64160    fi
64161  fi
64162
64163        if test "x${enable_aot}" = xyes; then
64164          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64165        else
64166          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64167$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64168        fi
64169      else
64170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64171$as_echo_n "checking if libelf works... " >&6; }
64172        ac_ext=c
64173ac_cpp='$CPP $CPPFLAGS'
64174ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64175ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64176ac_compiler_gnu=$ac_cv_c_compiler_gnu
64177
64178        OLD_CFLAGS="$CFLAGS"
64179        CFLAGS="$CFLAGS $ELF_CFLAGS"
64180        OLD_LIBS="$LIBS"
64181        LIBS="$LIBS $ELF_LIBS"
64182        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64183/* end confdefs.h.  */
64184#include <libelf.h>
64185int
64186main ()
64187{
64188
64189              elf_version(0);
64190              return 0;
64191
64192  ;
64193  return 0;
64194}
64195_ACEOF
64196if ac_fn_c_try_link "$LINENO"; then :
64197  LIBELF_WORKS=yes
64198else
64199  LIBELF_WORKS=no
64200
64201fi
64202rm -f core conftest.err conftest.$ac_objext \
64203    conftest$ac_exeext conftest.$ac_ext
64204        CFLAGS="$OLD_CFLAGS"
64205        LIBS="$OLD_LIBS"
64206        ac_ext=cpp
64207ac_cpp='$CXXCPP $CPPFLAGS'
64208ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64209ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64210ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64211
64212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64213$as_echo "$LIBELF_WORKS" >&6; }
64214
64215        if test "x$LIBELF_WORKS" = xno; then
64216          ENABLE_AOT="false"
64217
64218  # Print a helpful message on how to acquire the necessary build dependency.
64219  # elf is the help tag: freetype, cups, alsa etc
64220  MISSING_DEPENDENCY=elf
64221
64222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64223    cygwin_help $MISSING_DEPENDENCY
64224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64225    msys_help $MISSING_DEPENDENCY
64226  else
64227    PKGHANDLER_COMMAND=
64228
64229    case $PKGHANDLER in
64230      apt-get)
64231        apt_help     $MISSING_DEPENDENCY ;;
64232      yum)
64233        yum_help     $MISSING_DEPENDENCY ;;
64234      brew)
64235        brew_help    $MISSING_DEPENDENCY ;;
64236      port)
64237        port_help    $MISSING_DEPENDENCY ;;
64238      pkgutil)
64239        pkgutil_help $MISSING_DEPENDENCY ;;
64240      pkgadd)
64241        pkgadd_help  $MISSING_DEPENDENCY ;;
64242    esac
64243
64244    if test "x$PKGHANDLER_COMMAND" != x; then
64245      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64246    fi
64247  fi
64248
64249          if test "x$enable_aot" = "xyes"; then
64250            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64251          else
64252            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64253$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64254          fi
64255        fi
64256      fi
64257    fi
64258  fi
64259
64260
64261
64262
64263
64264
64265
64266
64267
64268
64269
64270
64271
64272
64273
64274
64275
64276
64277# Hotspot setup depends on lib checks (AOT needs libelf).
64278
64279
64280  # The user can in some cases supply additional jvm features. For the custom
64281  # variant, this defines the entire variant.
64282
64283# Check whether --with-jvm-features was given.
64284if test "${with_jvm_features+set}" = set; then :
64285  withval=$with_jvm_features;
64286fi
64287
64288  if test "x$with_jvm_features" != x; then
64289    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64290$as_echo_n "checking additional JVM features... " >&6; }
64291    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64293$as_echo "$JVM_FEATURES" >&6; }
64294  fi
64295
64296  # Override hotspot cpu definitions for ARM platforms
64297  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64298    HOTSPOT_TARGET_CPU=arm_32
64299    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64300    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64301    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64302  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64303    HOTSPOT_TARGET_CPU=arm_64
64304    HOTSPOT_TARGET_CPU_ARCH=arm
64305    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64306    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64307  fi
64308
64309  # Verify that dependencies are met for explicitly set features.
64310  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64311    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64312  fi
64313
64314  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64315    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64316  fi
64317
64318  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64319    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64320  fi
64321
64322  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64323    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64324  fi
64325
64326  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64327    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64328  fi
64329
64330  # Turn on additional features based on other parts of configure
64331  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64332    JVM_FEATURES="$JVM_FEATURES dtrace"
64333  else
64334    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64335      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64336    fi
64337  fi
64338
64339  if test "x$STATIC_BUILD" = "xtrue"; then
64340    JVM_FEATURES="$JVM_FEATURES static-build"
64341  else
64342    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64343      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64344    fi
64345  fi
64346
64347  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64348    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64349      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64350    fi
64351  fi
64352
64353  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64354    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64355      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64356    fi
64357  fi
64358
64359  # Only enable jvmci on x86_64, sparcv9 and aarch64.
64360  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64361     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64362     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64363    JVM_FEATURES_jvmci="jvmci"
64364  else
64365    JVM_FEATURES_jvmci=""
64366  fi
64367
64368  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.vm.compiler should be built" >&5
64369$as_echo_n "checking if jdk.vm.compiler should be built... " >&6; }
64370  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64372$as_echo "yes, forced" >&6; }
64373    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
64374      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
64375    fi
64376    INCLUDE_GRAAL="true"
64377  else
64378    # By default enable graal build where AOT is available
64379    if test "x$ENABLE_AOT" = "xtrue"; then
64380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64381$as_echo "yes" >&6; }
64382      JVM_FEATURES_graal="graal"
64383      INCLUDE_GRAAL="true"
64384    else
64385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64386$as_echo "no" >&6; }
64387      JVM_FEATURES_graal=""
64388      INCLUDE_GRAAL="false"
64389    fi
64390  fi
64391
64392
64393
64394  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
64395$as_echo_n "checking if aot should be enabled... " >&6; }
64396  if test "x$ENABLE_AOT" = "xtrue"; then
64397    if test "x$enable_aot" = "xyes"; then
64398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64399$as_echo "yes, forced" >&6; }
64400    else
64401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64402$as_echo "yes" >&6; }
64403    fi
64404    JVM_FEATURES_aot="aot"
64405  else
64406    if test "x$enable_aot" = "xno"; then
64407      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64408$as_echo "no, forced" >&6; }
64409    else
64410      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64411$as_echo "no" >&6; }
64412    fi
64413    JVM_FEATURES_aot=""
64414  fi
64415
64416  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
64417    # Default to use link time optimizations on minimal on arm
64418    JVM_FEATURES_link_time_opt="link-time-opt"
64419  else
64420    JVM_FEATURES_link_time_opt=""
64421  fi
64422
64423  # All variants but minimal (and custom) get these features
64424  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
64425
64426  # Enable features depending on variant.
64427  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
64428  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
64429  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
64430  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
64431  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
64432  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
64433  JVM_FEATURES_custom="$JVM_FEATURES"
64434
64435
64436
64437
64438
64439
64440
64441
64442
64443  # Used for verification of Makefiles by check-jvm-feature
64444
64445
64446  # We don't support --with-jvm-interpreter anymore, use zero instead.
64447
64448
64449# Check whether --with-jvm-interpreter was given.
64450if test "${with_jvm_interpreter+set}" = set; then :
64451  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
64452$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
64453fi
64454
64455
64456
64457
64458###############################################################################
64459#
64460# We need to do some final tweaking, when everything else is done.
64461#
64462###############################################################################
64463
64464
64465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64466$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64467
64468  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64469    ENABLE_INTREE_EC=true
64470    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64471$as_echo "yes" >&6; }
64472  else
64473    ENABLE_INTREE_EC=false
64474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64475$as_echo "no" >&6; }
64476  fi
64477
64478
64479
64480
64481  # Check whether --enable-jtreg-failure-handler was given.
64482if test "${enable_jtreg_failure_handler+set}" = set; then :
64483  enableval=$enable_jtreg_failure_handler;
64484fi
64485
64486
64487  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64488$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64489
64490  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64491    if test "x$JT_HOME" = "x"; then
64492      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64493    else
64494      BUILD_FAILURE_HANDLER=true
64495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64496$as_echo "yes, forced" >&6; }
64497    fi
64498  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64499    BUILD_FAILURE_HANDLER=false
64500    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64501$as_echo "no, forced" >&6; }
64502  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64503      || test "x$enable_jtreg_failure_handler" = "x"; then
64504    if test "x$JT_HOME" = "x"; then
64505      BUILD_FAILURE_HANDLER=false
64506      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64507$as_echo "no, missing jtreg" >&6; }
64508    else
64509      BUILD_FAILURE_HANDLER=true
64510      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64511$as_echo "yes, jtreg present" >&6; }
64512    fi
64513  else
64514    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64515  fi
64516
64517
64518
64519
64520  # Check whether --enable-generate-classlist was given.
64521if test "${enable_generate_classlist+set}" = set; then :
64522  enableval=$enable_generate_classlist;
64523fi
64524
64525
64526  # Check if it's likely that it's possible to generate the classlist. Depending
64527  # on exact jvm configuration it could be possible anyway.
64528  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64529    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64530  else
64531    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64532  fi
64533
64534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64535$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64536  if test "x$enable_generate_classlist" = "xyes"; then
64537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64538$as_echo "yes, forced" >&6; }
64539    ENABLE_GENERATE_CLASSLIST="true"
64540    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64541      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64542$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64543    fi
64544  elif test "x$enable_generate_classlist" = "xno"; then
64545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64546$as_echo "no, forced" >&6; }
64547    ENABLE_GENERATE_CLASSLIST="false"
64548  elif test "x$enable_generate_classlist" = "x"; then
64549    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64550      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64551$as_echo "yes" >&6; }
64552      ENABLE_GENERATE_CLASSLIST="true"
64553    else
64554      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64555$as_echo "no" >&6; }
64556      ENABLE_GENERATE_CLASSLIST="false"
64557    fi
64558  else
64559    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64560  fi
64561
64562
64563
64564
64565###############################################################################
64566#
64567# Configure parts of the build that only affect the build performance,
64568# not the result.
64569#
64570###############################################################################
64571
64572
64573  # How many cores do we have on this build system?
64574
64575# Check whether --with-num-cores was given.
64576if test "${with_num_cores+set}" = set; then :
64577  withval=$with_num_cores;
64578fi
64579
64580  if test "x$with_num_cores" = x; then
64581    # The number of cores were not specified, try to probe them.
64582
64583  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64584$as_echo_n "checking for number of cores... " >&6; }
64585  NUM_CORES=1
64586  FOUND_CORES=no
64587
64588  if test -f /proc/cpuinfo; then
64589    # Looks like a Linux (or cygwin) system
64590    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64591    FOUND_CORES=yes
64592  elif test -x /usr/sbin/psrinfo; then
64593    # Looks like a Solaris system
64594    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64595    FOUND_CORES=yes
64596  elif test -x /usr/sbin/sysctl; then
64597    # Looks like a MacOSX system
64598    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64599    FOUND_CORES=yes
64600  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64601    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64602    FOUND_CORES=yes
64603  elif test -n "$NUMBER_OF_PROCESSORS"; then
64604    # On windows, look in the env
64605    NUM_CORES=$NUMBER_OF_PROCESSORS
64606    FOUND_CORES=yes
64607  fi
64608
64609  if test "x$FOUND_CORES" = xyes; then
64610    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64611$as_echo "$NUM_CORES" >&6; }
64612  else
64613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64614$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64615    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64616$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64617  fi
64618
64619  else
64620    NUM_CORES=$with_num_cores
64621  fi
64622
64623
64624
64625  # How much memory do we have on this build system?
64626
64627# Check whether --with-memory-size was given.
64628if test "${with_memory_size+set}" = set; then :
64629  withval=$with_memory_size;
64630fi
64631
64632  if test "x$with_memory_size" = x; then
64633    # The memory size was not specified, try to probe it.
64634
64635  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64636$as_echo_n "checking for memory size... " >&6; }
64637  # Default to 1024 MB
64638  MEMORY_SIZE=1024
64639  FOUND_MEM=no
64640
64641  if test -f /proc/meminfo; then
64642    # Looks like a Linux (or cygwin) system
64643    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64644    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64645    FOUND_MEM=yes
64646  elif test -x /usr/sbin/prtconf; then
64647    # Looks like a Solaris or AIX system
64648    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64649    FOUND_MEM=yes
64650  elif test -x /usr/sbin/sysctl; then
64651    # Looks like a MacOSX system
64652    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64653    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64654    FOUND_MEM=yes
64655  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64656    # Windows, but without cygwin
64657    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64658    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64659    FOUND_MEM=yes
64660  fi
64661
64662  if test "x$FOUND_MEM" = xyes; then
64663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64664$as_echo "$MEMORY_SIZE MB" >&6; }
64665  else
64666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64667$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64668    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64669$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64670  fi
64671
64672  else
64673    MEMORY_SIZE=$with_memory_size
64674  fi
64675
64676
64677
64678  # Provide a decent default number of parallel jobs for make depending on
64679  # number of cores, amount of memory and machine architecture.
64680
64681# Check whether --with-jobs was given.
64682if test "${with_jobs+set}" = set; then :
64683  withval=$with_jobs;
64684fi
64685
64686  if test "x$with_jobs" = x; then
64687    # Number of jobs was not specified, calculate.
64688    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64689$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64690    # Approximate memory in GB.
64691    memory_gb=`expr $MEMORY_SIZE / 1024`
64692    # Pick the lowest of memory in gb and number of cores.
64693    if test "$memory_gb" -lt "$NUM_CORES"; then
64694      JOBS="$memory_gb"
64695    else
64696      JOBS="$NUM_CORES"
64697    fi
64698    if test "$JOBS" -eq "0"; then
64699      JOBS=1
64700    fi
64701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64702$as_echo "$JOBS" >&6; }
64703  else
64704    JOBS=$with_jobs
64705  fi
64706
64707
64708
64709  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64710
64711# Check whether --with-test-jobs was given.
64712if test "${with_test_jobs+set}" = set; then :
64713  withval=$with_test_jobs;
64714fi
64715
64716  if test "x$with_test_jobs" = x; then
64717      TEST_JOBS=0
64718  else
64719      TEST_JOBS=$with_test_jobs
64720  fi
64721
64722
64723
64724# Setup arguments for the boot jdk (after cores and memory have been setup)
64725
64726  ##############################################################################
64727  #
64728  # Specify jvm options for anything that is run with the Boot JDK.
64729  # Not all JVM:s accept the same arguments on the command line.
64730  #
64731
64732# Check whether --with-boot-jdk-jvmargs was given.
64733if test "${with_boot_jdk_jvmargs+set}" = set; then :
64734  withval=$with_boot_jdk_jvmargs;
64735fi
64736
64737
64738  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64739$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64740
64741  # Disable special log output when a debug build is used as Boot JDK...
64742
64743  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64744  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64745  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64746  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64747  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64748  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64749    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64750    JVM_ARG_OK=true
64751  else
64752    $ECHO "Arg failed:" >&5
64753    $ECHO "$OUTPUT" >&5
64754    JVM_ARG_OK=false
64755  fi
64756
64757
64758  # Force en-US environment
64759
64760  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64761  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64762  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64763  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64764  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64765  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64766    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64767    JVM_ARG_OK=true
64768  else
64769    $ECHO "Arg failed:" >&5
64770    $ECHO "$OUTPUT" >&5
64771    JVM_ARG_OK=false
64772  fi
64773
64774
64775  # Apply user provided options.
64776
64777  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64778  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64779  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64780  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64781  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64782  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64783    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64784    JVM_ARG_OK=true
64785  else
64786    $ECHO "Arg failed:" >&5
64787    $ECHO "$OUTPUT" >&5
64788    JVM_ARG_OK=false
64789  fi
64790
64791
64792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64793$as_echo "$boot_jdk_jvmargs" >&6; }
64794
64795  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64796  JAVA_FLAGS=$boot_jdk_jvmargs
64797
64798
64799
64800  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64801$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64802
64803  # Starting amount of heap memory.
64804
64805  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64806  $ECHO "Command: $JAVA -Xms64M -version" >&5
64807  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64808  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64809  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64810  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64811    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64812    JVM_ARG_OK=true
64813  else
64814    $ECHO "Arg failed:" >&5
64815    $ECHO "$OUTPUT" >&5
64816    JVM_ARG_OK=false
64817  fi
64818
64819  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64820
64821  # Maximum amount of heap memory and stack size.
64822  JVM_HEAP_LIMIT_32="1024"
64823  # Running a 64 bit JVM allows for and requires a bigger heap
64824  JVM_HEAP_LIMIT_64="1600"
64825  STACK_SIZE_32=768
64826  STACK_SIZE_64=1536
64827  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64828  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64829    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64830  fi
64831  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64832    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64833  fi
64834  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64835    JVM_HEAP_LIMIT_32=512
64836    JVM_HEAP_LIMIT_64=512
64837  fi
64838
64839  if test "x$BOOT_JDK_BITS" = "x32"; then
64840    STACK_SIZE=$STACK_SIZE_32
64841    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64842  else
64843    STACK_SIZE=$STACK_SIZE_64
64844    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64845  fi
64846
64847  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64848  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64849  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64850  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64851  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64852  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64853    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64854    JVM_ARG_OK=true
64855  else
64856    $ECHO "Arg failed:" >&5
64857    $ECHO "$OUTPUT" >&5
64858    JVM_ARG_OK=false
64859  fi
64860
64861
64862  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64863  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64864  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64865  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64866  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64867  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64868    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64869    JVM_ARG_OK=true
64870  else
64871    $ECHO "Arg failed:" >&5
64872    $ECHO "$OUTPUT" >&5
64873    JVM_ARG_OK=false
64874  fi
64875
64876
64877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64878$as_echo "$boot_jdk_jvmargs_big" >&6; }
64879
64880  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64881
64882
64883  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64884    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64885    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64886  else
64887    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64888    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64889  fi
64890  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64891  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64893$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64895$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64896
64897
64898  # By default, the main javac compilations use big
64899  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64900
64901
64902  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64903$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64904
64905  # Use serial gc for small short lived tools if possible
64906
64907  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64908  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64909  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64910  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64911  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64912  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64913    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64914    JVM_ARG_OK=true
64915  else
64916    $ECHO "Arg failed:" >&5
64917    $ECHO "$OUTPUT" >&5
64918    JVM_ARG_OK=false
64919  fi
64920
64921
64922  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64923  $ECHO "Command: $JAVA -Xms32M -version" >&5
64924  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64925  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64926  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64927  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64928    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64929    JVM_ARG_OK=true
64930  else
64931    $ECHO "Arg failed:" >&5
64932    $ECHO "$OUTPUT" >&5
64933    JVM_ARG_OK=false
64934  fi
64935
64936
64937  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64938  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64939  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64940  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64941  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64942  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64943    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64944    JVM_ARG_OK=true
64945  else
64946    $ECHO "Arg failed:" >&5
64947    $ECHO "$OUTPUT" >&5
64948    JVM_ARG_OK=false
64949  fi
64950
64951
64952  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64953  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64954  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64955  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64956  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64957  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64958    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64959    JVM_ARG_OK=true
64960  else
64961    $ECHO "Arg failed:" >&5
64962    $ECHO "$OUTPUT" >&5
64963    JVM_ARG_OK=false
64964  fi
64965
64966
64967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64968$as_echo "$boot_jdk_jvmargs_small" >&6; }
64969
64970  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64971
64972
64973  JAVA_TOOL_FLAGS_SMALL=""
64974  for f in $JAVA_FLAGS_SMALL; do
64975    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64976  done
64977
64978
64979
64980# Setup smart javac (after cores and memory have been setup)
64981
64982
64983# Check whether --with-sjavac-server-java was given.
64984if test "${with_sjavac_server_java+set}" = set; then :
64985  withval=$with_sjavac_server_java;
64986fi
64987
64988
64989  if test "x$with_sjavac_server_java" != x; then
64990    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64991    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64992    if test "x$FOUND_VERSION" = x; then
64993      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64994    fi
64995  else
64996    SJAVAC_SERVER_JAVA="$JAVA"
64997  fi
64998
64999
65000  if test "$MEMORY_SIZE" -gt "3000"; then
65001
65002  $ECHO "Check if jvm arg is ok: -d64" >&5
65003  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65004  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65005  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65006  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65007  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65008    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65009    JVM_ARG_OK=true
65010  else
65011    $ECHO "Arg failed:" >&5
65012    $ECHO "$OUTPUT" >&5
65013    JVM_ARG_OK=false
65014  fi
65015
65016    if test "$JVM_ARG_OK" = true; then
65017      JVM_64BIT=true
65018      JVM_ARG_OK=false
65019    fi
65020  fi
65021
65022  MX_VALUE=`expr $MEMORY_SIZE / 2`
65023  if test "$JVM_64BIT" = true; then
65024    # Set ms lower than mx since more than one instance of the server might
65025    # get launched at the same time before they figure out which instance won.
65026    MS_VALUE=512
65027    if test "$MX_VALUE" -gt "2048"; then
65028      MX_VALUE=2048
65029    fi
65030  else
65031    MS_VALUE=256
65032    if test "$MX_VALUE" -gt "1500"; then
65033      MX_VALUE=1500
65034    fi
65035  fi
65036  if test "$MX_VALUE" -lt "512"; then
65037    MX_VALUE=512
65038  fi
65039
65040  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65041  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65042  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65043  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65044  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65045  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65046    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65047    JVM_ARG_OK=true
65048  else
65049    $ECHO "Arg failed:" >&5
65050    $ECHO "$OUTPUT" >&5
65051    JVM_ARG_OK=false
65052  fi
65053
65054
65055
65056  # Check whether --enable-sjavac was given.
65057if test "${enable_sjavac+set}" = set; then :
65058  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65059else
65060  ENABLE_SJAVAC="no"
65061fi
65062
65063  if test "x$JVM_ARG_OK" = "xfalse"; then
65064    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65065$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65066    ENABLE_SJAVAC="no"
65067  fi
65068  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65069$as_echo_n "checking whether to use sjavac... " >&6; }
65070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65071$as_echo "$ENABLE_SJAVAC" >&6; }
65072
65073
65074  # Check whether --enable-javac-server was given.
65075if test "${enable_javac_server+set}" = set; then :
65076  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65077else
65078  ENABLE_JAVAC_SERVER="yes"
65079fi
65080
65081  if test "x$JVM_ARG_OK" = "xfalse"; then
65082    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65083$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65084    ENABLE_JAVAC_SERVER="no"
65085  fi
65086  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65087$as_echo_n "checking whether to use javac server... " >&6; }
65088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65089$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65090
65091
65092  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65093    # When using a server javac, the small client instances do not need much
65094    # resources.
65095    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65096  fi
65097
65098
65099# Setup use of icecc if requested
65100
65101  # Check whether --enable-icecc was given.
65102if test "${enable_icecc+set}" = set; then :
65103  enableval=$enable_icecc;
65104fi
65105
65106
65107  if test "x${enable_icecc}" = "xyes"; then
65108
65109
65110
65111  # Publish this variable in the help.
65112
65113
65114  if [ -z "${ICECC_CMD+x}" ]; then
65115    # The variable is not set by user, try to locate tool using the code snippet
65116    for ac_prog in icecc
65117do
65118  # Extract the first word of "$ac_prog", so it can be a program name with args.
65119set dummy $ac_prog; ac_word=$2
65120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65121$as_echo_n "checking for $ac_word... " >&6; }
65122if ${ac_cv_path_ICECC_CMD+:} false; then :
65123  $as_echo_n "(cached) " >&6
65124else
65125  case $ICECC_CMD in
65126  [\\/]* | ?:[\\/]*)
65127  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65128  ;;
65129  *)
65130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65131for as_dir in $PATH
65132do
65133  IFS=$as_save_IFS
65134  test -z "$as_dir" && as_dir=.
65135    for ac_exec_ext in '' $ac_executable_extensions; do
65136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65137    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65139    break 2
65140  fi
65141done
65142  done
65143IFS=$as_save_IFS
65144
65145  ;;
65146esac
65147fi
65148ICECC_CMD=$ac_cv_path_ICECC_CMD
65149if test -n "$ICECC_CMD"; then
65150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65151$as_echo "$ICECC_CMD" >&6; }
65152else
65153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65154$as_echo "no" >&6; }
65155fi
65156
65157
65158  test -n "$ICECC_CMD" && break
65159done
65160
65161  else
65162    # The variable is set, but is it from the command line or the environment?
65163
65164    # Try to remove the string !ICECC_CMD! from our list.
65165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65167      # If it failed, the variable was not from the command line. Ignore it,
65168      # but warn the user (except for BASH, which is always set by the calling BASH).
65169      if test "xICECC_CMD" != xBASH; then
65170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65171$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65172      fi
65173      # Try to locate tool using the code snippet
65174      for ac_prog in icecc
65175do
65176  # Extract the first word of "$ac_prog", so it can be a program name with args.
65177set dummy $ac_prog; ac_word=$2
65178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65179$as_echo_n "checking for $ac_word... " >&6; }
65180if ${ac_cv_path_ICECC_CMD+:} false; then :
65181  $as_echo_n "(cached) " >&6
65182else
65183  case $ICECC_CMD in
65184  [\\/]* | ?:[\\/]*)
65185  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65186  ;;
65187  *)
65188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65189for as_dir in $PATH
65190do
65191  IFS=$as_save_IFS
65192  test -z "$as_dir" && as_dir=.
65193    for ac_exec_ext in '' $ac_executable_extensions; do
65194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65195    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65197    break 2
65198  fi
65199done
65200  done
65201IFS=$as_save_IFS
65202
65203  ;;
65204esac
65205fi
65206ICECC_CMD=$ac_cv_path_ICECC_CMD
65207if test -n "$ICECC_CMD"; then
65208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65209$as_echo "$ICECC_CMD" >&6; }
65210else
65211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65212$as_echo "no" >&6; }
65213fi
65214
65215
65216  test -n "$ICECC_CMD" && break
65217done
65218
65219    else
65220      # If it succeeded, then it was overridden by the user. We will use it
65221      # for the tool.
65222
65223      # First remove it from the list of overridden variables, so we can test
65224      # for unknown variables in the end.
65225      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65226
65227      # Check if we try to supply an empty value
65228      if test "x$ICECC_CMD" = x; then
65229        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65230$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65232$as_echo_n "checking for ICECC_CMD... " >&6; }
65233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65234$as_echo "disabled" >&6; }
65235      else
65236        # Check if the provided tool contains a complete path.
65237        tool_specified="$ICECC_CMD"
65238        tool_basename="${tool_specified##*/}"
65239        if test "x$tool_basename" = "x$tool_specified"; then
65240          # A command without a complete path is provided, search $PATH.
65241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65242$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65243          # Extract the first word of "$tool_basename", so it can be a program name with args.
65244set dummy $tool_basename; ac_word=$2
65245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65246$as_echo_n "checking for $ac_word... " >&6; }
65247if ${ac_cv_path_ICECC_CMD+:} false; then :
65248  $as_echo_n "(cached) " >&6
65249else
65250  case $ICECC_CMD in
65251  [\\/]* | ?:[\\/]*)
65252  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65253  ;;
65254  *)
65255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65256for as_dir in $PATH
65257do
65258  IFS=$as_save_IFS
65259  test -z "$as_dir" && as_dir=.
65260    for ac_exec_ext in '' $ac_executable_extensions; do
65261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65262    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65264    break 2
65265  fi
65266done
65267  done
65268IFS=$as_save_IFS
65269
65270  ;;
65271esac
65272fi
65273ICECC_CMD=$ac_cv_path_ICECC_CMD
65274if test -n "$ICECC_CMD"; then
65275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65276$as_echo "$ICECC_CMD" >&6; }
65277else
65278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65279$as_echo "no" >&6; }
65280fi
65281
65282
65283          if test "x$ICECC_CMD" = x; then
65284            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65285          fi
65286        else
65287          # Otherwise we believe it is a complete path. Use it as it is.
65288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65289$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65290          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65291$as_echo_n "checking for ICECC_CMD... " >&6; }
65292          if test ! -x "$tool_specified"; then
65293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65294$as_echo "not found" >&6; }
65295            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65296          fi
65297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65298$as_echo "$tool_specified" >&6; }
65299        fi
65300      fi
65301    fi
65302
65303  fi
65304
65305
65306
65307  if test "x$ICECC_CMD" = x; then
65308    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65309  fi
65310
65311
65312    old_path="$PATH"
65313
65314    # Look for icecc-create-env in some known places
65315    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65316
65317
65318
65319  # Publish this variable in the help.
65320
65321
65322  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65323    # The variable is not set by user, try to locate tool using the code snippet
65324    for ac_prog in icecc-create-env
65325do
65326  # Extract the first word of "$ac_prog", so it can be a program name with args.
65327set dummy $ac_prog; ac_word=$2
65328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65329$as_echo_n "checking for $ac_word... " >&6; }
65330if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65331  $as_echo_n "(cached) " >&6
65332else
65333  case $ICECC_CREATE_ENV in
65334  [\\/]* | ?:[\\/]*)
65335  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65336  ;;
65337  *)
65338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65339for as_dir in $PATH
65340do
65341  IFS=$as_save_IFS
65342  test -z "$as_dir" && as_dir=.
65343    for ac_exec_ext in '' $ac_executable_extensions; do
65344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65345    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65347    break 2
65348  fi
65349done
65350  done
65351IFS=$as_save_IFS
65352
65353  ;;
65354esac
65355fi
65356ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65357if test -n "$ICECC_CREATE_ENV"; then
65358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65359$as_echo "$ICECC_CREATE_ENV" >&6; }
65360else
65361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65362$as_echo "no" >&6; }
65363fi
65364
65365
65366  test -n "$ICECC_CREATE_ENV" && break
65367done
65368
65369  else
65370    # The variable is set, but is it from the command line or the environment?
65371
65372    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65373    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65374    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65375      # If it failed, the variable was not from the command line. Ignore it,
65376      # but warn the user (except for BASH, which is always set by the calling BASH).
65377      if test "xICECC_CREATE_ENV" != xBASH; then
65378        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65379$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65380      fi
65381      # Try to locate tool using the code snippet
65382      for ac_prog in icecc-create-env
65383do
65384  # Extract the first word of "$ac_prog", so it can be a program name with args.
65385set dummy $ac_prog; ac_word=$2
65386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65387$as_echo_n "checking for $ac_word... " >&6; }
65388if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65389  $as_echo_n "(cached) " >&6
65390else
65391  case $ICECC_CREATE_ENV in
65392  [\\/]* | ?:[\\/]*)
65393  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65394  ;;
65395  *)
65396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65397for as_dir in $PATH
65398do
65399  IFS=$as_save_IFS
65400  test -z "$as_dir" && as_dir=.
65401    for ac_exec_ext in '' $ac_executable_extensions; do
65402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65403    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65405    break 2
65406  fi
65407done
65408  done
65409IFS=$as_save_IFS
65410
65411  ;;
65412esac
65413fi
65414ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65415if test -n "$ICECC_CREATE_ENV"; then
65416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65417$as_echo "$ICECC_CREATE_ENV" >&6; }
65418else
65419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65420$as_echo "no" >&6; }
65421fi
65422
65423
65424  test -n "$ICECC_CREATE_ENV" && break
65425done
65426
65427    else
65428      # If it succeeded, then it was overridden by the user. We will use it
65429      # for the tool.
65430
65431      # First remove it from the list of overridden variables, so we can test
65432      # for unknown variables in the end.
65433      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65434
65435      # Check if we try to supply an empty value
65436      if test "x$ICECC_CREATE_ENV" = x; then
65437        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65438$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65439        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65440$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65441        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65442$as_echo "disabled" >&6; }
65443      else
65444        # Check if the provided tool contains a complete path.
65445        tool_specified="$ICECC_CREATE_ENV"
65446        tool_basename="${tool_specified##*/}"
65447        if test "x$tool_basename" = "x$tool_specified"; then
65448          # A command without a complete path is provided, search $PATH.
65449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65450$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65451          # Extract the first word of "$tool_basename", so it can be a program name with args.
65452set dummy $tool_basename; ac_word=$2
65453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65454$as_echo_n "checking for $ac_word... " >&6; }
65455if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65456  $as_echo_n "(cached) " >&6
65457else
65458  case $ICECC_CREATE_ENV in
65459  [\\/]* | ?:[\\/]*)
65460  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65461  ;;
65462  *)
65463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65464for as_dir in $PATH
65465do
65466  IFS=$as_save_IFS
65467  test -z "$as_dir" && as_dir=.
65468    for ac_exec_ext in '' $ac_executable_extensions; do
65469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65470    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65472    break 2
65473  fi
65474done
65475  done
65476IFS=$as_save_IFS
65477
65478  ;;
65479esac
65480fi
65481ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65482if test -n "$ICECC_CREATE_ENV"; then
65483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65484$as_echo "$ICECC_CREATE_ENV" >&6; }
65485else
65486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65487$as_echo "no" >&6; }
65488fi
65489
65490
65491          if test "x$ICECC_CREATE_ENV" = x; then
65492            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65493          fi
65494        else
65495          # Otherwise we believe it is a complete path. Use it as it is.
65496          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65497$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65498          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65499$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65500          if test ! -x "$tool_specified"; then
65501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65502$as_echo "not found" >&6; }
65503            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65504          fi
65505          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65506$as_echo "$tool_specified" >&6; }
65507        fi
65508      fi
65509    fi
65510
65511  fi
65512
65513
65514
65515  if test "x$ICECC_CREATE_ENV" = x; then
65516    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65517  fi
65518
65519
65520    # Use icecc-create-env to create a minimal compilation environment that can
65521    # be sent to the other hosts in the icecream cluster.
65522    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65523    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65524    # Older versions of icecc does not have the --gcc parameter
65525    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65526      icecc_gcc_arg="--gcc"
65527    fi
65528    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65529
65530  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65531      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65532          ${icecc_create_env_log} 2>&1 )
65533  if test "$?" != "0"; then
65534    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65535$as_echo "$as_me: icecc-create-env output:" >&6;}
65536    cat \
65537          ${icecc_create_env_log}
65538    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65539  fi
65540
65541    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65542      # For clang, the icecc compilerwrapper is needed. It usually resides next
65543      # to icecc-create-env.
65544
65545
65546
65547  # Publish this variable in the help.
65548
65549
65550  if [ -z "${ICECC_WRAPPER+x}" ]; then
65551    # The variable is not set by user, try to locate tool using the code snippet
65552    for ac_prog in compilerwrapper
65553do
65554  # Extract the first word of "$ac_prog", so it can be a program name with args.
65555set dummy $ac_prog; ac_word=$2
65556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65557$as_echo_n "checking for $ac_word... " >&6; }
65558if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65559  $as_echo_n "(cached) " >&6
65560else
65561  case $ICECC_WRAPPER in
65562  [\\/]* | ?:[\\/]*)
65563  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65564  ;;
65565  *)
65566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65567for as_dir in $PATH
65568do
65569  IFS=$as_save_IFS
65570  test -z "$as_dir" && as_dir=.
65571    for ac_exec_ext in '' $ac_executable_extensions; do
65572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65573    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65575    break 2
65576  fi
65577done
65578  done
65579IFS=$as_save_IFS
65580
65581  ;;
65582esac
65583fi
65584ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65585if test -n "$ICECC_WRAPPER"; then
65586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65587$as_echo "$ICECC_WRAPPER" >&6; }
65588else
65589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65590$as_echo "no" >&6; }
65591fi
65592
65593
65594  test -n "$ICECC_WRAPPER" && break
65595done
65596
65597  else
65598    # The variable is set, but is it from the command line or the environment?
65599
65600    # Try to remove the string !ICECC_WRAPPER! from our list.
65601    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65602    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65603      # If it failed, the variable was not from the command line. Ignore it,
65604      # but warn the user (except for BASH, which is always set by the calling BASH).
65605      if test "xICECC_WRAPPER" != xBASH; then
65606        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65607$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65608      fi
65609      # Try to locate tool using the code snippet
65610      for ac_prog in compilerwrapper
65611do
65612  # Extract the first word of "$ac_prog", so it can be a program name with args.
65613set dummy $ac_prog; ac_word=$2
65614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65615$as_echo_n "checking for $ac_word... " >&6; }
65616if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65617  $as_echo_n "(cached) " >&6
65618else
65619  case $ICECC_WRAPPER in
65620  [\\/]* | ?:[\\/]*)
65621  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65622  ;;
65623  *)
65624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65625for as_dir in $PATH
65626do
65627  IFS=$as_save_IFS
65628  test -z "$as_dir" && as_dir=.
65629    for ac_exec_ext in '' $ac_executable_extensions; do
65630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65631    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65633    break 2
65634  fi
65635done
65636  done
65637IFS=$as_save_IFS
65638
65639  ;;
65640esac
65641fi
65642ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65643if test -n "$ICECC_WRAPPER"; then
65644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65645$as_echo "$ICECC_WRAPPER" >&6; }
65646else
65647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65648$as_echo "no" >&6; }
65649fi
65650
65651
65652  test -n "$ICECC_WRAPPER" && break
65653done
65654
65655    else
65656      # If it succeeded, then it was overridden by the user. We will use it
65657      # for the tool.
65658
65659      # First remove it from the list of overridden variables, so we can test
65660      # for unknown variables in the end.
65661      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65662
65663      # Check if we try to supply an empty value
65664      if test "x$ICECC_WRAPPER" = x; then
65665        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65666$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65667        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65668$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65669        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65670$as_echo "disabled" >&6; }
65671      else
65672        # Check if the provided tool contains a complete path.
65673        tool_specified="$ICECC_WRAPPER"
65674        tool_basename="${tool_specified##*/}"
65675        if test "x$tool_basename" = "x$tool_specified"; then
65676          # A command without a complete path is provided, search $PATH.
65677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65678$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65679          # Extract the first word of "$tool_basename", so it can be a program name with args.
65680set dummy $tool_basename; ac_word=$2
65681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65682$as_echo_n "checking for $ac_word... " >&6; }
65683if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65684  $as_echo_n "(cached) " >&6
65685else
65686  case $ICECC_WRAPPER in
65687  [\\/]* | ?:[\\/]*)
65688  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65689  ;;
65690  *)
65691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65692for as_dir in $PATH
65693do
65694  IFS=$as_save_IFS
65695  test -z "$as_dir" && as_dir=.
65696    for ac_exec_ext in '' $ac_executable_extensions; do
65697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65698    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65700    break 2
65701  fi
65702done
65703  done
65704IFS=$as_save_IFS
65705
65706  ;;
65707esac
65708fi
65709ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65710if test -n "$ICECC_WRAPPER"; then
65711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65712$as_echo "$ICECC_WRAPPER" >&6; }
65713else
65714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65715$as_echo "no" >&6; }
65716fi
65717
65718
65719          if test "x$ICECC_WRAPPER" = x; then
65720            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65721          fi
65722        else
65723          # Otherwise we believe it is a complete path. Use it as it is.
65724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65725$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65726          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65727$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65728          if test ! -x "$tool_specified"; then
65729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65730$as_echo "not found" >&6; }
65731            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65732          fi
65733          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65734$as_echo "$tool_specified" >&6; }
65735        fi
65736      fi
65737    fi
65738
65739  fi
65740
65741
65742
65743  if test "x$ICECC_WRAPPER" = x; then
65744    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65745  fi
65746
65747
65748
65749  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65750      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65751  if test "$?" != "0"; then
65752    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65753$as_echo "$as_me: icecc-create-env output:" >&6;}
65754    cat ${icecc_create_env_log}
65755    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65756  fi
65757
65758    else
65759      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65760    fi
65761    PATH="$old_path"
65762    # The bundle with the compiler gets a name based on checksums. Parse log file
65763    # to find it.
65764    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65765    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65766    if test ! -f ${ICECC_ENV_BUNDLE}; then
65767      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65768    fi
65769    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65770$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65771    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65772$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65773    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65774
65775    if test "x${COMPILE_TYPE}" = "xcross"; then
65776      # If cross compiling, create a separate env package for the build compiler
65777      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65778      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65779      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65780
65781  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65782      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65783            ${icecc_create_env_log_build} 2>&1 )
65784  if test "$?" != "0"; then
65785    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65786$as_echo "$as_me: icecc-create-env output:" >&6;}
65787    cat \
65788            ${icecc_create_env_log_build}
65789    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65790  fi
65791
65792      elif test "x${BUILD_CC##*/}" = "xclang"; then
65793
65794  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65795      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65796  if test "$?" != "0"; then
65797    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65798$as_echo "$as_me: icecc-create-env output:" >&6;}
65799    cat ${icecc_create_env_log_build}
65800    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65801  fi
65802
65803      else
65804        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65805      fi
65806      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65807      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65808      if test ! -f ${ICECC_ENV_BUNDLE}; then
65809        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65810      fi
65811      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65812$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65814$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65815      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65816          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65817    else
65818      BUILD_ICECC="${ICECC}"
65819    fi
65820
65821
65822  fi
65823
65824
65825# Can the C/C++ compiler use precompiled headers?
65826
65827
65828  ###############################################################################
65829  #
65830  # Can the C/C++ compiler use precompiled headers?
65831  #
65832  # Check whether --enable-precompiled-headers was given.
65833if test "${enable_precompiled_headers+set}" = set; then :
65834  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65835else
65836  ENABLE_PRECOMPH=yes
65837fi
65838
65839
65840  USE_PRECOMPILED_HEADER=true
65841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65842$as_echo_n "checking If precompiled header is enabled... " >&6; }
65843  if test "x$ENABLE_PRECOMPH" = xno; then
65844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65845$as_echo "no, forced" >&6; }
65846    USE_PRECOMPILED_HEADER=false
65847  elif test "x$ICECC" != "x"; then
65848    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65849$as_echo "no, does not work effectively with icecc" >&6; }
65850    USE_PRECOMPILED_HEADER=false
65851  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65852    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65853$as_echo "no, does not work with Solaris Studio" >&6; }
65854    USE_PRECOMPILED_HEADER=false
65855  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65857$as_echo "no, does not work with xlc" >&6; }
65858    USE_PRECOMPILED_HEADER=false
65859  else
65860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65861$as_echo "yes" >&6; }
65862  fi
65863
65864  if test "x$ENABLE_PRECOMPH" = xyes; then
65865    # Check that the compiler actually supports precomp headers.
65866    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65867      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65868$as_echo_n "checking that precompiled headers work... " >&6; }
65869      echo "int alfa();" > conftest.h
65870      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65871      if test ! -f conftest.hpp.gch; then
65872        USE_PRECOMPILED_HEADER=false
65873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65874$as_echo "no" >&6; }
65875      else
65876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65877$as_echo "yes" >&6; }
65878      fi
65879      $RM conftest.h conftest.hpp.gch
65880    fi
65881  fi
65882
65883
65884
65885
65886# Setup use of ccache, if available
65887
65888  # Check whether --enable-ccache was given.
65889if test "${enable_ccache+set}" = set; then :
65890  enableval=$enable_ccache;
65891fi
65892
65893
65894  CCACHE_STATUS=
65895  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65896$as_echo_n "checking is ccache enabled... " >&6; }
65897  if test "x$enable_ccache" = xyes; then
65898    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65899      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65900$as_echo "yes" >&6; }
65901      OLD_PATH="$PATH"
65902      if test "x$TOOLCHAIN_PATH" != x; then
65903        PATH=$TOOLCHAIN_PATH:$PATH
65904      fi
65905
65906
65907
65908  # Publish this variable in the help.
65909
65910
65911  if [ -z "${CCACHE+x}" ]; then
65912    # The variable is not set by user, try to locate tool using the code snippet
65913    for ac_prog in ccache
65914do
65915  # Extract the first word of "$ac_prog", so it can be a program name with args.
65916set dummy $ac_prog; ac_word=$2
65917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65918$as_echo_n "checking for $ac_word... " >&6; }
65919if ${ac_cv_path_CCACHE+:} false; then :
65920  $as_echo_n "(cached) " >&6
65921else
65922  case $CCACHE in
65923  [\\/]* | ?:[\\/]*)
65924  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65925  ;;
65926  *)
65927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65928for as_dir in $PATH
65929do
65930  IFS=$as_save_IFS
65931  test -z "$as_dir" && as_dir=.
65932    for ac_exec_ext in '' $ac_executable_extensions; do
65933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65934    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65936    break 2
65937  fi
65938done
65939  done
65940IFS=$as_save_IFS
65941
65942  ;;
65943esac
65944fi
65945CCACHE=$ac_cv_path_CCACHE
65946if test -n "$CCACHE"; then
65947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65948$as_echo "$CCACHE" >&6; }
65949else
65950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65951$as_echo "no" >&6; }
65952fi
65953
65954
65955  test -n "$CCACHE" && break
65956done
65957
65958  else
65959    # The variable is set, but is it from the command line or the environment?
65960
65961    # Try to remove the string !CCACHE! from our list.
65962    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65963    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65964      # If it failed, the variable was not from the command line. Ignore it,
65965      # but warn the user (except for BASH, which is always set by the calling BASH).
65966      if test "xCCACHE" != xBASH; then
65967        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65968$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65969      fi
65970      # Try to locate tool using the code snippet
65971      for ac_prog in ccache
65972do
65973  # Extract the first word of "$ac_prog", so it can be a program name with args.
65974set dummy $ac_prog; ac_word=$2
65975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65976$as_echo_n "checking for $ac_word... " >&6; }
65977if ${ac_cv_path_CCACHE+:} false; then :
65978  $as_echo_n "(cached) " >&6
65979else
65980  case $CCACHE in
65981  [\\/]* | ?:[\\/]*)
65982  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65983  ;;
65984  *)
65985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65986for as_dir in $PATH
65987do
65988  IFS=$as_save_IFS
65989  test -z "$as_dir" && as_dir=.
65990    for ac_exec_ext in '' $ac_executable_extensions; do
65991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65992    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65994    break 2
65995  fi
65996done
65997  done
65998IFS=$as_save_IFS
65999
66000  ;;
66001esac
66002fi
66003CCACHE=$ac_cv_path_CCACHE
66004if test -n "$CCACHE"; then
66005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66006$as_echo "$CCACHE" >&6; }
66007else
66008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66009$as_echo "no" >&6; }
66010fi
66011
66012
66013  test -n "$CCACHE" && break
66014done
66015
66016    else
66017      # If it succeeded, then it was overridden by the user. We will use it
66018      # for the tool.
66019
66020      # First remove it from the list of overridden variables, so we can test
66021      # for unknown variables in the end.
66022      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66023
66024      # Check if we try to supply an empty value
66025      if test "x$CCACHE" = x; then
66026        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66027$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66028        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66029$as_echo_n "checking for CCACHE... " >&6; }
66030        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66031$as_echo "disabled" >&6; }
66032      else
66033        # Check if the provided tool contains a complete path.
66034        tool_specified="$CCACHE"
66035        tool_basename="${tool_specified##*/}"
66036        if test "x$tool_basename" = "x$tool_specified"; then
66037          # A command without a complete path is provided, search $PATH.
66038          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66039$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66040          # Extract the first word of "$tool_basename", so it can be a program name with args.
66041set dummy $tool_basename; ac_word=$2
66042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66043$as_echo_n "checking for $ac_word... " >&6; }
66044if ${ac_cv_path_CCACHE+:} false; then :
66045  $as_echo_n "(cached) " >&6
66046else
66047  case $CCACHE in
66048  [\\/]* | ?:[\\/]*)
66049  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66050  ;;
66051  *)
66052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66053for as_dir in $PATH
66054do
66055  IFS=$as_save_IFS
66056  test -z "$as_dir" && as_dir=.
66057    for ac_exec_ext in '' $ac_executable_extensions; do
66058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66059    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66061    break 2
66062  fi
66063done
66064  done
66065IFS=$as_save_IFS
66066
66067  ;;
66068esac
66069fi
66070CCACHE=$ac_cv_path_CCACHE
66071if test -n "$CCACHE"; then
66072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66073$as_echo "$CCACHE" >&6; }
66074else
66075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66076$as_echo "no" >&6; }
66077fi
66078
66079
66080          if test "x$CCACHE" = x; then
66081            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66082          fi
66083        else
66084          # Otherwise we believe it is a complete path. Use it as it is.
66085          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66086$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66087          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66088$as_echo_n "checking for CCACHE... " >&6; }
66089          if test ! -x "$tool_specified"; then
66090            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66091$as_echo "not found" >&6; }
66092            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66093          fi
66094          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66095$as_echo "$tool_specified" >&6; }
66096        fi
66097      fi
66098    fi
66099
66100  fi
66101
66102
66103
66104  if test "x$CCACHE" = x; then
66105    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66106  fi
66107
66108
66109      PATH="$OLD_PATH"
66110      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66111      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66112    else
66113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66114$as_echo "no" >&6; }
66115      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66116$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66117    fi
66118  elif test "x$enable_ccache" = xno; then
66119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66120$as_echo "no, explicitly disabled" >&6; }
66121    CCACHE_STATUS="Disabled"
66122  elif test "x$enable_ccache" = x; then
66123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66124$as_echo "no" >&6; }
66125  else
66126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66127$as_echo "unknown" >&6; }
66128    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66129  fi
66130
66131
66132
66133# Check whether --with-ccache-dir was given.
66134if test "${with_ccache_dir+set}" = set; then :
66135  withval=$with_ccache_dir;
66136fi
66137
66138
66139  if test "x$with_ccache_dir" != x; then
66140    # When using a non home ccache directory, assume the use is to share ccache files
66141    # with other users. Thus change the umask.
66142    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66143    if test "x$CCACHE" = x; then
66144      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66145$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66146    fi
66147  fi
66148
66149  if test "x$CCACHE" != x; then
66150
66151  if test "x$CCACHE" != x; then
66152    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66153      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66154          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66155      if test "x$HAS_BAD_CCACHE" != "x"; then
66156        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66157      fi
66158    fi
66159    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
66160      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66161          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66162      if test "x$HAS_BAD_CCACHE" != "x"; then
66163        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66164      fi
66165      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66166$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66167      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66168      PUSHED_FLAGS="$CXXFLAGS"
66169      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66170      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66171/* end confdefs.h.  */
66172
66173int
66174main ()
66175{
66176
66177  ;
66178  return 0;
66179}
66180_ACEOF
66181if ac_fn_cxx_try_compile "$LINENO"; then :
66182  CC_KNOWS_CCACHE_TRICK=yes
66183else
66184  CC_KNOWS_CCACHE_TRICK=no
66185fi
66186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66187      CXXFLAGS="$PUSHED_FLAGS"
66188      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66190$as_echo "yes" >&6; }
66191        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66192
66193        CCACHE_SLOPPINESS=pch_defines,time_macros
66194      else
66195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66196$as_echo "no" >&6; }
66197        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66198      fi
66199    fi
66200
66201    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66202        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66203
66204    if test "x$SET_CCACHE_DIR" != x; then
66205      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66206      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66207    fi
66208  fi
66209
66210  fi
66211
66212
66213###############################################################################
66214#
66215# And now the finish...
66216#
66217###############################################################################
66218
66219# Check for some common pitfalls
66220
66221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66222    file_to_test="$SRC_ROOT/LICENSE"
66223    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66224      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
66225    fi
66226  fi
66227
66228
66229  # Did user specify any unknown variables?
66230
66231  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66232    # Replace the separating ! with spaces before presenting for end user.
66233    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66234    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66235$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66236  fi
66237
66238
66239  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66240$as_echo_n "checking if build directory is on local disk... " >&6; }
66241
66242  # df -l lists only local disks; if the given directory is not found then
66243  # a non-zero exit code is given
66244  if test "x$DF" = x; then
66245    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66246      # msys does not have df; use Windows "net use" instead.
66247      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66248      if test "x$IS_NETWORK_DISK" = x; then
66249        OUTPUT_DIR_IS_LOCAL="yes"
66250      else
66251        OUTPUT_DIR_IS_LOCAL="no"
66252      fi
66253    else
66254      # No df here, say it's local
66255      OUTPUT_DIR_IS_LOCAL="yes"
66256    fi
66257  else
66258    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66259      OUTPUT_DIR_IS_LOCAL="yes"
66260    else
66261      OUTPUT_DIR_IS_LOCAL="no"
66262    fi
66263  fi
66264
66265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66266$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66267
66268
66269
66270  # Check if the user has any old-style ALT_ variables set.
66271  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66272
66273  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66274  # Since we can't properly handle the dependencies for this, warn the user about the situation
66275  if test -e $OUTPUT_ROOT/spec.gmk; then
66276    IS_RECONFIGURE=yes
66277  else
66278    IS_RECONFIGURE=no
66279  fi
66280
66281
66282# At the end, call the custom hook. (Dummy macro if no custom sources available)
66283
66284
66285# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66286
66287  # Keep feature lists sorted and free of duplicates
66288  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66289  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66290  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66291  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66292  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66293  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66294  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66295
66296  # Validate features
66297  for variant in $JVM_VARIANTS; do
66298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66299$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66300    features_var_name=JVM_FEATURES_$variant
66301    JVM_FEATURES_TO_TEST=${!features_var_name}
66302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66303$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66304    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66305    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66306    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66307    if test "x$INVALID_FEATURES" != x; then
66308      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66309    fi
66310  done
66311
66312
66313# We're messing a bit with internal autoconf variables to put the config.status
66314# in the output directory instead of the current directory.
66315CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66316
66317# Create the actual output files. Now the main work of configure is done.
66318cat >confcache <<\_ACEOF
66319# This file is a shell script that caches the results of configure
66320# tests run on this system so they can be shared between configure
66321# scripts and configure runs, see configure's option --config-cache.
66322# It is not useful on other systems.  If it contains results you don't
66323# want to keep, you may remove or edit it.
66324#
66325# config.status only pays attention to the cache file if you give it
66326# the --recheck option to rerun configure.
66327#
66328# `ac_cv_env_foo' variables (set or unset) will be overridden when
66329# loading this file, other *unset* `ac_cv_foo' will be assigned the
66330# following values.
66331
66332_ACEOF
66333
66334# The following way of writing the cache mishandles newlines in values,
66335# but we know of no workaround that is simple, portable, and efficient.
66336# So, we kill variables containing newlines.
66337# Ultrix sh set writes to stderr and can't be redirected directly,
66338# and sets the high bit in the cache file unless we assign to the vars.
66339(
66340  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66341    eval ac_val=\$$ac_var
66342    case $ac_val in #(
66343    *${as_nl}*)
66344      case $ac_var in #(
66345      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66346$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66347      esac
66348      case $ac_var in #(
66349      _ | IFS | as_nl) ;; #(
66350      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66351      *) { eval $ac_var=; unset $ac_var;} ;;
66352      esac ;;
66353    esac
66354  done
66355
66356  (set) 2>&1 |
66357    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66358    *${as_nl}ac_space=\ *)
66359      # `set' does not quote correctly, so add quotes: double-quote
66360      # substitution turns \\\\ into \\, and sed turns \\ into \.
66361      sed -n \
66362	"s/'/'\\\\''/g;
66363	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66364      ;; #(
66365    *)
66366      # `set' quotes correctly as required by POSIX, so do not add quotes.
66367      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66368      ;;
66369    esac |
66370    sort
66371) |
66372  sed '
66373     /^ac_cv_env_/b end
66374     t clear
66375     :clear
66376     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66377     t end
66378     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66379     :end' >>confcache
66380if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66381  if test -w "$cache_file"; then
66382    if test "x$cache_file" != "x/dev/null"; then
66383      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66384$as_echo "$as_me: updating cache $cache_file" >&6;}
66385      if test ! -f "$cache_file" || test -h "$cache_file"; then
66386	cat confcache >"$cache_file"
66387      else
66388        case $cache_file in #(
66389        */* | ?:*)
66390	  mv -f confcache "$cache_file"$$ &&
66391	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66392        *)
66393	  mv -f confcache "$cache_file" ;;
66394	esac
66395      fi
66396    fi
66397  else
66398    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66399$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66400  fi
66401fi
66402rm -f confcache
66403
66404test "x$prefix" = xNONE && prefix=$ac_default_prefix
66405# Let make expand exec_prefix.
66406test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66407
66408# Transform confdefs.h into DEFS.
66409# Protect against shell expansion while executing Makefile rules.
66410# Protect against Makefile macro expansion.
66411#
66412# If the first sed substitution is executed (which looks for macros that
66413# take arguments), then branch to the quote section.  Otherwise,
66414# look for a macro that doesn't take arguments.
66415ac_script='
66416:mline
66417/\\$/{
66418 N
66419 s,\\\n,,
66420 b mline
66421}
66422t clear
66423:clear
66424s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66425t quote
66426s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66427t quote
66428b any
66429:quote
66430s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66431s/\[/\\&/g
66432s/\]/\\&/g
66433s/\$/$$/g
66434H
66435:any
66436${
66437	g
66438	s/^\n//
66439	s/\n/ /g
66440	p
66441}
66442'
66443DEFS=`sed -n "$ac_script" confdefs.h`
66444
66445
66446ac_libobjs=
66447ac_ltlibobjs=
66448U=
66449for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66450  # 1. Remove the extension, and $U if already installed.
66451  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66452  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66453  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66454  #    will be set to the directory where LIBOBJS objects are built.
66455  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66456  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66457done
66458LIBOBJS=$ac_libobjs
66459
66460LTLIBOBJS=$ac_ltlibobjs
66461
66462
66463
66464: "${CONFIG_STATUS=./config.status}"
66465ac_write_fail=0
66466ac_clean_files_save=$ac_clean_files
66467ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66468{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66469$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66470as_write_fail=0
66471cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66472#! $SHELL
66473# Generated by $as_me.
66474# Run this file to recreate the current configuration.
66475# Compiler output produced by configure, useful for debugging
66476# configure, is in config.log if it exists.
66477
66478debug=false
66479ac_cs_recheck=false
66480ac_cs_silent=false
66481
66482SHELL=\${CONFIG_SHELL-$SHELL}
66483export SHELL
66484_ASEOF
66485cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66486## -------------------- ##
66487## M4sh Initialization. ##
66488## -------------------- ##
66489
66490# Be more Bourne compatible
66491DUALCASE=1; export DUALCASE # for MKS sh
66492if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66493  emulate sh
66494  NULLCMD=:
66495  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66496  # is contrary to our usage.  Disable this feature.
66497  alias -g '${1+"$@"}'='"$@"'
66498  setopt NO_GLOB_SUBST
66499else
66500  case `(set -o) 2>/dev/null` in #(
66501  *posix*) :
66502    set -o posix ;; #(
66503  *) :
66504     ;;
66505esac
66506fi
66507
66508
66509as_nl='
66510'
66511export as_nl
66512# Printing a long string crashes Solaris 7 /usr/bin/printf.
66513as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66514as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66515as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66516# Prefer a ksh shell builtin over an external printf program on Solaris,
66517# but without wasting forks for bash or zsh.
66518if test -z "$BASH_VERSION$ZSH_VERSION" \
66519    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66520  as_echo='print -r --'
66521  as_echo_n='print -rn --'
66522elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66523  as_echo='printf %s\n'
66524  as_echo_n='printf %s'
66525else
66526  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66527    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66528    as_echo_n='/usr/ucb/echo -n'
66529  else
66530    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66531    as_echo_n_body='eval
66532      arg=$1;
66533      case $arg in #(
66534      *"$as_nl"*)
66535	expr "X$arg" : "X\\(.*\\)$as_nl";
66536	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66537      esac;
66538      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66539    '
66540    export as_echo_n_body
66541    as_echo_n='sh -c $as_echo_n_body as_echo'
66542  fi
66543  export as_echo_body
66544  as_echo='sh -c $as_echo_body as_echo'
66545fi
66546
66547# The user is always right.
66548if test "${PATH_SEPARATOR+set}" != set; then
66549  PATH_SEPARATOR=:
66550  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66551    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66552      PATH_SEPARATOR=';'
66553  }
66554fi
66555
66556
66557# IFS
66558# We need space, tab and new line, in precisely that order.  Quoting is
66559# there to prevent editors from complaining about space-tab.
66560# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66561# splitting by setting IFS to empty value.)
66562IFS=" ""	$as_nl"
66563
66564# Find who we are.  Look in the path if we contain no directory separator.
66565as_myself=
66566case $0 in #((
66567  *[\\/]* ) as_myself=$0 ;;
66568  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66569for as_dir in $PATH
66570do
66571  IFS=$as_save_IFS
66572  test -z "$as_dir" && as_dir=.
66573    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66574  done
66575IFS=$as_save_IFS
66576
66577     ;;
66578esac
66579# We did not find ourselves, most probably we were run as `sh COMMAND'
66580# in which case we are not to be found in the path.
66581if test "x$as_myself" = x; then
66582  as_myself=$0
66583fi
66584if test ! -f "$as_myself"; then
66585  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66586  exit 1
66587fi
66588
66589# Unset variables that we do not need and which cause bugs (e.g. in
66590# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66591# suppresses any "Segmentation fault" message there.  '((' could
66592# trigger a bug in pdksh 5.2.14.
66593for as_var in BASH_ENV ENV MAIL MAILPATH
66594do eval test x\${$as_var+set} = xset \
66595  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66596done
66597PS1='$ '
66598PS2='> '
66599PS4='+ '
66600
66601# NLS nuisances.
66602LC_ALL=C
66603export LC_ALL
66604LANGUAGE=C
66605export LANGUAGE
66606
66607# CDPATH.
66608(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66609
66610
66611# as_fn_error STATUS ERROR [LINENO LOG_FD]
66612# ----------------------------------------
66613# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66614# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66615# script with STATUS, using 1 if that was 0.
66616as_fn_error ()
66617{
66618  as_status=$1; test $as_status -eq 0 && as_status=1
66619  if test "$4"; then
66620    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66621    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66622  fi
66623  $as_echo "$as_me: error: $2" >&2
66624  as_fn_exit $as_status
66625} # as_fn_error
66626
66627
66628# as_fn_set_status STATUS
66629# -----------------------
66630# Set $? to STATUS, without forking.
66631as_fn_set_status ()
66632{
66633  return $1
66634} # as_fn_set_status
66635
66636# as_fn_exit STATUS
66637# -----------------
66638# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66639as_fn_exit ()
66640{
66641  set +e
66642  as_fn_set_status $1
66643  exit $1
66644} # as_fn_exit
66645
66646# as_fn_unset VAR
66647# ---------------
66648# Portably unset VAR.
66649as_fn_unset ()
66650{
66651  { eval $1=; unset $1;}
66652}
66653as_unset=as_fn_unset
66654# as_fn_append VAR VALUE
66655# ----------------------
66656# Append the text in VALUE to the end of the definition contained in VAR. Take
66657# advantage of any shell optimizations that allow amortized linear growth over
66658# repeated appends, instead of the typical quadratic growth present in naive
66659# implementations.
66660if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66661  eval 'as_fn_append ()
66662  {
66663    eval $1+=\$2
66664  }'
66665else
66666  as_fn_append ()
66667  {
66668    eval $1=\$$1\$2
66669  }
66670fi # as_fn_append
66671
66672# as_fn_arith ARG...
66673# ------------------
66674# Perform arithmetic evaluation on the ARGs, and store the result in the
66675# global $as_val. Take advantage of shells that can avoid forks. The arguments
66676# must be portable across $(()) and expr.
66677if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66678  eval 'as_fn_arith ()
66679  {
66680    as_val=$(( $* ))
66681  }'
66682else
66683  as_fn_arith ()
66684  {
66685    as_val=`expr "$@" || test $? -eq 1`
66686  }
66687fi # as_fn_arith
66688
66689
66690if expr a : '\(a\)' >/dev/null 2>&1 &&
66691   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66692  as_expr=expr
66693else
66694  as_expr=false
66695fi
66696
66697if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66698  as_basename=basename
66699else
66700  as_basename=false
66701fi
66702
66703if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66704  as_dirname=dirname
66705else
66706  as_dirname=false
66707fi
66708
66709as_me=`$as_basename -- "$0" ||
66710$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66711	 X"$0" : 'X\(//\)$' \| \
66712	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66713$as_echo X/"$0" |
66714    sed '/^.*\/\([^/][^/]*\)\/*$/{
66715	    s//\1/
66716	    q
66717	  }
66718	  /^X\/\(\/\/\)$/{
66719	    s//\1/
66720	    q
66721	  }
66722	  /^X\/\(\/\).*/{
66723	    s//\1/
66724	    q
66725	  }
66726	  s/.*/./; q'`
66727
66728# Avoid depending upon Character Ranges.
66729as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66730as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66731as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66732as_cr_digits='0123456789'
66733as_cr_alnum=$as_cr_Letters$as_cr_digits
66734
66735ECHO_C= ECHO_N= ECHO_T=
66736case `echo -n x` in #(((((
66737-n*)
66738  case `echo 'xy\c'` in
66739  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66740  xy)  ECHO_C='\c';;
66741  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66742       ECHO_T='	';;
66743  esac;;
66744*)
66745  ECHO_N='-n';;
66746esac
66747
66748rm -f conf$$ conf$$.exe conf$$.file
66749if test -d conf$$.dir; then
66750  rm -f conf$$.dir/conf$$.file
66751else
66752  rm -f conf$$.dir
66753  mkdir conf$$.dir 2>/dev/null
66754fi
66755if (echo >conf$$.file) 2>/dev/null; then
66756  if ln -s conf$$.file conf$$ 2>/dev/null; then
66757    as_ln_s='ln -s'
66758    # ... but there are two gotchas:
66759    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66760    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66761    # In both cases, we have to default to `cp -pR'.
66762    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66763      as_ln_s='cp -pR'
66764  elif ln conf$$.file conf$$ 2>/dev/null; then
66765    as_ln_s=ln
66766  else
66767    as_ln_s='cp -pR'
66768  fi
66769else
66770  as_ln_s='cp -pR'
66771fi
66772rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66773rmdir conf$$.dir 2>/dev/null
66774
66775
66776# as_fn_mkdir_p
66777# -------------
66778# Create "$as_dir" as a directory, including parents if necessary.
66779as_fn_mkdir_p ()
66780{
66781
66782  case $as_dir in #(
66783  -*) as_dir=./$as_dir;;
66784  esac
66785  test -d "$as_dir" || eval $as_mkdir_p || {
66786    as_dirs=
66787    while :; do
66788      case $as_dir in #(
66789      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66790      *) as_qdir=$as_dir;;
66791      esac
66792      as_dirs="'$as_qdir' $as_dirs"
66793      as_dir=`$as_dirname -- "$as_dir" ||
66794$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66795	 X"$as_dir" : 'X\(//\)[^/]' \| \
66796	 X"$as_dir" : 'X\(//\)$' \| \
66797	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66798$as_echo X"$as_dir" |
66799    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66800	    s//\1/
66801	    q
66802	  }
66803	  /^X\(\/\/\)[^/].*/{
66804	    s//\1/
66805	    q
66806	  }
66807	  /^X\(\/\/\)$/{
66808	    s//\1/
66809	    q
66810	  }
66811	  /^X\(\/\).*/{
66812	    s//\1/
66813	    q
66814	  }
66815	  s/.*/./; q'`
66816      test -d "$as_dir" && break
66817    done
66818    test -z "$as_dirs" || eval "mkdir $as_dirs"
66819  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66820
66821
66822} # as_fn_mkdir_p
66823if mkdir -p . 2>/dev/null; then
66824  as_mkdir_p='mkdir -p "$as_dir"'
66825else
66826  test -d ./-p && rmdir ./-p
66827  as_mkdir_p=false
66828fi
66829
66830
66831# as_fn_executable_p FILE
66832# -----------------------
66833# Test if FILE is an executable regular file.
66834as_fn_executable_p ()
66835{
66836  test -f "$1" && test -x "$1"
66837} # as_fn_executable_p
66838as_test_x='test -x'
66839as_executable_p=as_fn_executable_p
66840
66841# Sed expression to map a string onto a valid CPP name.
66842as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66843
66844# Sed expression to map a string onto a valid variable name.
66845as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66846
66847
66848exec 6>&1
66849## ----------------------------------- ##
66850## Main body of $CONFIG_STATUS script. ##
66851## ----------------------------------- ##
66852_ASEOF
66853test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66854
66855cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66856# Save the log message, to keep $0 and so on meaningful, and to
66857# report actual input values of CONFIG_FILES etc. instead of their
66858# values after options handling.
66859ac_log="
66860This file was extended by OpenJDK $as_me jdk9, which was
66861generated by GNU Autoconf 2.69.  Invocation command line was
66862
66863  CONFIG_FILES    = $CONFIG_FILES
66864  CONFIG_HEADERS  = $CONFIG_HEADERS
66865  CONFIG_LINKS    = $CONFIG_LINKS
66866  CONFIG_COMMANDS = $CONFIG_COMMANDS
66867  $ $0 $@
66868
66869on `(hostname || uname -n) 2>/dev/null | sed 1q`
66870"
66871
66872_ACEOF
66873
66874case $ac_config_files in *"
66875"*) set x $ac_config_files; shift; ac_config_files=$*;;
66876esac
66877
66878
66879
66880cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66881# Files that config.status was made for.
66882config_files="$ac_config_files"
66883
66884_ACEOF
66885
66886cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66887ac_cs_usage="\
66888\`$as_me' instantiates files and other configuration actions
66889from templates according to the current configuration.  Unless the files
66890and actions are specified as TAGs, all are instantiated by default.
66891
66892Usage: $0 [OPTION]... [TAG]...
66893
66894  -h, --help       print this help, then exit
66895  -V, --version    print version number and configuration settings, then exit
66896      --config     print configuration, then exit
66897  -q, --quiet, --silent
66898                   do not print progress messages
66899  -d, --debug      don't remove temporary files
66900      --recheck    update $as_me by reconfiguring in the same conditions
66901      --file=FILE[:TEMPLATE]
66902                   instantiate the configuration file FILE
66903
66904Configuration files:
66905$config_files
66906
66907Report bugs to <build-dev@openjdk.java.net>.
66908OpenJDK home page: <http://openjdk.java.net>."
66909
66910_ACEOF
66911cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66912ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66913ac_cs_version="\\
66914OpenJDK config.status jdk9
66915configured by $0, generated by GNU Autoconf 2.69,
66916  with options \\"\$ac_cs_config\\"
66917
66918Copyright (C) 2012 Free Software Foundation, Inc.
66919This config.status script is free software; the Free Software Foundation
66920gives unlimited permission to copy, distribute and modify it."
66921
66922ac_pwd='$ac_pwd'
66923srcdir='$srcdir'
66924AWK='$AWK'
66925test -n "\$AWK" || AWK=awk
66926_ACEOF
66927
66928cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66929# The default lists apply if the user does not specify any file.
66930ac_need_defaults=:
66931while test $# != 0
66932do
66933  case $1 in
66934  --*=?*)
66935    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66936    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66937    ac_shift=:
66938    ;;
66939  --*=)
66940    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66941    ac_optarg=
66942    ac_shift=:
66943    ;;
66944  *)
66945    ac_option=$1
66946    ac_optarg=$2
66947    ac_shift=shift
66948    ;;
66949  esac
66950
66951  case $ac_option in
66952  # Handling of the options.
66953  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66954    ac_cs_recheck=: ;;
66955  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66956    $as_echo "$ac_cs_version"; exit ;;
66957  --config | --confi | --conf | --con | --co | --c )
66958    $as_echo "$ac_cs_config"; exit ;;
66959  --debug | --debu | --deb | --de | --d | -d )
66960    debug=: ;;
66961  --file | --fil | --fi | --f )
66962    $ac_shift
66963    case $ac_optarg in
66964    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66965    '') as_fn_error $? "missing file argument" ;;
66966    esac
66967    as_fn_append CONFIG_FILES " '$ac_optarg'"
66968    ac_need_defaults=false;;
66969  --he | --h |  --help | --hel | -h )
66970    $as_echo "$ac_cs_usage"; exit ;;
66971  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66972  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66973    ac_cs_silent=: ;;
66974
66975  # This is an error.
66976  -*) as_fn_error $? "unrecognized option: \`$1'
66977Try \`$0 --help' for more information." ;;
66978
66979  *) as_fn_append ac_config_targets " $1"
66980     ac_need_defaults=false ;;
66981
66982  esac
66983  shift
66984done
66985
66986ac_configure_extra_args=
66987
66988if $ac_cs_silent; then
66989  exec 6>/dev/null
66990  ac_configure_extra_args="$ac_configure_extra_args --silent"
66991fi
66992
66993_ACEOF
66994cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66995if \$ac_cs_recheck; then
66996  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66997  shift
66998  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66999  CONFIG_SHELL='$SHELL'
67000  export CONFIG_SHELL
67001  exec "\$@"
67002fi
67003
67004_ACEOF
67005cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67006exec 5>>config.log
67007{
67008  echo
67009  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67010## Running $as_me. ##
67011_ASBOX
67012  $as_echo "$ac_log"
67013} >&5
67014
67015_ACEOF
67016cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67017_ACEOF
67018
67019cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67020
67021# Handling of arguments.
67022for ac_config_target in $ac_config_targets
67023do
67024  case $ac_config_target in
67025    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67026    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67027    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67028    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67029    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67030
67031  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67032  esac
67033done
67034
67035
67036# If the user did not use the arguments to specify the items to instantiate,
67037# then the envvar interface is used.  Set only those that are not.
67038# We use the long form for the default assignment because of an extremely
67039# bizarre bug on SunOS 4.1.3.
67040if $ac_need_defaults; then
67041  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67042fi
67043
67044# Have a temporary directory for convenience.  Make it in the build tree
67045# simply because there is no reason against having it here, and in addition,
67046# creating and moving files from /tmp can sometimes cause problems.
67047# Hook for its removal unless debugging.
67048# Note that there is a small window in which the directory will not be cleaned:
67049# after its creation but before its name has been assigned to `$tmp'.
67050$debug ||
67051{
67052  tmp= ac_tmp=
67053  trap 'exit_status=$?
67054  : "${ac_tmp:=$tmp}"
67055  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67056' 0
67057  trap 'as_fn_exit 1' 1 2 13 15
67058}
67059# Create a (secure) tmp directory for tmp files.
67060
67061{
67062  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67063  test -d "$tmp"
67064}  ||
67065{
67066  tmp=./conf$$-$RANDOM
67067  (umask 077 && mkdir "$tmp")
67068} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67069ac_tmp=$tmp
67070
67071# Set up the scripts for CONFIG_FILES section.
67072# No need to generate them if there are no CONFIG_FILES.
67073# This happens for instance with `./config.status config.h'.
67074if test -n "$CONFIG_FILES"; then
67075
67076
67077ac_cr=`echo X | tr X '\015'`
67078# On cygwin, bash can eat \r inside `` if the user requested igncr.
67079# But we know of no other shell where ac_cr would be empty at this
67080# point, so we can use a bashism as a fallback.
67081if test "x$ac_cr" = x; then
67082  eval ac_cr=\$\'\\r\'
67083fi
67084ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67085if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67086  ac_cs_awk_cr='\\r'
67087else
67088  ac_cs_awk_cr=$ac_cr
67089fi
67090
67091echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67092_ACEOF
67093
67094
67095{
67096  echo "cat >conf$$subs.awk <<_ACEOF" &&
67097  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67098  echo "_ACEOF"
67099} >conf$$subs.sh ||
67100  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67101ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67102ac_delim='%!_!# '
67103for ac_last_try in false false false false false :; do
67104  . ./conf$$subs.sh ||
67105    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67106
67107  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67108  if test $ac_delim_n = $ac_delim_num; then
67109    break
67110  elif $ac_last_try; then
67111    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67112  else
67113    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67114  fi
67115done
67116rm -f conf$$subs.sh
67117
67118cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67119cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67120_ACEOF
67121sed -n '
67122h
67123s/^/S["/; s/!.*/"]=/
67124p
67125g
67126s/^[^!]*!//
67127:repl
67128t repl
67129s/'"$ac_delim"'$//
67130t delim
67131:nl
67132h
67133s/\(.\{148\}\)..*/\1/
67134t more1
67135s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67136p
67137n
67138b repl
67139:more1
67140s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67141p
67142g
67143s/.\{148\}//
67144t nl
67145:delim
67146h
67147s/\(.\{148\}\)..*/\1/
67148t more2
67149s/["\\]/\\&/g; s/^/"/; s/$/"/
67150p
67151b
67152:more2
67153s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67154p
67155g
67156s/.\{148\}//
67157t delim
67158' <conf$$subs.awk | sed '
67159/^[^""]/{
67160  N
67161  s/\n//
67162}
67163' >>$CONFIG_STATUS || ac_write_fail=1
67164rm -f conf$$subs.awk
67165cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67166_ACAWK
67167cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67168  for (key in S) S_is_set[key] = 1
67169  FS = ""
67170
67171}
67172{
67173  line = $ 0
67174  nfields = split(line, field, "@")
67175  substed = 0
67176  len = length(field[1])
67177  for (i = 2; i < nfields; i++) {
67178    key = field[i]
67179    keylen = length(key)
67180    if (S_is_set[key]) {
67181      value = S[key]
67182      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67183      len += length(value) + length(field[++i])
67184      substed = 1
67185    } else
67186      len += 1 + keylen
67187  }
67188
67189  print line
67190}
67191
67192_ACAWK
67193_ACEOF
67194cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67195if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67196  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67197else
67198  cat
67199fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67200  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67201_ACEOF
67202
67203# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67204# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67205# trailing colons and then remove the whole line if VPATH becomes empty
67206# (actually we leave an empty line to preserve line numbers).
67207if test "x$srcdir" = x.; then
67208  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67209h
67210s///
67211s/^/:/
67212s/[	 ]*$/:/
67213s/:\$(srcdir):/:/g
67214s/:\${srcdir}:/:/g
67215s/:@srcdir@:/:/g
67216s/^:*//
67217s/:*$//
67218x
67219s/\(=[	 ]*\).*/\1/
67220G
67221s/\n//
67222s/^[^=]*=[	 ]*$//
67223}'
67224fi
67225
67226cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67227fi # test -n "$CONFIG_FILES"
67228
67229
67230eval set X "  :F $CONFIG_FILES      "
67231shift
67232for ac_tag
67233do
67234  case $ac_tag in
67235  :[FHLC]) ac_mode=$ac_tag; continue;;
67236  esac
67237  case $ac_mode$ac_tag in
67238  :[FHL]*:*);;
67239  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67240  :[FH]-) ac_tag=-:-;;
67241  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67242  esac
67243  ac_save_IFS=$IFS
67244  IFS=:
67245  set x $ac_tag
67246  IFS=$ac_save_IFS
67247  shift
67248  ac_file=$1
67249  shift
67250
67251  case $ac_mode in
67252  :L) ac_source=$1;;
67253  :[FH])
67254    ac_file_inputs=
67255    for ac_f
67256    do
67257      case $ac_f in
67258      -) ac_f="$ac_tmp/stdin";;
67259      *) # Look for the file first in the build tree, then in the source tree
67260	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67261	 # because $ac_f cannot contain `:'.
67262	 test -f "$ac_f" ||
67263	   case $ac_f in
67264	   [\\/$]*) false;;
67265	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67266	   esac ||
67267	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67268      esac
67269      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67270      as_fn_append ac_file_inputs " '$ac_f'"
67271    done
67272
67273    # Let's still pretend it is `configure' which instantiates (i.e., don't
67274    # use $as_me), people would be surprised to read:
67275    #    /* config.h.  Generated by config.status.  */
67276    configure_input='Generated from '`
67277	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67278	`' by configure.'
67279    if test x"$ac_file" != x-; then
67280      configure_input="$ac_file.  $configure_input"
67281      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67282$as_echo "$as_me: creating $ac_file" >&6;}
67283    fi
67284    # Neutralize special characters interpreted by sed in replacement strings.
67285    case $configure_input in #(
67286    *\&* | *\|* | *\\* )
67287       ac_sed_conf_input=`$as_echo "$configure_input" |
67288       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67289    *) ac_sed_conf_input=$configure_input;;
67290    esac
67291
67292    case $ac_tag in
67293    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67294      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67295    esac
67296    ;;
67297  esac
67298
67299  ac_dir=`$as_dirname -- "$ac_file" ||
67300$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67301	 X"$ac_file" : 'X\(//\)[^/]' \| \
67302	 X"$ac_file" : 'X\(//\)$' \| \
67303	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67304$as_echo X"$ac_file" |
67305    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67306	    s//\1/
67307	    q
67308	  }
67309	  /^X\(\/\/\)[^/].*/{
67310	    s//\1/
67311	    q
67312	  }
67313	  /^X\(\/\/\)$/{
67314	    s//\1/
67315	    q
67316	  }
67317	  /^X\(\/\).*/{
67318	    s//\1/
67319	    q
67320	  }
67321	  s/.*/./; q'`
67322  as_dir="$ac_dir"; as_fn_mkdir_p
67323  ac_builddir=.
67324
67325case "$ac_dir" in
67326.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67327*)
67328  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67329  # A ".." for each directory in $ac_dir_suffix.
67330  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67331  case $ac_top_builddir_sub in
67332  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67333  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67334  esac ;;
67335esac
67336ac_abs_top_builddir=$ac_pwd
67337ac_abs_builddir=$ac_pwd$ac_dir_suffix
67338# for backward compatibility:
67339ac_top_builddir=$ac_top_build_prefix
67340
67341case $srcdir in
67342  .)  # We are building in place.
67343    ac_srcdir=.
67344    ac_top_srcdir=$ac_top_builddir_sub
67345    ac_abs_top_srcdir=$ac_pwd ;;
67346  [\\/]* | ?:[\\/]* )  # Absolute name.
67347    ac_srcdir=$srcdir$ac_dir_suffix;
67348    ac_top_srcdir=$srcdir
67349    ac_abs_top_srcdir=$srcdir ;;
67350  *) # Relative name.
67351    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67352    ac_top_srcdir=$ac_top_build_prefix$srcdir
67353    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67354esac
67355ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67356
67357
67358  case $ac_mode in
67359  :F)
67360  #
67361  # CONFIG_FILE
67362  #
67363
67364_ACEOF
67365
67366cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67367# If the template does not know about datarootdir, expand it.
67368# FIXME: This hack should be removed a few years after 2.60.
67369ac_datarootdir_hack=; ac_datarootdir_seen=
67370ac_sed_dataroot='
67371/datarootdir/ {
67372  p
67373  q
67374}
67375/@datadir@/p
67376/@docdir@/p
67377/@infodir@/p
67378/@localedir@/p
67379/@mandir@/p'
67380case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67381*datarootdir*) ac_datarootdir_seen=yes;;
67382*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67383  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67384$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67385_ACEOF
67386cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67387  ac_datarootdir_hack='
67388  s&@datadir@&$datadir&g
67389  s&@docdir@&$docdir&g
67390  s&@infodir@&$infodir&g
67391  s&@localedir@&$localedir&g
67392  s&@mandir@&$mandir&g
67393  s&\\\${datarootdir}&$datarootdir&g' ;;
67394esac
67395_ACEOF
67396
67397# Neutralize VPATH when `$srcdir' = `.'.
67398# Shell code in configure.ac might set extrasub.
67399# FIXME: do we really want to maintain this feature?
67400cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67401ac_sed_extra="$ac_vpsub
67402$extrasub
67403_ACEOF
67404cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67405:t
67406/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67407s|@configure_input@|$ac_sed_conf_input|;t t
67408s&@top_builddir@&$ac_top_builddir_sub&;t t
67409s&@top_build_prefix@&$ac_top_build_prefix&;t t
67410s&@srcdir@&$ac_srcdir&;t t
67411s&@abs_srcdir@&$ac_abs_srcdir&;t t
67412s&@top_srcdir@&$ac_top_srcdir&;t t
67413s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67414s&@builddir@&$ac_builddir&;t t
67415s&@abs_builddir@&$ac_abs_builddir&;t t
67416s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67417$ac_datarootdir_hack
67418"
67419eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67420  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67421
67422test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67423  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67424  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67425      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67426  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67427which seems to be undefined.  Please make sure it is defined" >&5
67428$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67429which seems to be undefined.  Please make sure it is defined" >&2;}
67430
67431  rm -f "$ac_tmp/stdin"
67432  case $ac_file in
67433  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67434  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67435  esac \
67436  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67437 ;;
67438
67439
67440
67441  esac
67442
67443done # for ac_tag
67444
67445
67446as_fn_exit 0
67447_ACEOF
67448ac_clean_files=$ac_clean_files_save
67449
67450test $ac_write_fail = 0 ||
67451  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67452
67453
67454# configure is writing to config.log, and then calls config.status.
67455# config.status does its own redirection, appending to config.log.
67456# Unfortunately, on DOS this fails, as config.log is still kept open
67457# by configure, so config.status won't be able to write to it; its
67458# output is simply discarded.  So we exec the FD to /dev/null,
67459# effectively closing config.log, so it can be properly (re)opened and
67460# appended to by config.status.  When coming back to configure, we
67461# need to make the FD available again.
67462if test "$no_create" != yes; then
67463  ac_cs_success=:
67464  ac_config_status_args=
67465  test "$silent" = yes &&
67466    ac_config_status_args="$ac_config_status_args --quiet"
67467  exec 5>/dev/null
67468  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67469  exec 5>>config.log
67470  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67471  # would make configure fail if this is the last instruction.
67472  $ac_cs_success || as_fn_exit 1
67473fi
67474if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67475  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67476$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67477fi
67478
67479
67480# After AC_OUTPUT, we need to do final work
67481
67482
67483  # Try to move config.log (generated by autoconf) to the configure-support directory.
67484  if test -e ./config.log; then
67485    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67486  fi
67487
67488  # Rotate our log file (configure.log)
67489  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67490    $RM -f "$OUTPUT_ROOT/configure.log.old"
67491  fi
67492  if test -e "$OUTPUT_ROOT/configure.log"; then
67493    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67494  fi
67495
67496  # Move configure.log from current directory to the build output root
67497  if test -e ./configure.log; then
67498    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67499  fi
67500
67501  # Make the compare script executable
67502  $CHMOD +x $OUTPUT_ROOT/compare.sh
67503
67504
67505# Finally output some useful information to the user
67506
67507  # Finally output some useful information to the user
67508
67509  printf "\n"
67510  printf "====================================================\n"
67511  if test "x$no_create" != "xyes"; then
67512    if test "x$IS_RECONFIGURE" != "xyes"; then
67513      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67514    else
67515      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67516    fi
67517  else
67518    if test "x$IS_RECONFIGURE" != "xyes"; then
67519      printf "A configuration has been successfully checked but not created\n"
67520    else
67521      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67522    fi
67523  fi
67524  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67525    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67526  else
67527    printf "using default settings.\n"
67528  fi
67529
67530  printf "\n"
67531  printf "Configuration summary:\n"
67532  printf "* Debug level:    $DEBUG_LEVEL\n"
67533  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67534  printf "* JDK variant:    $JDK_VARIANT\n"
67535  printf "* JVM variants:   $JVM_VARIANTS\n"
67536  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67537  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67538
67539  printf "\n"
67540  printf "Tools summary:\n"
67541  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67542    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67543  fi
67544  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67545  if test "x$TOOLCHAIN_VERSION" != "x"; then
67546    print_version=" $TOOLCHAIN_VERSION"
67547  fi
67548  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67549  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67550  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67551
67552  printf "\n"
67553  printf "Build performance summary:\n"
67554  printf "* Cores to use:   $JOBS\n"
67555  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67556  if test "x$CCACHE_STATUS" != "x"; then
67557    printf "* ccache status:  $CCACHE_STATUS\n"
67558  fi
67559  printf "\n"
67560
67561  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67562    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67563    printf "will result in longer build times.\n"
67564    printf "\n"
67565  fi
67566
67567  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67568    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67569    printf "These are not respected, and will be ignored. It is recommended\n"
67570    printf "that you clean your environment. The following variables are set:\n"
67571    printf "$FOUND_ALT_VARIABLES\n"
67572    printf "\n"
67573  fi
67574
67575  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67576    printf "WARNING: Your build output directory is not on a local disk.\n"
67577    printf "This will severely degrade build performance!\n"
67578    printf "It is recommended that you create an output directory on a local disk,\n"
67579    printf "and run the configure script again from that directory.\n"
67580    printf "\n"
67581  fi
67582
67583  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67584    printf "WARNING: The result of this configuration has overridden an older\n"
67585    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67586    printf "proper build. Failure to do so might result in strange build problems.\n"
67587    printf "\n"
67588  fi
67589
67590  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67591    printf "WARNING: The result of this configuration was not saved.\n"
67592    printf "You should run without '--no-create | -n' to create the configuration.\n"
67593    printf "\n"
67594  fi
67595
67596
67597
67598  # Locate config.log.
67599  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67600    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67601  elif test -e "./config.log"; then
67602    CONFIG_LOG_PATH="."
67603  fi
67604
67605  if test -e "$CONFIG_LOG_PATH/config.log"; then
67606    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67607    if test $? -eq 0; then
67608      printf "The following warnings were produced. Repeated here for convenience:\n"
67609      # We must quote sed expression (using []) to stop m4 from eating the [].
67610      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67611      printf "\n"
67612    fi
67613  fi
67614
67615