generated-configure.sh revision 2774:f10b706d5c33
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657VALID_JVM_FEATURES
658JVM_FEATURES_custom
659JVM_FEATURES_zeroshark
660JVM_FEATURES_zero
661JVM_FEATURES_minimal
662JVM_FEATURES_core
663JVM_FEATURES_client
664JVM_FEATURES_server
665INCLUDE_GRAAL
666STLPORT_LIB
667LIBZIP_CAN_USE_MMAP
668LIBDL
669LIBM
670USE_EXTERNAL_LCMS
671LCMS_LIBS
672LCMS_CFLAGS
673USE_EXTERNAL_LIBZ
674USE_EXTERNAL_LIBPNG
675PNG_LIBS
676PNG_CFLAGS
677USE_EXTERNAL_LIBGIF
678USE_EXTERNAL_LIBJPEG
679LLVM_LIBS
680LLVM_LDFLAGS
681LLVM_CFLAGS
682LLVM_CONFIG
683LIBFFI_LIB_FILE
684ENABLE_LIBFFI_BUNDLING
685LIBFFI_LIBS
686LIBFFI_CFLAGS
687ALSA_LIBS
688ALSA_CFLAGS
689FREETYPE_LICENSE
690FREETYPE_BUNDLE_LIB_PATH
691FREETYPE_LIBS
692FREETYPE_CFLAGS
693CUPS_CFLAGS
694X_EXTRA_LIBS
695X_LIBS
696X_PRE_LIBS
697X_CFLAGS
698XMKMF
699MSVCP_DLL
700MSVCR_DLL
701LIBCXX
702FIXPATH_DETACH_FLAG
703FIXPATH
704BUILD_GTEST
705ENABLE_AOT
706GCOV_ENABLED
707ZIP_EXTERNAL_DEBUG_SYMBOLS
708COPY_DEBUG_SYMBOLS
709COMPILE_WITH_DEBUG_SYMBOLS
710CFLAGS_WARNINGS_ARE_ERRORS
711BUILD_CC_DISABLE_WARNING_PREFIX
712DISABLE_WARNING_PREFIX
713WARNINGS_AS_ERRORS
714COMPILER_SUPPORTS_TARGET_BITS_FLAG
715LDFLAGS_TESTEXE
716LDFLAGS_TESTLIB
717CXXFLAGS_TESTEXE
718CXXFLAGS_TESTLIB
719CFLAGS_TESTEXE
720CFLAGS_TESTLIB
721OPENJDK_BUILD_JVM_LIBS
722OPENJDK_BUILD_JVM_ASFLAGS
723OPENJDK_BUILD_JVM_LDFLAGS
724OPENJDK_BUILD_JVM_CFLAGS
725OPENJDK_BUILD_LDFLAGS_HASH_STYLE
726OPENJDK_BUILD_LDFLAGS_CXX_JDK
727OPENJDK_BUILD_JDKEXE_LIBS
728OPENJDK_BUILD_JDKLIB_LIBS
729OPENJDK_BUILD_LDFLAGS_JDKEXE
730OPENJDK_BUILD_LDFLAGS_JDKLIB
731OPENJDK_BUILD_CXXFLAGS_JDKEXE
732OPENJDK_BUILD_CXXFLAGS_JDKLIB
733OPENJDK_BUILD_CFLAGS_JDKEXE
734OPENJDK_BUILD_CFLAGS_JDKLIB
735OPENJDK_BUILD_CXXSTD_CXXFLAG
736JVM_LIBS
737JVM_ASFLAGS
738JVM_LDFLAGS
739JVM_CFLAGS
740LDFLAGS_HASH_STYLE
741LDFLAGS_CXX_JDK
742JDKEXE_LIBS
743JDKLIB_LIBS
744LDFLAGS_JDKEXE
745LDFLAGS_JDKLIB
746CXXFLAGS_JDKEXE
747CXXFLAGS_JDKLIB
748CFLAGS_JDKEXE
749CFLAGS_JDKLIB
750MACOSX_VERSION_MAX
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
791JIB_JAR
792JT_HOME
793JTREGEXE
794HOTSPOT_TOOLCHAIN_TYPE
795USING_BROKEN_SUSE_LD
796PACKAGE_PATH
797BUILD_AS
798BUILD_LDCXX
799BUILD_LD
800BUILD_STRIP
801BUILD_OBJCOPY
802BUILD_AR
803BUILD_NM
804BUILD_CXX
805BUILD_CC
806BUILD_SYSROOT_LDFLAGS
807BUILD_SYSROOT_CFLAGS
808ac_ct_OBJDUMP
809OBJDUMP
810ac_ct_OBJCOPY
811OBJCOPY
812ac_ct_NM
813ac_ct_STRIP
814GNM
815NM
816STRIP
817MSBUILD
818DUMPBIN
819RC
820MT
821LIPO
822ac_ct_AR
823AR
824AS
825LDCXX
826LD
827CXXCPP
828CPP
829CXX_VERSION_NUMBER
830CC_VERSION_NUMBER
831ac_ct_CXX
832CXXFLAGS
833CXX
834TOOLCHAIN_PATH_CXX
835POTENTIAL_CXX
836OBJEXT
837EXEEXT
838ac_ct_CC
839CPPFLAGS
840LDFLAGS
841CFLAGS
842CC
843TOOLCHAIN_PATH_CC
844POTENTIAL_CC
845TOOLCHAIN_VERSION
846VS_LIB
847VS_INCLUDE
848VS_PATH
849CYGWIN_LINK
850SYSROOT_LDFLAGS
851SYSROOT_CFLAGS
852EXTRA_LDFLAGS
853EXTRA_CXXFLAGS
854EXTRA_CFLAGS
855EXE_SUFFIX
856OBJ_SUFFIX
857STATIC_LIBRARY
858SHARED_LIBRARY
859STATIC_LIBRARY_SUFFIX
860SHARED_LIBRARY_SUFFIX
861LIBRARY_PREFIX
862TOOLCHAIN_TYPE
863STATIC_BUILD
864IMPORT_MODULES_MAKE
865IMPORT_MODULES_SRC
866IMPORT_MODULES_MAN
867IMPORT_MODULES_LEGAL
868IMPORT_MODULES_CONF
869IMPORT_MODULES_LIBS
870IMPORT_MODULES_CMDS
871IMPORT_MODULES_CLASSES
872BUILD_OUTPUT
873JDK_TOPDIR
874NASHORN_TOPDIR
875HOTSPOT_TOPDIR
876JAXWS_TOPDIR
877JAXP_TOPDIR
878CORBA_TOPDIR
879LANGTOOLS_TOPDIR
880EXTERNAL_BUILDJDK
881BUILD_JDK
882CREATE_BUILDJDK
883JLINK
884JMOD
885JAVAC_FLAGS
886BOOT_JDK_MODULAR
887BOOT_JDK_SOURCETARGET
888JARSIGNER
889JAR
890JAVAH
891JAVAC
892JAVA
893BOOT_JDK
894JAVA_CHECK
895JAVAC_CHECK
896VERSION_IS_GA
897VERSION_SHORT
898VERSION_STRING
899VERSION_NUMBER_FOUR_POSITIONS
900VERSION_NUMBER
901VERSION_OPT
902VERSION_BUILD
903VERSION_PRE
904VERSION_PATCH
905VERSION_SECURITY
906VERSION_MINOR
907VERSION_MAJOR
908MACOSX_BUNDLE_ID_BASE
909MACOSX_BUNDLE_NAME_BASE
910HOTSPOT_VM_DISTRO
911COMPANY_NAME
912JDK_RC_PLATFORM_NAME
913PRODUCT_SUFFIX
914PRODUCT_NAME
915LAUNCHER_NAME
916JLINK_KEEP_PACKAGED_MODULES
917COPYRIGHT_YEAR
918COMPRESS_JARS
919INCLUDE_SA
920UNLIMITED_CRYPTO
921CACERTS_FILE
922ENABLE_FULL_DOCS
923ENABLE_HEADLESS_ONLY
924DEFAULT_MAKE_TARGET
925OS_VERSION_MICRO
926OS_VERSION_MINOR
927OS_VERSION_MAJOR
928PKG_CONFIG
929BASH_ARGS
930SETFILE
931CODESIGN
932XATTR
933DSYMUTIL
934IS_GNU_TIME
935PATCH
936DTRACE
937FLOCK
938TIME
939STAT
940HG
941DOT
942READELF
943OTOOL
944LDD
945ZIPEXE
946UNZIP
947TAR_SUPPORTS_TRANSFORM
948TAR_INCLUDE_PARAM
949TAR_CREATE_EXTRA_PARAM
950TAR_TYPE
951FIND_DELETE
952OUTPUT_SYNC
953OUTPUT_SYNC_SUPPORTED
954CHECK_TOOLSDIR_MAKE
955CHECK_TOOLSDIR_GMAKE
956CHECK_MAKE
957CHECK_GMAKE
958MAKE
959PKGHANDLER
960CONFIGURESUPPORT_OUTPUTDIR
961OUTPUT_ROOT
962CONF_NAME
963SPEC
964SDKROOT
965XCODEBUILD
966JVM_VARIANT_MAIN
967VALID_JVM_VARIANTS
968JVM_VARIANTS
969DEBUG_LEVEL
970HOTSPOT_DEBUG_LEVEL
971JDK_VARIANT
972USERNAME
973CANONICAL_TOPDIR
974ORIGINAL_TOPDIR
975TOPDIR
976PATH_SEP
977HOTSPOT_BUILD_CPU_DEFINE
978HOTSPOT_BUILD_CPU_ARCH
979HOTSPOT_BUILD_CPU
980HOTSPOT_BUILD_OS_TYPE
981HOTSPOT_BUILD_OS
982OPENJDK_BUILD_BUNDLE_PLATFORM
983OPENJDK_BUILD_OS_EXPORT_DIR
984OPENJDK_BUILD_CPU_OSARCH
985OPENJDK_BUILD_CPU_ISADIR
986OPENJDK_BUILD_CPU_LEGACY_LIB
987OPENJDK_BUILD_CPU_LEGACY
988HOTSPOT_TARGET_CPU_DEFINE
989HOTSPOT_TARGET_CPU_ARCH
990HOTSPOT_TARGET_CPU
991HOTSPOT_TARGET_OS_TYPE
992HOTSPOT_TARGET_OS
993DEFINE_CROSS_COMPILE_ARCH
994OPENJDK_TARGET_BUNDLE_PLATFORM
995OPENJDK_TARGET_OS_EXPORT_DIR
996OPENJDK_TARGET_CPU_OSARCH
997OPENJDK_TARGET_CPU_ISADIR
998OPENJDK_TARGET_CPU_LEGACY_LIB
999OPENJDK_TARGET_CPU_LEGACY
1000RELEASE_FILE_OS_ARCH
1001RELEASE_FILE_OS_NAME
1002OPENJDK_MODULE_TARGET_PLATFORM
1003COMPILE_TYPE
1004OPENJDK_TARGET_CPU_ENDIAN
1005OPENJDK_TARGET_CPU_BITS
1006OPENJDK_TARGET_CPU_ARCH
1007OPENJDK_TARGET_CPU
1008OPENJDK_TARGET_OS_ENV
1009OPENJDK_TARGET_OS_TYPE
1010OPENJDK_TARGET_OS
1011OPENJDK_BUILD_CPU_ENDIAN
1012OPENJDK_BUILD_CPU_BITS
1013OPENJDK_BUILD_CPU_ARCH
1014OPENJDK_BUILD_CPU
1015OPENJDK_BUILD_OS_ENV
1016OPENJDK_BUILD_OS_TYPE
1017OPENJDK_BUILD_OS
1018OPENJDK_BUILD_AUTOCONF_NAME
1019OPENJDK_TARGET_AUTOCONF_NAME
1020target_os
1021target_vendor
1022target_cpu
1023target
1024host_os
1025host_vendor
1026host_cpu
1027host
1028build_os
1029build_vendor
1030build_cpu
1031build
1032PANDOC
1033NICE
1034CPIO
1035DF
1036READLINK
1037CYGPATH
1038SED
1039FGREP
1040EGREP
1041GREP
1042AWK
1043XARGS
1044WHICH
1045WC
1046UNIQ
1047UNAME
1048TR
1049TOUCH
1050TEE
1051TAR
1052TAIL
1053SORT
1054SH
1055RMDIR
1056RM
1057PRINTF
1058NAWK
1059MV
1060MKTEMP
1061MKDIR
1062LS
1063LN
1064GZIP
1065GUNZIP
1066HEAD
1067FIND
1068FILE
1069EXPR
1070ECHO
1071DIRNAME
1072DIFF
1073DATE
1074CUT
1075CP
1076COMM
1077CMP
1078CHMOD
1079CAT
1080BASH
1081BASENAME
1082DATE_WHEN_CONFIGURED
1083ORIGINAL_PATH
1084CONFIGURE_COMMAND_LINE
1085target_alias
1086host_alias
1087build_alias
1088LIBS
1089ECHO_T
1090ECHO_N
1091ECHO_C
1092DEFS
1093mandir
1094localedir
1095libdir
1096psdir
1097pdfdir
1098dvidir
1099htmldir
1100infodir
1101docdir
1102oldincludedir
1103includedir
1104localstatedir
1105sharedstatedir
1106sysconfdir
1107datadir
1108datarootdir
1109libexecdir
1110sbindir
1111bindir
1112program_transform_name
1113prefix
1114exec_prefix
1115PACKAGE_URL
1116PACKAGE_BUGREPORT
1117PACKAGE_STRING
1118PACKAGE_VERSION
1119PACKAGE_TARNAME
1120PACKAGE_NAME
1121PATH_SEPARATOR
1122SHELL'
1123ac_subst_files=''
1124ac_user_opts='
1125enable_option_checking
1126with_target_bits
1127enable_openjdk_only
1128with_custom_make_dir
1129with_jdk_variant
1130enable_debug
1131with_debug_level
1132with_jvm_variants
1133with_cpu_port
1134with_devkit
1135with_sys_root
1136with_sysroot
1137with_tools_dir
1138with_toolchain_path
1139with_extra_path
1140with_sdk_name
1141with_conf_name
1142with_output_sync
1143with_default_make_target
1144enable_headless_only
1145enable_full_docs
1146with_cacerts_file
1147enable_unlimited_crypto
1148with_copyright_year
1149enable_keep_packaged_modules
1150with_milestone
1151with_update_version
1152with_user_release_suffix
1153with_build_number
1154with_version_string
1155with_version_pre
1156with_version_opt
1157with_version_build
1158with_version_major
1159with_version_minor
1160with_version_security
1161with_version_patch
1162with_boot_jdk
1163with_build_jdk
1164with_add_source_root
1165with_override_source_root
1166with_adds_and_overrides
1167with_override_langtools
1168with_override_corba
1169with_override_jaxp
1170with_override_jaxws
1171with_override_hotspot
1172with_override_nashorn
1173with_override_jdk
1174with_import_hotspot
1175with_import_modules
1176enable_static_build
1177with_toolchain_type
1178with_extra_cflags
1179with_extra_cxxflags
1180with_extra_ldflags
1181with_toolchain_version
1182with_build_devkit
1183with_jtreg
1184with_jib
1185with_abi_profile
1186with_macosx_version_max
1187enable_warnings_as_errors
1188with_native_debug_symbols
1189enable_debug_symbols
1190enable_zip_debug_info
1191enable_native_coverage
1192enable_dtrace
1193enable_aot
1194enable_hotspot_gtest
1195with_stdc__lib
1196with_msvcr_dll
1197with_msvcp_dll
1198with_x
1199with_cups
1200with_cups_include
1201with_freetype
1202with_freetype_include
1203with_freetype_lib
1204with_freetype_src
1205enable_freetype_bundling
1206with_freetype_license
1207with_alsa
1208with_alsa_include
1209with_alsa_lib
1210with_libffi
1211with_libffi_include
1212with_libffi_lib
1213enable_libffi_bundling
1214with_libjpeg
1215with_giflib
1216with_libpng
1217with_zlib
1218with_lcms
1219with_dxsdk
1220with_dxsdk_lib
1221with_dxsdk_include
1222with_jvm_features
1223with_jvm_interpreter
1224enable_jtreg_failure_handler
1225enable_generate_classlist
1226with_num_cores
1227with_memory_size
1228with_jobs
1229with_test_jobs
1230with_boot_jdk_jvmargs
1231with_sjavac_server_java
1232enable_sjavac
1233enable_javac_server
1234enable_icecc
1235enable_precompiled_headers
1236enable_ccache
1237with_ccache_dir
1238'
1239      ac_precious_vars='build_alias
1240host_alias
1241target_alias
1242BASENAME
1243BASH
1244CAT
1245CHMOD
1246CMP
1247COMM
1248CP
1249CUT
1250DATE
1251DIFF
1252DIRNAME
1253ECHO
1254EXPR
1255FILE
1256FIND
1257HEAD
1258GUNZIP
1259GZIP
1260LN
1261LS
1262MKDIR
1263MKTEMP
1264MV
1265NAWK
1266PRINTF
1267RM
1268RMDIR
1269SH
1270SORT
1271TAIL
1272TAR
1273TEE
1274TOUCH
1275TR
1276UNAME
1277UNIQ
1278WC
1279WHICH
1280XARGS
1281AWK
1282GREP
1283EGREP
1284FGREP
1285SED
1286CYGPATH
1287READLINK
1288DF
1289CPIO
1290NICE
1291PANDOC
1292MAKE
1293UNZIP
1294ZIPEXE
1295LDD
1296OTOOL
1297READELF
1298DOT
1299HG
1300STAT
1301TIME
1302FLOCK
1303DTRACE
1304PATCH
1305DSYMUTIL
1306XATTR
1307CODESIGN
1308SETFILE
1309PKG_CONFIG
1310JAVA
1311JAVAC
1312JAVAH
1313JAR
1314JARSIGNER
1315CC
1316CFLAGS
1317LDFLAGS
1318LIBS
1319CPPFLAGS
1320CXX
1321CXXFLAGS
1322CCC
1323CPP
1324CXXCPP
1325AS
1326AR
1327LIPO
1328STRIP
1329NM
1330GNM
1331OBJCOPY
1332OBJDUMP
1333BUILD_CC
1334BUILD_CXX
1335BUILD_NM
1336BUILD_AR
1337BUILD_OBJCOPY
1338BUILD_STRIP
1339JTREGEXE
1340XMKMF
1341FREETYPE_CFLAGS
1342FREETYPE_LIBS
1343ALSA_CFLAGS
1344ALSA_LIBS
1345LIBFFI_CFLAGS
1346LIBFFI_LIBS
1347PNG_CFLAGS
1348PNG_LIBS
1349LCMS_CFLAGS
1350LCMS_LIBS
1351ICECC_CMD
1352ICECC_CREATE_ENV
1353ICECC_WRAPPER
1354CCACHE'
1355
1356
1357# Initialize some variables set by options.
1358ac_init_help=
1359ac_init_version=false
1360ac_unrecognized_opts=
1361ac_unrecognized_sep=
1362# The variables have the same names as the options, with
1363# dashes changed to underlines.
1364cache_file=/dev/null
1365exec_prefix=NONE
1366no_create=
1367no_recursion=
1368prefix=NONE
1369program_prefix=NONE
1370program_suffix=NONE
1371program_transform_name=s,x,x,
1372silent=
1373site=
1374srcdir=
1375verbose=
1376x_includes=NONE
1377x_libraries=NONE
1378
1379# Installation directory options.
1380# These are left unexpanded so users can "make install exec_prefix=/foo"
1381# and all the variables that are supposed to be based on exec_prefix
1382# by default will actually change.
1383# Use braces instead of parens because sh, perl, etc. also accept them.
1384# (The list follows the same order as the GNU Coding Standards.)
1385bindir='${exec_prefix}/bin'
1386sbindir='${exec_prefix}/sbin'
1387libexecdir='${exec_prefix}/libexec'
1388datarootdir='${prefix}/share'
1389datadir='${datarootdir}'
1390sysconfdir='${prefix}/etc'
1391sharedstatedir='${prefix}/com'
1392localstatedir='${prefix}/var'
1393includedir='${prefix}/include'
1394oldincludedir='/usr/include'
1395docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1396infodir='${datarootdir}/info'
1397htmldir='${docdir}'
1398dvidir='${docdir}'
1399pdfdir='${docdir}'
1400psdir='${docdir}'
1401libdir='${exec_prefix}/lib'
1402localedir='${datarootdir}/locale'
1403mandir='${datarootdir}/man'
1404
1405ac_prev=
1406ac_dashdash=
1407for ac_option
1408do
1409  # If the previous option needs an argument, assign it.
1410  if test -n "$ac_prev"; then
1411    eval $ac_prev=\$ac_option
1412    ac_prev=
1413    continue
1414  fi
1415
1416  case $ac_option in
1417  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1418  *=)   ac_optarg= ;;
1419  *)    ac_optarg=yes ;;
1420  esac
1421
1422  # Accept the important Cygnus configure options, so we can diagnose typos.
1423
1424  case $ac_dashdash$ac_option in
1425  --)
1426    ac_dashdash=yes ;;
1427
1428  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1429    ac_prev=bindir ;;
1430  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1431    bindir=$ac_optarg ;;
1432
1433  -build | --build | --buil | --bui | --bu)
1434    ac_prev=build_alias ;;
1435  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1436    build_alias=$ac_optarg ;;
1437
1438  -cache-file | --cache-file | --cache-fil | --cache-fi \
1439  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1440    ac_prev=cache_file ;;
1441  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1442  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1443    cache_file=$ac_optarg ;;
1444
1445  --config-cache | -C)
1446    cache_file=config.cache ;;
1447
1448  -datadir | --datadir | --datadi | --datad)
1449    ac_prev=datadir ;;
1450  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1451    datadir=$ac_optarg ;;
1452
1453  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1454  | --dataroo | --dataro | --datar)
1455    ac_prev=datarootdir ;;
1456  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1457  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1458    datarootdir=$ac_optarg ;;
1459
1460  -disable-* | --disable-*)
1461    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1462    # Reject names that are not valid shell variable names.
1463    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1464      as_fn_error $? "invalid feature name: $ac_useropt"
1465    ac_useropt_orig=$ac_useropt
1466    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1467    case $ac_user_opts in
1468      *"
1469"enable_$ac_useropt"
1470"*) ;;
1471      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1472	 ac_unrecognized_sep=', ';;
1473    esac
1474    eval enable_$ac_useropt=no ;;
1475
1476  -docdir | --docdir | --docdi | --doc | --do)
1477    ac_prev=docdir ;;
1478  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1479    docdir=$ac_optarg ;;
1480
1481  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1482    ac_prev=dvidir ;;
1483  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1484    dvidir=$ac_optarg ;;
1485
1486  -enable-* | --enable-*)
1487    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1488    # Reject names that are not valid shell variable names.
1489    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1490      as_fn_error $? "invalid feature name: $ac_useropt"
1491    ac_useropt_orig=$ac_useropt
1492    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1493    case $ac_user_opts in
1494      *"
1495"enable_$ac_useropt"
1496"*) ;;
1497      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1498	 ac_unrecognized_sep=', ';;
1499    esac
1500    eval enable_$ac_useropt=\$ac_optarg ;;
1501
1502  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1503  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1504  | --exec | --exe | --ex)
1505    ac_prev=exec_prefix ;;
1506  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1507  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1508  | --exec=* | --exe=* | --ex=*)
1509    exec_prefix=$ac_optarg ;;
1510
1511  -gas | --gas | --ga | --g)
1512    # Obsolete; use --with-gas.
1513    with_gas=yes ;;
1514
1515  -help | --help | --hel | --he | -h)
1516    ac_init_help=long ;;
1517  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1518    ac_init_help=recursive ;;
1519  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1520    ac_init_help=short ;;
1521
1522  -host | --host | --hos | --ho)
1523    ac_prev=host_alias ;;
1524  -host=* | --host=* | --hos=* | --ho=*)
1525    host_alias=$ac_optarg ;;
1526
1527  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1528    ac_prev=htmldir ;;
1529  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1530  | --ht=*)
1531    htmldir=$ac_optarg ;;
1532
1533  -includedir | --includedir | --includedi | --included | --include \
1534  | --includ | --inclu | --incl | --inc)
1535    ac_prev=includedir ;;
1536  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1537  | --includ=* | --inclu=* | --incl=* | --inc=*)
1538    includedir=$ac_optarg ;;
1539
1540  -infodir | --infodir | --infodi | --infod | --info | --inf)
1541    ac_prev=infodir ;;
1542  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1543    infodir=$ac_optarg ;;
1544
1545  -libdir | --libdir | --libdi | --libd)
1546    ac_prev=libdir ;;
1547  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1548    libdir=$ac_optarg ;;
1549
1550  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1551  | --libexe | --libex | --libe)
1552    ac_prev=libexecdir ;;
1553  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1554  | --libexe=* | --libex=* | --libe=*)
1555    libexecdir=$ac_optarg ;;
1556
1557  -localedir | --localedir | --localedi | --localed | --locale)
1558    ac_prev=localedir ;;
1559  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1560    localedir=$ac_optarg ;;
1561
1562  -localstatedir | --localstatedir | --localstatedi | --localstated \
1563  | --localstate | --localstat | --localsta | --localst | --locals)
1564    ac_prev=localstatedir ;;
1565  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1566  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1567    localstatedir=$ac_optarg ;;
1568
1569  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1570    ac_prev=mandir ;;
1571  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1572    mandir=$ac_optarg ;;
1573
1574  -nfp | --nfp | --nf)
1575    # Obsolete; use --without-fp.
1576    with_fp=no ;;
1577
1578  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1579  | --no-cr | --no-c | -n)
1580    no_create=yes ;;
1581
1582  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1583  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1584    no_recursion=yes ;;
1585
1586  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1587  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1588  | --oldin | --oldi | --old | --ol | --o)
1589    ac_prev=oldincludedir ;;
1590  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1591  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1592  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1593    oldincludedir=$ac_optarg ;;
1594
1595  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1596    ac_prev=prefix ;;
1597  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1598    prefix=$ac_optarg ;;
1599
1600  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1601  | --program-pre | --program-pr | --program-p)
1602    ac_prev=program_prefix ;;
1603  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1604  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1605    program_prefix=$ac_optarg ;;
1606
1607  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1608  | --program-suf | --program-su | --program-s)
1609    ac_prev=program_suffix ;;
1610  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1611  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1612    program_suffix=$ac_optarg ;;
1613
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    ac_prev=program_transform_name ;;
1622  -program-transform-name=* | --program-transform-name=* \
1623  | --program-transform-nam=* | --program-transform-na=* \
1624  | --program-transform-n=* | --program-transform-=* \
1625  | --program-transform=* | --program-transfor=* \
1626  | --program-transfo=* | --program-transf=* \
1627  | --program-trans=* | --program-tran=* \
1628  | --progr-tra=* | --program-tr=* | --program-t=*)
1629    program_transform_name=$ac_optarg ;;
1630
1631  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1632    ac_prev=pdfdir ;;
1633  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1634    pdfdir=$ac_optarg ;;
1635
1636  -psdir | --psdir | --psdi | --psd | --ps)
1637    ac_prev=psdir ;;
1638  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1639    psdir=$ac_optarg ;;
1640
1641  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1642  | -silent | --silent | --silen | --sile | --sil)
1643    silent=yes ;;
1644
1645  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1646    ac_prev=sbindir ;;
1647  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1648  | --sbi=* | --sb=*)
1649    sbindir=$ac_optarg ;;
1650
1651  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1652  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1653  | --sharedst | --shareds | --shared | --share | --shar \
1654  | --sha | --sh)
1655    ac_prev=sharedstatedir ;;
1656  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1657  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1658  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1659  | --sha=* | --sh=*)
1660    sharedstatedir=$ac_optarg ;;
1661
1662  -site | --site | --sit)
1663    ac_prev=site ;;
1664  -site=* | --site=* | --sit=*)
1665    site=$ac_optarg ;;
1666
1667  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1668    ac_prev=srcdir ;;
1669  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1670    srcdir=$ac_optarg ;;
1671
1672  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1673  | --syscon | --sysco | --sysc | --sys | --sy)
1674    ac_prev=sysconfdir ;;
1675  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1676  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1677    sysconfdir=$ac_optarg ;;
1678
1679  -target | --target | --targe | --targ | --tar | --ta | --t)
1680    ac_prev=target_alias ;;
1681  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1682    target_alias=$ac_optarg ;;
1683
1684  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1685    verbose=yes ;;
1686
1687  -version | --version | --versio | --versi | --vers | -V)
1688    ac_init_version=: ;;
1689
1690  -with-* | --with-*)
1691    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1692    # Reject names that are not valid shell variable names.
1693    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1694      as_fn_error $? "invalid package name: $ac_useropt"
1695    ac_useropt_orig=$ac_useropt
1696    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1697    case $ac_user_opts in
1698      *"
1699"with_$ac_useropt"
1700"*) ;;
1701      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1702	 ac_unrecognized_sep=', ';;
1703    esac
1704    eval with_$ac_useropt=\$ac_optarg ;;
1705
1706  -without-* | --without-*)
1707    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1708    # Reject names that are not valid shell variable names.
1709    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1710      as_fn_error $? "invalid package name: $ac_useropt"
1711    ac_useropt_orig=$ac_useropt
1712    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1713    case $ac_user_opts in
1714      *"
1715"with_$ac_useropt"
1716"*) ;;
1717      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1718	 ac_unrecognized_sep=', ';;
1719    esac
1720    eval with_$ac_useropt=no ;;
1721
1722  --x)
1723    # Obsolete; use --with-x.
1724    with_x=yes ;;
1725
1726  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1727  | --x-incl | --x-inc | --x-in | --x-i)
1728    ac_prev=x_includes ;;
1729  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1730  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1731    x_includes=$ac_optarg ;;
1732
1733  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1734  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1735    ac_prev=x_libraries ;;
1736  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1737  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1738    x_libraries=$ac_optarg ;;
1739
1740  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1741Try \`$0 --help' for more information"
1742    ;;
1743
1744  *=*)
1745    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1746    # Reject names that are not valid shell variable names.
1747    case $ac_envvar in #(
1748      '' | [0-9]* | *[!_$as_cr_alnum]* )
1749      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1750    esac
1751    eval $ac_envvar=\$ac_optarg
1752    export $ac_envvar ;;
1753
1754  *)
1755    # FIXME: should be removed in autoconf 3.0.
1756    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1757    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1758      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1759    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1760    ;;
1761
1762  esac
1763done
1764
1765if test -n "$ac_prev"; then
1766  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1767  as_fn_error $? "missing argument to $ac_option"
1768fi
1769
1770if test -n "$ac_unrecognized_opts"; then
1771  case $enable_option_checking in
1772    no) ;;
1773    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1774    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1775  esac
1776fi
1777
1778# Check all directory arguments for consistency.
1779for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1780		datadir sysconfdir sharedstatedir localstatedir includedir \
1781		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1782		libdir localedir mandir
1783do
1784  eval ac_val=\$$ac_var
1785  # Remove trailing slashes.
1786  case $ac_val in
1787    */ )
1788      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1789      eval $ac_var=\$ac_val;;
1790  esac
1791  # Be sure to have absolute directory names.
1792  case $ac_val in
1793    [\\/$]* | ?:[\\/]* )  continue;;
1794    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1795  esac
1796  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1797done
1798
1799# There might be people who depend on the old broken behavior: `$host'
1800# used to hold the argument of --host etc.
1801# FIXME: To remove some day.
1802build=$build_alias
1803host=$host_alias
1804target=$target_alias
1805
1806# FIXME: To remove some day.
1807if test "x$host_alias" != x; then
1808  if test "x$build_alias" = x; then
1809    cross_compiling=maybe
1810  elif test "x$build_alias" != "x$host_alias"; then
1811    cross_compiling=yes
1812  fi
1813fi
1814
1815ac_tool_prefix=
1816test -n "$host_alias" && ac_tool_prefix=$host_alias-
1817
1818test "$silent" = yes && exec 6>/dev/null
1819
1820
1821ac_pwd=`pwd` && test -n "$ac_pwd" &&
1822ac_ls_di=`ls -di .` &&
1823ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1824  as_fn_error $? "working directory cannot be determined"
1825test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1826  as_fn_error $? "pwd does not report name of working directory"
1827
1828
1829# Find the source files, if location was not specified.
1830if test -z "$srcdir"; then
1831  ac_srcdir_defaulted=yes
1832  # Try the directory containing this script, then the parent directory.
1833  ac_confdir=`$as_dirname -- "$as_myself" ||
1834$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1835	 X"$as_myself" : 'X\(//\)[^/]' \| \
1836	 X"$as_myself" : 'X\(//\)$' \| \
1837	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1838$as_echo X"$as_myself" |
1839    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1840	    s//\1/
1841	    q
1842	  }
1843	  /^X\(\/\/\)[^/].*/{
1844	    s//\1/
1845	    q
1846	  }
1847	  /^X\(\/\/\)$/{
1848	    s//\1/
1849	    q
1850	  }
1851	  /^X\(\/\).*/{
1852	    s//\1/
1853	    q
1854	  }
1855	  s/.*/./; q'`
1856  srcdir=$ac_confdir
1857  if test ! -r "$srcdir/$ac_unique_file"; then
1858    srcdir=..
1859  fi
1860else
1861  ac_srcdir_defaulted=no
1862fi
1863if test ! -r "$srcdir/$ac_unique_file"; then
1864  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1865  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1866fi
1867ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1868ac_abs_confdir=`(
1869	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1870	pwd)`
1871# When building in place, set srcdir=.
1872if test "$ac_abs_confdir" = "$ac_pwd"; then
1873  srcdir=.
1874fi
1875# Remove unnecessary trailing slashes from srcdir.
1876# Double slashes in file names in object file debugging info
1877# mess up M-x gdb in Emacs.
1878case $srcdir in
1879*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1880esac
1881for ac_var in $ac_precious_vars; do
1882  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1883  eval ac_env_${ac_var}_value=\$${ac_var}
1884  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1886done
1887
1888#
1889# Report the --help message.
1890#
1891if test "$ac_init_help" = "long"; then
1892  # Omit some internal or obsolete options to make the list less imposing.
1893  # This message is too long to be a string in the A/UX 3.1 sh.
1894  cat <<_ACEOF
1895\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1896
1897Usage: $0 [OPTION]... [VAR=VALUE]...
1898
1899To assign environment variables (e.g., CC, CFLAGS...), specify them as
1900VAR=VALUE.  See below for descriptions of some of the useful variables.
1901
1902Defaults for the options are specified in brackets.
1903
1904Configuration:
1905  -h, --help              display this help and exit
1906      --help=short        display options specific to this package
1907      --help=recursive    display the short help of all the included packages
1908  -V, --version           display version information and exit
1909  -q, --quiet, --silent   do not print \`checking ...' messages
1910      --cache-file=FILE   cache test results in FILE [disabled]
1911  -C, --config-cache      alias for \`--cache-file=config.cache'
1912  -n, --no-create         do not create output files
1913      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1914
1915Installation directories:
1916  --prefix=PREFIX         install architecture-independent files in PREFIX
1917                          [$ac_default_prefix]
1918  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1919                          [PREFIX]
1920
1921By default, \`make install' will install all the files in
1922\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1923an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1924for instance \`--prefix=\$HOME'.
1925
1926For better control, use the options below.
1927
1928Fine tuning of the installation directories:
1929  --bindir=DIR            user executables [EPREFIX/bin]
1930  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1931  --libexecdir=DIR        program executables [EPREFIX/libexec]
1932  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1933  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1934  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1935  --libdir=DIR            object code libraries [EPREFIX/lib]
1936  --includedir=DIR        C header files [PREFIX/include]
1937  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1938  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1939  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1940  --infodir=DIR           info documentation [DATAROOTDIR/info]
1941  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1942  --mandir=DIR            man documentation [DATAROOTDIR/man]
1943  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1944  --htmldir=DIR           html documentation [DOCDIR]
1945  --dvidir=DIR            dvi documentation [DOCDIR]
1946  --pdfdir=DIR            pdf documentation [DOCDIR]
1947  --psdir=DIR             ps documentation [DOCDIR]
1948_ACEOF
1949
1950  cat <<\_ACEOF
1951
1952X features:
1953  --x-includes=DIR    X include files are in DIR
1954  --x-libraries=DIR   X library files are in DIR
1955
1956System types:
1957  --build=BUILD     configure for building on BUILD [guessed]
1958  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1959  --target=TARGET   configure for building compilers for TARGET [HOST]
1960_ACEOF
1961fi
1962
1963if test -n "$ac_init_help"; then
1964  case $ac_init_help in
1965     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1966   esac
1967  cat <<\_ACEOF
1968
1969Optional Features:
1970  --disable-option-checking  ignore unrecognized --enable/--with options
1971  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1972  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1973  --enable-openjdk-only   suppress building custom source even if present
1974                          [disabled]
1975  --enable-debug          set the debug level to fastdebug (shorthand for
1976                          --with-debug-level=fastdebug) [disabled]
1977  --enable-headless-only  only build headless (no GUI) support [disabled]
1978  --enable-full-docs      build complete documentation [enabled if all tools
1979                          found]
1980  --disable-unlimited-crypto
1981                          Disable unlimited crypto policy [enabled]
1982  --disable-keep-packaged-modules
1983                          Do not keep packaged modules in jdk image [enable]
1984  --enable-static-build   enable static library build [disabled]
1985  --disable-warnings-as-errors
1986                          do not consider native warnings to be an error
1987                          [enabled]
1988  --enable-debug-symbols  Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --enable-zip-debug-info Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --enable-native-coverage
1993                          enable native compilation with code coverage
1994                          data[disabled]
1995  --enable-dtrace[=yes/no/auto]
1996                          enable dtrace. Default is auto, where dtrace is
1997                          enabled if all dependencies are present.
1998  --enable-aot[=yes/no/auto]
1999                          enable ahead of time compilation feature. Default is
2000                          auto, where aot is enabled if all dependencies are
2001                          present.
2002  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2003  --disable-freetype-bundling
2004                          disable bundling of the freetype library with the
2005                          build result [enabled on Windows or when using
2006                          --with-freetype, disabled otherwise]
2007  --enable-libffi-bundling
2008                          enable bundling of libffi.so to make the built JDK
2009                          runnable on more systems
2010  --enable-jtreg-failure-handler
2011                          forces build of the jtreg failure handler to be
2012                          enabled, missing dependencies become fatal errors.
2013                          Default is auto, where the failure handler is built
2014                          if all dependencies are present and otherwise just
2015                          disabled.
2016  --disable-generate-classlist
2017                          forces enabling or disabling of the generation of a
2018                          CDS classlist at build time. Default is to generate
2019                          it when either the server or client JVMs are built.
2020  --enable-sjavac         use sjavac to do fast incremental compiles
2021                          [disabled]
2022  --disable-javac-server  disable javac server [enabled]
2023  --enable-icecc          enable distribted compilation of native code using
2024                          icecc/icecream [disabled]
2025  --disable-precompiled-headers
2026                          disable using precompiled headers when compiling C++
2027                          [enabled]
2028  --enable-ccache         enable using ccache to speed up recompilations
2029                          [disabled]
2030
2031Optional Packages:
2032  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2033  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2034  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2035                          support it), e.g. --with-target-bits=32 [guessed]
2036  --with-custom-make-dir  Deprecated. Option is kept for backwards
2037                          compatibility and is ignored
2038  --with-jdk-variant      JDK variant to build (normal) [normal]
2039  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2040                          optimized) [release]
2041  --with-jvm-variants     JVM variants (separated by commas) to build
2042                          (server,client,minimal,core,zero,zeroshark,custom)
2043                          [server]
2044  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2045                          (arm64,aarch64) [aarch64]
2046  --with-devkit           use this devkit for compilers, tools and resources
2047  --with-sys-root         alias for --with-sysroot for backwards compatability
2048  --with-sysroot          use this directory as sysroot
2049  --with-tools-dir        alias for --with-toolchain-path for backwards
2050                          compatibility
2051  --with-toolchain-path   prepend these directories when searching for
2052                          toolchain binaries (compilers etc)
2053  --with-extra-path       prepend these directories to the default path
2054  --with-sdk-name         use the platform SDK of the given name. [macosx]
2055  --with-conf-name        use this as the name of the configuration [generated
2056                          from important configuration options]
2057  --with-output-sync      set make output sync type if supported by make.
2058                          [recurse]
2059  --with-default-make-target
2060                          set the default make target [exploded-image]
2061  --with-cacerts-file     specify alternative cacerts file
2062  --with-copyright-year   Set copyright year value for build [current year]
2063  --with-milestone        Deprecated. Option is kept for backwards
2064                          compatibility and is ignored
2065  --with-update-version   Deprecated. Option is kept for backwards
2066                          compatibility and is ignored
2067  --with-user-release-suffix
2068                          Deprecated. Option is kept for backwards
2069                          compatibility and is ignored
2070  --with-build-number     Deprecated. Option is kept for backwards
2071                          compatibility and is ignored
2072  --with-version-string   Set version string [calculated]
2073  --with-version-pre      Set the base part of the version 'PRE' field
2074                          (pre-release identifier) ['internal']
2075  --with-version-opt      Set version 'OPT' field (build metadata)
2076                          [<timestamp>.<user>.<dirname>]
2077  --with-version-build    Set version 'BUILD' field (build number) [not
2078                          specified]
2079  --with-version-major    Set version 'MAJOR' field (first number) [current
2080                          source value]
2081  --with-version-minor    Set version 'MINOR' field (second number) [current
2082                          source value]
2083  --with-version-security Set version 'SECURITY' field (third number) [current
2084                          source value]
2085  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2086                          specified]
2087  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2088  --with-build-jdk        path to JDK of same version as is being built[the
2089                          newly built JDK]
2090  --with-add-source-root  Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-source-root
2093                          Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-adds-and-overrides
2096                          Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-override-langtools
2099                          Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-corba   Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-jaxp    Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-override-jaxws   Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-override-hotspot Deprecated. Option is kept for backwards
2108                          compatibility and is ignored
2109  --with-override-nashorn Deprecated. Option is kept for backwards
2110                          compatibility and is ignored
2111  --with-override-jdk     Deprecated. Option is kept for backwards
2112                          compatibility and is ignored
2113  --with-import_hotspot   Deprecated. Option is kept for backwards
2114                          compatibility and is ignored
2115  --with-import-modules   import a set of prebuilt modules either as a zip
2116                          file or an exploded directory
2117  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2118                          to show possible values [platform dependent]
2119  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2120  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2121  --with-extra-ldflags    extra flags to be used when linking jdk
2122  --with-toolchain-version
2123                          the version of the toolchain to look for, use
2124                          '--help' to show possible values [platform
2125                          dependent]
2126  --with-build-devkit     Devkit to use for the build platform toolchain
2127  --with-jtreg            Regression Test Harness [probed]
2128  --with-jib              Jib dependency management tool [not used]
2129  --with-abi-profile      specify ABI profile for ARM builds
2130                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2131                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2132                          [toolchain dependent]
2133  --with-macosx-version-max
2134                          error on use of newer functionality. [macosx]
2135  --with-native-debug-symbols
2136                          set the native debug symbol configuration (none,
2137                          internal, external, zipped) [varying]
2138  --with-stdc++lib=<static>,<dynamic>,<default>
2139                          force linking of the C++ runtime on Linux to either
2140                          static or dynamic, default is static with dynamic as
2141                          fallback
2142  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2143                          (Windows only) [probed]
2144  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2145                          (Windows only) [probed]
2146  --with-x                use the X Window System
2147  --with-cups             specify prefix directory for the cups package
2148                          (expecting the headers under PATH/include)
2149  --with-cups-include     specify directory for the cups include files
2150  --with-freetype         specify prefix directory for the freetype package
2151                          (expecting the libraries under PATH/lib and the
2152                          headers under PATH/include)
2153  --with-freetype-include specify directory for the freetype include files
2154  --with-freetype-lib     specify directory for the freetype library
2155  --with-freetype-src     specify directory with freetype sources to
2156                          automatically build the library (experimental,
2157                          Windows-only)
2158  --with-freetype-license if bundling freetype, also bundle this license file
2159  --with-alsa             specify prefix directory for the alsa package
2160                          (expecting the libraries under PATH/lib and the
2161                          headers under PATH/include)
2162  --with-alsa-include     specify directory for the alsa include files
2163  --with-alsa-lib         specify directory for the alsa library
2164  --with-libffi           specify prefix directory for the libffi package
2165                          (expecting the libraries under PATH/lib and the
2166                          headers under PATH/include)
2167  --with-libffi-include   specify directory for the libffi include files
2168  --with-libffi-lib       specify directory for the libffi library
2169  --with-libjpeg          use libjpeg from build system or OpenJDK source
2170                          (system, bundled) [bundled]
2171  --with-giflib           use giflib from build system or OpenJDK source
2172                          (system, bundled) [bundled]
2173  --with-libpng           use libpng from build system or OpenJDK source
2174                          (system, bundled) [bundled]
2175  --with-zlib             use zlib from build system or OpenJDK source
2176                          (system, bundled) [bundled]
2177  --with-lcms             use lcms2 from build system or OpenJDK source
2178                          (system, bundled) [bundled]
2179  --with-dxsdk            Deprecated. Option is kept for backwards
2180                          compatibility and is ignored
2181  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2182                          compatibility and is ignored
2183  --with-dxsdk-include    Deprecated. Option is kept for backwards
2184                          compatibility and is ignored
2185  --with-jvm-features     additional JVM features to enable (separated by
2186                          comma), use '--help' to show possible values [none]
2187  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2188                          compatibility and is ignored
2189  --with-num-cores        number of cores in the build system, e.g.
2190                          --with-num-cores=8 [probed]
2191  --with-memory-size      memory (in MB) available in the build system, e.g.
2192                          --with-memory-size=1024 [probed]
2193  --with-jobs             number of parallel jobs to let make run [calculated
2194                          based on cores and memory]
2195  --with-test-jobs        number of parallel tests jobs to run [based on build
2196                          jobs]
2197  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2198                          invocations of boot JDK, overriding the default
2199                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2200                          -enableassertions"
2201  --with-sjavac-server-java
2202                          use this java binary for running the sjavac
2203                          background server [Boot JDK java]
2204  --with-ccache-dir       where to store ccache files [~/.ccache]
2205
2206Some influential environment variables:
2207  BASENAME    Override default value for BASENAME
2208  BASH        Override default value for BASH
2209  CAT         Override default value for CAT
2210  CHMOD       Override default value for CHMOD
2211  CMP         Override default value for CMP
2212  COMM        Override default value for COMM
2213  CP          Override default value for CP
2214  CUT         Override default value for CUT
2215  DATE        Override default value for DATE
2216  DIFF        Override default value for DIFF
2217  DIRNAME     Override default value for DIRNAME
2218  ECHO        Override default value for ECHO
2219  EXPR        Override default value for EXPR
2220  FILE        Override default value for FILE
2221  FIND        Override default value for FIND
2222  HEAD        Override default value for HEAD
2223  GUNZIP      Override default value for GUNZIP
2224  GZIP        Override default value for GZIP
2225  LN          Override default value for LN
2226  LS          Override default value for LS
2227  MKDIR       Override default value for MKDIR
2228  MKTEMP      Override default value for MKTEMP
2229  MV          Override default value for MV
2230  NAWK        Override default value for NAWK
2231  PRINTF      Override default value for PRINTF
2232  RM          Override default value for RM
2233  RMDIR       Override default value for RMDIR
2234  SH          Override default value for SH
2235  SORT        Override default value for SORT
2236  TAIL        Override default value for TAIL
2237  TAR         Override default value for TAR
2238  TEE         Override default value for TEE
2239  TOUCH       Override default value for TOUCH
2240  TR          Override default value for TR
2241  UNAME       Override default value for UNAME
2242  UNIQ        Override default value for UNIQ
2243  WC          Override default value for WC
2244  WHICH       Override default value for WHICH
2245  XARGS       Override default value for XARGS
2246  AWK         Override default value for AWK
2247  GREP        Override default value for GREP
2248  EGREP       Override default value for EGREP
2249  FGREP       Override default value for FGREP
2250  SED         Override default value for SED
2251  CYGPATH     Override default value for CYGPATH
2252  READLINK    Override default value for READLINK
2253  DF          Override default value for DF
2254  CPIO        Override default value for CPIO
2255  NICE        Override default value for NICE
2256  PANDOC      Override default value for PANDOC
2257  MAKE        Override default value for MAKE
2258  UNZIP       Override default value for UNZIP
2259  ZIPEXE      Override default value for ZIPEXE
2260  LDD         Override default value for LDD
2261  OTOOL       Override default value for OTOOL
2262  READELF     Override default value for READELF
2263  DOT         Override default value for DOT
2264  HG          Override default value for HG
2265  STAT        Override default value for STAT
2266  TIME        Override default value for TIME
2267  FLOCK       Override default value for FLOCK
2268  DTRACE      Override default value for DTRACE
2269  PATCH       Override default value for PATCH
2270  DSYMUTIL    Override default value for DSYMUTIL
2271  XATTR       Override default value for XATTR
2272  CODESIGN    Override default value for CODESIGN
2273  SETFILE     Override default value for SETFILE
2274  PKG_CONFIG  path to pkg-config utility
2275  JAVA        Override default value for JAVA
2276  JAVAC       Override default value for JAVAC
2277  JAVAH       Override default value for JAVAH
2278  JAR         Override default value for JAR
2279  JARSIGNER   Override default value for JARSIGNER
2280  CC          C compiler command
2281  CFLAGS      C compiler flags
2282  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2283              nonstandard directory <lib dir>
2284  LIBS        libraries to pass to the linker, e.g. -l<library>
2285  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2286              you have headers in a nonstandard directory <include dir>
2287  CXX         C++ compiler command
2288  CXXFLAGS    C++ compiler flags
2289  CPP         C preprocessor
2290  CXXCPP      C++ preprocessor
2291  AS          Override default value for AS
2292  AR          Override default value for AR
2293  LIPO        Override default value for LIPO
2294  STRIP       Override default value for STRIP
2295  NM          Override default value for NM
2296  GNM         Override default value for GNM
2297  OBJCOPY     Override default value for OBJCOPY
2298  OBJDUMP     Override default value for OBJDUMP
2299  BUILD_CC    Override default value for BUILD_CC
2300  BUILD_CXX   Override default value for BUILD_CXX
2301  BUILD_NM    Override default value for BUILD_NM
2302  BUILD_AR    Override default value for BUILD_AR
2303  BUILD_OBJCOPY
2304              Override default value for BUILD_OBJCOPY
2305  BUILD_STRIP Override default value for BUILD_STRIP
2306  JTREGEXE    Override default value for JTREGEXE
2307  XMKMF       Path to xmkmf, Makefile generator for X Window System
2308  FREETYPE_CFLAGS
2309              C compiler flags for FREETYPE, overriding pkg-config
2310  FREETYPE_LIBS
2311              linker flags for FREETYPE, overriding pkg-config
2312  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2313  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2314  LIBFFI_CFLAGS
2315              C compiler flags for LIBFFI, overriding pkg-config
2316  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2317  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2318  PNG_LIBS    linker flags for PNG, overriding pkg-config
2319  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2320  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2321  ICECC_CMD   Override default value for ICECC_CMD
2322  ICECC_CREATE_ENV
2323              Override default value for ICECC_CREATE_ENV
2324  ICECC_WRAPPER
2325              Override default value for ICECC_WRAPPER
2326  CCACHE      Override default value for CCACHE
2327
2328Use these variables to override the choices made by `configure' or to help
2329it to find libraries and programs with nonstandard names/locations.
2330
2331Report bugs to <build-dev@openjdk.java.net>.
2332OpenJDK home page: <http://openjdk.java.net>.
2333_ACEOF
2334ac_status=$?
2335fi
2336
2337if test "$ac_init_help" = "recursive"; then
2338  # If there are subdirs, report their specific --help.
2339  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2340    test -d "$ac_dir" ||
2341      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2342      continue
2343    ac_builddir=.
2344
2345case "$ac_dir" in
2346.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2347*)
2348  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2349  # A ".." for each directory in $ac_dir_suffix.
2350  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2351  case $ac_top_builddir_sub in
2352  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2353  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2354  esac ;;
2355esac
2356ac_abs_top_builddir=$ac_pwd
2357ac_abs_builddir=$ac_pwd$ac_dir_suffix
2358# for backward compatibility:
2359ac_top_builddir=$ac_top_build_prefix
2360
2361case $srcdir in
2362  .)  # We are building in place.
2363    ac_srcdir=.
2364    ac_top_srcdir=$ac_top_builddir_sub
2365    ac_abs_top_srcdir=$ac_pwd ;;
2366  [\\/]* | ?:[\\/]* )  # Absolute name.
2367    ac_srcdir=$srcdir$ac_dir_suffix;
2368    ac_top_srcdir=$srcdir
2369    ac_abs_top_srcdir=$srcdir ;;
2370  *) # Relative name.
2371    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2372    ac_top_srcdir=$ac_top_build_prefix$srcdir
2373    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2374esac
2375ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2376
2377    cd "$ac_dir" || { ac_status=$?; continue; }
2378    # Check for guested configure.
2379    if test -f "$ac_srcdir/configure.gnu"; then
2380      echo &&
2381      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2382    elif test -f "$ac_srcdir/configure"; then
2383      echo &&
2384      $SHELL "$ac_srcdir/configure" --help=recursive
2385    else
2386      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2387    fi || ac_status=$?
2388    cd "$ac_pwd" || { ac_status=$?; break; }
2389  done
2390fi
2391
2392test -n "$ac_init_help" && exit $ac_status
2393if $ac_init_version; then
2394  cat <<\_ACEOF
2395OpenJDK configure jdk9
2396generated by GNU Autoconf 2.69
2397
2398Copyright (C) 2012 Free Software Foundation, Inc.
2399This configure script is free software; the Free Software Foundation
2400gives unlimited permission to copy, distribute and modify it.
2401_ACEOF
2402  exit
2403fi
2404
2405## ------------------------ ##
2406## Autoconf initialization. ##
2407## ------------------------ ##
2408
2409# ac_fn_c_try_compile LINENO
2410# --------------------------
2411# Try to compile conftest.$ac_ext, and return whether this succeeded.
2412ac_fn_c_try_compile ()
2413{
2414  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2415  rm -f conftest.$ac_objext
2416  if { { ac_try="$ac_compile"
2417case "(($ac_try" in
2418  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2419  *) ac_try_echo=$ac_try;;
2420esac
2421eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2422$as_echo "$ac_try_echo"; } >&5
2423  (eval "$ac_compile") 2>conftest.err
2424  ac_status=$?
2425  if test -s conftest.err; then
2426    grep -v '^ *+' conftest.err >conftest.er1
2427    cat conftest.er1 >&5
2428    mv -f conftest.er1 conftest.err
2429  fi
2430  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2431  test $ac_status = 0; } && {
2432	 test -z "$ac_c_werror_flag" ||
2433	 test ! -s conftest.err
2434       } && test -s conftest.$ac_objext; then :
2435  ac_retval=0
2436else
2437  $as_echo "$as_me: failed program was:" >&5
2438sed 's/^/| /' conftest.$ac_ext >&5
2439
2440	ac_retval=1
2441fi
2442  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2443  as_fn_set_status $ac_retval
2444
2445} # ac_fn_c_try_compile
2446
2447# ac_fn_cxx_try_compile LINENO
2448# ----------------------------
2449# Try to compile conftest.$ac_ext, and return whether this succeeded.
2450ac_fn_cxx_try_compile ()
2451{
2452  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2453  rm -f conftest.$ac_objext
2454  if { { ac_try="$ac_compile"
2455case "(($ac_try" in
2456  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2457  *) ac_try_echo=$ac_try;;
2458esac
2459eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2460$as_echo "$ac_try_echo"; } >&5
2461  (eval "$ac_compile") 2>conftest.err
2462  ac_status=$?
2463  if test -s conftest.err; then
2464    grep -v '^ *+' conftest.err >conftest.er1
2465    cat conftest.er1 >&5
2466    mv -f conftest.er1 conftest.err
2467  fi
2468  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2469  test $ac_status = 0; } && {
2470	 test -z "$ac_cxx_werror_flag" ||
2471	 test ! -s conftest.err
2472       } && test -s conftest.$ac_objext; then :
2473  ac_retval=0
2474else
2475  $as_echo "$as_me: failed program was:" >&5
2476sed 's/^/| /' conftest.$ac_ext >&5
2477
2478	ac_retval=1
2479fi
2480  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2481  as_fn_set_status $ac_retval
2482
2483} # ac_fn_cxx_try_compile
2484
2485# ac_fn_c_try_cpp LINENO
2486# ----------------------
2487# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2488ac_fn_c_try_cpp ()
2489{
2490  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2491  if { { ac_try="$ac_cpp conftest.$ac_ext"
2492case "(($ac_try" in
2493  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2494  *) ac_try_echo=$ac_try;;
2495esac
2496eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2497$as_echo "$ac_try_echo"; } >&5
2498  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2499  ac_status=$?
2500  if test -s conftest.err; then
2501    grep -v '^ *+' conftest.err >conftest.er1
2502    cat conftest.er1 >&5
2503    mv -f conftest.er1 conftest.err
2504  fi
2505  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2506  test $ac_status = 0; } > conftest.i && {
2507	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2508	 test ! -s conftest.err
2509       }; then :
2510  ac_retval=0
2511else
2512  $as_echo "$as_me: failed program was:" >&5
2513sed 's/^/| /' conftest.$ac_ext >&5
2514
2515    ac_retval=1
2516fi
2517  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2518  as_fn_set_status $ac_retval
2519
2520} # ac_fn_c_try_cpp
2521
2522# ac_fn_cxx_try_cpp LINENO
2523# ------------------------
2524# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2525ac_fn_cxx_try_cpp ()
2526{
2527  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528  if { { ac_try="$ac_cpp conftest.$ac_ext"
2529case "(($ac_try" in
2530  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2531  *) ac_try_echo=$ac_try;;
2532esac
2533eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2534$as_echo "$ac_try_echo"; } >&5
2535  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2536  ac_status=$?
2537  if test -s conftest.err; then
2538    grep -v '^ *+' conftest.err >conftest.er1
2539    cat conftest.er1 >&5
2540    mv -f conftest.er1 conftest.err
2541  fi
2542  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2543  test $ac_status = 0; } > conftest.i && {
2544	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2545	 test ! -s conftest.err
2546       }; then :
2547  ac_retval=0
2548else
2549  $as_echo "$as_me: failed program was:" >&5
2550sed 's/^/| /' conftest.$ac_ext >&5
2551
2552    ac_retval=1
2553fi
2554  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2555  as_fn_set_status $ac_retval
2556
2557} # ac_fn_cxx_try_cpp
2558
2559# ac_fn_c_try_link LINENO
2560# -----------------------
2561# Try to link conftest.$ac_ext, and return whether this succeeded.
2562ac_fn_c_try_link ()
2563{
2564  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2565  rm -f conftest.$ac_objext conftest$ac_exeext
2566  if { { ac_try="$ac_link"
2567case "(($ac_try" in
2568  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2569  *) ac_try_echo=$ac_try;;
2570esac
2571eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2572$as_echo "$ac_try_echo"; } >&5
2573  (eval "$ac_link") 2>conftest.err
2574  ac_status=$?
2575  if test -s conftest.err; then
2576    grep -v '^ *+' conftest.err >conftest.er1
2577    cat conftest.er1 >&5
2578    mv -f conftest.er1 conftest.err
2579  fi
2580  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2581  test $ac_status = 0; } && {
2582	 test -z "$ac_c_werror_flag" ||
2583	 test ! -s conftest.err
2584       } && test -s conftest$ac_exeext && {
2585	 test "$cross_compiling" = yes ||
2586	 test -x conftest$ac_exeext
2587       }; then :
2588  ac_retval=0
2589else
2590  $as_echo "$as_me: failed program was:" >&5
2591sed 's/^/| /' conftest.$ac_ext >&5
2592
2593	ac_retval=1
2594fi
2595  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2596  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2597  # interfere with the next link command; also delete a directory that is
2598  # left behind by Apple's compiler.  We do this before executing the actions.
2599  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2600  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2601  as_fn_set_status $ac_retval
2602
2603} # ac_fn_c_try_link
2604
2605# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2606# ---------------------------------------------------------
2607# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2608# the include files in INCLUDES and setting the cache variable VAR
2609# accordingly.
2610ac_fn_cxx_check_header_mongrel ()
2611{
2612  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2613  if eval \${$3+:} false; then :
2614  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2615$as_echo_n "checking for $2... " >&6; }
2616if eval \${$3+:} false; then :
2617  $as_echo_n "(cached) " >&6
2618fi
2619eval ac_res=\$$3
2620	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2621$as_echo "$ac_res" >&6; }
2622else
2623  # Is the header compilable?
2624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2625$as_echo_n "checking $2 usability... " >&6; }
2626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2627/* end confdefs.h.  */
2628$4
2629#include <$2>
2630_ACEOF
2631if ac_fn_cxx_try_compile "$LINENO"; then :
2632  ac_header_compiler=yes
2633else
2634  ac_header_compiler=no
2635fi
2636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2638$as_echo "$ac_header_compiler" >&6; }
2639
2640# Is the header present?
2641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2642$as_echo_n "checking $2 presence... " >&6; }
2643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2644/* end confdefs.h.  */
2645#include <$2>
2646_ACEOF
2647if ac_fn_cxx_try_cpp "$LINENO"; then :
2648  ac_header_preproc=yes
2649else
2650  ac_header_preproc=no
2651fi
2652rm -f conftest.err conftest.i conftest.$ac_ext
2653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2654$as_echo "$ac_header_preproc" >&6; }
2655
2656# So?  What about this header?
2657case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2658  yes:no: )
2659    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2660$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2661    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2662$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2663    ;;
2664  no:yes:* )
2665    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2666$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2667    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2668$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2669    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2670$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2671    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2672$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2673    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2674$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2675( $as_echo "## ----------------------------------------- ##
2676## Report this to build-dev@openjdk.java.net ##
2677## ----------------------------------------- ##"
2678     ) | sed "s/^/$as_me: WARNING:     /" >&2
2679    ;;
2680esac
2681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2682$as_echo_n "checking for $2... " >&6; }
2683if eval \${$3+:} false; then :
2684  $as_echo_n "(cached) " >&6
2685else
2686  eval "$3=\$ac_header_compiler"
2687fi
2688eval ac_res=\$$3
2689	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2690$as_echo "$ac_res" >&6; }
2691fi
2692  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2693
2694} # ac_fn_cxx_check_header_mongrel
2695
2696# ac_fn_cxx_try_run LINENO
2697# ------------------------
2698# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2699# that executables *can* be run.
2700ac_fn_cxx_try_run ()
2701{
2702  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2703  if { { ac_try="$ac_link"
2704case "(($ac_try" in
2705  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2706  *) ac_try_echo=$ac_try;;
2707esac
2708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2709$as_echo "$ac_try_echo"; } >&5
2710  (eval "$ac_link") 2>&5
2711  ac_status=$?
2712  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2713  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2714  { { case "(($ac_try" in
2715  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2716  *) ac_try_echo=$ac_try;;
2717esac
2718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2719$as_echo "$ac_try_echo"; } >&5
2720  (eval "$ac_try") 2>&5
2721  ac_status=$?
2722  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2723  test $ac_status = 0; }; }; then :
2724  ac_retval=0
2725else
2726  $as_echo "$as_me: program exited with status $ac_status" >&5
2727       $as_echo "$as_me: failed program was:" >&5
2728sed 's/^/| /' conftest.$ac_ext >&5
2729
2730       ac_retval=$ac_status
2731fi
2732  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2733  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2734  as_fn_set_status $ac_retval
2735
2736} # ac_fn_cxx_try_run
2737
2738# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2739# ---------------------------------------------------------
2740# Tests whether HEADER exists and can be compiled using the include files in
2741# INCLUDES, setting the cache variable VAR accordingly.
2742ac_fn_cxx_check_header_compile ()
2743{
2744  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2746$as_echo_n "checking for $2... " >&6; }
2747if eval \${$3+:} false; then :
2748  $as_echo_n "(cached) " >&6
2749else
2750  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2751/* end confdefs.h.  */
2752$4
2753#include <$2>
2754_ACEOF
2755if ac_fn_cxx_try_compile "$LINENO"; then :
2756  eval "$3=yes"
2757else
2758  eval "$3=no"
2759fi
2760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2761fi
2762eval ac_res=\$$3
2763	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2764$as_echo "$ac_res" >&6; }
2765  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2766
2767} # ac_fn_cxx_check_header_compile
2768
2769# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2770# ----------------------------------------------
2771# Tries to find the compile-time value of EXPR in a program that includes
2772# INCLUDES, setting VAR accordingly. Returns whether the value could be
2773# computed
2774ac_fn_cxx_compute_int ()
2775{
2776  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2777  if test "$cross_compiling" = yes; then
2778    # Depending upon the size, compute the lo and hi bounds.
2779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2780/* end confdefs.h.  */
2781$4
2782int
2783main ()
2784{
2785static int test_array [1 - 2 * !(($2) >= 0)];
2786test_array [0] = 0;
2787return test_array [0];
2788
2789  ;
2790  return 0;
2791}
2792_ACEOF
2793if ac_fn_cxx_try_compile "$LINENO"; then :
2794  ac_lo=0 ac_mid=0
2795  while :; do
2796    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2797/* end confdefs.h.  */
2798$4
2799int
2800main ()
2801{
2802static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2803test_array [0] = 0;
2804return test_array [0];
2805
2806  ;
2807  return 0;
2808}
2809_ACEOF
2810if ac_fn_cxx_try_compile "$LINENO"; then :
2811  ac_hi=$ac_mid; break
2812else
2813  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2814			if test $ac_lo -le $ac_mid; then
2815			  ac_lo= ac_hi=
2816			  break
2817			fi
2818			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2819fi
2820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2821  done
2822else
2823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2824/* end confdefs.h.  */
2825$4
2826int
2827main ()
2828{
2829static int test_array [1 - 2 * !(($2) < 0)];
2830test_array [0] = 0;
2831return test_array [0];
2832
2833  ;
2834  return 0;
2835}
2836_ACEOF
2837if ac_fn_cxx_try_compile "$LINENO"; then :
2838  ac_hi=-1 ac_mid=-1
2839  while :; do
2840    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2841/* end confdefs.h.  */
2842$4
2843int
2844main ()
2845{
2846static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2847test_array [0] = 0;
2848return test_array [0];
2849
2850  ;
2851  return 0;
2852}
2853_ACEOF
2854if ac_fn_cxx_try_compile "$LINENO"; then :
2855  ac_lo=$ac_mid; break
2856else
2857  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2858			if test $ac_mid -le $ac_hi; then
2859			  ac_lo= ac_hi=
2860			  break
2861			fi
2862			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2863fi
2864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2865  done
2866else
2867  ac_lo= ac_hi=
2868fi
2869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870fi
2871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872# Binary search between lo and hi bounds.
2873while test "x$ac_lo" != "x$ac_hi"; do
2874  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2875  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2876/* end confdefs.h.  */
2877$4
2878int
2879main ()
2880{
2881static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2882test_array [0] = 0;
2883return test_array [0];
2884
2885  ;
2886  return 0;
2887}
2888_ACEOF
2889if ac_fn_cxx_try_compile "$LINENO"; then :
2890  ac_hi=$ac_mid
2891else
2892  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2893fi
2894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2895done
2896case $ac_lo in #((
2897?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2898'') ac_retval=1 ;;
2899esac
2900  else
2901    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2902/* end confdefs.h.  */
2903$4
2904static long int longval () { return $2; }
2905static unsigned long int ulongval () { return $2; }
2906#include <stdio.h>
2907#include <stdlib.h>
2908int
2909main ()
2910{
2911
2912  FILE *f = fopen ("conftest.val", "w");
2913  if (! f)
2914    return 1;
2915  if (($2) < 0)
2916    {
2917      long int i = longval ();
2918      if (i != ($2))
2919	return 1;
2920      fprintf (f, "%ld", i);
2921    }
2922  else
2923    {
2924      unsigned long int i = ulongval ();
2925      if (i != ($2))
2926	return 1;
2927      fprintf (f, "%lu", i);
2928    }
2929  /* Do not output a trailing newline, as this causes \r\n confusion
2930     on some platforms.  */
2931  return ferror (f) || fclose (f) != 0;
2932
2933  ;
2934  return 0;
2935}
2936_ACEOF
2937if ac_fn_cxx_try_run "$LINENO"; then :
2938  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2939else
2940  ac_retval=1
2941fi
2942rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2943  conftest.$ac_objext conftest.beam conftest.$ac_ext
2944rm -f conftest.val
2945
2946  fi
2947  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2948  as_fn_set_status $ac_retval
2949
2950} # ac_fn_cxx_compute_int
2951
2952# ac_fn_cxx_try_link LINENO
2953# -------------------------
2954# Try to link conftest.$ac_ext, and return whether this succeeded.
2955ac_fn_cxx_try_link ()
2956{
2957  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2958  rm -f conftest.$ac_objext conftest$ac_exeext
2959  if { { ac_try="$ac_link"
2960case "(($ac_try" in
2961  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2962  *) ac_try_echo=$ac_try;;
2963esac
2964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2965$as_echo "$ac_try_echo"; } >&5
2966  (eval "$ac_link") 2>conftest.err
2967  ac_status=$?
2968  if test -s conftest.err; then
2969    grep -v '^ *+' conftest.err >conftest.er1
2970    cat conftest.er1 >&5
2971    mv -f conftest.er1 conftest.err
2972  fi
2973  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2974  test $ac_status = 0; } && {
2975	 test -z "$ac_cxx_werror_flag" ||
2976	 test ! -s conftest.err
2977       } && test -s conftest$ac_exeext && {
2978	 test "$cross_compiling" = yes ||
2979	 test -x conftest$ac_exeext
2980       }; then :
2981  ac_retval=0
2982else
2983  $as_echo "$as_me: failed program was:" >&5
2984sed 's/^/| /' conftest.$ac_ext >&5
2985
2986	ac_retval=1
2987fi
2988  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2989  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2990  # interfere with the next link command; also delete a directory that is
2991  # left behind by Apple's compiler.  We do this before executing the actions.
2992  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2993  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2994  as_fn_set_status $ac_retval
2995
2996} # ac_fn_cxx_try_link
2997
2998# ac_fn_cxx_check_func LINENO FUNC VAR
2999# ------------------------------------
3000# Tests whether FUNC exists, setting the cache variable VAR accordingly
3001ac_fn_cxx_check_func ()
3002{
3003  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3005$as_echo_n "checking for $2... " >&6; }
3006if eval \${$3+:} false; then :
3007  $as_echo_n "(cached) " >&6
3008else
3009  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3010/* end confdefs.h.  */
3011/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3012   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3013#define $2 innocuous_$2
3014
3015/* System header to define __stub macros and hopefully few prototypes,
3016    which can conflict with char $2 (); below.
3017    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3018    <limits.h> exists even on freestanding compilers.  */
3019
3020#ifdef __STDC__
3021# include <limits.h>
3022#else
3023# include <assert.h>
3024#endif
3025
3026#undef $2
3027
3028/* Override any GCC internal prototype to avoid an error.
3029   Use char because int might match the return type of a GCC
3030   builtin and then its argument prototype would still apply.  */
3031#ifdef __cplusplus
3032extern "C"
3033#endif
3034char $2 ();
3035/* The GNU C library defines this for functions which it implements
3036    to always fail with ENOSYS.  Some functions are actually named
3037    something starting with __ and the normal name is an alias.  */
3038#if defined __stub_$2 || defined __stub___$2
3039choke me
3040#endif
3041
3042int
3043main ()
3044{
3045return $2 ();
3046  ;
3047  return 0;
3048}
3049_ACEOF
3050if ac_fn_cxx_try_link "$LINENO"; then :
3051  eval "$3=yes"
3052else
3053  eval "$3=no"
3054fi
3055rm -f core conftest.err conftest.$ac_objext \
3056    conftest$ac_exeext conftest.$ac_ext
3057fi
3058eval ac_res=\$$3
3059	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3060$as_echo "$ac_res" >&6; }
3061  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3062
3063} # ac_fn_cxx_check_func
3064
3065# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3066# -------------------------------------------------------
3067# Tests whether HEADER exists and can be compiled using the include files in
3068# INCLUDES, setting the cache variable VAR accordingly.
3069ac_fn_c_check_header_compile ()
3070{
3071  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3073$as_echo_n "checking for $2... " >&6; }
3074if eval \${$3+:} false; then :
3075  $as_echo_n "(cached) " >&6
3076else
3077  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3078/* end confdefs.h.  */
3079$4
3080#include <$2>
3081_ACEOF
3082if ac_fn_c_try_compile "$LINENO"; then :
3083  eval "$3=yes"
3084else
3085  eval "$3=no"
3086fi
3087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3088fi
3089eval ac_res=\$$3
3090	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3091$as_echo "$ac_res" >&6; }
3092  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3093
3094} # ac_fn_c_check_header_compile
3095cat >config.log <<_ACEOF
3096This file contains any messages produced by compilers while
3097running configure, to aid debugging if configure makes a mistake.
3098
3099It was created by OpenJDK $as_me jdk9, which was
3100generated by GNU Autoconf 2.69.  Invocation command line was
3101
3102  $ $0 $@
3103
3104_ACEOF
3105exec 5>>config.log
3106{
3107cat <<_ASUNAME
3108## --------- ##
3109## Platform. ##
3110## --------- ##
3111
3112hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3113uname -m = `(uname -m) 2>/dev/null || echo unknown`
3114uname -r = `(uname -r) 2>/dev/null || echo unknown`
3115uname -s = `(uname -s) 2>/dev/null || echo unknown`
3116uname -v = `(uname -v) 2>/dev/null || echo unknown`
3117
3118/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3119/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3120
3121/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3122/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3123/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3124/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3125/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3126/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3127/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3128
3129_ASUNAME
3130
3131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3132for as_dir in $PATH
3133do
3134  IFS=$as_save_IFS
3135  test -z "$as_dir" && as_dir=.
3136    $as_echo "PATH: $as_dir"
3137  done
3138IFS=$as_save_IFS
3139
3140} >&5
3141
3142cat >&5 <<_ACEOF
3143
3144
3145## ----------- ##
3146## Core tests. ##
3147## ----------- ##
3148
3149_ACEOF
3150
3151
3152# Keep a trace of the command line.
3153# Strip out --no-create and --no-recursion so they do not pile up.
3154# Strip out --silent because we don't want to record it for future runs.
3155# Also quote any args containing shell meta-characters.
3156# Make two passes to allow for proper duplicate-argument suppression.
3157ac_configure_args=
3158ac_configure_args0=
3159ac_configure_args1=
3160ac_must_keep_next=false
3161for ac_pass in 1 2
3162do
3163  for ac_arg
3164  do
3165    case $ac_arg in
3166    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3167    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3168    | -silent | --silent | --silen | --sile | --sil)
3169      continue ;;
3170    *\'*)
3171      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3172    esac
3173    case $ac_pass in
3174    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3175    2)
3176      as_fn_append ac_configure_args1 " '$ac_arg'"
3177      if test $ac_must_keep_next = true; then
3178	ac_must_keep_next=false # Got value, back to normal.
3179      else
3180	case $ac_arg in
3181	  *=* | --config-cache | -C | -disable-* | --disable-* \
3182	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3183	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3184	  | -with-* | --with-* | -without-* | --without-* | --x)
3185	    case "$ac_configure_args0 " in
3186	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3187	    esac
3188	    ;;
3189	  -* ) ac_must_keep_next=true ;;
3190	esac
3191      fi
3192      as_fn_append ac_configure_args " '$ac_arg'"
3193      ;;
3194    esac
3195  done
3196done
3197{ ac_configure_args0=; unset ac_configure_args0;}
3198{ ac_configure_args1=; unset ac_configure_args1;}
3199
3200# When interrupted or exit'd, cleanup temporary files, and complete
3201# config.log.  We remove comments because anyway the quotes in there
3202# would cause problems or look ugly.
3203# WARNING: Use '\'' to represent an apostrophe within the trap.
3204# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3205trap 'exit_status=$?
3206  # Save into config.log some information that might help in debugging.
3207  {
3208    echo
3209
3210    $as_echo "## ---------------- ##
3211## Cache variables. ##
3212## ---------------- ##"
3213    echo
3214    # The following way of writing the cache mishandles newlines in values,
3215(
3216  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3217    eval ac_val=\$$ac_var
3218    case $ac_val in #(
3219    *${as_nl}*)
3220      case $ac_var in #(
3221      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3222$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3223      esac
3224      case $ac_var in #(
3225      _ | IFS | as_nl) ;; #(
3226      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3227      *) { eval $ac_var=; unset $ac_var;} ;;
3228      esac ;;
3229    esac
3230  done
3231  (set) 2>&1 |
3232    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3233    *${as_nl}ac_space=\ *)
3234      sed -n \
3235	"s/'\''/'\''\\\\'\'''\''/g;
3236	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3237      ;; #(
3238    *)
3239      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3240      ;;
3241    esac |
3242    sort
3243)
3244    echo
3245
3246    $as_echo "## ----------------- ##
3247## Output variables. ##
3248## ----------------- ##"
3249    echo
3250    for ac_var in $ac_subst_vars
3251    do
3252      eval ac_val=\$$ac_var
3253      case $ac_val in
3254      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3255      esac
3256      $as_echo "$ac_var='\''$ac_val'\''"
3257    done | sort
3258    echo
3259
3260    if test -n "$ac_subst_files"; then
3261      $as_echo "## ------------------- ##
3262## File substitutions. ##
3263## ------------------- ##"
3264      echo
3265      for ac_var in $ac_subst_files
3266      do
3267	eval ac_val=\$$ac_var
3268	case $ac_val in
3269	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3270	esac
3271	$as_echo "$ac_var='\''$ac_val'\''"
3272      done | sort
3273      echo
3274    fi
3275
3276    if test -s confdefs.h; then
3277      $as_echo "## ----------- ##
3278## confdefs.h. ##
3279## ----------- ##"
3280      echo
3281      cat confdefs.h
3282      echo
3283    fi
3284    test "$ac_signal" != 0 &&
3285      $as_echo "$as_me: caught signal $ac_signal"
3286    $as_echo "$as_me: exit $exit_status"
3287  } >&5
3288  rm -f core *.core core.conftest.* &&
3289    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3290    exit $exit_status
3291' 0
3292for ac_signal in 1 2 13 15; do
3293  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3294done
3295ac_signal=0
3296
3297# confdefs.h avoids OS command line length limits that DEFS can exceed.
3298rm -f -r conftest* confdefs.h
3299
3300$as_echo "/* confdefs.h */" > confdefs.h
3301
3302# Predefined preprocessor variables.
3303
3304cat >>confdefs.h <<_ACEOF
3305#define PACKAGE_NAME "$PACKAGE_NAME"
3306_ACEOF
3307
3308cat >>confdefs.h <<_ACEOF
3309#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3310_ACEOF
3311
3312cat >>confdefs.h <<_ACEOF
3313#define PACKAGE_VERSION "$PACKAGE_VERSION"
3314_ACEOF
3315
3316cat >>confdefs.h <<_ACEOF
3317#define PACKAGE_STRING "$PACKAGE_STRING"
3318_ACEOF
3319
3320cat >>confdefs.h <<_ACEOF
3321#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3322_ACEOF
3323
3324cat >>confdefs.h <<_ACEOF
3325#define PACKAGE_URL "$PACKAGE_URL"
3326_ACEOF
3327
3328
3329# Let the site file select an alternate cache file if it wants to.
3330# Prefer an explicitly selected file to automatically selected ones.
3331ac_site_file1=NONE
3332ac_site_file2=NONE
3333if test -n "$CONFIG_SITE"; then
3334  # We do not want a PATH search for config.site.
3335  case $CONFIG_SITE in #((
3336    -*)  ac_site_file1=./$CONFIG_SITE;;
3337    */*) ac_site_file1=$CONFIG_SITE;;
3338    *)   ac_site_file1=./$CONFIG_SITE;;
3339  esac
3340elif test "x$prefix" != xNONE; then
3341  ac_site_file1=$prefix/share/config.site
3342  ac_site_file2=$prefix/etc/config.site
3343else
3344  ac_site_file1=$ac_default_prefix/share/config.site
3345  ac_site_file2=$ac_default_prefix/etc/config.site
3346fi
3347for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3348do
3349  test "x$ac_site_file" = xNONE && continue
3350  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3351    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3352$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3353    sed 's/^/| /' "$ac_site_file" >&5
3354    . "$ac_site_file" \
3355      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3356$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3357as_fn_error $? "failed to load site script $ac_site_file
3358See \`config.log' for more details" "$LINENO" 5; }
3359  fi
3360done
3361
3362if test -r "$cache_file"; then
3363  # Some versions of bash will fail to source /dev/null (special files
3364  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3365  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3366    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3367$as_echo "$as_me: loading cache $cache_file" >&6;}
3368    case $cache_file in
3369      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3370      *)                      . "./$cache_file";;
3371    esac
3372  fi
3373else
3374  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3375$as_echo "$as_me: creating cache $cache_file" >&6;}
3376  >$cache_file
3377fi
3378
3379# Check that the precious variables saved in the cache have kept the same
3380# value.
3381ac_cache_corrupted=false
3382for ac_var in $ac_precious_vars; do
3383  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3384  eval ac_new_set=\$ac_env_${ac_var}_set
3385  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3386  eval ac_new_val=\$ac_env_${ac_var}_value
3387  case $ac_old_set,$ac_new_set in
3388    set,)
3389      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3390$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3391      ac_cache_corrupted=: ;;
3392    ,set)
3393      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3394$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3395      ac_cache_corrupted=: ;;
3396    ,);;
3397    *)
3398      if test "x$ac_old_val" != "x$ac_new_val"; then
3399	# differences in whitespace do not lead to failure.
3400	ac_old_val_w=`echo x $ac_old_val`
3401	ac_new_val_w=`echo x $ac_new_val`
3402	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3403	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3404$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3405	  ac_cache_corrupted=:
3406	else
3407	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3408$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3409	  eval $ac_var=\$ac_old_val
3410	fi
3411	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3412$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3413	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3414$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3415      fi;;
3416  esac
3417  # Pass precious variables to config.status.
3418  if test "$ac_new_set" = set; then
3419    case $ac_new_val in
3420    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3421    *) ac_arg=$ac_var=$ac_new_val ;;
3422    esac
3423    case " $ac_configure_args " in
3424      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3425      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3426    esac
3427  fi
3428done
3429if $ac_cache_corrupted; then
3430  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3432  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3433$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3434  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3435fi
3436## -------------------- ##
3437## Main body of script. ##
3438## -------------------- ##
3439
3440ac_ext=c
3441ac_cpp='$CPP $CPPFLAGS'
3442ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3443ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3444ac_compiler_gnu=$ac_cv_c_compiler_gnu
3445
3446
3447
3448ac_aux_dir=
3449for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3450  if test -f "$ac_dir/install-sh"; then
3451    ac_aux_dir=$ac_dir
3452    ac_install_sh="$ac_aux_dir/install-sh -c"
3453    break
3454  elif test -f "$ac_dir/install.sh"; then
3455    ac_aux_dir=$ac_dir
3456    ac_install_sh="$ac_aux_dir/install.sh -c"
3457    break
3458  elif test -f "$ac_dir/shtool"; then
3459    ac_aux_dir=$ac_dir
3460    ac_install_sh="$ac_aux_dir/shtool install -c"
3461    break
3462  fi
3463done
3464if test -z "$ac_aux_dir"; then
3465  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3466fi
3467
3468# These three variables are undocumented and unsupported,
3469# and are intended to be withdrawn in a future Autoconf release.
3470# They can cause serious problems if a builder's source tree is in a directory
3471# whose full name contains unusual characters.
3472ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3473ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3474ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3475
3476
3477# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3478
3479#
3480# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3481# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3482#
3483# This code is free software; you can redistribute it and/or modify it
3484# under the terms of the GNU General Public License version 2 only, as
3485# published by the Free Software Foundation.  Oracle designates this
3486# particular file as subject to the "Classpath" exception as provided
3487# by Oracle in the LICENSE file that accompanied this code.
3488#
3489# This code is distributed in the hope that it will be useful, but WITHOUT
3490# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3491# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3492# version 2 for more details (a copy is included in the LICENSE file that
3493# accompanied this code).
3494#
3495# You should have received a copy of the GNU General Public License version
3496# 2 along with this work; if not, write to the Free Software Foundation,
3497# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3498#
3499# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3500# or visit www.oracle.com if you need additional information or have any
3501# questions.
3502#
3503
3504#
3505# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3506#
3507# This program is free software; you can redistribute it and/or modify
3508# it under the terms of the GNU General Public License as published by
3509# the Free Software Foundation; either version 2 of the License, or
3510# (at your option) any later version.
3511#
3512# This program is distributed in the hope that it will be useful, but
3513# WITHOUT ANY WARRANTY; without even the implied warranty of
3514# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3515# General Public License for more details.
3516#
3517# You should have received a copy of the GNU General Public License
3518# along with this program; if not, write to the Free Software
3519# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3520#
3521# As a special exception to the GNU General Public License, if you
3522# distribute this file as part of a program that contains a
3523# configuration script generated by Autoconf, you may include it under
3524# the same distribution terms that you use for the rest of that program.
3525
3526# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3527# ----------------------------------
3528# PKG_PROG_PKG_CONFIG
3529
3530# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3531#
3532# Check to see whether a particular set of modules exists.  Similar
3533# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3534#
3535#
3536# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3537# this or PKG_CHECK_MODULES is called, or make sure to call
3538# PKG_CHECK_EXISTS manually
3539# --------------------------------------------------------------
3540
3541
3542
3543# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3544# ---------------------------------------------
3545# _PKG_CONFIG
3546
3547# _PKG_SHORT_ERRORS_SUPPORTED
3548# -----------------------------
3549# _PKG_SHORT_ERRORS_SUPPORTED
3550
3551
3552# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3553# [ACTION-IF-NOT-FOUND])
3554#
3555#
3556# Note that if there is a possibility the first call to
3557# PKG_CHECK_MODULES might not happen, you should be sure to include an
3558# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3559#
3560#
3561# --------------------------------------------------------------
3562# PKG_CHECK_MODULES
3563
3564
3565# Include these first...
3566#
3567# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3568# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3569#
3570# This code is free software; you can redistribute it and/or modify it
3571# under the terms of the GNU General Public License version 2 only, as
3572# published by the Free Software Foundation.  Oracle designates this
3573# particular file as subject to the "Classpath" exception as provided
3574# by Oracle in the LICENSE file that accompanied this code.
3575#
3576# This code is distributed in the hope that it will be useful, but WITHOUT
3577# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3578# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3579# version 2 for more details (a copy is included in the LICENSE file that
3580# accompanied this code).
3581#
3582# You should have received a copy of the GNU General Public License version
3583# 2 along with this work; if not, write to the Free Software Foundation,
3584# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3585#
3586# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3587# or visit www.oracle.com if you need additional information or have any
3588# questions.
3589#
3590
3591# Create a function/macro that takes a series of named arguments. The call is
3592# similar to AC_DEFUN, but the setup of the function looks like this:
3593# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3594# ... do something
3595#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3596# ])
3597# A star (*) in front of a named argument means that it is required and it's
3598# presence will be verified. To pass e.g. the first value as a normal indexed
3599# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3600# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3601# "ARG_FOO".
3602#
3603# The generated function can be called like this:
3604# MYFUNC(FOO: [foo-val],
3605#     BAR: [
3606#         $ECHO hello world
3607#     ])
3608# Note that the argument value must start on the same line as the argument name.
3609#
3610# Argument 1: Name of the function to define
3611# Argument 2: List of legal named arguments, with a * prefix for required arguments
3612# Argument 3: Argument array to treat as named, typically $@
3613# Argument 4: The main function body
3614
3615
3616# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3617# If so, then append $1 to $2 \
3618# Also set JVM_ARG_OK to true/false depending on outcome.
3619
3620
3621# Appends a string to a path variable, only adding the : when needed.
3622
3623
3624# Prepends a string to a path variable, only adding the : when needed.
3625
3626
3627# This will make sure the given variable points to a full and proper
3628# path. This means:
3629# 1) There will be no spaces in the path. On unix platforms,
3630#    spaces in the path will result in an error. On Windows,
3631#    the path will be rewritten using short-style to be space-free.
3632# 2) The path will be absolute, and it will be in unix-style (on
3633#     cygwin).
3634# $1: The name of the variable to fix
3635
3636
3637# This will make sure the given variable points to a executable
3638# with a full and proper path. This means:
3639# 1) There will be no spaces in the path. On unix platforms,
3640#    spaces in the path will result in an error. On Windows,
3641#    the path will be rewritten using short-style to be space-free.
3642# 2) The path will be absolute, and it will be in unix-style (on
3643#     cygwin).
3644# Any arguments given to the executable is preserved.
3645# If the input variable does not have a directory specification, then
3646# it need to be in the PATH.
3647# $1: The name of the variable to fix
3648
3649
3650
3651
3652# Register a --with argument but mark it as deprecated
3653# $1: The name of the with argument to deprecate, not including --with-
3654
3655
3656# Register a --enable argument but mark it as deprecated
3657# $1: The name of the with argument to deprecate, not including --enable-
3658# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3659# $3: Messages to user.
3660
3661
3662
3663
3664# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3665# $1: variable to check
3666
3667
3668# Check that there are no unprocessed overridden variables left.
3669# If so, they are an incorrect argument and we will exit with an error.
3670
3671
3672# Setup a tool for the given variable. If correctly specified by the user,
3673# use that value, otherwise search for the tool using the supplied code snippet.
3674# $1: variable to set
3675# $2: code snippet to call to look for the tool
3676# $3: code snippet to call if variable was used to find tool
3677
3678
3679# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3680# $1: variable to set
3681# $2: executable name (or list of names) to look for
3682# $3: [path]
3683
3684
3685# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3686# $1: variable to set
3687# $2: executable name (or list of names) to look for
3688
3689
3690# Like BASIC_PATH_PROGS but fails if no tool was found.
3691# $1: variable to set
3692# $2: executable name (or list of names) to look for
3693# $3: [path]
3694
3695
3696# Like BASIC_SETUP_TOOL but fails if no tool was found.
3697# $1: variable to set
3698# $2: autoconf macro to call to look for the special tool
3699
3700
3701# Setup the most fundamental tools that relies on not much else to set up,
3702# but is used by much of the early bootstrap code.
3703
3704
3705# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3706
3707
3708# Evaluates platform specific overrides for devkit variables.
3709# $1: Name of variable
3710
3711
3712
3713
3714
3715
3716#%%% Simple tools %%%
3717
3718# Check if we have found a usable version of make
3719# $1: the path to a potential make binary (or empty)
3720# $2: the description on how we found this
3721
3722
3723
3724
3725# Goes looking for a usable version of GNU make.
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736# Check if build directory is on local disk. If not possible to determine,
3737# we prefer to claim it's local.
3738# Argument 1: directory to test
3739# Argument 2: what to do if it is on local disk
3740# Argument 3: what to do otherwise (remote disk or failure)
3741
3742
3743# Check that source files have basic read permissions set. This might
3744# not be the case in cygwin in certain conditions.
3745
3746
3747
3748
3749# Check for support for specific options in bash
3750
3751
3752################################################################################
3753#
3754# Default make target
3755#
3756
3757
3758# Code to run after AC_OUTPUT
3759
3760
3761#
3762# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3763# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3764#
3765# This code is free software; you can redistribute it and/or modify it
3766# under the terms of the GNU General Public License version 2 only, as
3767# published by the Free Software Foundation.  Oracle designates this
3768# particular file as subject to the "Classpath" exception as provided
3769# by Oracle in the LICENSE file that accompanied this code.
3770#
3771# This code is distributed in the hope that it will be useful, but WITHOUT
3772# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3773# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3774# version 2 for more details (a copy is included in the LICENSE file that
3775# accompanied this code).
3776#
3777# You should have received a copy of the GNU General Public License version
3778# 2 along with this work; if not, write to the Free Software Foundation,
3779# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3780#
3781# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3782# or visit www.oracle.com if you need additional information or have any
3783# questions.
3784#
3785
3786
3787
3788
3789
3790# Helper function which possibly converts a path using DOS-style short mode.
3791# If so, the updated path is stored in $new_path.
3792# $1: The path to check
3793
3794
3795# Helper function which possibly converts a path using DOS-style short mode.
3796# If so, the updated path is stored in $new_path.
3797# $1: The path to check
3798
3799
3800# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3801# and could probably be heavily simplified. However, all changes in this
3802# area tend to need lot of testing in different scenarios, and in lack of
3803# proper unit testing, cleaning this up has not been deemed worth the effort
3804# at the moment.
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3815
3816
3817
3818
3819# ... then the rest
3820#
3821# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3822# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3823#
3824# This code is free software; you can redistribute it and/or modify it
3825# under the terms of the GNU General Public License version 2 only, as
3826# published by the Free Software Foundation.  Oracle designates this
3827# particular file as subject to the "Classpath" exception as provided
3828# by Oracle in the LICENSE file that accompanied this code.
3829#
3830# This code is distributed in the hope that it will be useful, but WITHOUT
3831# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3832# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3833# version 2 for more details (a copy is included in the LICENSE file that
3834# accompanied this code).
3835#
3836# You should have received a copy of the GNU General Public License version
3837# 2 along with this work; if not, write to the Free Software Foundation,
3838# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3839#
3840# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3841# or visit www.oracle.com if you need additional information or have any
3842# questions.
3843#
3844
3845########################################################################
3846# This file handles detection of the Boot JDK. The Boot JDK detection
3847# process has been developed as a response to solve a complex real-world
3848# problem. Initially, it was simple, but it has grown as platform after
3849# platform, idiosyncracy after idiosyncracy has been supported.
3850#
3851# The basic idea is this:
3852# 1) You need an acceptable *) JDK to use as a Boot JDK
3853# 2) There are several ways to locate a JDK, that are mostly platform
3854#    dependent **)
3855# 3) You can have multiple JDKs installed
3856# 4) If possible, configure should try to dig out an acceptable JDK
3857#    automatically, without having to resort to command-line options
3858#
3859# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3860#     javac) and not a JRE, etc.
3861#
3862# **) On Windows we typically use a well-known path.
3863#     On MacOSX we typically use the tool java_home.
3864#     On Linux we typically find javac in the $PATH, and then follow a
3865#     chain of symlinks that often ends up in a real JDK.
3866#
3867# This leads to the code where we check in different ways to locate a
3868# JDK, and if one is found, check if it is acceptable. If not, we print
3869# our reasons for rejecting it (useful when debugging non-working
3870# configure situations) and continue checking the next one.
3871########################################################################
3872
3873# Execute the check given as argument, and verify the result
3874# If the Boot JDK was previously found, do nothing
3875# $1 A command line (typically autoconf macro) to execute
3876
3877
3878# Test: Is bootjdk explicitly set by command line arguments?
3879
3880
3881# Test: Is $JAVA_HOME set?
3882
3883
3884# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3885
3886
3887# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3888# $1: Argument to the java_home binary (optional)
3889
3890
3891# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3892
3893
3894# Look for a jdk in the given path. If there are multiple, try to select the newest.
3895# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3896# $1 = Path to directory containing jdk installations.
3897# $2 = String to append to the found JDK directory to get the proper JDK home
3898
3899
3900# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3901# environmental variable as base for where to look.
3902# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3903
3904
3905# Test: Is there a JDK installed in default, well-known locations?
3906
3907
3908# Check that a command-line tool in the Boot JDK is correct
3909# $1 = name of variable to assign
3910# $2 = name of binary
3911
3912
3913###############################################################################
3914#
3915# We need a Boot JDK to bootstrap the build.
3916#
3917
3918
3919
3920
3921
3922# BUILD_JDK: the location of the latest JDK that can run
3923#   on the host system and supports the target class file version
3924#   generated in this JDK build.  This variable should only be
3925#   used after the launchers are built.
3926#
3927
3928# Execute the check given as argument, and verify the result.
3929# If the JDK was previously found, do nothing.
3930# $1 A command line (typically autoconf macro) to execute
3931
3932
3933# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3934# is different than the host system doing the build (e.g. cross-compilation),
3935# a special BUILD_JDK is built as part of the build process.  An external
3936# prebuilt BUILD_JDK can also be supplied.
3937
3938
3939#
3940# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3941# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3942#
3943# This code is free software; you can redistribute it and/or modify it
3944# under the terms of the GNU General Public License version 2 only, as
3945# published by the Free Software Foundation.  Oracle designates this
3946# particular file as subject to the "Classpath" exception as provided
3947# by Oracle in the LICENSE file that accompanied this code.
3948#
3949# This code is distributed in the hope that it will be useful, but WITHOUT
3950# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3951# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3952# version 2 for more details (a copy is included in the LICENSE file that
3953# accompanied this code).
3954#
3955# You should have received a copy of the GNU General Public License version
3956# 2 along with this work; if not, write to the Free Software Foundation,
3957# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3958#
3959# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3960# or visit www.oracle.com if you need additional information or have any
3961# questions.
3962#
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980################################################################################
3981#
3982# Runs icecc-create-env once and prints the error if it fails
3983#
3984# $1: arguments to icecc-create-env
3985# $2: log file
3986#
3987
3988
3989################################################################################
3990#
3991# Optionally enable distributed compilation of native code using icecc/icecream
3992#
3993
3994
3995
3996
3997
3998
3999
4000#
4001# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4002# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4003#
4004# This code is free software; you can redistribute it and/or modify it
4005# under the terms of the GNU General Public License version 2 only, as
4006# published by the Free Software Foundation.  Oracle designates this
4007# particular file as subject to the "Classpath" exception as provided
4008# by Oracle in the LICENSE file that accompanied this code.
4009#
4010# This code is distributed in the hope that it will be useful, but WITHOUT
4011# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4012# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4013# version 2 for more details (a copy is included in the LICENSE file that
4014# accompanied this code).
4015#
4016# You should have received a copy of the GNU General Public License version
4017# 2 along with this work; if not, write to the Free Software Foundation,
4018# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4019#
4020# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4021# or visit www.oracle.com if you need additional information or have any
4022# questions.
4023#
4024
4025################################################################################
4026#
4027# Setup ABI profile (for arm)
4028#
4029
4030
4031# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4032# corresponding configure arguments instead
4033
4034
4035# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4036# that configure can use them while detecting compilers.
4037# TOOLCHAIN_TYPE is available here.
4038# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4039
4040
4041
4042
4043
4044
4045# Documentation on common flags used for solstudio in HIGHEST.
4046#
4047# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4048#          done with care, there are some assumptions below that need to
4049#          be understood about the use of pointers, and IEEE behavior.
4050#
4051# -fns: Use non-standard floating point mode (not IEEE 754)
4052# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4053# -fsingle: Use single precision floating point with 'float'
4054# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4055#   (Source with excessing pointer casting and data access with mixed
4056#    pointer types are not recommended)
4057# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4058#   (If you expect perfect errno behavior, do not use this)
4059# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4060# -xrestrict: Pointer parameters to functions do not overlap
4061#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4062#    If you pass in multiple pointers to the same data, do not use this)
4063# -xlibmil: Inline some library routines
4064#   (If you expect perfect errno behavior, do not use this)
4065# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4066#   (If you expect perfect errno behavior, do not use this)
4067#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4068
4069    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4070    # Bug?
4071    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4072    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4073    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4074    #fi
4075
4076
4077
4078
4079
4080
4081################################################################################
4082# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4083#      conditionals against.
4084# $2 - Optional prefix for each variable defined.
4085
4086
4087# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4088#                                  IF_FALSE: [RUN-IF-FALSE])
4089# ------------------------------------------------------------
4090# Check that the C compiler supports an argument
4091
4092
4093
4094
4095# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4096#                                    IF_FALSE: [RUN-IF-FALSE])
4097# ------------------------------------------------------------
4098# Check that the C++ compiler supports an argument
4099
4100
4101
4102
4103# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4104#                                IF_FALSE: [RUN-IF-FALSE])
4105# ------------------------------------------------------------
4106# Check that the C and C++ compilers support an argument
4107
4108
4109
4110
4111# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4112#                                   IF_FALSE: [RUN-IF-FALSE])
4113# ------------------------------------------------------------
4114# Check that the linker support an argument
4115
4116
4117
4118
4119
4120
4121# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4122# Arguments:
4123# $1 - Optional prefix for each variable defined.
4124
4125
4126#
4127# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4128# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4129#
4130# This code is free software; you can redistribute it and/or modify it
4131# under the terms of the GNU General Public License version 2 only, as
4132# published by the Free Software Foundation.  Oracle designates this
4133# particular file as subject to the "Classpath" exception as provided
4134# by Oracle in the LICENSE file that accompanied this code.
4135#
4136# This code is distributed in the hope that it will be useful, but WITHOUT
4137# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4138# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4139# version 2 for more details (a copy is included in the LICENSE file that
4140# accompanied this code).
4141#
4142# You should have received a copy of the GNU General Public License version
4143# 2 along with this work; if not, write to the Free Software Foundation,
4144# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4145#
4146# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4147# or visit www.oracle.com if you need additional information or have any
4148# questions.
4149#
4150
4151
4152
4153
4154
4155cygwin_help() {
4156  case $1 in
4157    unzip)
4158      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4159      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4160      ;;
4161    zip)
4162      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4163      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4164      ;;
4165    make)
4166      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4167      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4168      ;;
4169    freetype)
4170      HELP_MSG="
4171The freetype library can now be build during the configure process.
4172Download the freetype sources and unpack them into an arbitrary directory:
4173
4174wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4175tar -xzf freetype-2.5.3.tar.gz
4176
4177Then run configure with '--with-freetype-src=<freetype_src>'. This will
4178automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4179builds or into '<freetype_src>/lib32' for 32-bit builds.
4180Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4181and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4182
4183Alternatively you can unpack the sources like this to use the default directory:
4184
4185tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4186      ;;
4187  esac
4188}
4189
4190msys_help() {
4191  PKGHANDLER_COMMAND=""
4192}
4193
4194apt_help() {
4195  case $1 in
4196    reduced)
4197      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4198    devkit)
4199      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4200    openjdk)
4201      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4202    alsa)
4203      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4204    cups)
4205      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4206    freetype)
4207      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4208    ffi)
4209      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4210    x11)
4211      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4212    ccache)
4213      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4214    dtrace)
4215      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4216  esac
4217}
4218
4219yum_help() {
4220  case $1 in
4221    devkit)
4222      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4223    openjdk)
4224      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4225    alsa)
4226      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4227    cups)
4228      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4229    freetype)
4230      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4231    x11)
4232      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4233    ccache)
4234      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4235  esac
4236}
4237
4238brew_help() {
4239  case $1 in
4240    openjdk)
4241      PKGHANDLER_COMMAND="brew cask install java" ;;
4242    freetype)
4243      PKGHANDLER_COMMAND="brew install freetype" ;;
4244    ccache)
4245      PKGHANDLER_COMMAND="brew install ccache" ;;
4246  esac
4247}
4248
4249port_help() {
4250  PKGHANDLER_COMMAND=""
4251}
4252
4253pkgutil_help() {
4254  PKGHANDLER_COMMAND=""
4255}
4256
4257pkgadd_help() {
4258  PKGHANDLER_COMMAND=""
4259}
4260
4261# This function will check if we're called from the "configure" wrapper while
4262# printing --help. If so, we will print out additional information that can
4263# only be extracted within the autoconf script, and then exit. This must be
4264# called at the very beginning in configure.ac.
4265
4266
4267
4268
4269
4270
4271#
4272# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4273# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4274#
4275# This code is free software; you can redistribute it and/or modify it
4276# under the terms of the GNU General Public License version 2 only, as
4277# published by the Free Software Foundation.  Oracle designates this
4278# particular file as subject to the "Classpath" exception as provided
4279# by Oracle in the LICENSE file that accompanied this code.
4280#
4281# This code is distributed in the hope that it will be useful, but WITHOUT
4282# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4283# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4284# version 2 for more details (a copy is included in the LICENSE file that
4285# accompanied this code).
4286#
4287# You should have received a copy of the GNU General Public License version
4288# 2 along with this work; if not, write to the Free Software Foundation,
4289# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4290#
4291# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4292# or visit www.oracle.com if you need additional information or have any
4293# questions.
4294#
4295
4296# All valid JVM features, regardless of platform
4297VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4298    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4299    static-build link-time-opt aot"
4300
4301# All valid JVM variants
4302VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4303
4304###############################################################################
4305# Check if the specified JVM variant should be built. To be used in shell if
4306# constructs, like this:
4307# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4308#
4309# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4310
4311# Definition kept in one line to allow inlining in if statements.
4312# Additional [] needed to keep m4 from mangling shell constructs.
4313
4314
4315###############################################################################
4316# Check if the specified JVM features are explicitly enabled. To be used in
4317# shell if constructs, like this:
4318# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4319#
4320# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4321
4322# Definition kept in one line to allow inlining in if statements.
4323# Additional [] needed to keep m4 from mangling shell constructs.
4324
4325
4326###############################################################################
4327# Check which variants of the JVM that we want to build. Available variants are:
4328#   server: normal interpreter, and a tiered C1/C2 compiler
4329#   client: normal interpreter, and C1 (no C2 compiler)
4330#   minimal: reduced form of client with optional features stripped out
4331#   core: normal interpreter only, no compiler
4332#   zero: C++ based interpreter only, no compiler
4333#   zeroshark: C++ based interpreter, and a llvm-based compiler
4334#   custom: baseline JVM with no default features
4335#
4336
4337
4338###############################################################################
4339# Check if dtrace should be enabled and has all prerequisites present.
4340#
4341
4342
4343################################################################################
4344# Check if AOT should be enabled
4345#
4346
4347
4348###############################################################################
4349# Set up all JVM features for each JVM variant.
4350#
4351
4352
4353###############################################################################
4354# Validate JVM features once all setup is complete, including custom setup.
4355#
4356
4357
4358################################################################################
4359#
4360# Specify which sources will be used to build the 64-bit ARM port
4361#
4362# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4363# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4364#
4365
4366
4367
4368################################################################################
4369# Check if gtest should be built
4370#
4371
4372
4373#
4374# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4375# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4376#
4377# This code is free software; you can redistribute it and/or modify it
4378# under the terms of the GNU General Public License version 2 only, as
4379# published by the Free Software Foundation.  Oracle designates this
4380# particular file as subject to the "Classpath" exception as provided
4381# by Oracle in the LICENSE file that accompanied this code.
4382#
4383# This code is distributed in the hope that it will be useful, but WITHOUT
4384# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4385# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4386# version 2 for more details (a copy is included in the LICENSE file that
4387# accompanied this code).
4388#
4389# You should have received a copy of the GNU General Public License version
4390# 2 along with this work; if not, write to the Free Software Foundation,
4391# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4392#
4393# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4394# or visit www.oracle.com if you need additional information or have any
4395# questions.
4396#
4397
4398###############################################################################
4399# Check which variant of the JDK that we want to build.
4400# Currently we have:
4401#    normal:   standard edition
4402# but the custom make system may add other variants
4403#
4404# Effectively the JDK variant gives a name to a specific set of
4405# modules to compile into the JDK.
4406
4407
4408###############################################################################
4409# Set the debug level
4410#    release: no debug information, all optimizations, no asserts.
4411#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4412#    fastdebug: debug information (-g), all optimizations, all asserts
4413#    slowdebug: debug information (-g), no optimizations, all asserts
4414
4415
4416###############################################################################
4417#
4418# Should we build only OpenJDK even if closed sources are present?
4419#
4420
4421
4422
4423
4424###############################################################################
4425#
4426# Enable or disable the elliptic curve crypto implementation
4427#
4428
4429
4430
4431
4432################################################################################
4433#
4434# Gcov coverage data for hotspot
4435#
4436
4437
4438################################################################################
4439#
4440# Static build support.  When enabled will generate static
4441# libraries instead of shared libraries for all JDK libs.
4442#
4443
4444
4445################################################################################
4446#
4447# jlink options.
4448# We always keep packaged modules in JDK image.
4449#
4450
4451
4452################################################################################
4453#
4454# Check if building of the jtreg failure handler should be enabled.
4455#
4456
4457
4458################################################################################
4459#
4460# Enable or disable generation of the classlist at build time
4461#
4462
4463
4464#
4465# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4466# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4467#
4468# This code is free software; you can redistribute it and/or modify it
4469# under the terms of the GNU General Public License version 2 only, as
4470# published by the Free Software Foundation.  Oracle designates this
4471# particular file as subject to the "Classpath" exception as provided
4472# by Oracle in the LICENSE file that accompanied this code.
4473#
4474# This code is distributed in the hope that it will be useful, but WITHOUT
4475# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4476# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4477# version 2 for more details (a copy is included in the LICENSE file that
4478# accompanied this code).
4479#
4480# You should have received a copy of the GNU General Public License version
4481# 2 along with this work; if not, write to the Free Software Foundation,
4482# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4483#
4484# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4485# or visit www.oracle.com if you need additional information or have any
4486# questions.
4487#
4488
4489###############################################################################
4490#
4491# Setup version numbers
4492#
4493
4494# Verify that a given string represents a valid version number, and assign it
4495# to a variable.
4496
4497# Argument 1: the variable to assign to
4498# Argument 2: the value given by the user
4499
4500
4501
4502
4503#
4504# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4505# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4506#
4507# This code is free software; you can redistribute it and/or modify it
4508# under the terms of the GNU General Public License version 2 only, as
4509# published by the Free Software Foundation.  Oracle designates this
4510# particular file as subject to the "Classpath" exception as provided
4511# by Oracle in the LICENSE file that accompanied this code.
4512#
4513# This code is distributed in the hope that it will be useful, but WITHOUT
4514# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4515# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4516# version 2 for more details (a copy is included in the LICENSE file that
4517# accompanied this code).
4518#
4519# You should have received a copy of the GNU General Public License version
4520# 2 along with this work; if not, write to the Free Software Foundation,
4521# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4522#
4523# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4524# or visit www.oracle.com if you need additional information or have any
4525# questions.
4526#
4527
4528# Major library component reside in separate files.
4529#
4530# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4531# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4532#
4533# This code is free software; you can redistribute it and/or modify it
4534# under the terms of the GNU General Public License version 2 only, as
4535# published by the Free Software Foundation.  Oracle designates this
4536# particular file as subject to the "Classpath" exception as provided
4537# by Oracle in the LICENSE file that accompanied this code.
4538#
4539# This code is distributed in the hope that it will be useful, but WITHOUT
4540# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4541# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4542# version 2 for more details (a copy is included in the LICENSE file that
4543# accompanied this code).
4544#
4545# You should have received a copy of the GNU General Public License version
4546# 2 along with this work; if not, write to the Free Software Foundation,
4547# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4548#
4549# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4550# or visit www.oracle.com if you need additional information or have any
4551# questions.
4552#
4553
4554################################################################################
4555# Setup alsa (Advanced Linux Sound Architecture)
4556################################################################################
4557
4558
4559#
4560# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4561# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4562#
4563# This code is free software; you can redistribute it and/or modify it
4564# under the terms of the GNU General Public License version 2 only, as
4565# published by the Free Software Foundation.  Oracle designates this
4566# particular file as subject to the "Classpath" exception as provided
4567# by Oracle in the LICENSE file that accompanied this code.
4568#
4569# This code is distributed in the hope that it will be useful, but WITHOUT
4570# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4571# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4572# version 2 for more details (a copy is included in the LICENSE file that
4573# accompanied this code).
4574#
4575# You should have received a copy of the GNU General Public License version
4576# 2 along with this work; if not, write to the Free Software Foundation,
4577# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4578#
4579# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4580# or visit www.oracle.com if you need additional information or have any
4581# questions.
4582#
4583
4584################################################################################
4585# Setup bundled libraries.
4586#
4587# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4588# OpenJDK repository. Default is to use these libraries as bundled, but they
4589# might be replaced by en external version by the user.
4590################################################################################
4591
4592
4593################################################################################
4594# Setup libjpeg
4595################################################################################
4596
4597
4598################################################################################
4599# Setup giflib
4600################################################################################
4601
4602
4603################################################################################
4604# Setup libpng
4605################################################################################
4606
4607
4608################################################################################
4609# Setup zlib
4610################################################################################
4611
4612
4613################################################################################
4614# Setup lcms (Little CMS)
4615################################################################################
4616
4617
4618#
4619# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4620# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4621#
4622# This code is free software; you can redistribute it and/or modify it
4623# under the terms of the GNU General Public License version 2 only, as
4624# published by the Free Software Foundation.  Oracle designates this
4625# particular file as subject to the "Classpath" exception as provided
4626# by Oracle in the LICENSE file that accompanied this code.
4627#
4628# This code is distributed in the hope that it will be useful, but WITHOUT
4629# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4630# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4631# version 2 for more details (a copy is included in the LICENSE file that
4632# accompanied this code).
4633#
4634# You should have received a copy of the GNU General Public License version
4635# 2 along with this work; if not, write to the Free Software Foundation,
4636# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4637#
4638# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4639# or visit www.oracle.com if you need additional information or have any
4640# questions.
4641#
4642
4643################################################################################
4644# Setup cups (Common Unix Printing System)
4645################################################################################
4646
4647
4648#
4649# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4650# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4651#
4652# This code is free software; you can redistribute it and/or modify it
4653# under the terms of the GNU General Public License version 2 only, as
4654# published by the Free Software Foundation.  Oracle designates this
4655# particular file as subject to the "Classpath" exception as provided
4656# by Oracle in the LICENSE file that accompanied this code.
4657#
4658# This code is distributed in the hope that it will be useful, but WITHOUT
4659# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4660# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4661# version 2 for more details (a copy is included in the LICENSE file that
4662# accompanied this code).
4663#
4664# You should have received a copy of the GNU General Public License version
4665# 2 along with this work; if not, write to the Free Software Foundation,
4666# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4667#
4668# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4669# or visit www.oracle.com if you need additional information or have any
4670# questions.
4671#
4672
4673################################################################################
4674# Setup libffi (Foreign Function Interface)
4675################################################################################
4676
4677
4678#
4679# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4680# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4681#
4682# This code is free software; you can redistribute it and/or modify it
4683# under the terms of the GNU General Public License version 2 only, as
4684# published by the Free Software Foundation.  Oracle designates this
4685# particular file as subject to the "Classpath" exception as provided
4686# by Oracle in the LICENSE file that accompanied this code.
4687#
4688# This code is distributed in the hope that it will be useful, but WITHOUT
4689# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4690# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4691# version 2 for more details (a copy is included in the LICENSE file that
4692# accompanied this code).
4693#
4694# You should have received a copy of the GNU General Public License version
4695# 2 along with this work; if not, write to the Free Software Foundation,
4696# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4697#
4698# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4699# or visit www.oracle.com if you need additional information or have any
4700# questions.
4701#
4702
4703################################################################################
4704# Build the freetype lib from source
4705################################################################################
4706
4707
4708################################################################################
4709# Check if a potential freeype library match is correct and usable
4710################################################################################
4711
4712
4713################################################################################
4714# Setup freetype (The FreeType2 font rendering library)
4715################################################################################
4716
4717
4718#
4719# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4720# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4721#
4722# This code is free software; you can redistribute it and/or modify it
4723# under the terms of the GNU General Public License version 2 only, as
4724# published by the Free Software Foundation.  Oracle designates this
4725# particular file as subject to the "Classpath" exception as provided
4726# by Oracle in the LICENSE file that accompanied this code.
4727#
4728# This code is distributed in the hope that it will be useful, but WITHOUT
4729# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4730# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4731# version 2 for more details (a copy is included in the LICENSE file that
4732# accompanied this code).
4733#
4734# You should have received a copy of the GNU General Public License version
4735# 2 along with this work; if not, write to the Free Software Foundation,
4736# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4737#
4738# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4739# or visit www.oracle.com if you need additional information or have any
4740# questions.
4741#
4742
4743################################################################################
4744# Setup the standard C/C++ runtime libraries.
4745#
4746# Most importantly, determine if stdc++ should be linked statically or
4747# dynamically.
4748################################################################################
4749
4750
4751#
4752# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4753# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4754#
4755# This code is free software; you can redistribute it and/or modify it
4756# under the terms of the GNU General Public License version 2 only, as
4757# published by the Free Software Foundation.  Oracle designates this
4758# particular file as subject to the "Classpath" exception as provided
4759# by Oracle in the LICENSE file that accompanied this code.
4760#
4761# This code is distributed in the hope that it will be useful, but WITHOUT
4762# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4763# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4764# version 2 for more details (a copy is included in the LICENSE file that
4765# accompanied this code).
4766#
4767# You should have received a copy of the GNU General Public License version
4768# 2 along with this work; if not, write to the Free Software Foundation,
4769# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4770#
4771# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4772# or visit www.oracle.com if you need additional information or have any
4773# questions.
4774#
4775
4776################################################################################
4777# Setup X11 Windows system
4778################################################################################
4779
4780
4781
4782################################################################################
4783# Determine which libraries are needed for this configuration
4784################################################################################
4785
4786
4787################################################################################
4788# Parse library options, and setup needed libraries
4789################################################################################
4790
4791
4792################################################################################
4793# Setup llvm (Low-Level VM)
4794################################################################################
4795
4796
4797################################################################################
4798# Setup various libraries, typically small system libraries
4799################################################################################
4800
4801
4802################################################################################
4803# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4804# redistribute it in the test image.
4805################################################################################
4806
4807
4808
4809#
4810# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4811# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4812#
4813# This code is free software; you can redistribute it and/or modify it
4814# under the terms of the GNU General Public License version 2 only, as
4815# published by the Free Software Foundation.  Oracle designates this
4816# particular file as subject to the "Classpath" exception as provided
4817# by Oracle in the LICENSE file that accompanied this code.
4818#
4819# This code is distributed in the hope that it will be useful, but WITHOUT
4820# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4821# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4822# version 2 for more details (a copy is included in the LICENSE file that
4823# accompanied this code).
4824#
4825# You should have received a copy of the GNU General Public License version
4826# 2 along with this work; if not, write to the Free Software Foundation,
4827# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4828#
4829# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4830# or visit www.oracle.com if you need additional information or have any
4831# questions.
4832#
4833
4834# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4835# Converts autoconf style CPU name to OpenJDK style, into
4836# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4837
4838
4839# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4840# Converts autoconf style OS name to OpenJDK style, into
4841# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4842
4843
4844# Expects $host_os $host_cpu $build_os and $build_cpu
4845# and $with_target_bits to have been setup!
4846#
4847# Translate the standard triplet(quadruplet) definition
4848# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4849# OPENJDK_BUILD_OS, etc.
4850
4851
4852# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4853# accordingly. Must be done after setting up build and target system, but before
4854# doing anything else with these values.
4855
4856
4857# Setup the legacy variables, for controlling the old makefiles.
4858#
4859
4860
4861# $1 - Either TARGET or BUILD to setup the variables for.
4862
4863
4864
4865
4866
4867
4868#%%% Build and target systems %%%
4869
4870
4871
4872
4873# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4874# Add -mX to various FLAGS variables.
4875
4876
4877
4878
4879
4880
4881#
4882# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4883# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4884#
4885# This code is free software; you can redistribute it and/or modify it
4886# under the terms of the GNU General Public License version 2 only, as
4887# published by the Free Software Foundation.  Oracle designates this
4888# particular file as subject to the "Classpath" exception as provided
4889# by Oracle in the LICENSE file that accompanied this code.
4890#
4891# This code is distributed in the hope that it will be useful, but WITHOUT
4892# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4893# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4894# version 2 for more details (a copy is included in the LICENSE file that
4895# accompanied this code).
4896#
4897# You should have received a copy of the GNU General Public License version
4898# 2 along with this work; if not, write to the Free Software Foundation,
4899# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4900#
4901# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4902# or visit www.oracle.com if you need additional information or have any
4903# questions.
4904#
4905
4906
4907
4908
4909
4910
4911
4912################################################################################
4913# Define a mechanism for importing extra prebuilt modules
4914#
4915
4916
4917
4918#
4919# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4920# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4921#
4922# This code is free software; you can redistribute it and/or modify it
4923# under the terms of the GNU General Public License version 2 only, as
4924# published by the Free Software Foundation.  Oracle designates this
4925# particular file as subject to the "Classpath" exception as provided
4926# by Oracle in the LICENSE file that accompanied this code.
4927#
4928# This code is distributed in the hope that it will be useful, but WITHOUT
4929# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4930# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4931# version 2 for more details (a copy is included in the LICENSE file that
4932# accompanied this code).
4933#
4934# You should have received a copy of the GNU General Public License version
4935# 2 along with this work; if not, write to the Free Software Foundation,
4936# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4937#
4938# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4939# or visit www.oracle.com if you need additional information or have any
4940# questions.
4941#
4942
4943########################################################################
4944# This file is responsible for detecting, verifying and setting up the
4945# toolchain, i.e. the compiler, linker and related utilities. It will setup
4946# proper paths to the binaries, but it will not setup any flags.
4947#
4948# The binaries used is determined by the toolchain type, which is the family of
4949# compilers and related tools that are used.
4950########################################################################
4951
4952
4953# All valid toolchains, regardless of platform (used by help.m4)
4954VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4955
4956# These toolchains are valid on different platforms
4957VALID_TOOLCHAINS_linux="gcc clang"
4958VALID_TOOLCHAINS_solaris="solstudio"
4959VALID_TOOLCHAINS_macosx="gcc clang"
4960VALID_TOOLCHAINS_aix="xlc"
4961VALID_TOOLCHAINS_windows="microsoft"
4962
4963# Toolchain descriptions
4964TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4965TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4966TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4967TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4968TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4969
4970# Minimum supported versions, empty means unspecified
4971TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4972TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
4973TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4974TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4975TOOLCHAIN_MINIMUM_VERSION_xlc=""
4976
4977# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4978# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4979# $1 - optional variable prefix for compiler and version variables (BUILD_)
4980# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4981
4982
4983# Check if the configured compiler (C and C++) is of a specific version or
4984# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4985#
4986# Arguments:
4987#   VERSION:   The version string to check against the found version
4988#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4989#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4990#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4991
4992
4993
4994
4995# Setup a number of variables describing how native output files are
4996# named on this platform/toolchain.
4997
4998
4999# Determine which toolchain type to use, and make sure it is valid for this
5000# platform. Setup various information about the selected toolchain.
5001
5002
5003# Before we start detecting the toolchain executables, we might need some
5004# special setup, e.g. additional paths etc.
5005
5006
5007# Restore path, etc
5008
5009
5010# Check if a compiler is of the toolchain type we expect, and save the version
5011# information from it. If the compiler does not match the expected type,
5012# this function will abort using AC_MSG_ERROR. If it matches, the version will
5013# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5014# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5015#
5016# $1 = compiler to test (CC or CXX)
5017# $2 = human readable name of compiler (C or C++)
5018
5019
5020# Try to locate the given C or C++ compiler in the path, or otherwise.
5021#
5022# $1 = compiler to test (CC or CXX)
5023# $2 = human readable name of compiler (C or C++)
5024# $3 = compiler name to search for
5025
5026
5027# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5028# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5029# archiver (AR). Verify that the compilers are correct according to the
5030# toolchain type.
5031
5032
5033# Setup additional tools that is considered a part of the toolchain, but not the
5034# core part. Many of these are highly platform-specific and do not exist,
5035# and/or are not needed on all platforms.
5036
5037
5038# Setup the build tools (i.e, the compiler and linker used to build programs
5039# that should be run on the build platform, not the target platform, as a build
5040# helper). Since the non-cross-compile case uses the normal, target compilers
5041# for this, we can only do this after these have been setup.
5042
5043
5044# Do some additional checks on the detected tools.
5045
5046
5047# Setup the JTReg Regression Test Harness.
5048
5049
5050# Setup the JIB dependency resolver
5051
5052
5053#
5054# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5055# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5056#
5057# This code is free software; you can redistribute it and/or modify it
5058# under the terms of the GNU General Public License version 2 only, as
5059# published by the Free Software Foundation.  Oracle designates this
5060# particular file as subject to the "Classpath" exception as provided
5061# by Oracle in the LICENSE file that accompanied this code.
5062#
5063# This code is distributed in the hope that it will be useful, but WITHOUT
5064# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5065# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5066# version 2 for more details (a copy is included in the LICENSE file that
5067# accompanied this code).
5068#
5069# You should have received a copy of the GNU General Public License version
5070# 2 along with this work; if not, write to the Free Software Foundation,
5071# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5072#
5073# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5074# or visit www.oracle.com if you need additional information or have any
5075# questions.
5076#
5077
5078################################################################################
5079# The order of these defines the priority by which we try to find them.
5080VALID_VS_VERSIONS="2013 2012 2010"
5081
5082VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5083VS_VERSION_INTERNAL_2010=100
5084VS_MSVCR_2010=msvcr100.dll
5085# We don't use msvcp on Visual Studio 2010
5086#VS_MSVCP_2010=msvcp100.dll
5087VS_ENVVAR_2010="VS100COMNTOOLS"
5088VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5089VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5090VS_VS_PLATFORM_NAME_2010="v100"
5091VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5092
5093VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5094VS_VERSION_INTERNAL_2012=110
5095VS_MSVCR_2012=msvcr110.dll
5096VS_MSVCP_2012=msvcp110.dll
5097VS_ENVVAR_2012="VS110COMNTOOLS"
5098VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5099VS_SDK_INSTALLDIR_2012=
5100VS_VS_PLATFORM_NAME_2012="v110"
5101VS_SDK_PLATFORM_NAME_2012=
5102
5103VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5104VS_VERSION_INTERNAL_2013=120
5105VS_MSVCR_2013=msvcr120.dll
5106VS_MSVCP_2013=msvcp120.dll
5107VS_ENVVAR_2013="VS120COMNTOOLS"
5108VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5109VS_SDK_INSTALLDIR_2013=
5110VS_VS_PLATFORM_NAME_2013="v120"
5111VS_SDK_PLATFORM_NAME_2013=
5112
5113################################################################################
5114
5115
5116
5117################################################################################
5118
5119
5120
5121################################################################################
5122# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5123# build environment and assigns it to VS_ENV_CMD
5124
5125
5126################################################################################
5127
5128
5129
5130################################################################################
5131# Check if the VS env variables were setup prior to running configure.
5132# If not, then find vcvarsall.bat and run it automatically, and integrate
5133# the set env variables into the spec file.
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148# This line needs to be here, verbatim, after all includes and the dummy hook
5149# definitions. It is replaced with custom functionality when building
5150# custom sources.
5151#CUSTOM_AUTOCONF_INCLUDE
5152
5153# Do not change or remove the following line, it is needed for consistency checks:
5154DATE_WHEN_GENERATED=1503411624
5155
5156###############################################################################
5157#
5158# Initialization / Boot-strapping
5159#
5160# The bootstrapping process needs to solve the "chicken or the egg" problem,
5161# thus it jumps back and forth, each time gaining something needed later on.
5162#
5163###############################################################################
5164
5165# If we are requested to print additional help, do that and then exit.
5166# This must be the very first call.
5167
5168  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5169
5170    # Print available toolchains
5171    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5172    $PRINTF "Which are valid to use depends on the build platform.\n"
5173    for toolchain in $VALID_TOOLCHAINS_all; do
5174      # Use indirect variable referencing
5175      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5176      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5177      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5178    done
5179    $PRINTF "\n"
5180
5181    # Print available jvm features
5182    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5183    $PRINTF "Which are valid to use depends on the target platform.\n  "
5184    $PRINTF "%s " $VALID_JVM_FEATURES
5185    $PRINTF "\n"
5186
5187    # And now exit directly
5188    exit 0
5189  fi
5190
5191
5192# Basic initialization that must happen first of all in the normal process.
5193
5194  # Save the original command line. This is passed to us by the wrapper configure script.
5195
5196  # Save the path variable before it gets changed
5197  ORIGINAL_PATH="$PATH"
5198
5199  DATE_WHEN_CONFIGURED=`LANG=C date`
5200
5201  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5202$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5203  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5204$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5205
5206
5207  # Start with tools that do not need have cross compilation support
5208  # and can be expected to be found in the default PATH. These tools are
5209  # used by configure.
5210
5211  # First are all the simple required tools.
5212
5213
5214
5215  # Publish this variable in the help.
5216
5217
5218  if [ -z "${BASENAME+x}" ]; then
5219    # The variable is not set by user, try to locate tool using the code snippet
5220    for ac_prog in basename
5221do
5222  # Extract the first word of "$ac_prog", so it can be a program name with args.
5223set dummy $ac_prog; ac_word=$2
5224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5225$as_echo_n "checking for $ac_word... " >&6; }
5226if ${ac_cv_path_BASENAME+:} false; then :
5227  $as_echo_n "(cached) " >&6
5228else
5229  case $BASENAME in
5230  [\\/]* | ?:[\\/]*)
5231  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5232  ;;
5233  *)
5234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5235for as_dir in $PATH
5236do
5237  IFS=$as_save_IFS
5238  test -z "$as_dir" && as_dir=.
5239    for ac_exec_ext in '' $ac_executable_extensions; do
5240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5241    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5243    break 2
5244  fi
5245done
5246  done
5247IFS=$as_save_IFS
5248
5249  ;;
5250esac
5251fi
5252BASENAME=$ac_cv_path_BASENAME
5253if test -n "$BASENAME"; then
5254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5255$as_echo "$BASENAME" >&6; }
5256else
5257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5258$as_echo "no" >&6; }
5259fi
5260
5261
5262  test -n "$BASENAME" && break
5263done
5264
5265  else
5266    # The variable is set, but is it from the command line or the environment?
5267
5268    # Try to remove the string !BASENAME! from our list.
5269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5271      # If it failed, the variable was not from the command line. Ignore it,
5272      # but warn the user (except for BASH, which is always set by the calling BASH).
5273      if test "xBASENAME" != xBASH; then
5274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5275$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5276      fi
5277      # Try to locate tool using the code snippet
5278      for ac_prog in basename
5279do
5280  # Extract the first word of "$ac_prog", so it can be a program name with args.
5281set dummy $ac_prog; ac_word=$2
5282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5283$as_echo_n "checking for $ac_word... " >&6; }
5284if ${ac_cv_path_BASENAME+:} false; then :
5285  $as_echo_n "(cached) " >&6
5286else
5287  case $BASENAME in
5288  [\\/]* | ?:[\\/]*)
5289  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5290  ;;
5291  *)
5292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5293for as_dir in $PATH
5294do
5295  IFS=$as_save_IFS
5296  test -z "$as_dir" && as_dir=.
5297    for ac_exec_ext in '' $ac_executable_extensions; do
5298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5299    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5301    break 2
5302  fi
5303done
5304  done
5305IFS=$as_save_IFS
5306
5307  ;;
5308esac
5309fi
5310BASENAME=$ac_cv_path_BASENAME
5311if test -n "$BASENAME"; then
5312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5313$as_echo "$BASENAME" >&6; }
5314else
5315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5316$as_echo "no" >&6; }
5317fi
5318
5319
5320  test -n "$BASENAME" && break
5321done
5322
5323    else
5324      # If it succeeded, then it was overridden by the user. We will use it
5325      # for the tool.
5326
5327      # First remove it from the list of overridden variables, so we can test
5328      # for unknown variables in the end.
5329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5330
5331      # Check if we try to supply an empty value
5332      if test "x$BASENAME" = x; then
5333        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5334$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5336$as_echo_n "checking for BASENAME... " >&6; }
5337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5338$as_echo "disabled" >&6; }
5339      else
5340        # Check if the provided tool contains a complete path.
5341        tool_specified="$BASENAME"
5342        tool_basename="${tool_specified##*/}"
5343        if test "x$tool_basename" = "x$tool_specified"; then
5344          # A command without a complete path is provided, search $PATH.
5345          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5346$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5347          # Extract the first word of "$tool_basename", so it can be a program name with args.
5348set dummy $tool_basename; ac_word=$2
5349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5350$as_echo_n "checking for $ac_word... " >&6; }
5351if ${ac_cv_path_BASENAME+:} false; then :
5352  $as_echo_n "(cached) " >&6
5353else
5354  case $BASENAME in
5355  [\\/]* | ?:[\\/]*)
5356  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5357  ;;
5358  *)
5359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5360for as_dir in $PATH
5361do
5362  IFS=$as_save_IFS
5363  test -z "$as_dir" && as_dir=.
5364    for ac_exec_ext in '' $ac_executable_extensions; do
5365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5366    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5368    break 2
5369  fi
5370done
5371  done
5372IFS=$as_save_IFS
5373
5374  ;;
5375esac
5376fi
5377BASENAME=$ac_cv_path_BASENAME
5378if test -n "$BASENAME"; then
5379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5380$as_echo "$BASENAME" >&6; }
5381else
5382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5383$as_echo "no" >&6; }
5384fi
5385
5386
5387          if test "x$BASENAME" = x; then
5388            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5389          fi
5390        else
5391          # Otherwise we believe it is a complete path. Use it as it is.
5392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5393$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5394          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5395$as_echo_n "checking for BASENAME... " >&6; }
5396          if test ! -x "$tool_specified"; then
5397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5398$as_echo "not found" >&6; }
5399            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5400          fi
5401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5402$as_echo "$tool_specified" >&6; }
5403        fi
5404      fi
5405    fi
5406
5407  fi
5408
5409
5410
5411  if test "x$BASENAME" = x; then
5412    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5413  fi
5414
5415
5416
5417
5418
5419  # Publish this variable in the help.
5420
5421
5422  if [ -z "${BASH+x}" ]; then
5423    # The variable is not set by user, try to locate tool using the code snippet
5424    for ac_prog in bash
5425do
5426  # Extract the first word of "$ac_prog", so it can be a program name with args.
5427set dummy $ac_prog; ac_word=$2
5428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5429$as_echo_n "checking for $ac_word... " >&6; }
5430if ${ac_cv_path_BASH+:} false; then :
5431  $as_echo_n "(cached) " >&6
5432else
5433  case $BASH in
5434  [\\/]* | ?:[\\/]*)
5435  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5436  ;;
5437  *)
5438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5439for as_dir in $PATH
5440do
5441  IFS=$as_save_IFS
5442  test -z "$as_dir" && as_dir=.
5443    for ac_exec_ext in '' $ac_executable_extensions; do
5444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5445    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5447    break 2
5448  fi
5449done
5450  done
5451IFS=$as_save_IFS
5452
5453  ;;
5454esac
5455fi
5456BASH=$ac_cv_path_BASH
5457if test -n "$BASH"; then
5458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5459$as_echo "$BASH" >&6; }
5460else
5461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5462$as_echo "no" >&6; }
5463fi
5464
5465
5466  test -n "$BASH" && break
5467done
5468
5469  else
5470    # The variable is set, but is it from the command line or the environment?
5471
5472    # Try to remove the string !BASH! from our list.
5473    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5474    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5475      # If it failed, the variable was not from the command line. Ignore it,
5476      # but warn the user (except for BASH, which is always set by the calling BASH).
5477      if test "xBASH" != xBASH; then
5478        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5479$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5480      fi
5481      # Try to locate tool using the code snippet
5482      for ac_prog in bash
5483do
5484  # Extract the first word of "$ac_prog", so it can be a program name with args.
5485set dummy $ac_prog; ac_word=$2
5486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5487$as_echo_n "checking for $ac_word... " >&6; }
5488if ${ac_cv_path_BASH+:} false; then :
5489  $as_echo_n "(cached) " >&6
5490else
5491  case $BASH in
5492  [\\/]* | ?:[\\/]*)
5493  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5494  ;;
5495  *)
5496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5497for as_dir in $PATH
5498do
5499  IFS=$as_save_IFS
5500  test -z "$as_dir" && as_dir=.
5501    for ac_exec_ext in '' $ac_executable_extensions; do
5502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5503    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5505    break 2
5506  fi
5507done
5508  done
5509IFS=$as_save_IFS
5510
5511  ;;
5512esac
5513fi
5514BASH=$ac_cv_path_BASH
5515if test -n "$BASH"; then
5516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5517$as_echo "$BASH" >&6; }
5518else
5519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5520$as_echo "no" >&6; }
5521fi
5522
5523
5524  test -n "$BASH" && break
5525done
5526
5527    else
5528      # If it succeeded, then it was overridden by the user. We will use it
5529      # for the tool.
5530
5531      # First remove it from the list of overridden variables, so we can test
5532      # for unknown variables in the end.
5533      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5534
5535      # Check if we try to supply an empty value
5536      if test "x$BASH" = x; then
5537        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5538$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5540$as_echo_n "checking for BASH... " >&6; }
5541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5542$as_echo "disabled" >&6; }
5543      else
5544        # Check if the provided tool contains a complete path.
5545        tool_specified="$BASH"
5546        tool_basename="${tool_specified##*/}"
5547        if test "x$tool_basename" = "x$tool_specified"; then
5548          # A command without a complete path is provided, search $PATH.
5549          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5550$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5551          # Extract the first word of "$tool_basename", so it can be a program name with args.
5552set dummy $tool_basename; ac_word=$2
5553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5554$as_echo_n "checking for $ac_word... " >&6; }
5555if ${ac_cv_path_BASH+:} false; then :
5556  $as_echo_n "(cached) " >&6
5557else
5558  case $BASH in
5559  [\\/]* | ?:[\\/]*)
5560  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5561  ;;
5562  *)
5563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5564for as_dir in $PATH
5565do
5566  IFS=$as_save_IFS
5567  test -z "$as_dir" && as_dir=.
5568    for ac_exec_ext in '' $ac_executable_extensions; do
5569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5570    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5572    break 2
5573  fi
5574done
5575  done
5576IFS=$as_save_IFS
5577
5578  ;;
5579esac
5580fi
5581BASH=$ac_cv_path_BASH
5582if test -n "$BASH"; then
5583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5584$as_echo "$BASH" >&6; }
5585else
5586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5587$as_echo "no" >&6; }
5588fi
5589
5590
5591          if test "x$BASH" = x; then
5592            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5593          fi
5594        else
5595          # Otherwise we believe it is a complete path. Use it as it is.
5596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5597$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5598          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5599$as_echo_n "checking for BASH... " >&6; }
5600          if test ! -x "$tool_specified"; then
5601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5602$as_echo "not found" >&6; }
5603            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5604          fi
5605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5606$as_echo "$tool_specified" >&6; }
5607        fi
5608      fi
5609    fi
5610
5611  fi
5612
5613
5614
5615  if test "x$BASH" = x; then
5616    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5617  fi
5618
5619
5620
5621
5622
5623  # Publish this variable in the help.
5624
5625
5626  if [ -z "${CAT+x}" ]; then
5627    # The variable is not set by user, try to locate tool using the code snippet
5628    for ac_prog in cat
5629do
5630  # Extract the first word of "$ac_prog", so it can be a program name with args.
5631set dummy $ac_prog; ac_word=$2
5632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5633$as_echo_n "checking for $ac_word... " >&6; }
5634if ${ac_cv_path_CAT+:} false; then :
5635  $as_echo_n "(cached) " >&6
5636else
5637  case $CAT in
5638  [\\/]* | ?:[\\/]*)
5639  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5640  ;;
5641  *)
5642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5643for as_dir in $PATH
5644do
5645  IFS=$as_save_IFS
5646  test -z "$as_dir" && as_dir=.
5647    for ac_exec_ext in '' $ac_executable_extensions; do
5648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5649    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5651    break 2
5652  fi
5653done
5654  done
5655IFS=$as_save_IFS
5656
5657  ;;
5658esac
5659fi
5660CAT=$ac_cv_path_CAT
5661if test -n "$CAT"; then
5662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5663$as_echo "$CAT" >&6; }
5664else
5665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5666$as_echo "no" >&6; }
5667fi
5668
5669
5670  test -n "$CAT" && break
5671done
5672
5673  else
5674    # The variable is set, but is it from the command line or the environment?
5675
5676    # Try to remove the string !CAT! from our list.
5677    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5678    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5679      # If it failed, the variable was not from the command line. Ignore it,
5680      # but warn the user (except for BASH, which is always set by the calling BASH).
5681      if test "xCAT" != xBASH; then
5682        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5683$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5684      fi
5685      # Try to locate tool using the code snippet
5686      for ac_prog in cat
5687do
5688  # Extract the first word of "$ac_prog", so it can be a program name with args.
5689set dummy $ac_prog; ac_word=$2
5690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5691$as_echo_n "checking for $ac_word... " >&6; }
5692if ${ac_cv_path_CAT+:} false; then :
5693  $as_echo_n "(cached) " >&6
5694else
5695  case $CAT in
5696  [\\/]* | ?:[\\/]*)
5697  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5698  ;;
5699  *)
5700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5701for as_dir in $PATH
5702do
5703  IFS=$as_save_IFS
5704  test -z "$as_dir" && as_dir=.
5705    for ac_exec_ext in '' $ac_executable_extensions; do
5706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5707    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5709    break 2
5710  fi
5711done
5712  done
5713IFS=$as_save_IFS
5714
5715  ;;
5716esac
5717fi
5718CAT=$ac_cv_path_CAT
5719if test -n "$CAT"; then
5720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5721$as_echo "$CAT" >&6; }
5722else
5723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5724$as_echo "no" >&6; }
5725fi
5726
5727
5728  test -n "$CAT" && break
5729done
5730
5731    else
5732      # If it succeeded, then it was overridden by the user. We will use it
5733      # for the tool.
5734
5735      # First remove it from the list of overridden variables, so we can test
5736      # for unknown variables in the end.
5737      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5738
5739      # Check if we try to supply an empty value
5740      if test "x$CAT" = x; then
5741        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5742$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5744$as_echo_n "checking for CAT... " >&6; }
5745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5746$as_echo "disabled" >&6; }
5747      else
5748        # Check if the provided tool contains a complete path.
5749        tool_specified="$CAT"
5750        tool_basename="${tool_specified##*/}"
5751        if test "x$tool_basename" = "x$tool_specified"; then
5752          # A command without a complete path is provided, search $PATH.
5753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5754$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5755          # Extract the first word of "$tool_basename", so it can be a program name with args.
5756set dummy $tool_basename; ac_word=$2
5757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5758$as_echo_n "checking for $ac_word... " >&6; }
5759if ${ac_cv_path_CAT+:} false; then :
5760  $as_echo_n "(cached) " >&6
5761else
5762  case $CAT in
5763  [\\/]* | ?:[\\/]*)
5764  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5765  ;;
5766  *)
5767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5768for as_dir in $PATH
5769do
5770  IFS=$as_save_IFS
5771  test -z "$as_dir" && as_dir=.
5772    for ac_exec_ext in '' $ac_executable_extensions; do
5773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5774    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5776    break 2
5777  fi
5778done
5779  done
5780IFS=$as_save_IFS
5781
5782  ;;
5783esac
5784fi
5785CAT=$ac_cv_path_CAT
5786if test -n "$CAT"; then
5787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5788$as_echo "$CAT" >&6; }
5789else
5790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5791$as_echo "no" >&6; }
5792fi
5793
5794
5795          if test "x$CAT" = x; then
5796            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5797          fi
5798        else
5799          # Otherwise we believe it is a complete path. Use it as it is.
5800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5801$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5802          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5803$as_echo_n "checking for CAT... " >&6; }
5804          if test ! -x "$tool_specified"; then
5805            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5806$as_echo "not found" >&6; }
5807            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5808          fi
5809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5810$as_echo "$tool_specified" >&6; }
5811        fi
5812      fi
5813    fi
5814
5815  fi
5816
5817
5818
5819  if test "x$CAT" = x; then
5820    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5821  fi
5822
5823
5824
5825
5826
5827  # Publish this variable in the help.
5828
5829
5830  if [ -z "${CHMOD+x}" ]; then
5831    # The variable is not set by user, try to locate tool using the code snippet
5832    for ac_prog in chmod
5833do
5834  # Extract the first word of "$ac_prog", so it can be a program name with args.
5835set dummy $ac_prog; ac_word=$2
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5837$as_echo_n "checking for $ac_word... " >&6; }
5838if ${ac_cv_path_CHMOD+:} false; then :
5839  $as_echo_n "(cached) " >&6
5840else
5841  case $CHMOD in
5842  [\\/]* | ?:[\\/]*)
5843  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5844  ;;
5845  *)
5846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5847for as_dir in $PATH
5848do
5849  IFS=$as_save_IFS
5850  test -z "$as_dir" && as_dir=.
5851    for ac_exec_ext in '' $ac_executable_extensions; do
5852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5853    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5855    break 2
5856  fi
5857done
5858  done
5859IFS=$as_save_IFS
5860
5861  ;;
5862esac
5863fi
5864CHMOD=$ac_cv_path_CHMOD
5865if test -n "$CHMOD"; then
5866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5867$as_echo "$CHMOD" >&6; }
5868else
5869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5870$as_echo "no" >&6; }
5871fi
5872
5873
5874  test -n "$CHMOD" && break
5875done
5876
5877  else
5878    # The variable is set, but is it from the command line or the environment?
5879
5880    # Try to remove the string !CHMOD! from our list.
5881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5883      # If it failed, the variable was not from the command line. Ignore it,
5884      # but warn the user (except for BASH, which is always set by the calling BASH).
5885      if test "xCHMOD" != xBASH; then
5886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5887$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5888      fi
5889      # Try to locate tool using the code snippet
5890      for ac_prog in chmod
5891do
5892  # Extract the first word of "$ac_prog", so it can be a program name with args.
5893set dummy $ac_prog; ac_word=$2
5894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5895$as_echo_n "checking for $ac_word... " >&6; }
5896if ${ac_cv_path_CHMOD+:} false; then :
5897  $as_echo_n "(cached) " >&6
5898else
5899  case $CHMOD in
5900  [\\/]* | ?:[\\/]*)
5901  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5902  ;;
5903  *)
5904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5905for as_dir in $PATH
5906do
5907  IFS=$as_save_IFS
5908  test -z "$as_dir" && as_dir=.
5909    for ac_exec_ext in '' $ac_executable_extensions; do
5910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5911    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5913    break 2
5914  fi
5915done
5916  done
5917IFS=$as_save_IFS
5918
5919  ;;
5920esac
5921fi
5922CHMOD=$ac_cv_path_CHMOD
5923if test -n "$CHMOD"; then
5924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5925$as_echo "$CHMOD" >&6; }
5926else
5927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5928$as_echo "no" >&6; }
5929fi
5930
5931
5932  test -n "$CHMOD" && break
5933done
5934
5935    else
5936      # If it succeeded, then it was overridden by the user. We will use it
5937      # for the tool.
5938
5939      # First remove it from the list of overridden variables, so we can test
5940      # for unknown variables in the end.
5941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5942
5943      # Check if we try to supply an empty value
5944      if test "x$CHMOD" = x; then
5945        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5946$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5948$as_echo_n "checking for CHMOD... " >&6; }
5949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5950$as_echo "disabled" >&6; }
5951      else
5952        # Check if the provided tool contains a complete path.
5953        tool_specified="$CHMOD"
5954        tool_basename="${tool_specified##*/}"
5955        if test "x$tool_basename" = "x$tool_specified"; then
5956          # A command without a complete path is provided, search $PATH.
5957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5958$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5959          # Extract the first word of "$tool_basename", so it can be a program name with args.
5960set dummy $tool_basename; ac_word=$2
5961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5962$as_echo_n "checking for $ac_word... " >&6; }
5963if ${ac_cv_path_CHMOD+:} false; then :
5964  $as_echo_n "(cached) " >&6
5965else
5966  case $CHMOD in
5967  [\\/]* | ?:[\\/]*)
5968  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5969  ;;
5970  *)
5971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5972for as_dir in $PATH
5973do
5974  IFS=$as_save_IFS
5975  test -z "$as_dir" && as_dir=.
5976    for ac_exec_ext in '' $ac_executable_extensions; do
5977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5978    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5980    break 2
5981  fi
5982done
5983  done
5984IFS=$as_save_IFS
5985
5986  ;;
5987esac
5988fi
5989CHMOD=$ac_cv_path_CHMOD
5990if test -n "$CHMOD"; then
5991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5992$as_echo "$CHMOD" >&6; }
5993else
5994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5995$as_echo "no" >&6; }
5996fi
5997
5998
5999          if test "x$CHMOD" = x; then
6000            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6001          fi
6002        else
6003          # Otherwise we believe it is a complete path. Use it as it is.
6004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6005$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6006          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6007$as_echo_n "checking for CHMOD... " >&6; }
6008          if test ! -x "$tool_specified"; then
6009            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6010$as_echo "not found" >&6; }
6011            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6012          fi
6013          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6014$as_echo "$tool_specified" >&6; }
6015        fi
6016      fi
6017    fi
6018
6019  fi
6020
6021
6022
6023  if test "x$CHMOD" = x; then
6024    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6025  fi
6026
6027
6028
6029
6030
6031  # Publish this variable in the help.
6032
6033
6034  if [ -z "${CMP+x}" ]; then
6035    # The variable is not set by user, try to locate tool using the code snippet
6036    for ac_prog in cmp
6037do
6038  # Extract the first word of "$ac_prog", so it can be a program name with args.
6039set dummy $ac_prog; ac_word=$2
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6041$as_echo_n "checking for $ac_word... " >&6; }
6042if ${ac_cv_path_CMP+:} false; then :
6043  $as_echo_n "(cached) " >&6
6044else
6045  case $CMP in
6046  [\\/]* | ?:[\\/]*)
6047  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6048  ;;
6049  *)
6050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6051for as_dir in $PATH
6052do
6053  IFS=$as_save_IFS
6054  test -z "$as_dir" && as_dir=.
6055    for ac_exec_ext in '' $ac_executable_extensions; do
6056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6057    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6059    break 2
6060  fi
6061done
6062  done
6063IFS=$as_save_IFS
6064
6065  ;;
6066esac
6067fi
6068CMP=$ac_cv_path_CMP
6069if test -n "$CMP"; then
6070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6071$as_echo "$CMP" >&6; }
6072else
6073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6074$as_echo "no" >&6; }
6075fi
6076
6077
6078  test -n "$CMP" && break
6079done
6080
6081  else
6082    # The variable is set, but is it from the command line or the environment?
6083
6084    # Try to remove the string !CMP! from our list.
6085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6087      # If it failed, the variable was not from the command line. Ignore it,
6088      # but warn the user (except for BASH, which is always set by the calling BASH).
6089      if test "xCMP" != xBASH; then
6090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6091$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6092      fi
6093      # Try to locate tool using the code snippet
6094      for ac_prog in cmp
6095do
6096  # Extract the first word of "$ac_prog", so it can be a program name with args.
6097set dummy $ac_prog; ac_word=$2
6098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6099$as_echo_n "checking for $ac_word... " >&6; }
6100if ${ac_cv_path_CMP+:} false; then :
6101  $as_echo_n "(cached) " >&6
6102else
6103  case $CMP in
6104  [\\/]* | ?:[\\/]*)
6105  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6106  ;;
6107  *)
6108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6109for as_dir in $PATH
6110do
6111  IFS=$as_save_IFS
6112  test -z "$as_dir" && as_dir=.
6113    for ac_exec_ext in '' $ac_executable_extensions; do
6114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6115    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6117    break 2
6118  fi
6119done
6120  done
6121IFS=$as_save_IFS
6122
6123  ;;
6124esac
6125fi
6126CMP=$ac_cv_path_CMP
6127if test -n "$CMP"; then
6128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6129$as_echo "$CMP" >&6; }
6130else
6131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6132$as_echo "no" >&6; }
6133fi
6134
6135
6136  test -n "$CMP" && break
6137done
6138
6139    else
6140      # If it succeeded, then it was overridden by the user. We will use it
6141      # for the tool.
6142
6143      # First remove it from the list of overridden variables, so we can test
6144      # for unknown variables in the end.
6145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6146
6147      # Check if we try to supply an empty value
6148      if test "x$CMP" = x; then
6149        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6150$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6152$as_echo_n "checking for CMP... " >&6; }
6153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6154$as_echo "disabled" >&6; }
6155      else
6156        # Check if the provided tool contains a complete path.
6157        tool_specified="$CMP"
6158        tool_basename="${tool_specified##*/}"
6159        if test "x$tool_basename" = "x$tool_specified"; then
6160          # A command without a complete path is provided, search $PATH.
6161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6162$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6163          # Extract the first word of "$tool_basename", so it can be a program name with args.
6164set dummy $tool_basename; ac_word=$2
6165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6166$as_echo_n "checking for $ac_word... " >&6; }
6167if ${ac_cv_path_CMP+:} false; then :
6168  $as_echo_n "(cached) " >&6
6169else
6170  case $CMP in
6171  [\\/]* | ?:[\\/]*)
6172  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6173  ;;
6174  *)
6175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6176for as_dir in $PATH
6177do
6178  IFS=$as_save_IFS
6179  test -z "$as_dir" && as_dir=.
6180    for ac_exec_ext in '' $ac_executable_extensions; do
6181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6182    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6184    break 2
6185  fi
6186done
6187  done
6188IFS=$as_save_IFS
6189
6190  ;;
6191esac
6192fi
6193CMP=$ac_cv_path_CMP
6194if test -n "$CMP"; then
6195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6196$as_echo "$CMP" >&6; }
6197else
6198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6199$as_echo "no" >&6; }
6200fi
6201
6202
6203          if test "x$CMP" = x; then
6204            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6205          fi
6206        else
6207          # Otherwise we believe it is a complete path. Use it as it is.
6208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6209$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6210          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6211$as_echo_n "checking for CMP... " >&6; }
6212          if test ! -x "$tool_specified"; then
6213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6214$as_echo "not found" >&6; }
6215            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6216          fi
6217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6218$as_echo "$tool_specified" >&6; }
6219        fi
6220      fi
6221    fi
6222
6223  fi
6224
6225
6226
6227  if test "x$CMP" = x; then
6228    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6229  fi
6230
6231
6232
6233
6234
6235  # Publish this variable in the help.
6236
6237
6238  if [ -z "${COMM+x}" ]; then
6239    # The variable is not set by user, try to locate tool using the code snippet
6240    for ac_prog in comm
6241do
6242  # Extract the first word of "$ac_prog", so it can be a program name with args.
6243set dummy $ac_prog; ac_word=$2
6244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6245$as_echo_n "checking for $ac_word... " >&6; }
6246if ${ac_cv_path_COMM+:} false; then :
6247  $as_echo_n "(cached) " >&6
6248else
6249  case $COMM in
6250  [\\/]* | ?:[\\/]*)
6251  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6252  ;;
6253  *)
6254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6255for as_dir in $PATH
6256do
6257  IFS=$as_save_IFS
6258  test -z "$as_dir" && as_dir=.
6259    for ac_exec_ext in '' $ac_executable_extensions; do
6260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6261    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6263    break 2
6264  fi
6265done
6266  done
6267IFS=$as_save_IFS
6268
6269  ;;
6270esac
6271fi
6272COMM=$ac_cv_path_COMM
6273if test -n "$COMM"; then
6274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6275$as_echo "$COMM" >&6; }
6276else
6277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6278$as_echo "no" >&6; }
6279fi
6280
6281
6282  test -n "$COMM" && break
6283done
6284
6285  else
6286    # The variable is set, but is it from the command line or the environment?
6287
6288    # Try to remove the string !COMM! from our list.
6289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6291      # If it failed, the variable was not from the command line. Ignore it,
6292      # but warn the user (except for BASH, which is always set by the calling BASH).
6293      if test "xCOMM" != xBASH; then
6294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6295$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6296      fi
6297      # Try to locate tool using the code snippet
6298      for ac_prog in comm
6299do
6300  # Extract the first word of "$ac_prog", so it can be a program name with args.
6301set dummy $ac_prog; ac_word=$2
6302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6303$as_echo_n "checking for $ac_word... " >&6; }
6304if ${ac_cv_path_COMM+:} false; then :
6305  $as_echo_n "(cached) " >&6
6306else
6307  case $COMM in
6308  [\\/]* | ?:[\\/]*)
6309  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6310  ;;
6311  *)
6312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6313for as_dir in $PATH
6314do
6315  IFS=$as_save_IFS
6316  test -z "$as_dir" && as_dir=.
6317    for ac_exec_ext in '' $ac_executable_extensions; do
6318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6319    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6321    break 2
6322  fi
6323done
6324  done
6325IFS=$as_save_IFS
6326
6327  ;;
6328esac
6329fi
6330COMM=$ac_cv_path_COMM
6331if test -n "$COMM"; then
6332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6333$as_echo "$COMM" >&6; }
6334else
6335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6336$as_echo "no" >&6; }
6337fi
6338
6339
6340  test -n "$COMM" && break
6341done
6342
6343    else
6344      # If it succeeded, then it was overridden by the user. We will use it
6345      # for the tool.
6346
6347      # First remove it from the list of overridden variables, so we can test
6348      # for unknown variables in the end.
6349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6350
6351      # Check if we try to supply an empty value
6352      if test "x$COMM" = x; then
6353        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6354$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6355        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6356$as_echo_n "checking for COMM... " >&6; }
6357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6358$as_echo "disabled" >&6; }
6359      else
6360        # Check if the provided tool contains a complete path.
6361        tool_specified="$COMM"
6362        tool_basename="${tool_specified##*/}"
6363        if test "x$tool_basename" = "x$tool_specified"; then
6364          # A command without a complete path is provided, search $PATH.
6365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6366$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6367          # Extract the first word of "$tool_basename", so it can be a program name with args.
6368set dummy $tool_basename; ac_word=$2
6369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6370$as_echo_n "checking for $ac_word... " >&6; }
6371if ${ac_cv_path_COMM+:} false; then :
6372  $as_echo_n "(cached) " >&6
6373else
6374  case $COMM in
6375  [\\/]* | ?:[\\/]*)
6376  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6377  ;;
6378  *)
6379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6380for as_dir in $PATH
6381do
6382  IFS=$as_save_IFS
6383  test -z "$as_dir" && as_dir=.
6384    for ac_exec_ext in '' $ac_executable_extensions; do
6385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6386    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6388    break 2
6389  fi
6390done
6391  done
6392IFS=$as_save_IFS
6393
6394  ;;
6395esac
6396fi
6397COMM=$ac_cv_path_COMM
6398if test -n "$COMM"; then
6399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6400$as_echo "$COMM" >&6; }
6401else
6402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6403$as_echo "no" >&6; }
6404fi
6405
6406
6407          if test "x$COMM" = x; then
6408            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6409          fi
6410        else
6411          # Otherwise we believe it is a complete path. Use it as it is.
6412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6413$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6414          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6415$as_echo_n "checking for COMM... " >&6; }
6416          if test ! -x "$tool_specified"; then
6417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6418$as_echo "not found" >&6; }
6419            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6420          fi
6421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6422$as_echo "$tool_specified" >&6; }
6423        fi
6424      fi
6425    fi
6426
6427  fi
6428
6429
6430
6431  if test "x$COMM" = x; then
6432    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6433  fi
6434
6435
6436
6437
6438
6439  # Publish this variable in the help.
6440
6441
6442  if [ -z "${CP+x}" ]; then
6443    # The variable is not set by user, try to locate tool using the code snippet
6444    for ac_prog in cp
6445do
6446  # Extract the first word of "$ac_prog", so it can be a program name with args.
6447set dummy $ac_prog; ac_word=$2
6448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6449$as_echo_n "checking for $ac_word... " >&6; }
6450if ${ac_cv_path_CP+:} false; then :
6451  $as_echo_n "(cached) " >&6
6452else
6453  case $CP in
6454  [\\/]* | ?:[\\/]*)
6455  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6456  ;;
6457  *)
6458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6459for as_dir in $PATH
6460do
6461  IFS=$as_save_IFS
6462  test -z "$as_dir" && as_dir=.
6463    for ac_exec_ext in '' $ac_executable_extensions; do
6464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6465    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6467    break 2
6468  fi
6469done
6470  done
6471IFS=$as_save_IFS
6472
6473  ;;
6474esac
6475fi
6476CP=$ac_cv_path_CP
6477if test -n "$CP"; then
6478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6479$as_echo "$CP" >&6; }
6480else
6481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6482$as_echo "no" >&6; }
6483fi
6484
6485
6486  test -n "$CP" && break
6487done
6488
6489  else
6490    # The variable is set, but is it from the command line or the environment?
6491
6492    # Try to remove the string !CP! from our list.
6493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6495      # If it failed, the variable was not from the command line. Ignore it,
6496      # but warn the user (except for BASH, which is always set by the calling BASH).
6497      if test "xCP" != xBASH; then
6498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6499$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6500      fi
6501      # Try to locate tool using the code snippet
6502      for ac_prog in cp
6503do
6504  # Extract the first word of "$ac_prog", so it can be a program name with args.
6505set dummy $ac_prog; ac_word=$2
6506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6507$as_echo_n "checking for $ac_word... " >&6; }
6508if ${ac_cv_path_CP+:} false; then :
6509  $as_echo_n "(cached) " >&6
6510else
6511  case $CP in
6512  [\\/]* | ?:[\\/]*)
6513  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6514  ;;
6515  *)
6516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6517for as_dir in $PATH
6518do
6519  IFS=$as_save_IFS
6520  test -z "$as_dir" && as_dir=.
6521    for ac_exec_ext in '' $ac_executable_extensions; do
6522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6523    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6525    break 2
6526  fi
6527done
6528  done
6529IFS=$as_save_IFS
6530
6531  ;;
6532esac
6533fi
6534CP=$ac_cv_path_CP
6535if test -n "$CP"; then
6536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6537$as_echo "$CP" >&6; }
6538else
6539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6540$as_echo "no" >&6; }
6541fi
6542
6543
6544  test -n "$CP" && break
6545done
6546
6547    else
6548      # If it succeeded, then it was overridden by the user. We will use it
6549      # for the tool.
6550
6551      # First remove it from the list of overridden variables, so we can test
6552      # for unknown variables in the end.
6553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6554
6555      # Check if we try to supply an empty value
6556      if test "x$CP" = x; then
6557        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6558$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6560$as_echo_n "checking for CP... " >&6; }
6561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6562$as_echo "disabled" >&6; }
6563      else
6564        # Check if the provided tool contains a complete path.
6565        tool_specified="$CP"
6566        tool_basename="${tool_specified##*/}"
6567        if test "x$tool_basename" = "x$tool_specified"; then
6568          # A command without a complete path is provided, search $PATH.
6569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6570$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6571          # Extract the first word of "$tool_basename", so it can be a program name with args.
6572set dummy $tool_basename; ac_word=$2
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6574$as_echo_n "checking for $ac_word... " >&6; }
6575if ${ac_cv_path_CP+:} false; then :
6576  $as_echo_n "(cached) " >&6
6577else
6578  case $CP in
6579  [\\/]* | ?:[\\/]*)
6580  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6581  ;;
6582  *)
6583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584for as_dir in $PATH
6585do
6586  IFS=$as_save_IFS
6587  test -z "$as_dir" && as_dir=.
6588    for ac_exec_ext in '' $ac_executable_extensions; do
6589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6590    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6592    break 2
6593  fi
6594done
6595  done
6596IFS=$as_save_IFS
6597
6598  ;;
6599esac
6600fi
6601CP=$ac_cv_path_CP
6602if test -n "$CP"; then
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6604$as_echo "$CP" >&6; }
6605else
6606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607$as_echo "no" >&6; }
6608fi
6609
6610
6611          if test "x$CP" = x; then
6612            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6613          fi
6614        else
6615          # Otherwise we believe it is a complete path. Use it as it is.
6616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6617$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6618          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6619$as_echo_n "checking for CP... " >&6; }
6620          if test ! -x "$tool_specified"; then
6621            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6622$as_echo "not found" >&6; }
6623            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6624          fi
6625          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6626$as_echo "$tool_specified" >&6; }
6627        fi
6628      fi
6629    fi
6630
6631  fi
6632
6633
6634
6635  if test "x$CP" = x; then
6636    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6637  fi
6638
6639
6640
6641
6642
6643  # Publish this variable in the help.
6644
6645
6646  if [ -z "${CUT+x}" ]; then
6647    # The variable is not set by user, try to locate tool using the code snippet
6648    for ac_prog in cut
6649do
6650  # Extract the first word of "$ac_prog", so it can be a program name with args.
6651set dummy $ac_prog; ac_word=$2
6652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6653$as_echo_n "checking for $ac_word... " >&6; }
6654if ${ac_cv_path_CUT+:} false; then :
6655  $as_echo_n "(cached) " >&6
6656else
6657  case $CUT in
6658  [\\/]* | ?:[\\/]*)
6659  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6660  ;;
6661  *)
6662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6663for as_dir in $PATH
6664do
6665  IFS=$as_save_IFS
6666  test -z "$as_dir" && as_dir=.
6667    for ac_exec_ext in '' $ac_executable_extensions; do
6668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6669    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6671    break 2
6672  fi
6673done
6674  done
6675IFS=$as_save_IFS
6676
6677  ;;
6678esac
6679fi
6680CUT=$ac_cv_path_CUT
6681if test -n "$CUT"; then
6682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6683$as_echo "$CUT" >&6; }
6684else
6685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6686$as_echo "no" >&6; }
6687fi
6688
6689
6690  test -n "$CUT" && break
6691done
6692
6693  else
6694    # The variable is set, but is it from the command line or the environment?
6695
6696    # Try to remove the string !CUT! from our list.
6697    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6698    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6699      # If it failed, the variable was not from the command line. Ignore it,
6700      # but warn the user (except for BASH, which is always set by the calling BASH).
6701      if test "xCUT" != xBASH; then
6702        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6703$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6704      fi
6705      # Try to locate tool using the code snippet
6706      for ac_prog in cut
6707do
6708  # Extract the first word of "$ac_prog", so it can be a program name with args.
6709set dummy $ac_prog; ac_word=$2
6710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6711$as_echo_n "checking for $ac_word... " >&6; }
6712if ${ac_cv_path_CUT+:} false; then :
6713  $as_echo_n "(cached) " >&6
6714else
6715  case $CUT in
6716  [\\/]* | ?:[\\/]*)
6717  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6718  ;;
6719  *)
6720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6721for as_dir in $PATH
6722do
6723  IFS=$as_save_IFS
6724  test -z "$as_dir" && as_dir=.
6725    for ac_exec_ext in '' $ac_executable_extensions; do
6726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6727    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6729    break 2
6730  fi
6731done
6732  done
6733IFS=$as_save_IFS
6734
6735  ;;
6736esac
6737fi
6738CUT=$ac_cv_path_CUT
6739if test -n "$CUT"; then
6740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6741$as_echo "$CUT" >&6; }
6742else
6743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6744$as_echo "no" >&6; }
6745fi
6746
6747
6748  test -n "$CUT" && break
6749done
6750
6751    else
6752      # If it succeeded, then it was overridden by the user. We will use it
6753      # for the tool.
6754
6755      # First remove it from the list of overridden variables, so we can test
6756      # for unknown variables in the end.
6757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6758
6759      # Check if we try to supply an empty value
6760      if test "x$CUT" = x; then
6761        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6762$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6764$as_echo_n "checking for CUT... " >&6; }
6765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6766$as_echo "disabled" >&6; }
6767      else
6768        # Check if the provided tool contains a complete path.
6769        tool_specified="$CUT"
6770        tool_basename="${tool_specified##*/}"
6771        if test "x$tool_basename" = "x$tool_specified"; then
6772          # A command without a complete path is provided, search $PATH.
6773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6774$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6775          # Extract the first word of "$tool_basename", so it can be a program name with args.
6776set dummy $tool_basename; ac_word=$2
6777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6778$as_echo_n "checking for $ac_word... " >&6; }
6779if ${ac_cv_path_CUT+:} false; then :
6780  $as_echo_n "(cached) " >&6
6781else
6782  case $CUT in
6783  [\\/]* | ?:[\\/]*)
6784  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6785  ;;
6786  *)
6787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6788for as_dir in $PATH
6789do
6790  IFS=$as_save_IFS
6791  test -z "$as_dir" && as_dir=.
6792    for ac_exec_ext in '' $ac_executable_extensions; do
6793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6794    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6796    break 2
6797  fi
6798done
6799  done
6800IFS=$as_save_IFS
6801
6802  ;;
6803esac
6804fi
6805CUT=$ac_cv_path_CUT
6806if test -n "$CUT"; then
6807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6808$as_echo "$CUT" >&6; }
6809else
6810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6811$as_echo "no" >&6; }
6812fi
6813
6814
6815          if test "x$CUT" = x; then
6816            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6817          fi
6818        else
6819          # Otherwise we believe it is a complete path. Use it as it is.
6820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6821$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6822          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6823$as_echo_n "checking for CUT... " >&6; }
6824          if test ! -x "$tool_specified"; then
6825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6826$as_echo "not found" >&6; }
6827            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6828          fi
6829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6830$as_echo "$tool_specified" >&6; }
6831        fi
6832      fi
6833    fi
6834
6835  fi
6836
6837
6838
6839  if test "x$CUT" = x; then
6840    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6841  fi
6842
6843
6844
6845
6846
6847  # Publish this variable in the help.
6848
6849
6850  if [ -z "${DATE+x}" ]; then
6851    # The variable is not set by user, try to locate tool using the code snippet
6852    for ac_prog in date
6853do
6854  # Extract the first word of "$ac_prog", so it can be a program name with args.
6855set dummy $ac_prog; ac_word=$2
6856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6857$as_echo_n "checking for $ac_word... " >&6; }
6858if ${ac_cv_path_DATE+:} false; then :
6859  $as_echo_n "(cached) " >&6
6860else
6861  case $DATE in
6862  [\\/]* | ?:[\\/]*)
6863  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6864  ;;
6865  *)
6866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6867for as_dir in $PATH
6868do
6869  IFS=$as_save_IFS
6870  test -z "$as_dir" && as_dir=.
6871    for ac_exec_ext in '' $ac_executable_extensions; do
6872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6873    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6875    break 2
6876  fi
6877done
6878  done
6879IFS=$as_save_IFS
6880
6881  ;;
6882esac
6883fi
6884DATE=$ac_cv_path_DATE
6885if test -n "$DATE"; then
6886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6887$as_echo "$DATE" >&6; }
6888else
6889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6890$as_echo "no" >&6; }
6891fi
6892
6893
6894  test -n "$DATE" && break
6895done
6896
6897  else
6898    # The variable is set, but is it from the command line or the environment?
6899
6900    # Try to remove the string !DATE! from our list.
6901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6903      # If it failed, the variable was not from the command line. Ignore it,
6904      # but warn the user (except for BASH, which is always set by the calling BASH).
6905      if test "xDATE" != xBASH; then
6906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6907$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6908      fi
6909      # Try to locate tool using the code snippet
6910      for ac_prog in date
6911do
6912  # Extract the first word of "$ac_prog", so it can be a program name with args.
6913set dummy $ac_prog; ac_word=$2
6914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6915$as_echo_n "checking for $ac_word... " >&6; }
6916if ${ac_cv_path_DATE+:} false; then :
6917  $as_echo_n "(cached) " >&6
6918else
6919  case $DATE in
6920  [\\/]* | ?:[\\/]*)
6921  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6922  ;;
6923  *)
6924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6925for as_dir in $PATH
6926do
6927  IFS=$as_save_IFS
6928  test -z "$as_dir" && as_dir=.
6929    for ac_exec_ext in '' $ac_executable_extensions; do
6930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6931    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6933    break 2
6934  fi
6935done
6936  done
6937IFS=$as_save_IFS
6938
6939  ;;
6940esac
6941fi
6942DATE=$ac_cv_path_DATE
6943if test -n "$DATE"; then
6944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6945$as_echo "$DATE" >&6; }
6946else
6947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6948$as_echo "no" >&6; }
6949fi
6950
6951
6952  test -n "$DATE" && break
6953done
6954
6955    else
6956      # If it succeeded, then it was overridden by the user. We will use it
6957      # for the tool.
6958
6959      # First remove it from the list of overridden variables, so we can test
6960      # for unknown variables in the end.
6961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6962
6963      # Check if we try to supply an empty value
6964      if test "x$DATE" = x; then
6965        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6966$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6968$as_echo_n "checking for DATE... " >&6; }
6969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6970$as_echo "disabled" >&6; }
6971      else
6972        # Check if the provided tool contains a complete path.
6973        tool_specified="$DATE"
6974        tool_basename="${tool_specified##*/}"
6975        if test "x$tool_basename" = "x$tool_specified"; then
6976          # A command without a complete path is provided, search $PATH.
6977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6978$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6979          # Extract the first word of "$tool_basename", so it can be a program name with args.
6980set dummy $tool_basename; ac_word=$2
6981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6982$as_echo_n "checking for $ac_word... " >&6; }
6983if ${ac_cv_path_DATE+:} false; then :
6984  $as_echo_n "(cached) " >&6
6985else
6986  case $DATE in
6987  [\\/]* | ?:[\\/]*)
6988  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6989  ;;
6990  *)
6991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6992for as_dir in $PATH
6993do
6994  IFS=$as_save_IFS
6995  test -z "$as_dir" && as_dir=.
6996    for ac_exec_ext in '' $ac_executable_extensions; do
6997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6998    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7000    break 2
7001  fi
7002done
7003  done
7004IFS=$as_save_IFS
7005
7006  ;;
7007esac
7008fi
7009DATE=$ac_cv_path_DATE
7010if test -n "$DATE"; then
7011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7012$as_echo "$DATE" >&6; }
7013else
7014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7015$as_echo "no" >&6; }
7016fi
7017
7018
7019          if test "x$DATE" = x; then
7020            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7021          fi
7022        else
7023          # Otherwise we believe it is a complete path. Use it as it is.
7024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7025$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7026          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7027$as_echo_n "checking for DATE... " >&6; }
7028          if test ! -x "$tool_specified"; then
7029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7030$as_echo "not found" >&6; }
7031            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7032          fi
7033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7034$as_echo "$tool_specified" >&6; }
7035        fi
7036      fi
7037    fi
7038
7039  fi
7040
7041
7042
7043  if test "x$DATE" = x; then
7044    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7045  fi
7046
7047
7048
7049
7050
7051  # Publish this variable in the help.
7052
7053
7054  if [ -z "${DIFF+x}" ]; then
7055    # The variable is not set by user, try to locate tool using the code snippet
7056    for ac_prog in gdiff diff
7057do
7058  # Extract the first word of "$ac_prog", so it can be a program name with args.
7059set dummy $ac_prog; ac_word=$2
7060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7061$as_echo_n "checking for $ac_word... " >&6; }
7062if ${ac_cv_path_DIFF+:} false; then :
7063  $as_echo_n "(cached) " >&6
7064else
7065  case $DIFF in
7066  [\\/]* | ?:[\\/]*)
7067  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7068  ;;
7069  *)
7070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7071for as_dir in $PATH
7072do
7073  IFS=$as_save_IFS
7074  test -z "$as_dir" && as_dir=.
7075    for ac_exec_ext in '' $ac_executable_extensions; do
7076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7077    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7079    break 2
7080  fi
7081done
7082  done
7083IFS=$as_save_IFS
7084
7085  ;;
7086esac
7087fi
7088DIFF=$ac_cv_path_DIFF
7089if test -n "$DIFF"; then
7090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7091$as_echo "$DIFF" >&6; }
7092else
7093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7094$as_echo "no" >&6; }
7095fi
7096
7097
7098  test -n "$DIFF" && break
7099done
7100
7101  else
7102    # The variable is set, but is it from the command line or the environment?
7103
7104    # Try to remove the string !DIFF! from our list.
7105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7107      # If it failed, the variable was not from the command line. Ignore it,
7108      # but warn the user (except for BASH, which is always set by the calling BASH).
7109      if test "xDIFF" != xBASH; then
7110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7111$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7112      fi
7113      # Try to locate tool using the code snippet
7114      for ac_prog in gdiff diff
7115do
7116  # Extract the first word of "$ac_prog", so it can be a program name with args.
7117set dummy $ac_prog; ac_word=$2
7118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7119$as_echo_n "checking for $ac_word... " >&6; }
7120if ${ac_cv_path_DIFF+:} false; then :
7121  $as_echo_n "(cached) " >&6
7122else
7123  case $DIFF in
7124  [\\/]* | ?:[\\/]*)
7125  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7126  ;;
7127  *)
7128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7129for as_dir in $PATH
7130do
7131  IFS=$as_save_IFS
7132  test -z "$as_dir" && as_dir=.
7133    for ac_exec_ext in '' $ac_executable_extensions; do
7134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7135    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7137    break 2
7138  fi
7139done
7140  done
7141IFS=$as_save_IFS
7142
7143  ;;
7144esac
7145fi
7146DIFF=$ac_cv_path_DIFF
7147if test -n "$DIFF"; then
7148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7149$as_echo "$DIFF" >&6; }
7150else
7151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7152$as_echo "no" >&6; }
7153fi
7154
7155
7156  test -n "$DIFF" && break
7157done
7158
7159    else
7160      # If it succeeded, then it was overridden by the user. We will use it
7161      # for the tool.
7162
7163      # First remove it from the list of overridden variables, so we can test
7164      # for unknown variables in the end.
7165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7166
7167      # Check if we try to supply an empty value
7168      if test "x$DIFF" = x; then
7169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7170$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7172$as_echo_n "checking for DIFF... " >&6; }
7173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7174$as_echo "disabled" >&6; }
7175      else
7176        # Check if the provided tool contains a complete path.
7177        tool_specified="$DIFF"
7178        tool_basename="${tool_specified##*/}"
7179        if test "x$tool_basename" = "x$tool_specified"; then
7180          # A command without a complete path is provided, search $PATH.
7181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7182$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7183          # Extract the first word of "$tool_basename", so it can be a program name with args.
7184set dummy $tool_basename; ac_word=$2
7185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7186$as_echo_n "checking for $ac_word... " >&6; }
7187if ${ac_cv_path_DIFF+:} false; then :
7188  $as_echo_n "(cached) " >&6
7189else
7190  case $DIFF in
7191  [\\/]* | ?:[\\/]*)
7192  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7193  ;;
7194  *)
7195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7196for as_dir in $PATH
7197do
7198  IFS=$as_save_IFS
7199  test -z "$as_dir" && as_dir=.
7200    for ac_exec_ext in '' $ac_executable_extensions; do
7201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7202    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7204    break 2
7205  fi
7206done
7207  done
7208IFS=$as_save_IFS
7209
7210  ;;
7211esac
7212fi
7213DIFF=$ac_cv_path_DIFF
7214if test -n "$DIFF"; then
7215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7216$as_echo "$DIFF" >&6; }
7217else
7218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7219$as_echo "no" >&6; }
7220fi
7221
7222
7223          if test "x$DIFF" = x; then
7224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7225          fi
7226        else
7227          # Otherwise we believe it is a complete path. Use it as it is.
7228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7229$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7231$as_echo_n "checking for DIFF... " >&6; }
7232          if test ! -x "$tool_specified"; then
7233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7234$as_echo "not found" >&6; }
7235            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7236          fi
7237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7238$as_echo "$tool_specified" >&6; }
7239        fi
7240      fi
7241    fi
7242
7243  fi
7244
7245
7246
7247  if test "x$DIFF" = x; then
7248    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7249  fi
7250
7251
7252
7253
7254
7255  # Publish this variable in the help.
7256
7257
7258  if [ -z "${DIRNAME+x}" ]; then
7259    # The variable is not set by user, try to locate tool using the code snippet
7260    for ac_prog in dirname
7261do
7262  # Extract the first word of "$ac_prog", so it can be a program name with args.
7263set dummy $ac_prog; ac_word=$2
7264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7265$as_echo_n "checking for $ac_word... " >&6; }
7266if ${ac_cv_path_DIRNAME+:} false; then :
7267  $as_echo_n "(cached) " >&6
7268else
7269  case $DIRNAME in
7270  [\\/]* | ?:[\\/]*)
7271  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7272  ;;
7273  *)
7274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275for as_dir in $PATH
7276do
7277  IFS=$as_save_IFS
7278  test -z "$as_dir" && as_dir=.
7279    for ac_exec_ext in '' $ac_executable_extensions; do
7280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7281    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7283    break 2
7284  fi
7285done
7286  done
7287IFS=$as_save_IFS
7288
7289  ;;
7290esac
7291fi
7292DIRNAME=$ac_cv_path_DIRNAME
7293if test -n "$DIRNAME"; then
7294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7295$as_echo "$DIRNAME" >&6; }
7296else
7297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298$as_echo "no" >&6; }
7299fi
7300
7301
7302  test -n "$DIRNAME" && break
7303done
7304
7305  else
7306    # The variable is set, but is it from the command line or the environment?
7307
7308    # Try to remove the string !DIRNAME! from our list.
7309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7311      # If it failed, the variable was not from the command line. Ignore it,
7312      # but warn the user (except for BASH, which is always set by the calling BASH).
7313      if test "xDIRNAME" != xBASH; then
7314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7315$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7316      fi
7317      # Try to locate tool using the code snippet
7318      for ac_prog in dirname
7319do
7320  # Extract the first word of "$ac_prog", so it can be a program name with args.
7321set dummy $ac_prog; ac_word=$2
7322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7323$as_echo_n "checking for $ac_word... " >&6; }
7324if ${ac_cv_path_DIRNAME+:} false; then :
7325  $as_echo_n "(cached) " >&6
7326else
7327  case $DIRNAME in
7328  [\\/]* | ?:[\\/]*)
7329  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7330  ;;
7331  *)
7332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7333for as_dir in $PATH
7334do
7335  IFS=$as_save_IFS
7336  test -z "$as_dir" && as_dir=.
7337    for ac_exec_ext in '' $ac_executable_extensions; do
7338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7339    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7341    break 2
7342  fi
7343done
7344  done
7345IFS=$as_save_IFS
7346
7347  ;;
7348esac
7349fi
7350DIRNAME=$ac_cv_path_DIRNAME
7351if test -n "$DIRNAME"; then
7352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7353$as_echo "$DIRNAME" >&6; }
7354else
7355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7356$as_echo "no" >&6; }
7357fi
7358
7359
7360  test -n "$DIRNAME" && break
7361done
7362
7363    else
7364      # If it succeeded, then it was overridden by the user. We will use it
7365      # for the tool.
7366
7367      # First remove it from the list of overridden variables, so we can test
7368      # for unknown variables in the end.
7369      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7370
7371      # Check if we try to supply an empty value
7372      if test "x$DIRNAME" = x; then
7373        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7374$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7376$as_echo_n "checking for DIRNAME... " >&6; }
7377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7378$as_echo "disabled" >&6; }
7379      else
7380        # Check if the provided tool contains a complete path.
7381        tool_specified="$DIRNAME"
7382        tool_basename="${tool_specified##*/}"
7383        if test "x$tool_basename" = "x$tool_specified"; then
7384          # A command without a complete path is provided, search $PATH.
7385          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7386$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7387          # Extract the first word of "$tool_basename", so it can be a program name with args.
7388set dummy $tool_basename; ac_word=$2
7389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7390$as_echo_n "checking for $ac_word... " >&6; }
7391if ${ac_cv_path_DIRNAME+:} false; then :
7392  $as_echo_n "(cached) " >&6
7393else
7394  case $DIRNAME in
7395  [\\/]* | ?:[\\/]*)
7396  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7397  ;;
7398  *)
7399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7400for as_dir in $PATH
7401do
7402  IFS=$as_save_IFS
7403  test -z "$as_dir" && as_dir=.
7404    for ac_exec_ext in '' $ac_executable_extensions; do
7405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7406    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7408    break 2
7409  fi
7410done
7411  done
7412IFS=$as_save_IFS
7413
7414  ;;
7415esac
7416fi
7417DIRNAME=$ac_cv_path_DIRNAME
7418if test -n "$DIRNAME"; then
7419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7420$as_echo "$DIRNAME" >&6; }
7421else
7422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7423$as_echo "no" >&6; }
7424fi
7425
7426
7427          if test "x$DIRNAME" = x; then
7428            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7429          fi
7430        else
7431          # Otherwise we believe it is a complete path. Use it as it is.
7432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7433$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7434          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7435$as_echo_n "checking for DIRNAME... " >&6; }
7436          if test ! -x "$tool_specified"; then
7437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7438$as_echo "not found" >&6; }
7439            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7440          fi
7441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7442$as_echo "$tool_specified" >&6; }
7443        fi
7444      fi
7445    fi
7446
7447  fi
7448
7449
7450
7451  if test "x$DIRNAME" = x; then
7452    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7453  fi
7454
7455
7456
7457
7458
7459  # Publish this variable in the help.
7460
7461
7462  if [ -z "${ECHO+x}" ]; then
7463    # The variable is not set by user, try to locate tool using the code snippet
7464    for ac_prog in echo
7465do
7466  # Extract the first word of "$ac_prog", so it can be a program name with args.
7467set dummy $ac_prog; ac_word=$2
7468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7469$as_echo_n "checking for $ac_word... " >&6; }
7470if ${ac_cv_path_ECHO+:} false; then :
7471  $as_echo_n "(cached) " >&6
7472else
7473  case $ECHO in
7474  [\\/]* | ?:[\\/]*)
7475  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7476  ;;
7477  *)
7478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7479for as_dir in $PATH
7480do
7481  IFS=$as_save_IFS
7482  test -z "$as_dir" && as_dir=.
7483    for ac_exec_ext in '' $ac_executable_extensions; do
7484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7485    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7487    break 2
7488  fi
7489done
7490  done
7491IFS=$as_save_IFS
7492
7493  ;;
7494esac
7495fi
7496ECHO=$ac_cv_path_ECHO
7497if test -n "$ECHO"; then
7498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7499$as_echo "$ECHO" >&6; }
7500else
7501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7502$as_echo "no" >&6; }
7503fi
7504
7505
7506  test -n "$ECHO" && break
7507done
7508
7509  else
7510    # The variable is set, but is it from the command line or the environment?
7511
7512    # Try to remove the string !ECHO! from our list.
7513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7515      # If it failed, the variable was not from the command line. Ignore it,
7516      # but warn the user (except for BASH, which is always set by the calling BASH).
7517      if test "xECHO" != xBASH; then
7518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7519$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7520      fi
7521      # Try to locate tool using the code snippet
7522      for ac_prog in echo
7523do
7524  # Extract the first word of "$ac_prog", so it can be a program name with args.
7525set dummy $ac_prog; ac_word=$2
7526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7527$as_echo_n "checking for $ac_word... " >&6; }
7528if ${ac_cv_path_ECHO+:} false; then :
7529  $as_echo_n "(cached) " >&6
7530else
7531  case $ECHO in
7532  [\\/]* | ?:[\\/]*)
7533  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7534  ;;
7535  *)
7536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7537for as_dir in $PATH
7538do
7539  IFS=$as_save_IFS
7540  test -z "$as_dir" && as_dir=.
7541    for ac_exec_ext in '' $ac_executable_extensions; do
7542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7543    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7545    break 2
7546  fi
7547done
7548  done
7549IFS=$as_save_IFS
7550
7551  ;;
7552esac
7553fi
7554ECHO=$ac_cv_path_ECHO
7555if test -n "$ECHO"; then
7556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7557$as_echo "$ECHO" >&6; }
7558else
7559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7560$as_echo "no" >&6; }
7561fi
7562
7563
7564  test -n "$ECHO" && break
7565done
7566
7567    else
7568      # If it succeeded, then it was overridden by the user. We will use it
7569      # for the tool.
7570
7571      # First remove it from the list of overridden variables, so we can test
7572      # for unknown variables in the end.
7573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7574
7575      # Check if we try to supply an empty value
7576      if test "x$ECHO" = x; then
7577        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7578$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7579        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7580$as_echo_n "checking for ECHO... " >&6; }
7581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7582$as_echo "disabled" >&6; }
7583      else
7584        # Check if the provided tool contains a complete path.
7585        tool_specified="$ECHO"
7586        tool_basename="${tool_specified##*/}"
7587        if test "x$tool_basename" = "x$tool_specified"; then
7588          # A command without a complete path is provided, search $PATH.
7589          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7590$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7591          # Extract the first word of "$tool_basename", so it can be a program name with args.
7592set dummy $tool_basename; ac_word=$2
7593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7594$as_echo_n "checking for $ac_word... " >&6; }
7595if ${ac_cv_path_ECHO+:} false; then :
7596  $as_echo_n "(cached) " >&6
7597else
7598  case $ECHO in
7599  [\\/]* | ?:[\\/]*)
7600  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7601  ;;
7602  *)
7603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7604for as_dir in $PATH
7605do
7606  IFS=$as_save_IFS
7607  test -z "$as_dir" && as_dir=.
7608    for ac_exec_ext in '' $ac_executable_extensions; do
7609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7610    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7612    break 2
7613  fi
7614done
7615  done
7616IFS=$as_save_IFS
7617
7618  ;;
7619esac
7620fi
7621ECHO=$ac_cv_path_ECHO
7622if test -n "$ECHO"; then
7623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7624$as_echo "$ECHO" >&6; }
7625else
7626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7627$as_echo "no" >&6; }
7628fi
7629
7630
7631          if test "x$ECHO" = x; then
7632            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7633          fi
7634        else
7635          # Otherwise we believe it is a complete path. Use it as it is.
7636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7637$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7638          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7639$as_echo_n "checking for ECHO... " >&6; }
7640          if test ! -x "$tool_specified"; then
7641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7642$as_echo "not found" >&6; }
7643            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7644          fi
7645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7646$as_echo "$tool_specified" >&6; }
7647        fi
7648      fi
7649    fi
7650
7651  fi
7652
7653
7654
7655  if test "x$ECHO" = x; then
7656    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7657  fi
7658
7659
7660
7661
7662
7663  # Publish this variable in the help.
7664
7665
7666  if [ -z "${EXPR+x}" ]; then
7667    # The variable is not set by user, try to locate tool using the code snippet
7668    for ac_prog in expr
7669do
7670  # Extract the first word of "$ac_prog", so it can be a program name with args.
7671set dummy $ac_prog; ac_word=$2
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7673$as_echo_n "checking for $ac_word... " >&6; }
7674if ${ac_cv_path_EXPR+:} false; then :
7675  $as_echo_n "(cached) " >&6
7676else
7677  case $EXPR in
7678  [\\/]* | ?:[\\/]*)
7679  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7680  ;;
7681  *)
7682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7683for as_dir in $PATH
7684do
7685  IFS=$as_save_IFS
7686  test -z "$as_dir" && as_dir=.
7687    for ac_exec_ext in '' $ac_executable_extensions; do
7688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7689    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7691    break 2
7692  fi
7693done
7694  done
7695IFS=$as_save_IFS
7696
7697  ;;
7698esac
7699fi
7700EXPR=$ac_cv_path_EXPR
7701if test -n "$EXPR"; then
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7703$as_echo "$EXPR" >&6; }
7704else
7705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706$as_echo "no" >&6; }
7707fi
7708
7709
7710  test -n "$EXPR" && break
7711done
7712
7713  else
7714    # The variable is set, but is it from the command line or the environment?
7715
7716    # Try to remove the string !EXPR! from our list.
7717    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7718    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7719      # If it failed, the variable was not from the command line. Ignore it,
7720      # but warn the user (except for BASH, which is always set by the calling BASH).
7721      if test "xEXPR" != xBASH; then
7722        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7723$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7724      fi
7725      # Try to locate tool using the code snippet
7726      for ac_prog in expr
7727do
7728  # Extract the first word of "$ac_prog", so it can be a program name with args.
7729set dummy $ac_prog; ac_word=$2
7730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7731$as_echo_n "checking for $ac_word... " >&6; }
7732if ${ac_cv_path_EXPR+:} false; then :
7733  $as_echo_n "(cached) " >&6
7734else
7735  case $EXPR in
7736  [\\/]* | ?:[\\/]*)
7737  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7738  ;;
7739  *)
7740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7741for as_dir in $PATH
7742do
7743  IFS=$as_save_IFS
7744  test -z "$as_dir" && as_dir=.
7745    for ac_exec_ext in '' $ac_executable_extensions; do
7746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7747    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7749    break 2
7750  fi
7751done
7752  done
7753IFS=$as_save_IFS
7754
7755  ;;
7756esac
7757fi
7758EXPR=$ac_cv_path_EXPR
7759if test -n "$EXPR"; then
7760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7761$as_echo "$EXPR" >&6; }
7762else
7763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7764$as_echo "no" >&6; }
7765fi
7766
7767
7768  test -n "$EXPR" && break
7769done
7770
7771    else
7772      # If it succeeded, then it was overridden by the user. We will use it
7773      # for the tool.
7774
7775      # First remove it from the list of overridden variables, so we can test
7776      # for unknown variables in the end.
7777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7778
7779      # Check if we try to supply an empty value
7780      if test "x$EXPR" = x; then
7781        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7782$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7784$as_echo_n "checking for EXPR... " >&6; }
7785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7786$as_echo "disabled" >&6; }
7787      else
7788        # Check if the provided tool contains a complete path.
7789        tool_specified="$EXPR"
7790        tool_basename="${tool_specified##*/}"
7791        if test "x$tool_basename" = "x$tool_specified"; then
7792          # A command without a complete path is provided, search $PATH.
7793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7794$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7795          # Extract the first word of "$tool_basename", so it can be a program name with args.
7796set dummy $tool_basename; ac_word=$2
7797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7798$as_echo_n "checking for $ac_word... " >&6; }
7799if ${ac_cv_path_EXPR+:} false; then :
7800  $as_echo_n "(cached) " >&6
7801else
7802  case $EXPR in
7803  [\\/]* | ?:[\\/]*)
7804  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7805  ;;
7806  *)
7807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7808for as_dir in $PATH
7809do
7810  IFS=$as_save_IFS
7811  test -z "$as_dir" && as_dir=.
7812    for ac_exec_ext in '' $ac_executable_extensions; do
7813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7814    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7816    break 2
7817  fi
7818done
7819  done
7820IFS=$as_save_IFS
7821
7822  ;;
7823esac
7824fi
7825EXPR=$ac_cv_path_EXPR
7826if test -n "$EXPR"; then
7827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7828$as_echo "$EXPR" >&6; }
7829else
7830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7831$as_echo "no" >&6; }
7832fi
7833
7834
7835          if test "x$EXPR" = x; then
7836            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7837          fi
7838        else
7839          # Otherwise we believe it is a complete path. Use it as it is.
7840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7841$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7842          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7843$as_echo_n "checking for EXPR... " >&6; }
7844          if test ! -x "$tool_specified"; then
7845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7846$as_echo "not found" >&6; }
7847            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7848          fi
7849          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7850$as_echo "$tool_specified" >&6; }
7851        fi
7852      fi
7853    fi
7854
7855  fi
7856
7857
7858
7859  if test "x$EXPR" = x; then
7860    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7861  fi
7862
7863
7864
7865
7866
7867  # Publish this variable in the help.
7868
7869
7870  if [ -z "${FILE+x}" ]; then
7871    # The variable is not set by user, try to locate tool using the code snippet
7872    for ac_prog in file
7873do
7874  # Extract the first word of "$ac_prog", so it can be a program name with args.
7875set dummy $ac_prog; ac_word=$2
7876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7877$as_echo_n "checking for $ac_word... " >&6; }
7878if ${ac_cv_path_FILE+:} false; then :
7879  $as_echo_n "(cached) " >&6
7880else
7881  case $FILE in
7882  [\\/]* | ?:[\\/]*)
7883  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7884  ;;
7885  *)
7886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7887for as_dir in $PATH
7888do
7889  IFS=$as_save_IFS
7890  test -z "$as_dir" && as_dir=.
7891    for ac_exec_ext in '' $ac_executable_extensions; do
7892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7893    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7895    break 2
7896  fi
7897done
7898  done
7899IFS=$as_save_IFS
7900
7901  ;;
7902esac
7903fi
7904FILE=$ac_cv_path_FILE
7905if test -n "$FILE"; then
7906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7907$as_echo "$FILE" >&6; }
7908else
7909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7910$as_echo "no" >&6; }
7911fi
7912
7913
7914  test -n "$FILE" && break
7915done
7916
7917  else
7918    # The variable is set, but is it from the command line or the environment?
7919
7920    # Try to remove the string !FILE! from our list.
7921    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7922    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7923      # If it failed, the variable was not from the command line. Ignore it,
7924      # but warn the user (except for BASH, which is always set by the calling BASH).
7925      if test "xFILE" != xBASH; then
7926        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7927$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7928      fi
7929      # Try to locate tool using the code snippet
7930      for ac_prog in file
7931do
7932  # Extract the first word of "$ac_prog", so it can be a program name with args.
7933set dummy $ac_prog; ac_word=$2
7934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7935$as_echo_n "checking for $ac_word... " >&6; }
7936if ${ac_cv_path_FILE+:} false; then :
7937  $as_echo_n "(cached) " >&6
7938else
7939  case $FILE in
7940  [\\/]* | ?:[\\/]*)
7941  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7942  ;;
7943  *)
7944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7945for as_dir in $PATH
7946do
7947  IFS=$as_save_IFS
7948  test -z "$as_dir" && as_dir=.
7949    for ac_exec_ext in '' $ac_executable_extensions; do
7950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7951    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7953    break 2
7954  fi
7955done
7956  done
7957IFS=$as_save_IFS
7958
7959  ;;
7960esac
7961fi
7962FILE=$ac_cv_path_FILE
7963if test -n "$FILE"; then
7964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7965$as_echo "$FILE" >&6; }
7966else
7967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7968$as_echo "no" >&6; }
7969fi
7970
7971
7972  test -n "$FILE" && break
7973done
7974
7975    else
7976      # If it succeeded, then it was overridden by the user. We will use it
7977      # for the tool.
7978
7979      # First remove it from the list of overridden variables, so we can test
7980      # for unknown variables in the end.
7981      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7982
7983      # Check if we try to supply an empty value
7984      if test "x$FILE" = x; then
7985        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7986$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7988$as_echo_n "checking for FILE... " >&6; }
7989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7990$as_echo "disabled" >&6; }
7991      else
7992        # Check if the provided tool contains a complete path.
7993        tool_specified="$FILE"
7994        tool_basename="${tool_specified##*/}"
7995        if test "x$tool_basename" = "x$tool_specified"; then
7996          # A command without a complete path is provided, search $PATH.
7997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7998$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7999          # Extract the first word of "$tool_basename", so it can be a program name with args.
8000set dummy $tool_basename; ac_word=$2
8001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8002$as_echo_n "checking for $ac_word... " >&6; }
8003if ${ac_cv_path_FILE+:} false; then :
8004  $as_echo_n "(cached) " >&6
8005else
8006  case $FILE in
8007  [\\/]* | ?:[\\/]*)
8008  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8009  ;;
8010  *)
8011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8012for as_dir in $PATH
8013do
8014  IFS=$as_save_IFS
8015  test -z "$as_dir" && as_dir=.
8016    for ac_exec_ext in '' $ac_executable_extensions; do
8017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8018    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8020    break 2
8021  fi
8022done
8023  done
8024IFS=$as_save_IFS
8025
8026  ;;
8027esac
8028fi
8029FILE=$ac_cv_path_FILE
8030if test -n "$FILE"; then
8031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8032$as_echo "$FILE" >&6; }
8033else
8034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8035$as_echo "no" >&6; }
8036fi
8037
8038
8039          if test "x$FILE" = x; then
8040            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8041          fi
8042        else
8043          # Otherwise we believe it is a complete path. Use it as it is.
8044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8045$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8046          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8047$as_echo_n "checking for FILE... " >&6; }
8048          if test ! -x "$tool_specified"; then
8049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8050$as_echo "not found" >&6; }
8051            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8052          fi
8053          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8054$as_echo "$tool_specified" >&6; }
8055        fi
8056      fi
8057    fi
8058
8059  fi
8060
8061
8062
8063  if test "x$FILE" = x; then
8064    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8065  fi
8066
8067
8068
8069
8070
8071  # Publish this variable in the help.
8072
8073
8074  if [ -z "${FIND+x}" ]; then
8075    # The variable is not set by user, try to locate tool using the code snippet
8076    for ac_prog in find
8077do
8078  # Extract the first word of "$ac_prog", so it can be a program name with args.
8079set dummy $ac_prog; ac_word=$2
8080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8081$as_echo_n "checking for $ac_word... " >&6; }
8082if ${ac_cv_path_FIND+:} false; then :
8083  $as_echo_n "(cached) " >&6
8084else
8085  case $FIND in
8086  [\\/]* | ?:[\\/]*)
8087  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8088  ;;
8089  *)
8090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8091for as_dir in $PATH
8092do
8093  IFS=$as_save_IFS
8094  test -z "$as_dir" && as_dir=.
8095    for ac_exec_ext in '' $ac_executable_extensions; do
8096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8097    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8099    break 2
8100  fi
8101done
8102  done
8103IFS=$as_save_IFS
8104
8105  ;;
8106esac
8107fi
8108FIND=$ac_cv_path_FIND
8109if test -n "$FIND"; then
8110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8111$as_echo "$FIND" >&6; }
8112else
8113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8114$as_echo "no" >&6; }
8115fi
8116
8117
8118  test -n "$FIND" && break
8119done
8120
8121  else
8122    # The variable is set, but is it from the command line or the environment?
8123
8124    # Try to remove the string !FIND! from our list.
8125    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8126    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8127      # If it failed, the variable was not from the command line. Ignore it,
8128      # but warn the user (except for BASH, which is always set by the calling BASH).
8129      if test "xFIND" != xBASH; then
8130        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8131$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8132      fi
8133      # Try to locate tool using the code snippet
8134      for ac_prog in find
8135do
8136  # Extract the first word of "$ac_prog", so it can be a program name with args.
8137set dummy $ac_prog; ac_word=$2
8138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8139$as_echo_n "checking for $ac_word... " >&6; }
8140if ${ac_cv_path_FIND+:} false; then :
8141  $as_echo_n "(cached) " >&6
8142else
8143  case $FIND in
8144  [\\/]* | ?:[\\/]*)
8145  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8146  ;;
8147  *)
8148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8149for as_dir in $PATH
8150do
8151  IFS=$as_save_IFS
8152  test -z "$as_dir" && as_dir=.
8153    for ac_exec_ext in '' $ac_executable_extensions; do
8154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8155    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8157    break 2
8158  fi
8159done
8160  done
8161IFS=$as_save_IFS
8162
8163  ;;
8164esac
8165fi
8166FIND=$ac_cv_path_FIND
8167if test -n "$FIND"; then
8168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8169$as_echo "$FIND" >&6; }
8170else
8171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8172$as_echo "no" >&6; }
8173fi
8174
8175
8176  test -n "$FIND" && break
8177done
8178
8179    else
8180      # If it succeeded, then it was overridden by the user. We will use it
8181      # for the tool.
8182
8183      # First remove it from the list of overridden variables, so we can test
8184      # for unknown variables in the end.
8185      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8186
8187      # Check if we try to supply an empty value
8188      if test "x$FIND" = x; then
8189        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8190$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8191        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8192$as_echo_n "checking for FIND... " >&6; }
8193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8194$as_echo "disabled" >&6; }
8195      else
8196        # Check if the provided tool contains a complete path.
8197        tool_specified="$FIND"
8198        tool_basename="${tool_specified##*/}"
8199        if test "x$tool_basename" = "x$tool_specified"; then
8200          # A command without a complete path is provided, search $PATH.
8201          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8202$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8203          # Extract the first word of "$tool_basename", so it can be a program name with args.
8204set dummy $tool_basename; ac_word=$2
8205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8206$as_echo_n "checking for $ac_word... " >&6; }
8207if ${ac_cv_path_FIND+:} false; then :
8208  $as_echo_n "(cached) " >&6
8209else
8210  case $FIND in
8211  [\\/]* | ?:[\\/]*)
8212  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8213  ;;
8214  *)
8215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8216for as_dir in $PATH
8217do
8218  IFS=$as_save_IFS
8219  test -z "$as_dir" && as_dir=.
8220    for ac_exec_ext in '' $ac_executable_extensions; do
8221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8222    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8224    break 2
8225  fi
8226done
8227  done
8228IFS=$as_save_IFS
8229
8230  ;;
8231esac
8232fi
8233FIND=$ac_cv_path_FIND
8234if test -n "$FIND"; then
8235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8236$as_echo "$FIND" >&6; }
8237else
8238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8239$as_echo "no" >&6; }
8240fi
8241
8242
8243          if test "x$FIND" = x; then
8244            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8245          fi
8246        else
8247          # Otherwise we believe it is a complete path. Use it as it is.
8248          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8249$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8250          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8251$as_echo_n "checking for FIND... " >&6; }
8252          if test ! -x "$tool_specified"; then
8253            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8254$as_echo "not found" >&6; }
8255            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8256          fi
8257          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8258$as_echo "$tool_specified" >&6; }
8259        fi
8260      fi
8261    fi
8262
8263  fi
8264
8265
8266
8267  if test "x$FIND" = x; then
8268    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8269  fi
8270
8271
8272
8273
8274
8275  # Publish this variable in the help.
8276
8277
8278  if [ -z "${HEAD+x}" ]; then
8279    # The variable is not set by user, try to locate tool using the code snippet
8280    for ac_prog in head
8281do
8282  # Extract the first word of "$ac_prog", so it can be a program name with args.
8283set dummy $ac_prog; ac_word=$2
8284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8285$as_echo_n "checking for $ac_word... " >&6; }
8286if ${ac_cv_path_HEAD+:} false; then :
8287  $as_echo_n "(cached) " >&6
8288else
8289  case $HEAD in
8290  [\\/]* | ?:[\\/]*)
8291  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8292  ;;
8293  *)
8294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8295for as_dir in $PATH
8296do
8297  IFS=$as_save_IFS
8298  test -z "$as_dir" && as_dir=.
8299    for ac_exec_ext in '' $ac_executable_extensions; do
8300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8301    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8303    break 2
8304  fi
8305done
8306  done
8307IFS=$as_save_IFS
8308
8309  ;;
8310esac
8311fi
8312HEAD=$ac_cv_path_HEAD
8313if test -n "$HEAD"; then
8314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8315$as_echo "$HEAD" >&6; }
8316else
8317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8318$as_echo "no" >&6; }
8319fi
8320
8321
8322  test -n "$HEAD" && break
8323done
8324
8325  else
8326    # The variable is set, but is it from the command line or the environment?
8327
8328    # Try to remove the string !HEAD! from our list.
8329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8331      # If it failed, the variable was not from the command line. Ignore it,
8332      # but warn the user (except for BASH, which is always set by the calling BASH).
8333      if test "xHEAD" != xBASH; then
8334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8335$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8336      fi
8337      # Try to locate tool using the code snippet
8338      for ac_prog in head
8339do
8340  # Extract the first word of "$ac_prog", so it can be a program name with args.
8341set dummy $ac_prog; ac_word=$2
8342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8343$as_echo_n "checking for $ac_word... " >&6; }
8344if ${ac_cv_path_HEAD+:} false; then :
8345  $as_echo_n "(cached) " >&6
8346else
8347  case $HEAD in
8348  [\\/]* | ?:[\\/]*)
8349  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8350  ;;
8351  *)
8352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8353for as_dir in $PATH
8354do
8355  IFS=$as_save_IFS
8356  test -z "$as_dir" && as_dir=.
8357    for ac_exec_ext in '' $ac_executable_extensions; do
8358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8359    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8361    break 2
8362  fi
8363done
8364  done
8365IFS=$as_save_IFS
8366
8367  ;;
8368esac
8369fi
8370HEAD=$ac_cv_path_HEAD
8371if test -n "$HEAD"; then
8372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8373$as_echo "$HEAD" >&6; }
8374else
8375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8376$as_echo "no" >&6; }
8377fi
8378
8379
8380  test -n "$HEAD" && break
8381done
8382
8383    else
8384      # If it succeeded, then it was overridden by the user. We will use it
8385      # for the tool.
8386
8387      # First remove it from the list of overridden variables, so we can test
8388      # for unknown variables in the end.
8389      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8390
8391      # Check if we try to supply an empty value
8392      if test "x$HEAD" = x; then
8393        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8394$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8395        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8396$as_echo_n "checking for HEAD... " >&6; }
8397        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8398$as_echo "disabled" >&6; }
8399      else
8400        # Check if the provided tool contains a complete path.
8401        tool_specified="$HEAD"
8402        tool_basename="${tool_specified##*/}"
8403        if test "x$tool_basename" = "x$tool_specified"; then
8404          # A command without a complete path is provided, search $PATH.
8405          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8406$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8407          # Extract the first word of "$tool_basename", so it can be a program name with args.
8408set dummy $tool_basename; ac_word=$2
8409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8410$as_echo_n "checking for $ac_word... " >&6; }
8411if ${ac_cv_path_HEAD+:} false; then :
8412  $as_echo_n "(cached) " >&6
8413else
8414  case $HEAD in
8415  [\\/]* | ?:[\\/]*)
8416  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8417  ;;
8418  *)
8419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8420for as_dir in $PATH
8421do
8422  IFS=$as_save_IFS
8423  test -z "$as_dir" && as_dir=.
8424    for ac_exec_ext in '' $ac_executable_extensions; do
8425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8426    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8428    break 2
8429  fi
8430done
8431  done
8432IFS=$as_save_IFS
8433
8434  ;;
8435esac
8436fi
8437HEAD=$ac_cv_path_HEAD
8438if test -n "$HEAD"; then
8439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8440$as_echo "$HEAD" >&6; }
8441else
8442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8443$as_echo "no" >&6; }
8444fi
8445
8446
8447          if test "x$HEAD" = x; then
8448            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8449          fi
8450        else
8451          # Otherwise we believe it is a complete path. Use it as it is.
8452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8453$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8454          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8455$as_echo_n "checking for HEAD... " >&6; }
8456          if test ! -x "$tool_specified"; then
8457            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8458$as_echo "not found" >&6; }
8459            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8460          fi
8461          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8462$as_echo "$tool_specified" >&6; }
8463        fi
8464      fi
8465    fi
8466
8467  fi
8468
8469
8470
8471  if test "x$HEAD" = x; then
8472    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8473  fi
8474
8475
8476
8477
8478
8479  # Publish this variable in the help.
8480
8481
8482  if [ -z "${GUNZIP+x}" ]; then
8483    # The variable is not set by user, try to locate tool using the code snippet
8484    for ac_prog in gunzip
8485do
8486  # Extract the first word of "$ac_prog", so it can be a program name with args.
8487set dummy $ac_prog; ac_word=$2
8488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8489$as_echo_n "checking for $ac_word... " >&6; }
8490if ${ac_cv_path_GUNZIP+:} false; then :
8491  $as_echo_n "(cached) " >&6
8492else
8493  case $GUNZIP in
8494  [\\/]* | ?:[\\/]*)
8495  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8496  ;;
8497  *)
8498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8499for as_dir in $PATH
8500do
8501  IFS=$as_save_IFS
8502  test -z "$as_dir" && as_dir=.
8503    for ac_exec_ext in '' $ac_executable_extensions; do
8504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8505    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8507    break 2
8508  fi
8509done
8510  done
8511IFS=$as_save_IFS
8512
8513  ;;
8514esac
8515fi
8516GUNZIP=$ac_cv_path_GUNZIP
8517if test -n "$GUNZIP"; then
8518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8519$as_echo "$GUNZIP" >&6; }
8520else
8521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8522$as_echo "no" >&6; }
8523fi
8524
8525
8526  test -n "$GUNZIP" && break
8527done
8528
8529  else
8530    # The variable is set, but is it from the command line or the environment?
8531
8532    # Try to remove the string !GUNZIP! from our list.
8533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8535      # If it failed, the variable was not from the command line. Ignore it,
8536      # but warn the user (except for BASH, which is always set by the calling BASH).
8537      if test "xGUNZIP" != xBASH; then
8538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8539$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8540      fi
8541      # Try to locate tool using the code snippet
8542      for ac_prog in gunzip
8543do
8544  # Extract the first word of "$ac_prog", so it can be a program name with args.
8545set dummy $ac_prog; ac_word=$2
8546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8547$as_echo_n "checking for $ac_word... " >&6; }
8548if ${ac_cv_path_GUNZIP+:} false; then :
8549  $as_echo_n "(cached) " >&6
8550else
8551  case $GUNZIP in
8552  [\\/]* | ?:[\\/]*)
8553  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8554  ;;
8555  *)
8556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8557for as_dir in $PATH
8558do
8559  IFS=$as_save_IFS
8560  test -z "$as_dir" && as_dir=.
8561    for ac_exec_ext in '' $ac_executable_extensions; do
8562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8563    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8565    break 2
8566  fi
8567done
8568  done
8569IFS=$as_save_IFS
8570
8571  ;;
8572esac
8573fi
8574GUNZIP=$ac_cv_path_GUNZIP
8575if test -n "$GUNZIP"; then
8576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8577$as_echo "$GUNZIP" >&6; }
8578else
8579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8580$as_echo "no" >&6; }
8581fi
8582
8583
8584  test -n "$GUNZIP" && break
8585done
8586
8587    else
8588      # If it succeeded, then it was overridden by the user. We will use it
8589      # for the tool.
8590
8591      # First remove it from the list of overridden variables, so we can test
8592      # for unknown variables in the end.
8593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8594
8595      # Check if we try to supply an empty value
8596      if test "x$GUNZIP" = x; then
8597        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8598$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8599        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8600$as_echo_n "checking for GUNZIP... " >&6; }
8601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8602$as_echo "disabled" >&6; }
8603      else
8604        # Check if the provided tool contains a complete path.
8605        tool_specified="$GUNZIP"
8606        tool_basename="${tool_specified##*/}"
8607        if test "x$tool_basename" = "x$tool_specified"; then
8608          # A command without a complete path is provided, search $PATH.
8609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8610$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8611          # Extract the first word of "$tool_basename", so it can be a program name with args.
8612set dummy $tool_basename; ac_word=$2
8613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8614$as_echo_n "checking for $ac_word... " >&6; }
8615if ${ac_cv_path_GUNZIP+:} false; then :
8616  $as_echo_n "(cached) " >&6
8617else
8618  case $GUNZIP in
8619  [\\/]* | ?:[\\/]*)
8620  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8621  ;;
8622  *)
8623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8624for as_dir in $PATH
8625do
8626  IFS=$as_save_IFS
8627  test -z "$as_dir" && as_dir=.
8628    for ac_exec_ext in '' $ac_executable_extensions; do
8629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8630    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8632    break 2
8633  fi
8634done
8635  done
8636IFS=$as_save_IFS
8637
8638  ;;
8639esac
8640fi
8641GUNZIP=$ac_cv_path_GUNZIP
8642if test -n "$GUNZIP"; then
8643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8644$as_echo "$GUNZIP" >&6; }
8645else
8646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8647$as_echo "no" >&6; }
8648fi
8649
8650
8651          if test "x$GUNZIP" = x; then
8652            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8653          fi
8654        else
8655          # Otherwise we believe it is a complete path. Use it as it is.
8656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8657$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8658          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8659$as_echo_n "checking for GUNZIP... " >&6; }
8660          if test ! -x "$tool_specified"; then
8661            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8662$as_echo "not found" >&6; }
8663            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8664          fi
8665          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8666$as_echo "$tool_specified" >&6; }
8667        fi
8668      fi
8669    fi
8670
8671  fi
8672
8673
8674
8675  if test "x$GUNZIP" = x; then
8676    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8677  fi
8678
8679
8680
8681
8682
8683  # Publish this variable in the help.
8684
8685
8686  if [ -z "${GZIP+x}" ]; then
8687    # The variable is not set by user, try to locate tool using the code snippet
8688    for ac_prog in pigz gzip
8689do
8690  # Extract the first word of "$ac_prog", so it can be a program name with args.
8691set dummy $ac_prog; ac_word=$2
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8693$as_echo_n "checking for $ac_word... " >&6; }
8694if ${ac_cv_path_GZIP+:} false; then :
8695  $as_echo_n "(cached) " >&6
8696else
8697  case $GZIP in
8698  [\\/]* | ?:[\\/]*)
8699  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8700  ;;
8701  *)
8702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8703for as_dir in $PATH
8704do
8705  IFS=$as_save_IFS
8706  test -z "$as_dir" && as_dir=.
8707    for ac_exec_ext in '' $ac_executable_extensions; do
8708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8709    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8711    break 2
8712  fi
8713done
8714  done
8715IFS=$as_save_IFS
8716
8717  ;;
8718esac
8719fi
8720GZIP=$ac_cv_path_GZIP
8721if test -n "$GZIP"; then
8722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8723$as_echo "$GZIP" >&6; }
8724else
8725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8726$as_echo "no" >&6; }
8727fi
8728
8729
8730  test -n "$GZIP" && break
8731done
8732
8733  else
8734    # The variable is set, but is it from the command line or the environment?
8735
8736    # Try to remove the string !GZIP! from our list.
8737    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8738    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8739      # If it failed, the variable was not from the command line. Ignore it,
8740      # but warn the user (except for BASH, which is always set by the calling BASH).
8741      if test "xGZIP" != xBASH; then
8742        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8743$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8744      fi
8745      # Try to locate tool using the code snippet
8746      for ac_prog in pigz gzip
8747do
8748  # Extract the first word of "$ac_prog", so it can be a program name with args.
8749set dummy $ac_prog; ac_word=$2
8750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8751$as_echo_n "checking for $ac_word... " >&6; }
8752if ${ac_cv_path_GZIP+:} false; then :
8753  $as_echo_n "(cached) " >&6
8754else
8755  case $GZIP in
8756  [\\/]* | ?:[\\/]*)
8757  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8758  ;;
8759  *)
8760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8761for as_dir in $PATH
8762do
8763  IFS=$as_save_IFS
8764  test -z "$as_dir" && as_dir=.
8765    for ac_exec_ext in '' $ac_executable_extensions; do
8766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8767    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8769    break 2
8770  fi
8771done
8772  done
8773IFS=$as_save_IFS
8774
8775  ;;
8776esac
8777fi
8778GZIP=$ac_cv_path_GZIP
8779if test -n "$GZIP"; then
8780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8781$as_echo "$GZIP" >&6; }
8782else
8783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8784$as_echo "no" >&6; }
8785fi
8786
8787
8788  test -n "$GZIP" && break
8789done
8790
8791    else
8792      # If it succeeded, then it was overridden by the user. We will use it
8793      # for the tool.
8794
8795      # First remove it from the list of overridden variables, so we can test
8796      # for unknown variables in the end.
8797      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8798
8799      # Check if we try to supply an empty value
8800      if test "x$GZIP" = x; then
8801        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8802$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8803        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8804$as_echo_n "checking for GZIP... " >&6; }
8805        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8806$as_echo "disabled" >&6; }
8807      else
8808        # Check if the provided tool contains a complete path.
8809        tool_specified="$GZIP"
8810        tool_basename="${tool_specified##*/}"
8811        if test "x$tool_basename" = "x$tool_specified"; then
8812          # A command without a complete path is provided, search $PATH.
8813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8814$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8815          # Extract the first word of "$tool_basename", so it can be a program name with args.
8816set dummy $tool_basename; ac_word=$2
8817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8818$as_echo_n "checking for $ac_word... " >&6; }
8819if ${ac_cv_path_GZIP+:} false; then :
8820  $as_echo_n "(cached) " >&6
8821else
8822  case $GZIP in
8823  [\\/]* | ?:[\\/]*)
8824  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8825  ;;
8826  *)
8827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8828for as_dir in $PATH
8829do
8830  IFS=$as_save_IFS
8831  test -z "$as_dir" && as_dir=.
8832    for ac_exec_ext in '' $ac_executable_extensions; do
8833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8834    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8836    break 2
8837  fi
8838done
8839  done
8840IFS=$as_save_IFS
8841
8842  ;;
8843esac
8844fi
8845GZIP=$ac_cv_path_GZIP
8846if test -n "$GZIP"; then
8847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8848$as_echo "$GZIP" >&6; }
8849else
8850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8851$as_echo "no" >&6; }
8852fi
8853
8854
8855          if test "x$GZIP" = x; then
8856            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8857          fi
8858        else
8859          # Otherwise we believe it is a complete path. Use it as it is.
8860          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8861$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8862          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8863$as_echo_n "checking for GZIP... " >&6; }
8864          if test ! -x "$tool_specified"; then
8865            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8866$as_echo "not found" >&6; }
8867            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8868          fi
8869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8870$as_echo "$tool_specified" >&6; }
8871        fi
8872      fi
8873    fi
8874
8875  fi
8876
8877
8878
8879  if test "x$GZIP" = x; then
8880    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8881  fi
8882
8883
8884
8885
8886
8887  # Publish this variable in the help.
8888
8889
8890  if [ -z "${LN+x}" ]; then
8891    # The variable is not set by user, try to locate tool using the code snippet
8892    for ac_prog in ln
8893do
8894  # Extract the first word of "$ac_prog", so it can be a program name with args.
8895set dummy $ac_prog; ac_word=$2
8896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8897$as_echo_n "checking for $ac_word... " >&6; }
8898if ${ac_cv_path_LN+:} false; then :
8899  $as_echo_n "(cached) " >&6
8900else
8901  case $LN in
8902  [\\/]* | ?:[\\/]*)
8903  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8904  ;;
8905  *)
8906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8907for as_dir in $PATH
8908do
8909  IFS=$as_save_IFS
8910  test -z "$as_dir" && as_dir=.
8911    for ac_exec_ext in '' $ac_executable_extensions; do
8912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8913    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8915    break 2
8916  fi
8917done
8918  done
8919IFS=$as_save_IFS
8920
8921  ;;
8922esac
8923fi
8924LN=$ac_cv_path_LN
8925if test -n "$LN"; then
8926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8927$as_echo "$LN" >&6; }
8928else
8929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8930$as_echo "no" >&6; }
8931fi
8932
8933
8934  test -n "$LN" && break
8935done
8936
8937  else
8938    # The variable is set, but is it from the command line or the environment?
8939
8940    # Try to remove the string !LN! from our list.
8941    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8942    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8943      # If it failed, the variable was not from the command line. Ignore it,
8944      # but warn the user (except for BASH, which is always set by the calling BASH).
8945      if test "xLN" != xBASH; then
8946        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8947$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8948      fi
8949      # Try to locate tool using the code snippet
8950      for ac_prog in ln
8951do
8952  # Extract the first word of "$ac_prog", so it can be a program name with args.
8953set dummy $ac_prog; ac_word=$2
8954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8955$as_echo_n "checking for $ac_word... " >&6; }
8956if ${ac_cv_path_LN+:} false; then :
8957  $as_echo_n "(cached) " >&6
8958else
8959  case $LN in
8960  [\\/]* | ?:[\\/]*)
8961  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8962  ;;
8963  *)
8964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8965for as_dir in $PATH
8966do
8967  IFS=$as_save_IFS
8968  test -z "$as_dir" && as_dir=.
8969    for ac_exec_ext in '' $ac_executable_extensions; do
8970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8971    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8973    break 2
8974  fi
8975done
8976  done
8977IFS=$as_save_IFS
8978
8979  ;;
8980esac
8981fi
8982LN=$ac_cv_path_LN
8983if test -n "$LN"; then
8984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8985$as_echo "$LN" >&6; }
8986else
8987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8988$as_echo "no" >&6; }
8989fi
8990
8991
8992  test -n "$LN" && break
8993done
8994
8995    else
8996      # If it succeeded, then it was overridden by the user. We will use it
8997      # for the tool.
8998
8999      # First remove it from the list of overridden variables, so we can test
9000      # for unknown variables in the end.
9001      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9002
9003      # Check if we try to supply an empty value
9004      if test "x$LN" = x; then
9005        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9006$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9007        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9008$as_echo_n "checking for LN... " >&6; }
9009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9010$as_echo "disabled" >&6; }
9011      else
9012        # Check if the provided tool contains a complete path.
9013        tool_specified="$LN"
9014        tool_basename="${tool_specified##*/}"
9015        if test "x$tool_basename" = "x$tool_specified"; then
9016          # A command without a complete path is provided, search $PATH.
9017          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9018$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9019          # Extract the first word of "$tool_basename", so it can be a program name with args.
9020set dummy $tool_basename; ac_word=$2
9021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9022$as_echo_n "checking for $ac_word... " >&6; }
9023if ${ac_cv_path_LN+:} false; then :
9024  $as_echo_n "(cached) " >&6
9025else
9026  case $LN in
9027  [\\/]* | ?:[\\/]*)
9028  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9029  ;;
9030  *)
9031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9032for as_dir in $PATH
9033do
9034  IFS=$as_save_IFS
9035  test -z "$as_dir" && as_dir=.
9036    for ac_exec_ext in '' $ac_executable_extensions; do
9037  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9038    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9039    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9040    break 2
9041  fi
9042done
9043  done
9044IFS=$as_save_IFS
9045
9046  ;;
9047esac
9048fi
9049LN=$ac_cv_path_LN
9050if test -n "$LN"; then
9051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9052$as_echo "$LN" >&6; }
9053else
9054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9055$as_echo "no" >&6; }
9056fi
9057
9058
9059          if test "x$LN" = x; then
9060            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9061          fi
9062        else
9063          # Otherwise we believe it is a complete path. Use it as it is.
9064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9065$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9066          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9067$as_echo_n "checking for LN... " >&6; }
9068          if test ! -x "$tool_specified"; then
9069            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9070$as_echo "not found" >&6; }
9071            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9072          fi
9073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9074$as_echo "$tool_specified" >&6; }
9075        fi
9076      fi
9077    fi
9078
9079  fi
9080
9081
9082
9083  if test "x$LN" = x; then
9084    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9085  fi
9086
9087
9088
9089
9090
9091  # Publish this variable in the help.
9092
9093
9094  if [ -z "${LS+x}" ]; then
9095    # The variable is not set by user, try to locate tool using the code snippet
9096    for ac_prog in ls
9097do
9098  # Extract the first word of "$ac_prog", so it can be a program name with args.
9099set dummy $ac_prog; ac_word=$2
9100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9101$as_echo_n "checking for $ac_word... " >&6; }
9102if ${ac_cv_path_LS+:} false; then :
9103  $as_echo_n "(cached) " >&6
9104else
9105  case $LS in
9106  [\\/]* | ?:[\\/]*)
9107  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9108  ;;
9109  *)
9110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9111for as_dir in $PATH
9112do
9113  IFS=$as_save_IFS
9114  test -z "$as_dir" && as_dir=.
9115    for ac_exec_ext in '' $ac_executable_extensions; do
9116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9117    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9119    break 2
9120  fi
9121done
9122  done
9123IFS=$as_save_IFS
9124
9125  ;;
9126esac
9127fi
9128LS=$ac_cv_path_LS
9129if test -n "$LS"; then
9130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9131$as_echo "$LS" >&6; }
9132else
9133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9134$as_echo "no" >&6; }
9135fi
9136
9137
9138  test -n "$LS" && break
9139done
9140
9141  else
9142    # The variable is set, but is it from the command line or the environment?
9143
9144    # Try to remove the string !LS! from our list.
9145    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9146    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9147      # If it failed, the variable was not from the command line. Ignore it,
9148      # but warn the user (except for BASH, which is always set by the calling BASH).
9149      if test "xLS" != xBASH; then
9150        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9151$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9152      fi
9153      # Try to locate tool using the code snippet
9154      for ac_prog in ls
9155do
9156  # Extract the first word of "$ac_prog", so it can be a program name with args.
9157set dummy $ac_prog; ac_word=$2
9158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9159$as_echo_n "checking for $ac_word... " >&6; }
9160if ${ac_cv_path_LS+:} false; then :
9161  $as_echo_n "(cached) " >&6
9162else
9163  case $LS in
9164  [\\/]* | ?:[\\/]*)
9165  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9166  ;;
9167  *)
9168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9169for as_dir in $PATH
9170do
9171  IFS=$as_save_IFS
9172  test -z "$as_dir" && as_dir=.
9173    for ac_exec_ext in '' $ac_executable_extensions; do
9174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9175    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9177    break 2
9178  fi
9179done
9180  done
9181IFS=$as_save_IFS
9182
9183  ;;
9184esac
9185fi
9186LS=$ac_cv_path_LS
9187if test -n "$LS"; then
9188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9189$as_echo "$LS" >&6; }
9190else
9191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9192$as_echo "no" >&6; }
9193fi
9194
9195
9196  test -n "$LS" && break
9197done
9198
9199    else
9200      # If it succeeded, then it was overridden by the user. We will use it
9201      # for the tool.
9202
9203      # First remove it from the list of overridden variables, so we can test
9204      # for unknown variables in the end.
9205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9206
9207      # Check if we try to supply an empty value
9208      if test "x$LS" = x; then
9209        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9210$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9212$as_echo_n "checking for LS... " >&6; }
9213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9214$as_echo "disabled" >&6; }
9215      else
9216        # Check if the provided tool contains a complete path.
9217        tool_specified="$LS"
9218        tool_basename="${tool_specified##*/}"
9219        if test "x$tool_basename" = "x$tool_specified"; then
9220          # A command without a complete path is provided, search $PATH.
9221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9222$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9223          # Extract the first word of "$tool_basename", so it can be a program name with args.
9224set dummy $tool_basename; ac_word=$2
9225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9226$as_echo_n "checking for $ac_word... " >&6; }
9227if ${ac_cv_path_LS+:} false; then :
9228  $as_echo_n "(cached) " >&6
9229else
9230  case $LS in
9231  [\\/]* | ?:[\\/]*)
9232  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9233  ;;
9234  *)
9235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9236for as_dir in $PATH
9237do
9238  IFS=$as_save_IFS
9239  test -z "$as_dir" && as_dir=.
9240    for ac_exec_ext in '' $ac_executable_extensions; do
9241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9242    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9244    break 2
9245  fi
9246done
9247  done
9248IFS=$as_save_IFS
9249
9250  ;;
9251esac
9252fi
9253LS=$ac_cv_path_LS
9254if test -n "$LS"; then
9255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9256$as_echo "$LS" >&6; }
9257else
9258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9259$as_echo "no" >&6; }
9260fi
9261
9262
9263          if test "x$LS" = x; then
9264            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9265          fi
9266        else
9267          # Otherwise we believe it is a complete path. Use it as it is.
9268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9269$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9270          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9271$as_echo_n "checking for LS... " >&6; }
9272          if test ! -x "$tool_specified"; then
9273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9274$as_echo "not found" >&6; }
9275            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9276          fi
9277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9278$as_echo "$tool_specified" >&6; }
9279        fi
9280      fi
9281    fi
9282
9283  fi
9284
9285
9286
9287  if test "x$LS" = x; then
9288    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9289  fi
9290
9291
9292
9293
9294
9295  # Publish this variable in the help.
9296
9297
9298  if [ -z "${MKDIR+x}" ]; then
9299    # The variable is not set by user, try to locate tool using the code snippet
9300    for ac_prog in mkdir
9301do
9302  # Extract the first word of "$ac_prog", so it can be a program name with args.
9303set dummy $ac_prog; ac_word=$2
9304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9305$as_echo_n "checking for $ac_word... " >&6; }
9306if ${ac_cv_path_MKDIR+:} false; then :
9307  $as_echo_n "(cached) " >&6
9308else
9309  case $MKDIR in
9310  [\\/]* | ?:[\\/]*)
9311  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9312  ;;
9313  *)
9314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9315for as_dir in $PATH
9316do
9317  IFS=$as_save_IFS
9318  test -z "$as_dir" && as_dir=.
9319    for ac_exec_ext in '' $ac_executable_extensions; do
9320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9321    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9323    break 2
9324  fi
9325done
9326  done
9327IFS=$as_save_IFS
9328
9329  ;;
9330esac
9331fi
9332MKDIR=$ac_cv_path_MKDIR
9333if test -n "$MKDIR"; then
9334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9335$as_echo "$MKDIR" >&6; }
9336else
9337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9338$as_echo "no" >&6; }
9339fi
9340
9341
9342  test -n "$MKDIR" && break
9343done
9344
9345  else
9346    # The variable is set, but is it from the command line or the environment?
9347
9348    # Try to remove the string !MKDIR! from our list.
9349    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9350    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9351      # If it failed, the variable was not from the command line. Ignore it,
9352      # but warn the user (except for BASH, which is always set by the calling BASH).
9353      if test "xMKDIR" != xBASH; then
9354        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9355$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9356      fi
9357      # Try to locate tool using the code snippet
9358      for ac_prog in mkdir
9359do
9360  # Extract the first word of "$ac_prog", so it can be a program name with args.
9361set dummy $ac_prog; ac_word=$2
9362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9363$as_echo_n "checking for $ac_word... " >&6; }
9364if ${ac_cv_path_MKDIR+:} false; then :
9365  $as_echo_n "(cached) " >&6
9366else
9367  case $MKDIR in
9368  [\\/]* | ?:[\\/]*)
9369  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9370  ;;
9371  *)
9372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9373for as_dir in $PATH
9374do
9375  IFS=$as_save_IFS
9376  test -z "$as_dir" && as_dir=.
9377    for ac_exec_ext in '' $ac_executable_extensions; do
9378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9379    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9381    break 2
9382  fi
9383done
9384  done
9385IFS=$as_save_IFS
9386
9387  ;;
9388esac
9389fi
9390MKDIR=$ac_cv_path_MKDIR
9391if test -n "$MKDIR"; then
9392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9393$as_echo "$MKDIR" >&6; }
9394else
9395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9396$as_echo "no" >&6; }
9397fi
9398
9399
9400  test -n "$MKDIR" && break
9401done
9402
9403    else
9404      # If it succeeded, then it was overridden by the user. We will use it
9405      # for the tool.
9406
9407      # First remove it from the list of overridden variables, so we can test
9408      # for unknown variables in the end.
9409      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9410
9411      # Check if we try to supply an empty value
9412      if test "x$MKDIR" = x; then
9413        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9414$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9415        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9416$as_echo_n "checking for MKDIR... " >&6; }
9417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9418$as_echo "disabled" >&6; }
9419      else
9420        # Check if the provided tool contains a complete path.
9421        tool_specified="$MKDIR"
9422        tool_basename="${tool_specified##*/}"
9423        if test "x$tool_basename" = "x$tool_specified"; then
9424          # A command without a complete path is provided, search $PATH.
9425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9426$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9427          # Extract the first word of "$tool_basename", so it can be a program name with args.
9428set dummy $tool_basename; ac_word=$2
9429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9430$as_echo_n "checking for $ac_word... " >&6; }
9431if ${ac_cv_path_MKDIR+:} false; then :
9432  $as_echo_n "(cached) " >&6
9433else
9434  case $MKDIR in
9435  [\\/]* | ?:[\\/]*)
9436  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9437  ;;
9438  *)
9439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9440for as_dir in $PATH
9441do
9442  IFS=$as_save_IFS
9443  test -z "$as_dir" && as_dir=.
9444    for ac_exec_ext in '' $ac_executable_extensions; do
9445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9446    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9448    break 2
9449  fi
9450done
9451  done
9452IFS=$as_save_IFS
9453
9454  ;;
9455esac
9456fi
9457MKDIR=$ac_cv_path_MKDIR
9458if test -n "$MKDIR"; then
9459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9460$as_echo "$MKDIR" >&6; }
9461else
9462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9463$as_echo "no" >&6; }
9464fi
9465
9466
9467          if test "x$MKDIR" = x; then
9468            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9469          fi
9470        else
9471          # Otherwise we believe it is a complete path. Use it as it is.
9472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9473$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9474          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9475$as_echo_n "checking for MKDIR... " >&6; }
9476          if test ! -x "$tool_specified"; then
9477            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9478$as_echo "not found" >&6; }
9479            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9480          fi
9481          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9482$as_echo "$tool_specified" >&6; }
9483        fi
9484      fi
9485    fi
9486
9487  fi
9488
9489
9490
9491  if test "x$MKDIR" = x; then
9492    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9493  fi
9494
9495
9496
9497
9498
9499  # Publish this variable in the help.
9500
9501
9502  if [ -z "${MKTEMP+x}" ]; then
9503    # The variable is not set by user, try to locate tool using the code snippet
9504    for ac_prog in mktemp
9505do
9506  # Extract the first word of "$ac_prog", so it can be a program name with args.
9507set dummy $ac_prog; ac_word=$2
9508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9509$as_echo_n "checking for $ac_word... " >&6; }
9510if ${ac_cv_path_MKTEMP+:} false; then :
9511  $as_echo_n "(cached) " >&6
9512else
9513  case $MKTEMP in
9514  [\\/]* | ?:[\\/]*)
9515  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9516  ;;
9517  *)
9518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9519for as_dir in $PATH
9520do
9521  IFS=$as_save_IFS
9522  test -z "$as_dir" && as_dir=.
9523    for ac_exec_ext in '' $ac_executable_extensions; do
9524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9525    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9527    break 2
9528  fi
9529done
9530  done
9531IFS=$as_save_IFS
9532
9533  ;;
9534esac
9535fi
9536MKTEMP=$ac_cv_path_MKTEMP
9537if test -n "$MKTEMP"; then
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9539$as_echo "$MKTEMP" >&6; }
9540else
9541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9542$as_echo "no" >&6; }
9543fi
9544
9545
9546  test -n "$MKTEMP" && break
9547done
9548
9549  else
9550    # The variable is set, but is it from the command line or the environment?
9551
9552    # Try to remove the string !MKTEMP! from our list.
9553    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9554    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9555      # If it failed, the variable was not from the command line. Ignore it,
9556      # but warn the user (except for BASH, which is always set by the calling BASH).
9557      if test "xMKTEMP" != xBASH; then
9558        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9559$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9560      fi
9561      # Try to locate tool using the code snippet
9562      for ac_prog in mktemp
9563do
9564  # Extract the first word of "$ac_prog", so it can be a program name with args.
9565set dummy $ac_prog; ac_word=$2
9566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9567$as_echo_n "checking for $ac_word... " >&6; }
9568if ${ac_cv_path_MKTEMP+:} false; then :
9569  $as_echo_n "(cached) " >&6
9570else
9571  case $MKTEMP in
9572  [\\/]* | ?:[\\/]*)
9573  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9574  ;;
9575  *)
9576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9577for as_dir in $PATH
9578do
9579  IFS=$as_save_IFS
9580  test -z "$as_dir" && as_dir=.
9581    for ac_exec_ext in '' $ac_executable_extensions; do
9582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9583    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9585    break 2
9586  fi
9587done
9588  done
9589IFS=$as_save_IFS
9590
9591  ;;
9592esac
9593fi
9594MKTEMP=$ac_cv_path_MKTEMP
9595if test -n "$MKTEMP"; then
9596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9597$as_echo "$MKTEMP" >&6; }
9598else
9599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9600$as_echo "no" >&6; }
9601fi
9602
9603
9604  test -n "$MKTEMP" && break
9605done
9606
9607    else
9608      # If it succeeded, then it was overridden by the user. We will use it
9609      # for the tool.
9610
9611      # First remove it from the list of overridden variables, so we can test
9612      # for unknown variables in the end.
9613      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9614
9615      # Check if we try to supply an empty value
9616      if test "x$MKTEMP" = x; then
9617        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9618$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9620$as_echo_n "checking for MKTEMP... " >&6; }
9621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9622$as_echo "disabled" >&6; }
9623      else
9624        # Check if the provided tool contains a complete path.
9625        tool_specified="$MKTEMP"
9626        tool_basename="${tool_specified##*/}"
9627        if test "x$tool_basename" = "x$tool_specified"; then
9628          # A command without a complete path is provided, search $PATH.
9629          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9630$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9631          # Extract the first word of "$tool_basename", so it can be a program name with args.
9632set dummy $tool_basename; ac_word=$2
9633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9634$as_echo_n "checking for $ac_word... " >&6; }
9635if ${ac_cv_path_MKTEMP+:} false; then :
9636  $as_echo_n "(cached) " >&6
9637else
9638  case $MKTEMP in
9639  [\\/]* | ?:[\\/]*)
9640  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9641  ;;
9642  *)
9643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9644for as_dir in $PATH
9645do
9646  IFS=$as_save_IFS
9647  test -z "$as_dir" && as_dir=.
9648    for ac_exec_ext in '' $ac_executable_extensions; do
9649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9650    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9652    break 2
9653  fi
9654done
9655  done
9656IFS=$as_save_IFS
9657
9658  ;;
9659esac
9660fi
9661MKTEMP=$ac_cv_path_MKTEMP
9662if test -n "$MKTEMP"; then
9663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9664$as_echo "$MKTEMP" >&6; }
9665else
9666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9667$as_echo "no" >&6; }
9668fi
9669
9670
9671          if test "x$MKTEMP" = x; then
9672            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9673          fi
9674        else
9675          # Otherwise we believe it is a complete path. Use it as it is.
9676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9677$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9678          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9679$as_echo_n "checking for MKTEMP... " >&6; }
9680          if test ! -x "$tool_specified"; then
9681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9682$as_echo "not found" >&6; }
9683            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9684          fi
9685          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9686$as_echo "$tool_specified" >&6; }
9687        fi
9688      fi
9689    fi
9690
9691  fi
9692
9693
9694
9695  if test "x$MKTEMP" = x; then
9696    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9697  fi
9698
9699
9700
9701
9702
9703  # Publish this variable in the help.
9704
9705
9706  if [ -z "${MV+x}" ]; then
9707    # The variable is not set by user, try to locate tool using the code snippet
9708    for ac_prog in mv
9709do
9710  # Extract the first word of "$ac_prog", so it can be a program name with args.
9711set dummy $ac_prog; ac_word=$2
9712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9713$as_echo_n "checking for $ac_word... " >&6; }
9714if ${ac_cv_path_MV+:} false; then :
9715  $as_echo_n "(cached) " >&6
9716else
9717  case $MV in
9718  [\\/]* | ?:[\\/]*)
9719  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9720  ;;
9721  *)
9722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9723for as_dir in $PATH
9724do
9725  IFS=$as_save_IFS
9726  test -z "$as_dir" && as_dir=.
9727    for ac_exec_ext in '' $ac_executable_extensions; do
9728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9729    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9731    break 2
9732  fi
9733done
9734  done
9735IFS=$as_save_IFS
9736
9737  ;;
9738esac
9739fi
9740MV=$ac_cv_path_MV
9741if test -n "$MV"; then
9742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9743$as_echo "$MV" >&6; }
9744else
9745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9746$as_echo "no" >&6; }
9747fi
9748
9749
9750  test -n "$MV" && break
9751done
9752
9753  else
9754    # The variable is set, but is it from the command line or the environment?
9755
9756    # Try to remove the string !MV! from our list.
9757    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9758    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9759      # If it failed, the variable was not from the command line. Ignore it,
9760      # but warn the user (except for BASH, which is always set by the calling BASH).
9761      if test "xMV" != xBASH; then
9762        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9763$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9764      fi
9765      # Try to locate tool using the code snippet
9766      for ac_prog in mv
9767do
9768  # Extract the first word of "$ac_prog", so it can be a program name with args.
9769set dummy $ac_prog; ac_word=$2
9770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9771$as_echo_n "checking for $ac_word... " >&6; }
9772if ${ac_cv_path_MV+:} false; then :
9773  $as_echo_n "(cached) " >&6
9774else
9775  case $MV in
9776  [\\/]* | ?:[\\/]*)
9777  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9778  ;;
9779  *)
9780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9781for as_dir in $PATH
9782do
9783  IFS=$as_save_IFS
9784  test -z "$as_dir" && as_dir=.
9785    for ac_exec_ext in '' $ac_executable_extensions; do
9786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9787    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9789    break 2
9790  fi
9791done
9792  done
9793IFS=$as_save_IFS
9794
9795  ;;
9796esac
9797fi
9798MV=$ac_cv_path_MV
9799if test -n "$MV"; then
9800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9801$as_echo "$MV" >&6; }
9802else
9803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9804$as_echo "no" >&6; }
9805fi
9806
9807
9808  test -n "$MV" && break
9809done
9810
9811    else
9812      # If it succeeded, then it was overridden by the user. We will use it
9813      # for the tool.
9814
9815      # First remove it from the list of overridden variables, so we can test
9816      # for unknown variables in the end.
9817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9818
9819      # Check if we try to supply an empty value
9820      if test "x$MV" = x; then
9821        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9822$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9823        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9824$as_echo_n "checking for MV... " >&6; }
9825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9826$as_echo "disabled" >&6; }
9827      else
9828        # Check if the provided tool contains a complete path.
9829        tool_specified="$MV"
9830        tool_basename="${tool_specified##*/}"
9831        if test "x$tool_basename" = "x$tool_specified"; then
9832          # A command without a complete path is provided, search $PATH.
9833          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9834$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9835          # Extract the first word of "$tool_basename", so it can be a program name with args.
9836set dummy $tool_basename; ac_word=$2
9837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9838$as_echo_n "checking for $ac_word... " >&6; }
9839if ${ac_cv_path_MV+:} false; then :
9840  $as_echo_n "(cached) " >&6
9841else
9842  case $MV in
9843  [\\/]* | ?:[\\/]*)
9844  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9845  ;;
9846  *)
9847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9848for as_dir in $PATH
9849do
9850  IFS=$as_save_IFS
9851  test -z "$as_dir" && as_dir=.
9852    for ac_exec_ext in '' $ac_executable_extensions; do
9853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9854    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9856    break 2
9857  fi
9858done
9859  done
9860IFS=$as_save_IFS
9861
9862  ;;
9863esac
9864fi
9865MV=$ac_cv_path_MV
9866if test -n "$MV"; then
9867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9868$as_echo "$MV" >&6; }
9869else
9870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9871$as_echo "no" >&6; }
9872fi
9873
9874
9875          if test "x$MV" = x; then
9876            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9877          fi
9878        else
9879          # Otherwise we believe it is a complete path. Use it as it is.
9880          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9881$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9882          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9883$as_echo_n "checking for MV... " >&6; }
9884          if test ! -x "$tool_specified"; then
9885            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9886$as_echo "not found" >&6; }
9887            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9888          fi
9889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9890$as_echo "$tool_specified" >&6; }
9891        fi
9892      fi
9893    fi
9894
9895  fi
9896
9897
9898
9899  if test "x$MV" = x; then
9900    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9901  fi
9902
9903
9904
9905
9906
9907  # Publish this variable in the help.
9908
9909
9910  if [ -z "${NAWK+x}" ]; then
9911    # The variable is not set by user, try to locate tool using the code snippet
9912    for ac_prog in nawk gawk awk
9913do
9914  # Extract the first word of "$ac_prog", so it can be a program name with args.
9915set dummy $ac_prog; ac_word=$2
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9917$as_echo_n "checking for $ac_word... " >&6; }
9918if ${ac_cv_path_NAWK+:} false; then :
9919  $as_echo_n "(cached) " >&6
9920else
9921  case $NAWK in
9922  [\\/]* | ?:[\\/]*)
9923  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9924  ;;
9925  *)
9926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9927for as_dir in $PATH
9928do
9929  IFS=$as_save_IFS
9930  test -z "$as_dir" && as_dir=.
9931    for ac_exec_ext in '' $ac_executable_extensions; do
9932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9933    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9935    break 2
9936  fi
9937done
9938  done
9939IFS=$as_save_IFS
9940
9941  ;;
9942esac
9943fi
9944NAWK=$ac_cv_path_NAWK
9945if test -n "$NAWK"; then
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9947$as_echo "$NAWK" >&6; }
9948else
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950$as_echo "no" >&6; }
9951fi
9952
9953
9954  test -n "$NAWK" && break
9955done
9956
9957  else
9958    # The variable is set, but is it from the command line or the environment?
9959
9960    # Try to remove the string !NAWK! from our list.
9961    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9962    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9963      # If it failed, the variable was not from the command line. Ignore it,
9964      # but warn the user (except for BASH, which is always set by the calling BASH).
9965      if test "xNAWK" != xBASH; then
9966        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9967$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9968      fi
9969      # Try to locate tool using the code snippet
9970      for ac_prog in nawk gawk awk
9971do
9972  # Extract the first word of "$ac_prog", so it can be a program name with args.
9973set dummy $ac_prog; ac_word=$2
9974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9975$as_echo_n "checking for $ac_word... " >&6; }
9976if ${ac_cv_path_NAWK+:} false; then :
9977  $as_echo_n "(cached) " >&6
9978else
9979  case $NAWK in
9980  [\\/]* | ?:[\\/]*)
9981  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9982  ;;
9983  *)
9984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9985for as_dir in $PATH
9986do
9987  IFS=$as_save_IFS
9988  test -z "$as_dir" && as_dir=.
9989    for ac_exec_ext in '' $ac_executable_extensions; do
9990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9991    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9993    break 2
9994  fi
9995done
9996  done
9997IFS=$as_save_IFS
9998
9999  ;;
10000esac
10001fi
10002NAWK=$ac_cv_path_NAWK
10003if test -n "$NAWK"; then
10004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10005$as_echo "$NAWK" >&6; }
10006else
10007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10008$as_echo "no" >&6; }
10009fi
10010
10011
10012  test -n "$NAWK" && break
10013done
10014
10015    else
10016      # If it succeeded, then it was overridden by the user. We will use it
10017      # for the tool.
10018
10019      # First remove it from the list of overridden variables, so we can test
10020      # for unknown variables in the end.
10021      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10022
10023      # Check if we try to supply an empty value
10024      if test "x$NAWK" = x; then
10025        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10026$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10028$as_echo_n "checking for NAWK... " >&6; }
10029        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10030$as_echo "disabled" >&6; }
10031      else
10032        # Check if the provided tool contains a complete path.
10033        tool_specified="$NAWK"
10034        tool_basename="${tool_specified##*/}"
10035        if test "x$tool_basename" = "x$tool_specified"; then
10036          # A command without a complete path is provided, search $PATH.
10037          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10038$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10039          # Extract the first word of "$tool_basename", so it can be a program name with args.
10040set dummy $tool_basename; ac_word=$2
10041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10042$as_echo_n "checking for $ac_word... " >&6; }
10043if ${ac_cv_path_NAWK+:} false; then :
10044  $as_echo_n "(cached) " >&6
10045else
10046  case $NAWK in
10047  [\\/]* | ?:[\\/]*)
10048  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10049  ;;
10050  *)
10051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10052for as_dir in $PATH
10053do
10054  IFS=$as_save_IFS
10055  test -z "$as_dir" && as_dir=.
10056    for ac_exec_ext in '' $ac_executable_extensions; do
10057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10058    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10060    break 2
10061  fi
10062done
10063  done
10064IFS=$as_save_IFS
10065
10066  ;;
10067esac
10068fi
10069NAWK=$ac_cv_path_NAWK
10070if test -n "$NAWK"; then
10071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10072$as_echo "$NAWK" >&6; }
10073else
10074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10075$as_echo "no" >&6; }
10076fi
10077
10078
10079          if test "x$NAWK" = x; then
10080            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10081          fi
10082        else
10083          # Otherwise we believe it is a complete path. Use it as it is.
10084          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10085$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10086          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10087$as_echo_n "checking for NAWK... " >&6; }
10088          if test ! -x "$tool_specified"; then
10089            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10090$as_echo "not found" >&6; }
10091            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10092          fi
10093          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10094$as_echo "$tool_specified" >&6; }
10095        fi
10096      fi
10097    fi
10098
10099  fi
10100
10101
10102
10103  if test "x$NAWK" = x; then
10104    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10105  fi
10106
10107
10108
10109
10110
10111  # Publish this variable in the help.
10112
10113
10114  if [ -z "${PRINTF+x}" ]; then
10115    # The variable is not set by user, try to locate tool using the code snippet
10116    for ac_prog in printf
10117do
10118  # Extract the first word of "$ac_prog", so it can be a program name with args.
10119set dummy $ac_prog; ac_word=$2
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10121$as_echo_n "checking for $ac_word... " >&6; }
10122if ${ac_cv_path_PRINTF+:} false; then :
10123  $as_echo_n "(cached) " >&6
10124else
10125  case $PRINTF in
10126  [\\/]* | ?:[\\/]*)
10127  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10128  ;;
10129  *)
10130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10131for as_dir in $PATH
10132do
10133  IFS=$as_save_IFS
10134  test -z "$as_dir" && as_dir=.
10135    for ac_exec_ext in '' $ac_executable_extensions; do
10136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10137    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10139    break 2
10140  fi
10141done
10142  done
10143IFS=$as_save_IFS
10144
10145  ;;
10146esac
10147fi
10148PRINTF=$ac_cv_path_PRINTF
10149if test -n "$PRINTF"; then
10150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10151$as_echo "$PRINTF" >&6; }
10152else
10153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10154$as_echo "no" >&6; }
10155fi
10156
10157
10158  test -n "$PRINTF" && break
10159done
10160
10161  else
10162    # The variable is set, but is it from the command line or the environment?
10163
10164    # Try to remove the string !PRINTF! from our list.
10165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10167      # If it failed, the variable was not from the command line. Ignore it,
10168      # but warn the user (except for BASH, which is always set by the calling BASH).
10169      if test "xPRINTF" != xBASH; then
10170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10171$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10172      fi
10173      # Try to locate tool using the code snippet
10174      for ac_prog in printf
10175do
10176  # Extract the first word of "$ac_prog", so it can be a program name with args.
10177set dummy $ac_prog; ac_word=$2
10178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10179$as_echo_n "checking for $ac_word... " >&6; }
10180if ${ac_cv_path_PRINTF+:} false; then :
10181  $as_echo_n "(cached) " >&6
10182else
10183  case $PRINTF in
10184  [\\/]* | ?:[\\/]*)
10185  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10186  ;;
10187  *)
10188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10189for as_dir in $PATH
10190do
10191  IFS=$as_save_IFS
10192  test -z "$as_dir" && as_dir=.
10193    for ac_exec_ext in '' $ac_executable_extensions; do
10194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10195    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10197    break 2
10198  fi
10199done
10200  done
10201IFS=$as_save_IFS
10202
10203  ;;
10204esac
10205fi
10206PRINTF=$ac_cv_path_PRINTF
10207if test -n "$PRINTF"; then
10208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10209$as_echo "$PRINTF" >&6; }
10210else
10211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10212$as_echo "no" >&6; }
10213fi
10214
10215
10216  test -n "$PRINTF" && break
10217done
10218
10219    else
10220      # If it succeeded, then it was overridden by the user. We will use it
10221      # for the tool.
10222
10223      # First remove it from the list of overridden variables, so we can test
10224      # for unknown variables in the end.
10225      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10226
10227      # Check if we try to supply an empty value
10228      if test "x$PRINTF" = x; then
10229        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10230$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10232$as_echo_n "checking for PRINTF... " >&6; }
10233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10234$as_echo "disabled" >&6; }
10235      else
10236        # Check if the provided tool contains a complete path.
10237        tool_specified="$PRINTF"
10238        tool_basename="${tool_specified##*/}"
10239        if test "x$tool_basename" = "x$tool_specified"; then
10240          # A command without a complete path is provided, search $PATH.
10241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10242$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10243          # Extract the first word of "$tool_basename", so it can be a program name with args.
10244set dummy $tool_basename; ac_word=$2
10245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10246$as_echo_n "checking for $ac_word... " >&6; }
10247if ${ac_cv_path_PRINTF+:} false; then :
10248  $as_echo_n "(cached) " >&6
10249else
10250  case $PRINTF in
10251  [\\/]* | ?:[\\/]*)
10252  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10253  ;;
10254  *)
10255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10256for as_dir in $PATH
10257do
10258  IFS=$as_save_IFS
10259  test -z "$as_dir" && as_dir=.
10260    for ac_exec_ext in '' $ac_executable_extensions; do
10261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10262    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10264    break 2
10265  fi
10266done
10267  done
10268IFS=$as_save_IFS
10269
10270  ;;
10271esac
10272fi
10273PRINTF=$ac_cv_path_PRINTF
10274if test -n "$PRINTF"; then
10275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10276$as_echo "$PRINTF" >&6; }
10277else
10278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10279$as_echo "no" >&6; }
10280fi
10281
10282
10283          if test "x$PRINTF" = x; then
10284            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10285          fi
10286        else
10287          # Otherwise we believe it is a complete path. Use it as it is.
10288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10289$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10290          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10291$as_echo_n "checking for PRINTF... " >&6; }
10292          if test ! -x "$tool_specified"; then
10293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10294$as_echo "not found" >&6; }
10295            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10296          fi
10297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10298$as_echo "$tool_specified" >&6; }
10299        fi
10300      fi
10301    fi
10302
10303  fi
10304
10305
10306
10307  if test "x$PRINTF" = x; then
10308    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10309  fi
10310
10311
10312
10313
10314
10315  # Publish this variable in the help.
10316
10317
10318  if [ -z "${RM+x}" ]; then
10319    # The variable is not set by user, try to locate tool using the code snippet
10320    for ac_prog in rm
10321do
10322  # Extract the first word of "$ac_prog", so it can be a program name with args.
10323set dummy $ac_prog; ac_word=$2
10324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10325$as_echo_n "checking for $ac_word... " >&6; }
10326if ${ac_cv_path_RM+:} false; then :
10327  $as_echo_n "(cached) " >&6
10328else
10329  case $RM in
10330  [\\/]* | ?:[\\/]*)
10331  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10332  ;;
10333  *)
10334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10335for as_dir in $PATH
10336do
10337  IFS=$as_save_IFS
10338  test -z "$as_dir" && as_dir=.
10339    for ac_exec_ext in '' $ac_executable_extensions; do
10340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10341    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10343    break 2
10344  fi
10345done
10346  done
10347IFS=$as_save_IFS
10348
10349  ;;
10350esac
10351fi
10352RM=$ac_cv_path_RM
10353if test -n "$RM"; then
10354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10355$as_echo "$RM" >&6; }
10356else
10357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10358$as_echo "no" >&6; }
10359fi
10360
10361
10362  test -n "$RM" && break
10363done
10364
10365  else
10366    # The variable is set, but is it from the command line or the environment?
10367
10368    # Try to remove the string !RM! from our list.
10369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10371      # If it failed, the variable was not from the command line. Ignore it,
10372      # but warn the user (except for BASH, which is always set by the calling BASH).
10373      if test "xRM" != xBASH; then
10374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10375$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10376      fi
10377      # Try to locate tool using the code snippet
10378      for ac_prog in rm
10379do
10380  # Extract the first word of "$ac_prog", so it can be a program name with args.
10381set dummy $ac_prog; ac_word=$2
10382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10383$as_echo_n "checking for $ac_word... " >&6; }
10384if ${ac_cv_path_RM+:} false; then :
10385  $as_echo_n "(cached) " >&6
10386else
10387  case $RM in
10388  [\\/]* | ?:[\\/]*)
10389  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10390  ;;
10391  *)
10392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10393for as_dir in $PATH
10394do
10395  IFS=$as_save_IFS
10396  test -z "$as_dir" && as_dir=.
10397    for ac_exec_ext in '' $ac_executable_extensions; do
10398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10399    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10401    break 2
10402  fi
10403done
10404  done
10405IFS=$as_save_IFS
10406
10407  ;;
10408esac
10409fi
10410RM=$ac_cv_path_RM
10411if test -n "$RM"; then
10412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10413$as_echo "$RM" >&6; }
10414else
10415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10416$as_echo "no" >&6; }
10417fi
10418
10419
10420  test -n "$RM" && break
10421done
10422
10423    else
10424      # If it succeeded, then it was overridden by the user. We will use it
10425      # for the tool.
10426
10427      # First remove it from the list of overridden variables, so we can test
10428      # for unknown variables in the end.
10429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10430
10431      # Check if we try to supply an empty value
10432      if test "x$RM" = x; then
10433        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10434$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10435        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10436$as_echo_n "checking for RM... " >&6; }
10437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10438$as_echo "disabled" >&6; }
10439      else
10440        # Check if the provided tool contains a complete path.
10441        tool_specified="$RM"
10442        tool_basename="${tool_specified##*/}"
10443        if test "x$tool_basename" = "x$tool_specified"; then
10444          # A command without a complete path is provided, search $PATH.
10445          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10446$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10447          # Extract the first word of "$tool_basename", so it can be a program name with args.
10448set dummy $tool_basename; ac_word=$2
10449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10450$as_echo_n "checking for $ac_word... " >&6; }
10451if ${ac_cv_path_RM+:} false; then :
10452  $as_echo_n "(cached) " >&6
10453else
10454  case $RM in
10455  [\\/]* | ?:[\\/]*)
10456  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10457  ;;
10458  *)
10459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10460for as_dir in $PATH
10461do
10462  IFS=$as_save_IFS
10463  test -z "$as_dir" && as_dir=.
10464    for ac_exec_ext in '' $ac_executable_extensions; do
10465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10466    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10468    break 2
10469  fi
10470done
10471  done
10472IFS=$as_save_IFS
10473
10474  ;;
10475esac
10476fi
10477RM=$ac_cv_path_RM
10478if test -n "$RM"; then
10479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10480$as_echo "$RM" >&6; }
10481else
10482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10483$as_echo "no" >&6; }
10484fi
10485
10486
10487          if test "x$RM" = x; then
10488            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10489          fi
10490        else
10491          # Otherwise we believe it is a complete path. Use it as it is.
10492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10493$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10494          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10495$as_echo_n "checking for RM... " >&6; }
10496          if test ! -x "$tool_specified"; then
10497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10498$as_echo "not found" >&6; }
10499            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10500          fi
10501          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10502$as_echo "$tool_specified" >&6; }
10503        fi
10504      fi
10505    fi
10506
10507  fi
10508
10509
10510
10511  if test "x$RM" = x; then
10512    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10513  fi
10514
10515
10516
10517
10518
10519  # Publish this variable in the help.
10520
10521
10522  if [ -z "${RMDIR+x}" ]; then
10523    # The variable is not set by user, try to locate tool using the code snippet
10524    for ac_prog in rmdir
10525do
10526  # Extract the first word of "$ac_prog", so it can be a program name with args.
10527set dummy $ac_prog; ac_word=$2
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10529$as_echo_n "checking for $ac_word... " >&6; }
10530if ${ac_cv_path_RMDIR+:} false; then :
10531  $as_echo_n "(cached) " >&6
10532else
10533  case $RMDIR in
10534  [\\/]* | ?:[\\/]*)
10535  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10536  ;;
10537  *)
10538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10539for as_dir in $PATH
10540do
10541  IFS=$as_save_IFS
10542  test -z "$as_dir" && as_dir=.
10543    for ac_exec_ext in '' $ac_executable_extensions; do
10544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10545    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10547    break 2
10548  fi
10549done
10550  done
10551IFS=$as_save_IFS
10552
10553  ;;
10554esac
10555fi
10556RMDIR=$ac_cv_path_RMDIR
10557if test -n "$RMDIR"; then
10558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10559$as_echo "$RMDIR" >&6; }
10560else
10561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562$as_echo "no" >&6; }
10563fi
10564
10565
10566  test -n "$RMDIR" && break
10567done
10568
10569  else
10570    # The variable is set, but is it from the command line or the environment?
10571
10572    # Try to remove the string !RMDIR! from our list.
10573    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10574    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10575      # If it failed, the variable was not from the command line. Ignore it,
10576      # but warn the user (except for BASH, which is always set by the calling BASH).
10577      if test "xRMDIR" != xBASH; then
10578        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10579$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10580      fi
10581      # Try to locate tool using the code snippet
10582      for ac_prog in rmdir
10583do
10584  # Extract the first word of "$ac_prog", so it can be a program name with args.
10585set dummy $ac_prog; ac_word=$2
10586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10587$as_echo_n "checking for $ac_word... " >&6; }
10588if ${ac_cv_path_RMDIR+:} false; then :
10589  $as_echo_n "(cached) " >&6
10590else
10591  case $RMDIR in
10592  [\\/]* | ?:[\\/]*)
10593  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10594  ;;
10595  *)
10596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10597for as_dir in $PATH
10598do
10599  IFS=$as_save_IFS
10600  test -z "$as_dir" && as_dir=.
10601    for ac_exec_ext in '' $ac_executable_extensions; do
10602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10603    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10605    break 2
10606  fi
10607done
10608  done
10609IFS=$as_save_IFS
10610
10611  ;;
10612esac
10613fi
10614RMDIR=$ac_cv_path_RMDIR
10615if test -n "$RMDIR"; then
10616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10617$as_echo "$RMDIR" >&6; }
10618else
10619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10620$as_echo "no" >&6; }
10621fi
10622
10623
10624  test -n "$RMDIR" && break
10625done
10626
10627    else
10628      # If it succeeded, then it was overridden by the user. We will use it
10629      # for the tool.
10630
10631      # First remove it from the list of overridden variables, so we can test
10632      # for unknown variables in the end.
10633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10634
10635      # Check if we try to supply an empty value
10636      if test "x$RMDIR" = x; then
10637        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10638$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10640$as_echo_n "checking for RMDIR... " >&6; }
10641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10642$as_echo "disabled" >&6; }
10643      else
10644        # Check if the provided tool contains a complete path.
10645        tool_specified="$RMDIR"
10646        tool_basename="${tool_specified##*/}"
10647        if test "x$tool_basename" = "x$tool_specified"; then
10648          # A command without a complete path is provided, search $PATH.
10649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10650$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10651          # Extract the first word of "$tool_basename", so it can be a program name with args.
10652set dummy $tool_basename; ac_word=$2
10653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10654$as_echo_n "checking for $ac_word... " >&6; }
10655if ${ac_cv_path_RMDIR+:} false; then :
10656  $as_echo_n "(cached) " >&6
10657else
10658  case $RMDIR in
10659  [\\/]* | ?:[\\/]*)
10660  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10661  ;;
10662  *)
10663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10664for as_dir in $PATH
10665do
10666  IFS=$as_save_IFS
10667  test -z "$as_dir" && as_dir=.
10668    for ac_exec_ext in '' $ac_executable_extensions; do
10669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10670    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10672    break 2
10673  fi
10674done
10675  done
10676IFS=$as_save_IFS
10677
10678  ;;
10679esac
10680fi
10681RMDIR=$ac_cv_path_RMDIR
10682if test -n "$RMDIR"; then
10683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10684$as_echo "$RMDIR" >&6; }
10685else
10686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10687$as_echo "no" >&6; }
10688fi
10689
10690
10691          if test "x$RMDIR" = x; then
10692            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10693          fi
10694        else
10695          # Otherwise we believe it is a complete path. Use it as it is.
10696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10697$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10698          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10699$as_echo_n "checking for RMDIR... " >&6; }
10700          if test ! -x "$tool_specified"; then
10701            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10702$as_echo "not found" >&6; }
10703            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10704          fi
10705          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10706$as_echo "$tool_specified" >&6; }
10707        fi
10708      fi
10709    fi
10710
10711  fi
10712
10713
10714
10715  if test "x$RMDIR" = x; then
10716    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10717  fi
10718
10719
10720
10721
10722
10723  # Publish this variable in the help.
10724
10725
10726  if [ -z "${SH+x}" ]; then
10727    # The variable is not set by user, try to locate tool using the code snippet
10728    for ac_prog in sh
10729do
10730  # Extract the first word of "$ac_prog", so it can be a program name with args.
10731set dummy $ac_prog; ac_word=$2
10732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10733$as_echo_n "checking for $ac_word... " >&6; }
10734if ${ac_cv_path_SH+:} false; then :
10735  $as_echo_n "(cached) " >&6
10736else
10737  case $SH in
10738  [\\/]* | ?:[\\/]*)
10739  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10740  ;;
10741  *)
10742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10743for as_dir in $PATH
10744do
10745  IFS=$as_save_IFS
10746  test -z "$as_dir" && as_dir=.
10747    for ac_exec_ext in '' $ac_executable_extensions; do
10748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10749    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10751    break 2
10752  fi
10753done
10754  done
10755IFS=$as_save_IFS
10756
10757  ;;
10758esac
10759fi
10760SH=$ac_cv_path_SH
10761if test -n "$SH"; then
10762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10763$as_echo "$SH" >&6; }
10764else
10765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10766$as_echo "no" >&6; }
10767fi
10768
10769
10770  test -n "$SH" && break
10771done
10772
10773  else
10774    # The variable is set, but is it from the command line or the environment?
10775
10776    # Try to remove the string !SH! from our list.
10777    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10778    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10779      # If it failed, the variable was not from the command line. Ignore it,
10780      # but warn the user (except for BASH, which is always set by the calling BASH).
10781      if test "xSH" != xBASH; then
10782        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10783$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10784      fi
10785      # Try to locate tool using the code snippet
10786      for ac_prog in sh
10787do
10788  # Extract the first word of "$ac_prog", so it can be a program name with args.
10789set dummy $ac_prog; ac_word=$2
10790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10791$as_echo_n "checking for $ac_word... " >&6; }
10792if ${ac_cv_path_SH+:} false; then :
10793  $as_echo_n "(cached) " >&6
10794else
10795  case $SH in
10796  [\\/]* | ?:[\\/]*)
10797  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10798  ;;
10799  *)
10800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10801for as_dir in $PATH
10802do
10803  IFS=$as_save_IFS
10804  test -z "$as_dir" && as_dir=.
10805    for ac_exec_ext in '' $ac_executable_extensions; do
10806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10807    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10809    break 2
10810  fi
10811done
10812  done
10813IFS=$as_save_IFS
10814
10815  ;;
10816esac
10817fi
10818SH=$ac_cv_path_SH
10819if test -n "$SH"; then
10820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10821$as_echo "$SH" >&6; }
10822else
10823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10824$as_echo "no" >&6; }
10825fi
10826
10827
10828  test -n "$SH" && break
10829done
10830
10831    else
10832      # If it succeeded, then it was overridden by the user. We will use it
10833      # for the tool.
10834
10835      # First remove it from the list of overridden variables, so we can test
10836      # for unknown variables in the end.
10837      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10838
10839      # Check if we try to supply an empty value
10840      if test "x$SH" = x; then
10841        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10842$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10844$as_echo_n "checking for SH... " >&6; }
10845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10846$as_echo "disabled" >&6; }
10847      else
10848        # Check if the provided tool contains a complete path.
10849        tool_specified="$SH"
10850        tool_basename="${tool_specified##*/}"
10851        if test "x$tool_basename" = "x$tool_specified"; then
10852          # A command without a complete path is provided, search $PATH.
10853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10854$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10855          # Extract the first word of "$tool_basename", so it can be a program name with args.
10856set dummy $tool_basename; ac_word=$2
10857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10858$as_echo_n "checking for $ac_word... " >&6; }
10859if ${ac_cv_path_SH+:} false; then :
10860  $as_echo_n "(cached) " >&6
10861else
10862  case $SH in
10863  [\\/]* | ?:[\\/]*)
10864  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10865  ;;
10866  *)
10867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10868for as_dir in $PATH
10869do
10870  IFS=$as_save_IFS
10871  test -z "$as_dir" && as_dir=.
10872    for ac_exec_ext in '' $ac_executable_extensions; do
10873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10874    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10876    break 2
10877  fi
10878done
10879  done
10880IFS=$as_save_IFS
10881
10882  ;;
10883esac
10884fi
10885SH=$ac_cv_path_SH
10886if test -n "$SH"; then
10887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10888$as_echo "$SH" >&6; }
10889else
10890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10891$as_echo "no" >&6; }
10892fi
10893
10894
10895          if test "x$SH" = x; then
10896            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10897          fi
10898        else
10899          # Otherwise we believe it is a complete path. Use it as it is.
10900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10901$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10902          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10903$as_echo_n "checking for SH... " >&6; }
10904          if test ! -x "$tool_specified"; then
10905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10906$as_echo "not found" >&6; }
10907            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10908          fi
10909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10910$as_echo "$tool_specified" >&6; }
10911        fi
10912      fi
10913    fi
10914
10915  fi
10916
10917
10918
10919  if test "x$SH" = x; then
10920    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10921  fi
10922
10923
10924
10925
10926
10927  # Publish this variable in the help.
10928
10929
10930  if [ -z "${SORT+x}" ]; then
10931    # The variable is not set by user, try to locate tool using the code snippet
10932    for ac_prog in sort
10933do
10934  # Extract the first word of "$ac_prog", so it can be a program name with args.
10935set dummy $ac_prog; ac_word=$2
10936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10937$as_echo_n "checking for $ac_word... " >&6; }
10938if ${ac_cv_path_SORT+:} false; then :
10939  $as_echo_n "(cached) " >&6
10940else
10941  case $SORT in
10942  [\\/]* | ?:[\\/]*)
10943  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10944  ;;
10945  *)
10946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10947for as_dir in $PATH
10948do
10949  IFS=$as_save_IFS
10950  test -z "$as_dir" && as_dir=.
10951    for ac_exec_ext in '' $ac_executable_extensions; do
10952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10953    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10955    break 2
10956  fi
10957done
10958  done
10959IFS=$as_save_IFS
10960
10961  ;;
10962esac
10963fi
10964SORT=$ac_cv_path_SORT
10965if test -n "$SORT"; then
10966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10967$as_echo "$SORT" >&6; }
10968else
10969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
10971fi
10972
10973
10974  test -n "$SORT" && break
10975done
10976
10977  else
10978    # The variable is set, but is it from the command line or the environment?
10979
10980    # Try to remove the string !SORT! from our list.
10981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10983      # If it failed, the variable was not from the command line. Ignore it,
10984      # but warn the user (except for BASH, which is always set by the calling BASH).
10985      if test "xSORT" != xBASH; then
10986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10987$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10988      fi
10989      # Try to locate tool using the code snippet
10990      for ac_prog in sort
10991do
10992  # Extract the first word of "$ac_prog", so it can be a program name with args.
10993set dummy $ac_prog; ac_word=$2
10994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10995$as_echo_n "checking for $ac_word... " >&6; }
10996if ${ac_cv_path_SORT+:} false; then :
10997  $as_echo_n "(cached) " >&6
10998else
10999  case $SORT in
11000  [\\/]* | ?:[\\/]*)
11001  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11002  ;;
11003  *)
11004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11005for as_dir in $PATH
11006do
11007  IFS=$as_save_IFS
11008  test -z "$as_dir" && as_dir=.
11009    for ac_exec_ext in '' $ac_executable_extensions; do
11010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11011    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11013    break 2
11014  fi
11015done
11016  done
11017IFS=$as_save_IFS
11018
11019  ;;
11020esac
11021fi
11022SORT=$ac_cv_path_SORT
11023if test -n "$SORT"; then
11024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11025$as_echo "$SORT" >&6; }
11026else
11027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11028$as_echo "no" >&6; }
11029fi
11030
11031
11032  test -n "$SORT" && break
11033done
11034
11035    else
11036      # If it succeeded, then it was overridden by the user. We will use it
11037      # for the tool.
11038
11039      # First remove it from the list of overridden variables, so we can test
11040      # for unknown variables in the end.
11041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11042
11043      # Check if we try to supply an empty value
11044      if test "x$SORT" = x; then
11045        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11046$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11048$as_echo_n "checking for SORT... " >&6; }
11049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11050$as_echo "disabled" >&6; }
11051      else
11052        # Check if the provided tool contains a complete path.
11053        tool_specified="$SORT"
11054        tool_basename="${tool_specified##*/}"
11055        if test "x$tool_basename" = "x$tool_specified"; then
11056          # A command without a complete path is provided, search $PATH.
11057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11058$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11059          # Extract the first word of "$tool_basename", so it can be a program name with args.
11060set dummy $tool_basename; ac_word=$2
11061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11062$as_echo_n "checking for $ac_word... " >&6; }
11063if ${ac_cv_path_SORT+:} false; then :
11064  $as_echo_n "(cached) " >&6
11065else
11066  case $SORT in
11067  [\\/]* | ?:[\\/]*)
11068  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11069  ;;
11070  *)
11071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11072for as_dir in $PATH
11073do
11074  IFS=$as_save_IFS
11075  test -z "$as_dir" && as_dir=.
11076    for ac_exec_ext in '' $ac_executable_extensions; do
11077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11078    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11080    break 2
11081  fi
11082done
11083  done
11084IFS=$as_save_IFS
11085
11086  ;;
11087esac
11088fi
11089SORT=$ac_cv_path_SORT
11090if test -n "$SORT"; then
11091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11092$as_echo "$SORT" >&6; }
11093else
11094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11095$as_echo "no" >&6; }
11096fi
11097
11098
11099          if test "x$SORT" = x; then
11100            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11101          fi
11102        else
11103          # Otherwise we believe it is a complete path. Use it as it is.
11104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11105$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11106          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11107$as_echo_n "checking for SORT... " >&6; }
11108          if test ! -x "$tool_specified"; then
11109            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11110$as_echo "not found" >&6; }
11111            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11112          fi
11113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11114$as_echo "$tool_specified" >&6; }
11115        fi
11116      fi
11117    fi
11118
11119  fi
11120
11121
11122
11123  if test "x$SORT" = x; then
11124    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11125  fi
11126
11127
11128
11129
11130
11131  # Publish this variable in the help.
11132
11133
11134  if [ -z "${TAIL+x}" ]; then
11135    # The variable is not set by user, try to locate tool using the code snippet
11136    for ac_prog in tail
11137do
11138  # Extract the first word of "$ac_prog", so it can be a program name with args.
11139set dummy $ac_prog; ac_word=$2
11140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11141$as_echo_n "checking for $ac_word... " >&6; }
11142if ${ac_cv_path_TAIL+:} false; then :
11143  $as_echo_n "(cached) " >&6
11144else
11145  case $TAIL in
11146  [\\/]* | ?:[\\/]*)
11147  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11148  ;;
11149  *)
11150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11151for as_dir in $PATH
11152do
11153  IFS=$as_save_IFS
11154  test -z "$as_dir" && as_dir=.
11155    for ac_exec_ext in '' $ac_executable_extensions; do
11156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11157    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11159    break 2
11160  fi
11161done
11162  done
11163IFS=$as_save_IFS
11164
11165  ;;
11166esac
11167fi
11168TAIL=$ac_cv_path_TAIL
11169if test -n "$TAIL"; then
11170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11171$as_echo "$TAIL" >&6; }
11172else
11173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11174$as_echo "no" >&6; }
11175fi
11176
11177
11178  test -n "$TAIL" && break
11179done
11180
11181  else
11182    # The variable is set, but is it from the command line or the environment?
11183
11184    # Try to remove the string !TAIL! from our list.
11185    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11186    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11187      # If it failed, the variable was not from the command line. Ignore it,
11188      # but warn the user (except for BASH, which is always set by the calling BASH).
11189      if test "xTAIL" != xBASH; then
11190        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11191$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11192      fi
11193      # Try to locate tool using the code snippet
11194      for ac_prog in tail
11195do
11196  # Extract the first word of "$ac_prog", so it can be a program name with args.
11197set dummy $ac_prog; ac_word=$2
11198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11199$as_echo_n "checking for $ac_word... " >&6; }
11200if ${ac_cv_path_TAIL+:} false; then :
11201  $as_echo_n "(cached) " >&6
11202else
11203  case $TAIL in
11204  [\\/]* | ?:[\\/]*)
11205  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11206  ;;
11207  *)
11208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11209for as_dir in $PATH
11210do
11211  IFS=$as_save_IFS
11212  test -z "$as_dir" && as_dir=.
11213    for ac_exec_ext in '' $ac_executable_extensions; do
11214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11215    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11217    break 2
11218  fi
11219done
11220  done
11221IFS=$as_save_IFS
11222
11223  ;;
11224esac
11225fi
11226TAIL=$ac_cv_path_TAIL
11227if test -n "$TAIL"; then
11228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11229$as_echo "$TAIL" >&6; }
11230else
11231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11232$as_echo "no" >&6; }
11233fi
11234
11235
11236  test -n "$TAIL" && break
11237done
11238
11239    else
11240      # If it succeeded, then it was overridden by the user. We will use it
11241      # for the tool.
11242
11243      # First remove it from the list of overridden variables, so we can test
11244      # for unknown variables in the end.
11245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11246
11247      # Check if we try to supply an empty value
11248      if test "x$TAIL" = x; then
11249        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11250$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11251        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11252$as_echo_n "checking for TAIL... " >&6; }
11253        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11254$as_echo "disabled" >&6; }
11255      else
11256        # Check if the provided tool contains a complete path.
11257        tool_specified="$TAIL"
11258        tool_basename="${tool_specified##*/}"
11259        if test "x$tool_basename" = "x$tool_specified"; then
11260          # A command without a complete path is provided, search $PATH.
11261          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11262$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11263          # Extract the first word of "$tool_basename", so it can be a program name with args.
11264set dummy $tool_basename; ac_word=$2
11265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11266$as_echo_n "checking for $ac_word... " >&6; }
11267if ${ac_cv_path_TAIL+:} false; then :
11268  $as_echo_n "(cached) " >&6
11269else
11270  case $TAIL in
11271  [\\/]* | ?:[\\/]*)
11272  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11273  ;;
11274  *)
11275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11276for as_dir in $PATH
11277do
11278  IFS=$as_save_IFS
11279  test -z "$as_dir" && as_dir=.
11280    for ac_exec_ext in '' $ac_executable_extensions; do
11281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11282    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11284    break 2
11285  fi
11286done
11287  done
11288IFS=$as_save_IFS
11289
11290  ;;
11291esac
11292fi
11293TAIL=$ac_cv_path_TAIL
11294if test -n "$TAIL"; then
11295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11296$as_echo "$TAIL" >&6; }
11297else
11298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11299$as_echo "no" >&6; }
11300fi
11301
11302
11303          if test "x$TAIL" = x; then
11304            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11305          fi
11306        else
11307          # Otherwise we believe it is a complete path. Use it as it is.
11308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11309$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11310          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11311$as_echo_n "checking for TAIL... " >&6; }
11312          if test ! -x "$tool_specified"; then
11313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11314$as_echo "not found" >&6; }
11315            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11316          fi
11317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11318$as_echo "$tool_specified" >&6; }
11319        fi
11320      fi
11321    fi
11322
11323  fi
11324
11325
11326
11327  if test "x$TAIL" = x; then
11328    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11329  fi
11330
11331
11332
11333
11334
11335  # Publish this variable in the help.
11336
11337
11338  if [ -z "${TAR+x}" ]; then
11339    # The variable is not set by user, try to locate tool using the code snippet
11340    for ac_prog in gtar tar
11341do
11342  # Extract the first word of "$ac_prog", so it can be a program name with args.
11343set dummy $ac_prog; ac_word=$2
11344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11345$as_echo_n "checking for $ac_word... " >&6; }
11346if ${ac_cv_path_TAR+:} false; then :
11347  $as_echo_n "(cached) " >&6
11348else
11349  case $TAR in
11350  [\\/]* | ?:[\\/]*)
11351  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11352  ;;
11353  *)
11354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11355for as_dir in $PATH
11356do
11357  IFS=$as_save_IFS
11358  test -z "$as_dir" && as_dir=.
11359    for ac_exec_ext in '' $ac_executable_extensions; do
11360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11361    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11363    break 2
11364  fi
11365done
11366  done
11367IFS=$as_save_IFS
11368
11369  ;;
11370esac
11371fi
11372TAR=$ac_cv_path_TAR
11373if test -n "$TAR"; then
11374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11375$as_echo "$TAR" >&6; }
11376else
11377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11378$as_echo "no" >&6; }
11379fi
11380
11381
11382  test -n "$TAR" && break
11383done
11384
11385  else
11386    # The variable is set, but is it from the command line or the environment?
11387
11388    # Try to remove the string !TAR! from our list.
11389    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11390    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11391      # If it failed, the variable was not from the command line. Ignore it,
11392      # but warn the user (except for BASH, which is always set by the calling BASH).
11393      if test "xTAR" != xBASH; then
11394        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11395$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11396      fi
11397      # Try to locate tool using the code snippet
11398      for ac_prog in gtar tar
11399do
11400  # Extract the first word of "$ac_prog", so it can be a program name with args.
11401set dummy $ac_prog; ac_word=$2
11402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11403$as_echo_n "checking for $ac_word... " >&6; }
11404if ${ac_cv_path_TAR+:} false; then :
11405  $as_echo_n "(cached) " >&6
11406else
11407  case $TAR in
11408  [\\/]* | ?:[\\/]*)
11409  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11410  ;;
11411  *)
11412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11413for as_dir in $PATH
11414do
11415  IFS=$as_save_IFS
11416  test -z "$as_dir" && as_dir=.
11417    for ac_exec_ext in '' $ac_executable_extensions; do
11418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11419    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11421    break 2
11422  fi
11423done
11424  done
11425IFS=$as_save_IFS
11426
11427  ;;
11428esac
11429fi
11430TAR=$ac_cv_path_TAR
11431if test -n "$TAR"; then
11432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11433$as_echo "$TAR" >&6; }
11434else
11435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11436$as_echo "no" >&6; }
11437fi
11438
11439
11440  test -n "$TAR" && break
11441done
11442
11443    else
11444      # If it succeeded, then it was overridden by the user. We will use it
11445      # for the tool.
11446
11447      # First remove it from the list of overridden variables, so we can test
11448      # for unknown variables in the end.
11449      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11450
11451      # Check if we try to supply an empty value
11452      if test "x$TAR" = x; then
11453        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11454$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11456$as_echo_n "checking for TAR... " >&6; }
11457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11458$as_echo "disabled" >&6; }
11459      else
11460        # Check if the provided tool contains a complete path.
11461        tool_specified="$TAR"
11462        tool_basename="${tool_specified##*/}"
11463        if test "x$tool_basename" = "x$tool_specified"; then
11464          # A command without a complete path is provided, search $PATH.
11465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11466$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11467          # Extract the first word of "$tool_basename", so it can be a program name with args.
11468set dummy $tool_basename; ac_word=$2
11469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11470$as_echo_n "checking for $ac_word... " >&6; }
11471if ${ac_cv_path_TAR+:} false; then :
11472  $as_echo_n "(cached) " >&6
11473else
11474  case $TAR in
11475  [\\/]* | ?:[\\/]*)
11476  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11477  ;;
11478  *)
11479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11480for as_dir in $PATH
11481do
11482  IFS=$as_save_IFS
11483  test -z "$as_dir" && as_dir=.
11484    for ac_exec_ext in '' $ac_executable_extensions; do
11485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11486    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11488    break 2
11489  fi
11490done
11491  done
11492IFS=$as_save_IFS
11493
11494  ;;
11495esac
11496fi
11497TAR=$ac_cv_path_TAR
11498if test -n "$TAR"; then
11499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11500$as_echo "$TAR" >&6; }
11501else
11502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11503$as_echo "no" >&6; }
11504fi
11505
11506
11507          if test "x$TAR" = x; then
11508            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11509          fi
11510        else
11511          # Otherwise we believe it is a complete path. Use it as it is.
11512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11513$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11514          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11515$as_echo_n "checking for TAR... " >&6; }
11516          if test ! -x "$tool_specified"; then
11517            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11518$as_echo "not found" >&6; }
11519            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11520          fi
11521          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11522$as_echo "$tool_specified" >&6; }
11523        fi
11524      fi
11525    fi
11526
11527  fi
11528
11529
11530
11531  if test "x$TAR" = x; then
11532    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11533  fi
11534
11535
11536
11537
11538
11539  # Publish this variable in the help.
11540
11541
11542  if [ -z "${TEE+x}" ]; then
11543    # The variable is not set by user, try to locate tool using the code snippet
11544    for ac_prog in tee
11545do
11546  # Extract the first word of "$ac_prog", so it can be a program name with args.
11547set dummy $ac_prog; ac_word=$2
11548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11549$as_echo_n "checking for $ac_word... " >&6; }
11550if ${ac_cv_path_TEE+:} false; then :
11551  $as_echo_n "(cached) " >&6
11552else
11553  case $TEE in
11554  [\\/]* | ?:[\\/]*)
11555  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11556  ;;
11557  *)
11558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11559for as_dir in $PATH
11560do
11561  IFS=$as_save_IFS
11562  test -z "$as_dir" && as_dir=.
11563    for ac_exec_ext in '' $ac_executable_extensions; do
11564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11565    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11567    break 2
11568  fi
11569done
11570  done
11571IFS=$as_save_IFS
11572
11573  ;;
11574esac
11575fi
11576TEE=$ac_cv_path_TEE
11577if test -n "$TEE"; then
11578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11579$as_echo "$TEE" >&6; }
11580else
11581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582$as_echo "no" >&6; }
11583fi
11584
11585
11586  test -n "$TEE" && break
11587done
11588
11589  else
11590    # The variable is set, but is it from the command line or the environment?
11591
11592    # Try to remove the string !TEE! from our list.
11593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11595      # If it failed, the variable was not from the command line. Ignore it,
11596      # but warn the user (except for BASH, which is always set by the calling BASH).
11597      if test "xTEE" != xBASH; then
11598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11599$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11600      fi
11601      # Try to locate tool using the code snippet
11602      for ac_prog in tee
11603do
11604  # Extract the first word of "$ac_prog", so it can be a program name with args.
11605set dummy $ac_prog; ac_word=$2
11606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11607$as_echo_n "checking for $ac_word... " >&6; }
11608if ${ac_cv_path_TEE+:} false; then :
11609  $as_echo_n "(cached) " >&6
11610else
11611  case $TEE in
11612  [\\/]* | ?:[\\/]*)
11613  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11614  ;;
11615  *)
11616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11617for as_dir in $PATH
11618do
11619  IFS=$as_save_IFS
11620  test -z "$as_dir" && as_dir=.
11621    for ac_exec_ext in '' $ac_executable_extensions; do
11622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11623    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11625    break 2
11626  fi
11627done
11628  done
11629IFS=$as_save_IFS
11630
11631  ;;
11632esac
11633fi
11634TEE=$ac_cv_path_TEE
11635if test -n "$TEE"; then
11636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11637$as_echo "$TEE" >&6; }
11638else
11639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11640$as_echo "no" >&6; }
11641fi
11642
11643
11644  test -n "$TEE" && break
11645done
11646
11647    else
11648      # If it succeeded, then it was overridden by the user. We will use it
11649      # for the tool.
11650
11651      # First remove it from the list of overridden variables, so we can test
11652      # for unknown variables in the end.
11653      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11654
11655      # Check if we try to supply an empty value
11656      if test "x$TEE" = x; then
11657        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11658$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11659        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11660$as_echo_n "checking for TEE... " >&6; }
11661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11662$as_echo "disabled" >&6; }
11663      else
11664        # Check if the provided tool contains a complete path.
11665        tool_specified="$TEE"
11666        tool_basename="${tool_specified##*/}"
11667        if test "x$tool_basename" = "x$tool_specified"; then
11668          # A command without a complete path is provided, search $PATH.
11669          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11670$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11671          # Extract the first word of "$tool_basename", so it can be a program name with args.
11672set dummy $tool_basename; ac_word=$2
11673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11674$as_echo_n "checking for $ac_word... " >&6; }
11675if ${ac_cv_path_TEE+:} false; then :
11676  $as_echo_n "(cached) " >&6
11677else
11678  case $TEE in
11679  [\\/]* | ?:[\\/]*)
11680  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11681  ;;
11682  *)
11683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11684for as_dir in $PATH
11685do
11686  IFS=$as_save_IFS
11687  test -z "$as_dir" && as_dir=.
11688    for ac_exec_ext in '' $ac_executable_extensions; do
11689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11690    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11692    break 2
11693  fi
11694done
11695  done
11696IFS=$as_save_IFS
11697
11698  ;;
11699esac
11700fi
11701TEE=$ac_cv_path_TEE
11702if test -n "$TEE"; then
11703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11704$as_echo "$TEE" >&6; }
11705else
11706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11707$as_echo "no" >&6; }
11708fi
11709
11710
11711          if test "x$TEE" = x; then
11712            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11713          fi
11714        else
11715          # Otherwise we believe it is a complete path. Use it as it is.
11716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11717$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11718          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11719$as_echo_n "checking for TEE... " >&6; }
11720          if test ! -x "$tool_specified"; then
11721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11722$as_echo "not found" >&6; }
11723            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11724          fi
11725          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11726$as_echo "$tool_specified" >&6; }
11727        fi
11728      fi
11729    fi
11730
11731  fi
11732
11733
11734
11735  if test "x$TEE" = x; then
11736    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11737  fi
11738
11739
11740
11741
11742
11743  # Publish this variable in the help.
11744
11745
11746  if [ -z "${TOUCH+x}" ]; then
11747    # The variable is not set by user, try to locate tool using the code snippet
11748    for ac_prog in touch
11749do
11750  # Extract the first word of "$ac_prog", so it can be a program name with args.
11751set dummy $ac_prog; ac_word=$2
11752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11753$as_echo_n "checking for $ac_word... " >&6; }
11754if ${ac_cv_path_TOUCH+:} false; then :
11755  $as_echo_n "(cached) " >&6
11756else
11757  case $TOUCH in
11758  [\\/]* | ?:[\\/]*)
11759  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11760  ;;
11761  *)
11762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11763for as_dir in $PATH
11764do
11765  IFS=$as_save_IFS
11766  test -z "$as_dir" && as_dir=.
11767    for ac_exec_ext in '' $ac_executable_extensions; do
11768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11769    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11771    break 2
11772  fi
11773done
11774  done
11775IFS=$as_save_IFS
11776
11777  ;;
11778esac
11779fi
11780TOUCH=$ac_cv_path_TOUCH
11781if test -n "$TOUCH"; then
11782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11783$as_echo "$TOUCH" >&6; }
11784else
11785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11786$as_echo "no" >&6; }
11787fi
11788
11789
11790  test -n "$TOUCH" && break
11791done
11792
11793  else
11794    # The variable is set, but is it from the command line or the environment?
11795
11796    # Try to remove the string !TOUCH! from our list.
11797    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11798    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11799      # If it failed, the variable was not from the command line. Ignore it,
11800      # but warn the user (except for BASH, which is always set by the calling BASH).
11801      if test "xTOUCH" != xBASH; then
11802        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11803$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11804      fi
11805      # Try to locate tool using the code snippet
11806      for ac_prog in touch
11807do
11808  # Extract the first word of "$ac_prog", so it can be a program name with args.
11809set dummy $ac_prog; ac_word=$2
11810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11811$as_echo_n "checking for $ac_word... " >&6; }
11812if ${ac_cv_path_TOUCH+:} false; then :
11813  $as_echo_n "(cached) " >&6
11814else
11815  case $TOUCH in
11816  [\\/]* | ?:[\\/]*)
11817  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11818  ;;
11819  *)
11820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11821for as_dir in $PATH
11822do
11823  IFS=$as_save_IFS
11824  test -z "$as_dir" && as_dir=.
11825    for ac_exec_ext in '' $ac_executable_extensions; do
11826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11827    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11829    break 2
11830  fi
11831done
11832  done
11833IFS=$as_save_IFS
11834
11835  ;;
11836esac
11837fi
11838TOUCH=$ac_cv_path_TOUCH
11839if test -n "$TOUCH"; then
11840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11841$as_echo "$TOUCH" >&6; }
11842else
11843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11844$as_echo "no" >&6; }
11845fi
11846
11847
11848  test -n "$TOUCH" && break
11849done
11850
11851    else
11852      # If it succeeded, then it was overridden by the user. We will use it
11853      # for the tool.
11854
11855      # First remove it from the list of overridden variables, so we can test
11856      # for unknown variables in the end.
11857      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11858
11859      # Check if we try to supply an empty value
11860      if test "x$TOUCH" = x; then
11861        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11862$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11863        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11864$as_echo_n "checking for TOUCH... " >&6; }
11865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11866$as_echo "disabled" >&6; }
11867      else
11868        # Check if the provided tool contains a complete path.
11869        tool_specified="$TOUCH"
11870        tool_basename="${tool_specified##*/}"
11871        if test "x$tool_basename" = "x$tool_specified"; then
11872          # A command without a complete path is provided, search $PATH.
11873          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11874$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11875          # Extract the first word of "$tool_basename", so it can be a program name with args.
11876set dummy $tool_basename; ac_word=$2
11877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11878$as_echo_n "checking for $ac_word... " >&6; }
11879if ${ac_cv_path_TOUCH+:} false; then :
11880  $as_echo_n "(cached) " >&6
11881else
11882  case $TOUCH in
11883  [\\/]* | ?:[\\/]*)
11884  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11885  ;;
11886  *)
11887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11888for as_dir in $PATH
11889do
11890  IFS=$as_save_IFS
11891  test -z "$as_dir" && as_dir=.
11892    for ac_exec_ext in '' $ac_executable_extensions; do
11893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11894    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11896    break 2
11897  fi
11898done
11899  done
11900IFS=$as_save_IFS
11901
11902  ;;
11903esac
11904fi
11905TOUCH=$ac_cv_path_TOUCH
11906if test -n "$TOUCH"; then
11907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11908$as_echo "$TOUCH" >&6; }
11909else
11910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11911$as_echo "no" >&6; }
11912fi
11913
11914
11915          if test "x$TOUCH" = x; then
11916            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11917          fi
11918        else
11919          # Otherwise we believe it is a complete path. Use it as it is.
11920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11921$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11922          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11923$as_echo_n "checking for TOUCH... " >&6; }
11924          if test ! -x "$tool_specified"; then
11925            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11926$as_echo "not found" >&6; }
11927            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11928          fi
11929          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11930$as_echo "$tool_specified" >&6; }
11931        fi
11932      fi
11933    fi
11934
11935  fi
11936
11937
11938
11939  if test "x$TOUCH" = x; then
11940    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11941  fi
11942
11943
11944
11945
11946
11947  # Publish this variable in the help.
11948
11949
11950  if [ -z "${TR+x}" ]; then
11951    # The variable is not set by user, try to locate tool using the code snippet
11952    for ac_prog in tr
11953do
11954  # Extract the first word of "$ac_prog", so it can be a program name with args.
11955set dummy $ac_prog; ac_word=$2
11956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11957$as_echo_n "checking for $ac_word... " >&6; }
11958if ${ac_cv_path_TR+:} false; then :
11959  $as_echo_n "(cached) " >&6
11960else
11961  case $TR in
11962  [\\/]* | ?:[\\/]*)
11963  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11964  ;;
11965  *)
11966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11967for as_dir in $PATH
11968do
11969  IFS=$as_save_IFS
11970  test -z "$as_dir" && as_dir=.
11971    for ac_exec_ext in '' $ac_executable_extensions; do
11972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11973    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11975    break 2
11976  fi
11977done
11978  done
11979IFS=$as_save_IFS
11980
11981  ;;
11982esac
11983fi
11984TR=$ac_cv_path_TR
11985if test -n "$TR"; then
11986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11987$as_echo "$TR" >&6; }
11988else
11989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990$as_echo "no" >&6; }
11991fi
11992
11993
11994  test -n "$TR" && break
11995done
11996
11997  else
11998    # The variable is set, but is it from the command line or the environment?
11999
12000    # Try to remove the string !TR! from our list.
12001    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12002    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12003      # If it failed, the variable was not from the command line. Ignore it,
12004      # but warn the user (except for BASH, which is always set by the calling BASH).
12005      if test "xTR" != xBASH; then
12006        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12007$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12008      fi
12009      # Try to locate tool using the code snippet
12010      for ac_prog in tr
12011do
12012  # Extract the first word of "$ac_prog", so it can be a program name with args.
12013set dummy $ac_prog; ac_word=$2
12014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12015$as_echo_n "checking for $ac_word... " >&6; }
12016if ${ac_cv_path_TR+:} false; then :
12017  $as_echo_n "(cached) " >&6
12018else
12019  case $TR in
12020  [\\/]* | ?:[\\/]*)
12021  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12022  ;;
12023  *)
12024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12025for as_dir in $PATH
12026do
12027  IFS=$as_save_IFS
12028  test -z "$as_dir" && as_dir=.
12029    for ac_exec_ext in '' $ac_executable_extensions; do
12030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12031    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12033    break 2
12034  fi
12035done
12036  done
12037IFS=$as_save_IFS
12038
12039  ;;
12040esac
12041fi
12042TR=$ac_cv_path_TR
12043if test -n "$TR"; then
12044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12045$as_echo "$TR" >&6; }
12046else
12047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12048$as_echo "no" >&6; }
12049fi
12050
12051
12052  test -n "$TR" && break
12053done
12054
12055    else
12056      # If it succeeded, then it was overridden by the user. We will use it
12057      # for the tool.
12058
12059      # First remove it from the list of overridden variables, so we can test
12060      # for unknown variables in the end.
12061      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12062
12063      # Check if we try to supply an empty value
12064      if test "x$TR" = x; then
12065        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12066$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12067        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12068$as_echo_n "checking for TR... " >&6; }
12069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12070$as_echo "disabled" >&6; }
12071      else
12072        # Check if the provided tool contains a complete path.
12073        tool_specified="$TR"
12074        tool_basename="${tool_specified##*/}"
12075        if test "x$tool_basename" = "x$tool_specified"; then
12076          # A command without a complete path is provided, search $PATH.
12077          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12078$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12079          # Extract the first word of "$tool_basename", so it can be a program name with args.
12080set dummy $tool_basename; ac_word=$2
12081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12082$as_echo_n "checking for $ac_word... " >&6; }
12083if ${ac_cv_path_TR+:} false; then :
12084  $as_echo_n "(cached) " >&6
12085else
12086  case $TR in
12087  [\\/]* | ?:[\\/]*)
12088  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12089  ;;
12090  *)
12091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12092for as_dir in $PATH
12093do
12094  IFS=$as_save_IFS
12095  test -z "$as_dir" && as_dir=.
12096    for ac_exec_ext in '' $ac_executable_extensions; do
12097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12098    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12100    break 2
12101  fi
12102done
12103  done
12104IFS=$as_save_IFS
12105
12106  ;;
12107esac
12108fi
12109TR=$ac_cv_path_TR
12110if test -n "$TR"; then
12111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12112$as_echo "$TR" >&6; }
12113else
12114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12115$as_echo "no" >&6; }
12116fi
12117
12118
12119          if test "x$TR" = x; then
12120            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12121          fi
12122        else
12123          # Otherwise we believe it is a complete path. Use it as it is.
12124          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12125$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12126          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12127$as_echo_n "checking for TR... " >&6; }
12128          if test ! -x "$tool_specified"; then
12129            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12130$as_echo "not found" >&6; }
12131            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12132          fi
12133          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12134$as_echo "$tool_specified" >&6; }
12135        fi
12136      fi
12137    fi
12138
12139  fi
12140
12141
12142
12143  if test "x$TR" = x; then
12144    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12145  fi
12146
12147
12148
12149
12150
12151  # Publish this variable in the help.
12152
12153
12154  if [ -z "${UNAME+x}" ]; then
12155    # The variable is not set by user, try to locate tool using the code snippet
12156    for ac_prog in uname
12157do
12158  # Extract the first word of "$ac_prog", so it can be a program name with args.
12159set dummy $ac_prog; ac_word=$2
12160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12161$as_echo_n "checking for $ac_word... " >&6; }
12162if ${ac_cv_path_UNAME+:} false; then :
12163  $as_echo_n "(cached) " >&6
12164else
12165  case $UNAME in
12166  [\\/]* | ?:[\\/]*)
12167  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12168  ;;
12169  *)
12170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12171for as_dir in $PATH
12172do
12173  IFS=$as_save_IFS
12174  test -z "$as_dir" && as_dir=.
12175    for ac_exec_ext in '' $ac_executable_extensions; do
12176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12177    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12179    break 2
12180  fi
12181done
12182  done
12183IFS=$as_save_IFS
12184
12185  ;;
12186esac
12187fi
12188UNAME=$ac_cv_path_UNAME
12189if test -n "$UNAME"; then
12190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12191$as_echo "$UNAME" >&6; }
12192else
12193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12194$as_echo "no" >&6; }
12195fi
12196
12197
12198  test -n "$UNAME" && break
12199done
12200
12201  else
12202    # The variable is set, but is it from the command line or the environment?
12203
12204    # Try to remove the string !UNAME! from our list.
12205    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12206    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12207      # If it failed, the variable was not from the command line. Ignore it,
12208      # but warn the user (except for BASH, which is always set by the calling BASH).
12209      if test "xUNAME" != xBASH; then
12210        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12211$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12212      fi
12213      # Try to locate tool using the code snippet
12214      for ac_prog in uname
12215do
12216  # Extract the first word of "$ac_prog", so it can be a program name with args.
12217set dummy $ac_prog; ac_word=$2
12218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12219$as_echo_n "checking for $ac_word... " >&6; }
12220if ${ac_cv_path_UNAME+:} false; then :
12221  $as_echo_n "(cached) " >&6
12222else
12223  case $UNAME in
12224  [\\/]* | ?:[\\/]*)
12225  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12226  ;;
12227  *)
12228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12229for as_dir in $PATH
12230do
12231  IFS=$as_save_IFS
12232  test -z "$as_dir" && as_dir=.
12233    for ac_exec_ext in '' $ac_executable_extensions; do
12234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12235    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12237    break 2
12238  fi
12239done
12240  done
12241IFS=$as_save_IFS
12242
12243  ;;
12244esac
12245fi
12246UNAME=$ac_cv_path_UNAME
12247if test -n "$UNAME"; then
12248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12249$as_echo "$UNAME" >&6; }
12250else
12251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12252$as_echo "no" >&6; }
12253fi
12254
12255
12256  test -n "$UNAME" && break
12257done
12258
12259    else
12260      # If it succeeded, then it was overridden by the user. We will use it
12261      # for the tool.
12262
12263      # First remove it from the list of overridden variables, so we can test
12264      # for unknown variables in the end.
12265      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12266
12267      # Check if we try to supply an empty value
12268      if test "x$UNAME" = x; then
12269        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12270$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12271        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12272$as_echo_n "checking for UNAME... " >&6; }
12273        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12274$as_echo "disabled" >&6; }
12275      else
12276        # Check if the provided tool contains a complete path.
12277        tool_specified="$UNAME"
12278        tool_basename="${tool_specified##*/}"
12279        if test "x$tool_basename" = "x$tool_specified"; then
12280          # A command without a complete path is provided, search $PATH.
12281          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12282$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12283          # Extract the first word of "$tool_basename", so it can be a program name with args.
12284set dummy $tool_basename; ac_word=$2
12285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12286$as_echo_n "checking for $ac_word... " >&6; }
12287if ${ac_cv_path_UNAME+:} false; then :
12288  $as_echo_n "(cached) " >&6
12289else
12290  case $UNAME in
12291  [\\/]* | ?:[\\/]*)
12292  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12293  ;;
12294  *)
12295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12296for as_dir in $PATH
12297do
12298  IFS=$as_save_IFS
12299  test -z "$as_dir" && as_dir=.
12300    for ac_exec_ext in '' $ac_executable_extensions; do
12301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12302    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12304    break 2
12305  fi
12306done
12307  done
12308IFS=$as_save_IFS
12309
12310  ;;
12311esac
12312fi
12313UNAME=$ac_cv_path_UNAME
12314if test -n "$UNAME"; then
12315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12316$as_echo "$UNAME" >&6; }
12317else
12318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12319$as_echo "no" >&6; }
12320fi
12321
12322
12323          if test "x$UNAME" = x; then
12324            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12325          fi
12326        else
12327          # Otherwise we believe it is a complete path. Use it as it is.
12328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12329$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12330          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12331$as_echo_n "checking for UNAME... " >&6; }
12332          if test ! -x "$tool_specified"; then
12333            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12334$as_echo "not found" >&6; }
12335            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12336          fi
12337          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12338$as_echo "$tool_specified" >&6; }
12339        fi
12340      fi
12341    fi
12342
12343  fi
12344
12345
12346
12347  if test "x$UNAME" = x; then
12348    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12349  fi
12350
12351
12352
12353
12354
12355  # Publish this variable in the help.
12356
12357
12358  if [ -z "${UNIQ+x}" ]; then
12359    # The variable is not set by user, try to locate tool using the code snippet
12360    for ac_prog in uniq
12361do
12362  # Extract the first word of "$ac_prog", so it can be a program name with args.
12363set dummy $ac_prog; ac_word=$2
12364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12365$as_echo_n "checking for $ac_word... " >&6; }
12366if ${ac_cv_path_UNIQ+:} false; then :
12367  $as_echo_n "(cached) " >&6
12368else
12369  case $UNIQ in
12370  [\\/]* | ?:[\\/]*)
12371  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12372  ;;
12373  *)
12374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12375for as_dir in $PATH
12376do
12377  IFS=$as_save_IFS
12378  test -z "$as_dir" && as_dir=.
12379    for ac_exec_ext in '' $ac_executable_extensions; do
12380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12381    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12383    break 2
12384  fi
12385done
12386  done
12387IFS=$as_save_IFS
12388
12389  ;;
12390esac
12391fi
12392UNIQ=$ac_cv_path_UNIQ
12393if test -n "$UNIQ"; then
12394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12395$as_echo "$UNIQ" >&6; }
12396else
12397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12398$as_echo "no" >&6; }
12399fi
12400
12401
12402  test -n "$UNIQ" && break
12403done
12404
12405  else
12406    # The variable is set, but is it from the command line or the environment?
12407
12408    # Try to remove the string !UNIQ! from our list.
12409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12411      # If it failed, the variable was not from the command line. Ignore it,
12412      # but warn the user (except for BASH, which is always set by the calling BASH).
12413      if test "xUNIQ" != xBASH; then
12414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12415$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12416      fi
12417      # Try to locate tool using the code snippet
12418      for ac_prog in uniq
12419do
12420  # Extract the first word of "$ac_prog", so it can be a program name with args.
12421set dummy $ac_prog; ac_word=$2
12422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12423$as_echo_n "checking for $ac_word... " >&6; }
12424if ${ac_cv_path_UNIQ+:} false; then :
12425  $as_echo_n "(cached) " >&6
12426else
12427  case $UNIQ in
12428  [\\/]* | ?:[\\/]*)
12429  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12430  ;;
12431  *)
12432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12433for as_dir in $PATH
12434do
12435  IFS=$as_save_IFS
12436  test -z "$as_dir" && as_dir=.
12437    for ac_exec_ext in '' $ac_executable_extensions; do
12438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12439    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12441    break 2
12442  fi
12443done
12444  done
12445IFS=$as_save_IFS
12446
12447  ;;
12448esac
12449fi
12450UNIQ=$ac_cv_path_UNIQ
12451if test -n "$UNIQ"; then
12452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12453$as_echo "$UNIQ" >&6; }
12454else
12455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12456$as_echo "no" >&6; }
12457fi
12458
12459
12460  test -n "$UNIQ" && break
12461done
12462
12463    else
12464      # If it succeeded, then it was overridden by the user. We will use it
12465      # for the tool.
12466
12467      # First remove it from the list of overridden variables, so we can test
12468      # for unknown variables in the end.
12469      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12470
12471      # Check if we try to supply an empty value
12472      if test "x$UNIQ" = x; then
12473        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12474$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12476$as_echo_n "checking for UNIQ... " >&6; }
12477        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12478$as_echo "disabled" >&6; }
12479      else
12480        # Check if the provided tool contains a complete path.
12481        tool_specified="$UNIQ"
12482        tool_basename="${tool_specified##*/}"
12483        if test "x$tool_basename" = "x$tool_specified"; then
12484          # A command without a complete path is provided, search $PATH.
12485          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12486$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12487          # Extract the first word of "$tool_basename", so it can be a program name with args.
12488set dummy $tool_basename; ac_word=$2
12489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12490$as_echo_n "checking for $ac_word... " >&6; }
12491if ${ac_cv_path_UNIQ+:} false; then :
12492  $as_echo_n "(cached) " >&6
12493else
12494  case $UNIQ in
12495  [\\/]* | ?:[\\/]*)
12496  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12497  ;;
12498  *)
12499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12500for as_dir in $PATH
12501do
12502  IFS=$as_save_IFS
12503  test -z "$as_dir" && as_dir=.
12504    for ac_exec_ext in '' $ac_executable_extensions; do
12505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12506    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12508    break 2
12509  fi
12510done
12511  done
12512IFS=$as_save_IFS
12513
12514  ;;
12515esac
12516fi
12517UNIQ=$ac_cv_path_UNIQ
12518if test -n "$UNIQ"; then
12519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12520$as_echo "$UNIQ" >&6; }
12521else
12522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12523$as_echo "no" >&6; }
12524fi
12525
12526
12527          if test "x$UNIQ" = x; then
12528            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12529          fi
12530        else
12531          # Otherwise we believe it is a complete path. Use it as it is.
12532          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12533$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12534          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12535$as_echo_n "checking for UNIQ... " >&6; }
12536          if test ! -x "$tool_specified"; then
12537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12538$as_echo "not found" >&6; }
12539            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12540          fi
12541          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12542$as_echo "$tool_specified" >&6; }
12543        fi
12544      fi
12545    fi
12546
12547  fi
12548
12549
12550
12551  if test "x$UNIQ" = x; then
12552    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12553  fi
12554
12555
12556
12557
12558
12559  # Publish this variable in the help.
12560
12561
12562  if [ -z "${WC+x}" ]; then
12563    # The variable is not set by user, try to locate tool using the code snippet
12564    for ac_prog in wc
12565do
12566  # Extract the first word of "$ac_prog", so it can be a program name with args.
12567set dummy $ac_prog; ac_word=$2
12568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12569$as_echo_n "checking for $ac_word... " >&6; }
12570if ${ac_cv_path_WC+:} false; then :
12571  $as_echo_n "(cached) " >&6
12572else
12573  case $WC in
12574  [\\/]* | ?:[\\/]*)
12575  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12576  ;;
12577  *)
12578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579for as_dir in $PATH
12580do
12581  IFS=$as_save_IFS
12582  test -z "$as_dir" && as_dir=.
12583    for ac_exec_ext in '' $ac_executable_extensions; do
12584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12585    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587    break 2
12588  fi
12589done
12590  done
12591IFS=$as_save_IFS
12592
12593  ;;
12594esac
12595fi
12596WC=$ac_cv_path_WC
12597if test -n "$WC"; then
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12599$as_echo "$WC" >&6; }
12600else
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602$as_echo "no" >&6; }
12603fi
12604
12605
12606  test -n "$WC" && break
12607done
12608
12609  else
12610    # The variable is set, but is it from the command line or the environment?
12611
12612    # Try to remove the string !WC! from our list.
12613    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12614    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12615      # If it failed, the variable was not from the command line. Ignore it,
12616      # but warn the user (except for BASH, which is always set by the calling BASH).
12617      if test "xWC" != xBASH; then
12618        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12619$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12620      fi
12621      # Try to locate tool using the code snippet
12622      for ac_prog in wc
12623do
12624  # Extract the first word of "$ac_prog", so it can be a program name with args.
12625set dummy $ac_prog; ac_word=$2
12626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12627$as_echo_n "checking for $ac_word... " >&6; }
12628if ${ac_cv_path_WC+:} false; then :
12629  $as_echo_n "(cached) " >&6
12630else
12631  case $WC in
12632  [\\/]* | ?:[\\/]*)
12633  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12634  ;;
12635  *)
12636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12637for as_dir in $PATH
12638do
12639  IFS=$as_save_IFS
12640  test -z "$as_dir" && as_dir=.
12641    for ac_exec_ext in '' $ac_executable_extensions; do
12642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12643    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12645    break 2
12646  fi
12647done
12648  done
12649IFS=$as_save_IFS
12650
12651  ;;
12652esac
12653fi
12654WC=$ac_cv_path_WC
12655if test -n "$WC"; then
12656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12657$as_echo "$WC" >&6; }
12658else
12659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12660$as_echo "no" >&6; }
12661fi
12662
12663
12664  test -n "$WC" && break
12665done
12666
12667    else
12668      # If it succeeded, then it was overridden by the user. We will use it
12669      # for the tool.
12670
12671      # First remove it from the list of overridden variables, so we can test
12672      # for unknown variables in the end.
12673      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12674
12675      # Check if we try to supply an empty value
12676      if test "x$WC" = x; then
12677        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12678$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12679        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12680$as_echo_n "checking for WC... " >&6; }
12681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12682$as_echo "disabled" >&6; }
12683      else
12684        # Check if the provided tool contains a complete path.
12685        tool_specified="$WC"
12686        tool_basename="${tool_specified##*/}"
12687        if test "x$tool_basename" = "x$tool_specified"; then
12688          # A command without a complete path is provided, search $PATH.
12689          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12690$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12691          # Extract the first word of "$tool_basename", so it can be a program name with args.
12692set dummy $tool_basename; ac_word=$2
12693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12694$as_echo_n "checking for $ac_word... " >&6; }
12695if ${ac_cv_path_WC+:} false; then :
12696  $as_echo_n "(cached) " >&6
12697else
12698  case $WC in
12699  [\\/]* | ?:[\\/]*)
12700  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12701  ;;
12702  *)
12703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12704for as_dir in $PATH
12705do
12706  IFS=$as_save_IFS
12707  test -z "$as_dir" && as_dir=.
12708    for ac_exec_ext in '' $ac_executable_extensions; do
12709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12710    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12712    break 2
12713  fi
12714done
12715  done
12716IFS=$as_save_IFS
12717
12718  ;;
12719esac
12720fi
12721WC=$ac_cv_path_WC
12722if test -n "$WC"; then
12723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12724$as_echo "$WC" >&6; }
12725else
12726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12727$as_echo "no" >&6; }
12728fi
12729
12730
12731          if test "x$WC" = x; then
12732            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12733          fi
12734        else
12735          # Otherwise we believe it is a complete path. Use it as it is.
12736          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12737$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12738          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12739$as_echo_n "checking for WC... " >&6; }
12740          if test ! -x "$tool_specified"; then
12741            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12742$as_echo "not found" >&6; }
12743            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12744          fi
12745          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12746$as_echo "$tool_specified" >&6; }
12747        fi
12748      fi
12749    fi
12750
12751  fi
12752
12753
12754
12755  if test "x$WC" = x; then
12756    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12757  fi
12758
12759
12760
12761
12762
12763  # Publish this variable in the help.
12764
12765
12766  if [ -z "${WHICH+x}" ]; then
12767    # The variable is not set by user, try to locate tool using the code snippet
12768    for ac_prog in which
12769do
12770  # Extract the first word of "$ac_prog", so it can be a program name with args.
12771set dummy $ac_prog; ac_word=$2
12772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12773$as_echo_n "checking for $ac_word... " >&6; }
12774if ${ac_cv_path_WHICH+:} false; then :
12775  $as_echo_n "(cached) " >&6
12776else
12777  case $WHICH in
12778  [\\/]* | ?:[\\/]*)
12779  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12780  ;;
12781  *)
12782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12783for as_dir in $PATH
12784do
12785  IFS=$as_save_IFS
12786  test -z "$as_dir" && as_dir=.
12787    for ac_exec_ext in '' $ac_executable_extensions; do
12788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12789    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12791    break 2
12792  fi
12793done
12794  done
12795IFS=$as_save_IFS
12796
12797  ;;
12798esac
12799fi
12800WHICH=$ac_cv_path_WHICH
12801if test -n "$WHICH"; then
12802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12803$as_echo "$WHICH" >&6; }
12804else
12805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12806$as_echo "no" >&6; }
12807fi
12808
12809
12810  test -n "$WHICH" && break
12811done
12812
12813  else
12814    # The variable is set, but is it from the command line or the environment?
12815
12816    # Try to remove the string !WHICH! from our list.
12817    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12818    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12819      # If it failed, the variable was not from the command line. Ignore it,
12820      # but warn the user (except for BASH, which is always set by the calling BASH).
12821      if test "xWHICH" != xBASH; then
12822        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12823$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12824      fi
12825      # Try to locate tool using the code snippet
12826      for ac_prog in which
12827do
12828  # Extract the first word of "$ac_prog", so it can be a program name with args.
12829set dummy $ac_prog; ac_word=$2
12830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12831$as_echo_n "checking for $ac_word... " >&6; }
12832if ${ac_cv_path_WHICH+:} false; then :
12833  $as_echo_n "(cached) " >&6
12834else
12835  case $WHICH in
12836  [\\/]* | ?:[\\/]*)
12837  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12838  ;;
12839  *)
12840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12841for as_dir in $PATH
12842do
12843  IFS=$as_save_IFS
12844  test -z "$as_dir" && as_dir=.
12845    for ac_exec_ext in '' $ac_executable_extensions; do
12846  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12847    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12849    break 2
12850  fi
12851done
12852  done
12853IFS=$as_save_IFS
12854
12855  ;;
12856esac
12857fi
12858WHICH=$ac_cv_path_WHICH
12859if test -n "$WHICH"; then
12860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12861$as_echo "$WHICH" >&6; }
12862else
12863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12864$as_echo "no" >&6; }
12865fi
12866
12867
12868  test -n "$WHICH" && break
12869done
12870
12871    else
12872      # If it succeeded, then it was overridden by the user. We will use it
12873      # for the tool.
12874
12875      # First remove it from the list of overridden variables, so we can test
12876      # for unknown variables in the end.
12877      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12878
12879      # Check if we try to supply an empty value
12880      if test "x$WHICH" = x; then
12881        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12882$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12884$as_echo_n "checking for WHICH... " >&6; }
12885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12886$as_echo "disabled" >&6; }
12887      else
12888        # Check if the provided tool contains a complete path.
12889        tool_specified="$WHICH"
12890        tool_basename="${tool_specified##*/}"
12891        if test "x$tool_basename" = "x$tool_specified"; then
12892          # A command without a complete path is provided, search $PATH.
12893          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12894$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12895          # Extract the first word of "$tool_basename", so it can be a program name with args.
12896set dummy $tool_basename; ac_word=$2
12897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12898$as_echo_n "checking for $ac_word... " >&6; }
12899if ${ac_cv_path_WHICH+:} false; then :
12900  $as_echo_n "(cached) " >&6
12901else
12902  case $WHICH in
12903  [\\/]* | ?:[\\/]*)
12904  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12905  ;;
12906  *)
12907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12908for as_dir in $PATH
12909do
12910  IFS=$as_save_IFS
12911  test -z "$as_dir" && as_dir=.
12912    for ac_exec_ext in '' $ac_executable_extensions; do
12913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12914    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12916    break 2
12917  fi
12918done
12919  done
12920IFS=$as_save_IFS
12921
12922  ;;
12923esac
12924fi
12925WHICH=$ac_cv_path_WHICH
12926if test -n "$WHICH"; then
12927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12928$as_echo "$WHICH" >&6; }
12929else
12930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12931$as_echo "no" >&6; }
12932fi
12933
12934
12935          if test "x$WHICH" = x; then
12936            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12937          fi
12938        else
12939          # Otherwise we believe it is a complete path. Use it as it is.
12940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12941$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12942          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12943$as_echo_n "checking for WHICH... " >&6; }
12944          if test ! -x "$tool_specified"; then
12945            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12946$as_echo "not found" >&6; }
12947            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12948          fi
12949          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12950$as_echo "$tool_specified" >&6; }
12951        fi
12952      fi
12953    fi
12954
12955  fi
12956
12957
12958
12959  if test "x$WHICH" = x; then
12960    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12961  fi
12962
12963
12964
12965
12966
12967  # Publish this variable in the help.
12968
12969
12970  if [ -z "${XARGS+x}" ]; then
12971    # The variable is not set by user, try to locate tool using the code snippet
12972    for ac_prog in xargs
12973do
12974  # Extract the first word of "$ac_prog", so it can be a program name with args.
12975set dummy $ac_prog; ac_word=$2
12976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12977$as_echo_n "checking for $ac_word... " >&6; }
12978if ${ac_cv_path_XARGS+:} false; then :
12979  $as_echo_n "(cached) " >&6
12980else
12981  case $XARGS in
12982  [\\/]* | ?:[\\/]*)
12983  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12984  ;;
12985  *)
12986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12987for as_dir in $PATH
12988do
12989  IFS=$as_save_IFS
12990  test -z "$as_dir" && as_dir=.
12991    for ac_exec_ext in '' $ac_executable_extensions; do
12992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12993    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12995    break 2
12996  fi
12997done
12998  done
12999IFS=$as_save_IFS
13000
13001  ;;
13002esac
13003fi
13004XARGS=$ac_cv_path_XARGS
13005if test -n "$XARGS"; then
13006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13007$as_echo "$XARGS" >&6; }
13008else
13009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13010$as_echo "no" >&6; }
13011fi
13012
13013
13014  test -n "$XARGS" && break
13015done
13016
13017  else
13018    # The variable is set, but is it from the command line or the environment?
13019
13020    # Try to remove the string !XARGS! from our list.
13021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13023      # If it failed, the variable was not from the command line. Ignore it,
13024      # but warn the user (except for BASH, which is always set by the calling BASH).
13025      if test "xXARGS" != xBASH; then
13026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13027$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13028      fi
13029      # Try to locate tool using the code snippet
13030      for ac_prog in xargs
13031do
13032  # Extract the first word of "$ac_prog", so it can be a program name with args.
13033set dummy $ac_prog; ac_word=$2
13034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13035$as_echo_n "checking for $ac_word... " >&6; }
13036if ${ac_cv_path_XARGS+:} false; then :
13037  $as_echo_n "(cached) " >&6
13038else
13039  case $XARGS in
13040  [\\/]* | ?:[\\/]*)
13041  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13042  ;;
13043  *)
13044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13045for as_dir in $PATH
13046do
13047  IFS=$as_save_IFS
13048  test -z "$as_dir" && as_dir=.
13049    for ac_exec_ext in '' $ac_executable_extensions; do
13050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13051    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13053    break 2
13054  fi
13055done
13056  done
13057IFS=$as_save_IFS
13058
13059  ;;
13060esac
13061fi
13062XARGS=$ac_cv_path_XARGS
13063if test -n "$XARGS"; then
13064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13065$as_echo "$XARGS" >&6; }
13066else
13067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13068$as_echo "no" >&6; }
13069fi
13070
13071
13072  test -n "$XARGS" && break
13073done
13074
13075    else
13076      # If it succeeded, then it was overridden by the user. We will use it
13077      # for the tool.
13078
13079      # First remove it from the list of overridden variables, so we can test
13080      # for unknown variables in the end.
13081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13082
13083      # Check if we try to supply an empty value
13084      if test "x$XARGS" = x; then
13085        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13086$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13088$as_echo_n "checking for XARGS... " >&6; }
13089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13090$as_echo "disabled" >&6; }
13091      else
13092        # Check if the provided tool contains a complete path.
13093        tool_specified="$XARGS"
13094        tool_basename="${tool_specified##*/}"
13095        if test "x$tool_basename" = "x$tool_specified"; then
13096          # A command without a complete path is provided, search $PATH.
13097          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13098$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13099          # Extract the first word of "$tool_basename", so it can be a program name with args.
13100set dummy $tool_basename; ac_word=$2
13101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13102$as_echo_n "checking for $ac_word... " >&6; }
13103if ${ac_cv_path_XARGS+:} false; then :
13104  $as_echo_n "(cached) " >&6
13105else
13106  case $XARGS in
13107  [\\/]* | ?:[\\/]*)
13108  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13109  ;;
13110  *)
13111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13112for as_dir in $PATH
13113do
13114  IFS=$as_save_IFS
13115  test -z "$as_dir" && as_dir=.
13116    for ac_exec_ext in '' $ac_executable_extensions; do
13117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13118    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13120    break 2
13121  fi
13122done
13123  done
13124IFS=$as_save_IFS
13125
13126  ;;
13127esac
13128fi
13129XARGS=$ac_cv_path_XARGS
13130if test -n "$XARGS"; then
13131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13132$as_echo "$XARGS" >&6; }
13133else
13134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13135$as_echo "no" >&6; }
13136fi
13137
13138
13139          if test "x$XARGS" = x; then
13140            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13141          fi
13142        else
13143          # Otherwise we believe it is a complete path. Use it as it is.
13144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13145$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13146          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13147$as_echo_n "checking for XARGS... " >&6; }
13148          if test ! -x "$tool_specified"; then
13149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13150$as_echo "not found" >&6; }
13151            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13152          fi
13153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13154$as_echo "$tool_specified" >&6; }
13155        fi
13156      fi
13157    fi
13158
13159  fi
13160
13161
13162
13163  if test "x$XARGS" = x; then
13164    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13165  fi
13166
13167
13168
13169  # Then required tools that require some special treatment.
13170
13171
13172  # Publish this variable in the help.
13173
13174
13175  if [ -z "${AWK+x}" ]; then
13176    # The variable is not set by user, try to locate tool using the code snippet
13177    for ac_prog in gawk mawk nawk awk
13178do
13179  # Extract the first word of "$ac_prog", so it can be a program name with args.
13180set dummy $ac_prog; ac_word=$2
13181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13182$as_echo_n "checking for $ac_word... " >&6; }
13183if ${ac_cv_prog_AWK+:} false; then :
13184  $as_echo_n "(cached) " >&6
13185else
13186  if test -n "$AWK"; then
13187  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13188else
13189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13190for as_dir in $PATH
13191do
13192  IFS=$as_save_IFS
13193  test -z "$as_dir" && as_dir=.
13194    for ac_exec_ext in '' $ac_executable_extensions; do
13195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13196    ac_cv_prog_AWK="$ac_prog"
13197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13198    break 2
13199  fi
13200done
13201  done
13202IFS=$as_save_IFS
13203
13204fi
13205fi
13206AWK=$ac_cv_prog_AWK
13207if test -n "$AWK"; then
13208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13209$as_echo "$AWK" >&6; }
13210else
13211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13212$as_echo "no" >&6; }
13213fi
13214
13215
13216  test -n "$AWK" && break
13217done
13218
13219  else
13220    # The variable is set, but is it from the command line or the environment?
13221
13222    # Try to remove the string !AWK! from our list.
13223    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13224    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13225      # If it failed, the variable was not from the command line. Ignore it,
13226      # but warn the user (except for BASH, which is always set by the calling BASH).
13227      if test "xAWK" != xBASH; then
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13229$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13230      fi
13231      # Try to locate tool using the code snippet
13232      for ac_prog in gawk mawk nawk awk
13233do
13234  # Extract the first word of "$ac_prog", so it can be a program name with args.
13235set dummy $ac_prog; ac_word=$2
13236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13237$as_echo_n "checking for $ac_word... " >&6; }
13238if ${ac_cv_prog_AWK+:} false; then :
13239  $as_echo_n "(cached) " >&6
13240else
13241  if test -n "$AWK"; then
13242  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13243else
13244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13245for as_dir in $PATH
13246do
13247  IFS=$as_save_IFS
13248  test -z "$as_dir" && as_dir=.
13249    for ac_exec_ext in '' $ac_executable_extensions; do
13250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13251    ac_cv_prog_AWK="$ac_prog"
13252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13253    break 2
13254  fi
13255done
13256  done
13257IFS=$as_save_IFS
13258
13259fi
13260fi
13261AWK=$ac_cv_prog_AWK
13262if test -n "$AWK"; then
13263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13264$as_echo "$AWK" >&6; }
13265else
13266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13267$as_echo "no" >&6; }
13268fi
13269
13270
13271  test -n "$AWK" && break
13272done
13273
13274    else
13275      # If it succeeded, then it was overridden by the user. We will use it
13276      # for the tool.
13277
13278      # First remove it from the list of overridden variables, so we can test
13279      # for unknown variables in the end.
13280      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13281
13282      # Check if we try to supply an empty value
13283      if test "x$AWK" = x; then
13284        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13285$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13287$as_echo_n "checking for AWK... " >&6; }
13288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13289$as_echo "disabled" >&6; }
13290      else
13291        # Check if the provided tool contains a complete path.
13292        tool_specified="$AWK"
13293        tool_basename="${tool_specified##*/}"
13294        if test "x$tool_basename" = "x$tool_specified"; then
13295          # A command without a complete path is provided, search $PATH.
13296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13297$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13298          # Extract the first word of "$tool_basename", so it can be a program name with args.
13299set dummy $tool_basename; ac_word=$2
13300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13301$as_echo_n "checking for $ac_word... " >&6; }
13302if ${ac_cv_path_AWK+:} false; then :
13303  $as_echo_n "(cached) " >&6
13304else
13305  case $AWK in
13306  [\\/]* | ?:[\\/]*)
13307  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13308  ;;
13309  *)
13310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13311for as_dir in $PATH
13312do
13313  IFS=$as_save_IFS
13314  test -z "$as_dir" && as_dir=.
13315    for ac_exec_ext in '' $ac_executable_extensions; do
13316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13317    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13319    break 2
13320  fi
13321done
13322  done
13323IFS=$as_save_IFS
13324
13325  ;;
13326esac
13327fi
13328AWK=$ac_cv_path_AWK
13329if test -n "$AWK"; then
13330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13331$as_echo "$AWK" >&6; }
13332else
13333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13334$as_echo "no" >&6; }
13335fi
13336
13337
13338          if test "x$AWK" = x; then
13339            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13340          fi
13341        else
13342          # Otherwise we believe it is a complete path. Use it as it is.
13343          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13344$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13345          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13346$as_echo_n "checking for AWK... " >&6; }
13347          if test ! -x "$tool_specified"; then
13348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13349$as_echo "not found" >&6; }
13350            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13351          fi
13352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13353$as_echo "$tool_specified" >&6; }
13354        fi
13355      fi
13356    fi
13357
13358  fi
13359
13360
13361  if test "x$AWK" = x; then
13362    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13363  fi
13364
13365
13366
13367
13368  # Publish this variable in the help.
13369
13370
13371  if [ -z "${GREP+x}" ]; then
13372    # The variable is not set by user, try to locate tool using the code snippet
13373    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13374$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13375if ${ac_cv_path_GREP+:} false; then :
13376  $as_echo_n "(cached) " >&6
13377else
13378  if test -z "$GREP"; then
13379  ac_path_GREP_found=false
13380  # Loop through the user's path and test for each of PROGNAME-LIST
13381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13382for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13383do
13384  IFS=$as_save_IFS
13385  test -z "$as_dir" && as_dir=.
13386    for ac_prog in grep ggrep; do
13387    for ac_exec_ext in '' $ac_executable_extensions; do
13388      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13389      as_fn_executable_p "$ac_path_GREP" || continue
13390# Check for GNU ac_path_GREP and select it if it is found.
13391  # Check for GNU $ac_path_GREP
13392case `"$ac_path_GREP" --version 2>&1` in
13393*GNU*)
13394  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13395*)
13396  ac_count=0
13397  $as_echo_n 0123456789 >"conftest.in"
13398  while :
13399  do
13400    cat "conftest.in" "conftest.in" >"conftest.tmp"
13401    mv "conftest.tmp" "conftest.in"
13402    cp "conftest.in" "conftest.nl"
13403    $as_echo 'GREP' >> "conftest.nl"
13404    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13405    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13406    as_fn_arith $ac_count + 1 && ac_count=$as_val
13407    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13408      # Best one so far, save it but keep looking for a better one
13409      ac_cv_path_GREP="$ac_path_GREP"
13410      ac_path_GREP_max=$ac_count
13411    fi
13412    # 10*(2^10) chars as input seems more than enough
13413    test $ac_count -gt 10 && break
13414  done
13415  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13416esac
13417
13418      $ac_path_GREP_found && break 3
13419    done
13420  done
13421  done
13422IFS=$as_save_IFS
13423  if test -z "$ac_cv_path_GREP"; then
13424    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13425  fi
13426else
13427  ac_cv_path_GREP=$GREP
13428fi
13429
13430fi
13431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13432$as_echo "$ac_cv_path_GREP" >&6; }
13433 GREP="$ac_cv_path_GREP"
13434
13435
13436  else
13437    # The variable is set, but is it from the command line or the environment?
13438
13439    # Try to remove the string !GREP! from our list.
13440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13442      # If it failed, the variable was not from the command line. Ignore it,
13443      # but warn the user (except for BASH, which is always set by the calling BASH).
13444      if test "xGREP" != xBASH; then
13445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13446$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13447      fi
13448      # Try to locate tool using the code snippet
13449      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13450$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13451if ${ac_cv_path_GREP+:} false; then :
13452  $as_echo_n "(cached) " >&6
13453else
13454  if test -z "$GREP"; then
13455  ac_path_GREP_found=false
13456  # Loop through the user's path and test for each of PROGNAME-LIST
13457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13458for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13459do
13460  IFS=$as_save_IFS
13461  test -z "$as_dir" && as_dir=.
13462    for ac_prog in grep ggrep; do
13463    for ac_exec_ext in '' $ac_executable_extensions; do
13464      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13465      as_fn_executable_p "$ac_path_GREP" || continue
13466# Check for GNU ac_path_GREP and select it if it is found.
13467  # Check for GNU $ac_path_GREP
13468case `"$ac_path_GREP" --version 2>&1` in
13469*GNU*)
13470  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13471*)
13472  ac_count=0
13473  $as_echo_n 0123456789 >"conftest.in"
13474  while :
13475  do
13476    cat "conftest.in" "conftest.in" >"conftest.tmp"
13477    mv "conftest.tmp" "conftest.in"
13478    cp "conftest.in" "conftest.nl"
13479    $as_echo 'GREP' >> "conftest.nl"
13480    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13481    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13482    as_fn_arith $ac_count + 1 && ac_count=$as_val
13483    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13484      # Best one so far, save it but keep looking for a better one
13485      ac_cv_path_GREP="$ac_path_GREP"
13486      ac_path_GREP_max=$ac_count
13487    fi
13488    # 10*(2^10) chars as input seems more than enough
13489    test $ac_count -gt 10 && break
13490  done
13491  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13492esac
13493
13494      $ac_path_GREP_found && break 3
13495    done
13496  done
13497  done
13498IFS=$as_save_IFS
13499  if test -z "$ac_cv_path_GREP"; then
13500    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13501  fi
13502else
13503  ac_cv_path_GREP=$GREP
13504fi
13505
13506fi
13507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13508$as_echo "$ac_cv_path_GREP" >&6; }
13509 GREP="$ac_cv_path_GREP"
13510
13511
13512    else
13513      # If it succeeded, then it was overridden by the user. We will use it
13514      # for the tool.
13515
13516      # First remove it from the list of overridden variables, so we can test
13517      # for unknown variables in the end.
13518      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13519
13520      # Check if we try to supply an empty value
13521      if test "x$GREP" = x; then
13522        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13523$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13524        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13525$as_echo_n "checking for GREP... " >&6; }
13526        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13527$as_echo "disabled" >&6; }
13528      else
13529        # Check if the provided tool contains a complete path.
13530        tool_specified="$GREP"
13531        tool_basename="${tool_specified##*/}"
13532        if test "x$tool_basename" = "x$tool_specified"; then
13533          # A command without a complete path is provided, search $PATH.
13534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13535$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13536          # Extract the first word of "$tool_basename", so it can be a program name with args.
13537set dummy $tool_basename; ac_word=$2
13538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13539$as_echo_n "checking for $ac_word... " >&6; }
13540if ${ac_cv_path_GREP+:} false; then :
13541  $as_echo_n "(cached) " >&6
13542else
13543  case $GREP in
13544  [\\/]* | ?:[\\/]*)
13545  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13546  ;;
13547  *)
13548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13549for as_dir in $PATH
13550do
13551  IFS=$as_save_IFS
13552  test -z "$as_dir" && as_dir=.
13553    for ac_exec_ext in '' $ac_executable_extensions; do
13554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13555    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13557    break 2
13558  fi
13559done
13560  done
13561IFS=$as_save_IFS
13562
13563  ;;
13564esac
13565fi
13566GREP=$ac_cv_path_GREP
13567if test -n "$GREP"; then
13568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13569$as_echo "$GREP" >&6; }
13570else
13571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13572$as_echo "no" >&6; }
13573fi
13574
13575
13576          if test "x$GREP" = x; then
13577            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13578          fi
13579        else
13580          # Otherwise we believe it is a complete path. Use it as it is.
13581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13582$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13583          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13584$as_echo_n "checking for GREP... " >&6; }
13585          if test ! -x "$tool_specified"; then
13586            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13587$as_echo "not found" >&6; }
13588            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13589          fi
13590          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13591$as_echo "$tool_specified" >&6; }
13592        fi
13593      fi
13594    fi
13595
13596  fi
13597
13598
13599  if test "x$GREP" = x; then
13600    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13601  fi
13602
13603
13604
13605
13606  # Publish this variable in the help.
13607
13608
13609  if [ -z "${EGREP+x}" ]; then
13610    # The variable is not set by user, try to locate tool using the code snippet
13611    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13612$as_echo_n "checking for egrep... " >&6; }
13613if ${ac_cv_path_EGREP+:} false; then :
13614  $as_echo_n "(cached) " >&6
13615else
13616  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13617   then ac_cv_path_EGREP="$GREP -E"
13618   else
13619     if test -z "$EGREP"; then
13620  ac_path_EGREP_found=false
13621  # Loop through the user's path and test for each of PROGNAME-LIST
13622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13623for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13624do
13625  IFS=$as_save_IFS
13626  test -z "$as_dir" && as_dir=.
13627    for ac_prog in egrep; do
13628    for ac_exec_ext in '' $ac_executable_extensions; do
13629      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13630      as_fn_executable_p "$ac_path_EGREP" || continue
13631# Check for GNU ac_path_EGREP and select it if it is found.
13632  # Check for GNU $ac_path_EGREP
13633case `"$ac_path_EGREP" --version 2>&1` in
13634*GNU*)
13635  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13636*)
13637  ac_count=0
13638  $as_echo_n 0123456789 >"conftest.in"
13639  while :
13640  do
13641    cat "conftest.in" "conftest.in" >"conftest.tmp"
13642    mv "conftest.tmp" "conftest.in"
13643    cp "conftest.in" "conftest.nl"
13644    $as_echo 'EGREP' >> "conftest.nl"
13645    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13646    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13647    as_fn_arith $ac_count + 1 && ac_count=$as_val
13648    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13649      # Best one so far, save it but keep looking for a better one
13650      ac_cv_path_EGREP="$ac_path_EGREP"
13651      ac_path_EGREP_max=$ac_count
13652    fi
13653    # 10*(2^10) chars as input seems more than enough
13654    test $ac_count -gt 10 && break
13655  done
13656  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13657esac
13658
13659      $ac_path_EGREP_found && break 3
13660    done
13661  done
13662  done
13663IFS=$as_save_IFS
13664  if test -z "$ac_cv_path_EGREP"; then
13665    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13666  fi
13667else
13668  ac_cv_path_EGREP=$EGREP
13669fi
13670
13671   fi
13672fi
13673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13674$as_echo "$ac_cv_path_EGREP" >&6; }
13675 EGREP="$ac_cv_path_EGREP"
13676
13677
13678  else
13679    # The variable is set, but is it from the command line or the environment?
13680
13681    # Try to remove the string !EGREP! from our list.
13682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13684      # If it failed, the variable was not from the command line. Ignore it,
13685      # but warn the user (except for BASH, which is always set by the calling BASH).
13686      if test "xEGREP" != xBASH; then
13687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13688$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13689      fi
13690      # Try to locate tool using the code snippet
13691      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13692$as_echo_n "checking for egrep... " >&6; }
13693if ${ac_cv_path_EGREP+:} false; then :
13694  $as_echo_n "(cached) " >&6
13695else
13696  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13697   then ac_cv_path_EGREP="$GREP -E"
13698   else
13699     if test -z "$EGREP"; then
13700  ac_path_EGREP_found=false
13701  # Loop through the user's path and test for each of PROGNAME-LIST
13702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13703for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13704do
13705  IFS=$as_save_IFS
13706  test -z "$as_dir" && as_dir=.
13707    for ac_prog in egrep; do
13708    for ac_exec_ext in '' $ac_executable_extensions; do
13709      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13710      as_fn_executable_p "$ac_path_EGREP" || continue
13711# Check for GNU ac_path_EGREP and select it if it is found.
13712  # Check for GNU $ac_path_EGREP
13713case `"$ac_path_EGREP" --version 2>&1` in
13714*GNU*)
13715  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13716*)
13717  ac_count=0
13718  $as_echo_n 0123456789 >"conftest.in"
13719  while :
13720  do
13721    cat "conftest.in" "conftest.in" >"conftest.tmp"
13722    mv "conftest.tmp" "conftest.in"
13723    cp "conftest.in" "conftest.nl"
13724    $as_echo 'EGREP' >> "conftest.nl"
13725    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13726    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13727    as_fn_arith $ac_count + 1 && ac_count=$as_val
13728    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13729      # Best one so far, save it but keep looking for a better one
13730      ac_cv_path_EGREP="$ac_path_EGREP"
13731      ac_path_EGREP_max=$ac_count
13732    fi
13733    # 10*(2^10) chars as input seems more than enough
13734    test $ac_count -gt 10 && break
13735  done
13736  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13737esac
13738
13739      $ac_path_EGREP_found && break 3
13740    done
13741  done
13742  done
13743IFS=$as_save_IFS
13744  if test -z "$ac_cv_path_EGREP"; then
13745    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13746  fi
13747else
13748  ac_cv_path_EGREP=$EGREP
13749fi
13750
13751   fi
13752fi
13753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13754$as_echo "$ac_cv_path_EGREP" >&6; }
13755 EGREP="$ac_cv_path_EGREP"
13756
13757
13758    else
13759      # If it succeeded, then it was overridden by the user. We will use it
13760      # for the tool.
13761
13762      # First remove it from the list of overridden variables, so we can test
13763      # for unknown variables in the end.
13764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13765
13766      # Check if we try to supply an empty value
13767      if test "x$EGREP" = x; then
13768        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13769$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13771$as_echo_n "checking for EGREP... " >&6; }
13772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13773$as_echo "disabled" >&6; }
13774      else
13775        # Check if the provided tool contains a complete path.
13776        tool_specified="$EGREP"
13777        tool_basename="${tool_specified##*/}"
13778        if test "x$tool_basename" = "x$tool_specified"; then
13779          # A command without a complete path is provided, search $PATH.
13780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13781$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13782          # Extract the first word of "$tool_basename", so it can be a program name with args.
13783set dummy $tool_basename; ac_word=$2
13784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13785$as_echo_n "checking for $ac_word... " >&6; }
13786if ${ac_cv_path_EGREP+:} false; then :
13787  $as_echo_n "(cached) " >&6
13788else
13789  case $EGREP in
13790  [\\/]* | ?:[\\/]*)
13791  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13792  ;;
13793  *)
13794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13795for as_dir in $PATH
13796do
13797  IFS=$as_save_IFS
13798  test -z "$as_dir" && as_dir=.
13799    for ac_exec_ext in '' $ac_executable_extensions; do
13800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13801    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13803    break 2
13804  fi
13805done
13806  done
13807IFS=$as_save_IFS
13808
13809  ;;
13810esac
13811fi
13812EGREP=$ac_cv_path_EGREP
13813if test -n "$EGREP"; then
13814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13815$as_echo "$EGREP" >&6; }
13816else
13817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13818$as_echo "no" >&6; }
13819fi
13820
13821
13822          if test "x$EGREP" = x; then
13823            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13824          fi
13825        else
13826          # Otherwise we believe it is a complete path. Use it as it is.
13827          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13828$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13830$as_echo_n "checking for EGREP... " >&6; }
13831          if test ! -x "$tool_specified"; then
13832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13833$as_echo "not found" >&6; }
13834            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13835          fi
13836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13837$as_echo "$tool_specified" >&6; }
13838        fi
13839      fi
13840    fi
13841
13842  fi
13843
13844
13845  if test "x$EGREP" = x; then
13846    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13847  fi
13848
13849
13850
13851
13852  # Publish this variable in the help.
13853
13854
13855  if [ -z "${FGREP+x}" ]; then
13856    # The variable is not set by user, try to locate tool using the code snippet
13857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13858$as_echo_n "checking for fgrep... " >&6; }
13859if ${ac_cv_path_FGREP+:} false; then :
13860  $as_echo_n "(cached) " >&6
13861else
13862  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13863   then ac_cv_path_FGREP="$GREP -F"
13864   else
13865     if test -z "$FGREP"; then
13866  ac_path_FGREP_found=false
13867  # Loop through the user's path and test for each of PROGNAME-LIST
13868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13869for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13870do
13871  IFS=$as_save_IFS
13872  test -z "$as_dir" && as_dir=.
13873    for ac_prog in fgrep; do
13874    for ac_exec_ext in '' $ac_executable_extensions; do
13875      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13876      as_fn_executable_p "$ac_path_FGREP" || continue
13877# Check for GNU ac_path_FGREP and select it if it is found.
13878  # Check for GNU $ac_path_FGREP
13879case `"$ac_path_FGREP" --version 2>&1` in
13880*GNU*)
13881  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13882*)
13883  ac_count=0
13884  $as_echo_n 0123456789 >"conftest.in"
13885  while :
13886  do
13887    cat "conftest.in" "conftest.in" >"conftest.tmp"
13888    mv "conftest.tmp" "conftest.in"
13889    cp "conftest.in" "conftest.nl"
13890    $as_echo 'FGREP' >> "conftest.nl"
13891    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13892    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13893    as_fn_arith $ac_count + 1 && ac_count=$as_val
13894    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13895      # Best one so far, save it but keep looking for a better one
13896      ac_cv_path_FGREP="$ac_path_FGREP"
13897      ac_path_FGREP_max=$ac_count
13898    fi
13899    # 10*(2^10) chars as input seems more than enough
13900    test $ac_count -gt 10 && break
13901  done
13902  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13903esac
13904
13905      $ac_path_FGREP_found && break 3
13906    done
13907  done
13908  done
13909IFS=$as_save_IFS
13910  if test -z "$ac_cv_path_FGREP"; then
13911    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13912  fi
13913else
13914  ac_cv_path_FGREP=$FGREP
13915fi
13916
13917   fi
13918fi
13919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13920$as_echo "$ac_cv_path_FGREP" >&6; }
13921 FGREP="$ac_cv_path_FGREP"
13922
13923
13924  else
13925    # The variable is set, but is it from the command line or the environment?
13926
13927    # Try to remove the string !FGREP! from our list.
13928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13930      # If it failed, the variable was not from the command line. Ignore it,
13931      # but warn the user (except for BASH, which is always set by the calling BASH).
13932      if test "xFGREP" != xBASH; then
13933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13934$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13935      fi
13936      # Try to locate tool using the code snippet
13937      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13938$as_echo_n "checking for fgrep... " >&6; }
13939if ${ac_cv_path_FGREP+:} false; then :
13940  $as_echo_n "(cached) " >&6
13941else
13942  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13943   then ac_cv_path_FGREP="$GREP -F"
13944   else
13945     if test -z "$FGREP"; then
13946  ac_path_FGREP_found=false
13947  # Loop through the user's path and test for each of PROGNAME-LIST
13948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13949for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13950do
13951  IFS=$as_save_IFS
13952  test -z "$as_dir" && as_dir=.
13953    for ac_prog in fgrep; do
13954    for ac_exec_ext in '' $ac_executable_extensions; do
13955      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13956      as_fn_executable_p "$ac_path_FGREP" || continue
13957# Check for GNU ac_path_FGREP and select it if it is found.
13958  # Check for GNU $ac_path_FGREP
13959case `"$ac_path_FGREP" --version 2>&1` in
13960*GNU*)
13961  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13962*)
13963  ac_count=0
13964  $as_echo_n 0123456789 >"conftest.in"
13965  while :
13966  do
13967    cat "conftest.in" "conftest.in" >"conftest.tmp"
13968    mv "conftest.tmp" "conftest.in"
13969    cp "conftest.in" "conftest.nl"
13970    $as_echo 'FGREP' >> "conftest.nl"
13971    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13972    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13973    as_fn_arith $ac_count + 1 && ac_count=$as_val
13974    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13975      # Best one so far, save it but keep looking for a better one
13976      ac_cv_path_FGREP="$ac_path_FGREP"
13977      ac_path_FGREP_max=$ac_count
13978    fi
13979    # 10*(2^10) chars as input seems more than enough
13980    test $ac_count -gt 10 && break
13981  done
13982  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13983esac
13984
13985      $ac_path_FGREP_found && break 3
13986    done
13987  done
13988  done
13989IFS=$as_save_IFS
13990  if test -z "$ac_cv_path_FGREP"; then
13991    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13992  fi
13993else
13994  ac_cv_path_FGREP=$FGREP
13995fi
13996
13997   fi
13998fi
13999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14000$as_echo "$ac_cv_path_FGREP" >&6; }
14001 FGREP="$ac_cv_path_FGREP"
14002
14003
14004    else
14005      # If it succeeded, then it was overridden by the user. We will use it
14006      # for the tool.
14007
14008      # First remove it from the list of overridden variables, so we can test
14009      # for unknown variables in the end.
14010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14011
14012      # Check if we try to supply an empty value
14013      if test "x$FGREP" = x; then
14014        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14015$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14017$as_echo_n "checking for FGREP... " >&6; }
14018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14019$as_echo "disabled" >&6; }
14020      else
14021        # Check if the provided tool contains a complete path.
14022        tool_specified="$FGREP"
14023        tool_basename="${tool_specified##*/}"
14024        if test "x$tool_basename" = "x$tool_specified"; then
14025          # A command without a complete path is provided, search $PATH.
14026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14027$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14028          # Extract the first word of "$tool_basename", so it can be a program name with args.
14029set dummy $tool_basename; ac_word=$2
14030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14031$as_echo_n "checking for $ac_word... " >&6; }
14032if ${ac_cv_path_FGREP+:} false; then :
14033  $as_echo_n "(cached) " >&6
14034else
14035  case $FGREP in
14036  [\\/]* | ?:[\\/]*)
14037  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14038  ;;
14039  *)
14040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14041for as_dir in $PATH
14042do
14043  IFS=$as_save_IFS
14044  test -z "$as_dir" && as_dir=.
14045    for ac_exec_ext in '' $ac_executable_extensions; do
14046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14047    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14049    break 2
14050  fi
14051done
14052  done
14053IFS=$as_save_IFS
14054
14055  ;;
14056esac
14057fi
14058FGREP=$ac_cv_path_FGREP
14059if test -n "$FGREP"; then
14060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14061$as_echo "$FGREP" >&6; }
14062else
14063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14064$as_echo "no" >&6; }
14065fi
14066
14067
14068          if test "x$FGREP" = x; then
14069            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14070          fi
14071        else
14072          # Otherwise we believe it is a complete path. Use it as it is.
14073          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14074$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14075          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14076$as_echo_n "checking for FGREP... " >&6; }
14077          if test ! -x "$tool_specified"; then
14078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14079$as_echo "not found" >&6; }
14080            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14081          fi
14082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14083$as_echo "$tool_specified" >&6; }
14084        fi
14085      fi
14086    fi
14087
14088  fi
14089
14090
14091  if test "x$FGREP" = x; then
14092    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14093  fi
14094
14095
14096
14097
14098  # Publish this variable in the help.
14099
14100
14101  if [ -z "${SED+x}" ]; then
14102    # The variable is not set by user, try to locate tool using the code snippet
14103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14104$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14105if ${ac_cv_path_SED+:} false; then :
14106  $as_echo_n "(cached) " >&6
14107else
14108            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14109     for ac_i in 1 2 3 4 5 6 7; do
14110       ac_script="$ac_script$as_nl$ac_script"
14111     done
14112     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14113     { ac_script=; unset ac_script;}
14114     if test -z "$SED"; then
14115  ac_path_SED_found=false
14116  # Loop through the user's path and test for each of PROGNAME-LIST
14117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14118for as_dir in $PATH
14119do
14120  IFS=$as_save_IFS
14121  test -z "$as_dir" && as_dir=.
14122    for ac_prog in sed gsed; do
14123    for ac_exec_ext in '' $ac_executable_extensions; do
14124      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14125      as_fn_executable_p "$ac_path_SED" || continue
14126# Check for GNU ac_path_SED and select it if it is found.
14127  # Check for GNU $ac_path_SED
14128case `"$ac_path_SED" --version 2>&1` in
14129*GNU*)
14130  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14131*)
14132  ac_count=0
14133  $as_echo_n 0123456789 >"conftest.in"
14134  while :
14135  do
14136    cat "conftest.in" "conftest.in" >"conftest.tmp"
14137    mv "conftest.tmp" "conftest.in"
14138    cp "conftest.in" "conftest.nl"
14139    $as_echo '' >> "conftest.nl"
14140    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14141    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14142    as_fn_arith $ac_count + 1 && ac_count=$as_val
14143    if test $ac_count -gt ${ac_path_SED_max-0}; then
14144      # Best one so far, save it but keep looking for a better one
14145      ac_cv_path_SED="$ac_path_SED"
14146      ac_path_SED_max=$ac_count
14147    fi
14148    # 10*(2^10) chars as input seems more than enough
14149    test $ac_count -gt 10 && break
14150  done
14151  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14152esac
14153
14154      $ac_path_SED_found && break 3
14155    done
14156  done
14157  done
14158IFS=$as_save_IFS
14159  if test -z "$ac_cv_path_SED"; then
14160    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14161  fi
14162else
14163  ac_cv_path_SED=$SED
14164fi
14165
14166fi
14167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14168$as_echo "$ac_cv_path_SED" >&6; }
14169 SED="$ac_cv_path_SED"
14170  rm -f conftest.sed
14171
14172  else
14173    # The variable is set, but is it from the command line or the environment?
14174
14175    # Try to remove the string !SED! from our list.
14176    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14177    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14178      # If it failed, the variable was not from the command line. Ignore it,
14179      # but warn the user (except for BASH, which is always set by the calling BASH).
14180      if test "xSED" != xBASH; then
14181        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14182$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14183      fi
14184      # Try to locate tool using the code snippet
14185      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14186$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14187if ${ac_cv_path_SED+:} false; then :
14188  $as_echo_n "(cached) " >&6
14189else
14190            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14191     for ac_i in 1 2 3 4 5 6 7; do
14192       ac_script="$ac_script$as_nl$ac_script"
14193     done
14194     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14195     { ac_script=; unset ac_script;}
14196     if test -z "$SED"; then
14197  ac_path_SED_found=false
14198  # Loop through the user's path and test for each of PROGNAME-LIST
14199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14200for as_dir in $PATH
14201do
14202  IFS=$as_save_IFS
14203  test -z "$as_dir" && as_dir=.
14204    for ac_prog in sed gsed; do
14205    for ac_exec_ext in '' $ac_executable_extensions; do
14206      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14207      as_fn_executable_p "$ac_path_SED" || continue
14208# Check for GNU ac_path_SED and select it if it is found.
14209  # Check for GNU $ac_path_SED
14210case `"$ac_path_SED" --version 2>&1` in
14211*GNU*)
14212  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14213*)
14214  ac_count=0
14215  $as_echo_n 0123456789 >"conftest.in"
14216  while :
14217  do
14218    cat "conftest.in" "conftest.in" >"conftest.tmp"
14219    mv "conftest.tmp" "conftest.in"
14220    cp "conftest.in" "conftest.nl"
14221    $as_echo '' >> "conftest.nl"
14222    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14223    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14224    as_fn_arith $ac_count + 1 && ac_count=$as_val
14225    if test $ac_count -gt ${ac_path_SED_max-0}; then
14226      # Best one so far, save it but keep looking for a better one
14227      ac_cv_path_SED="$ac_path_SED"
14228      ac_path_SED_max=$ac_count
14229    fi
14230    # 10*(2^10) chars as input seems more than enough
14231    test $ac_count -gt 10 && break
14232  done
14233  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14234esac
14235
14236      $ac_path_SED_found && break 3
14237    done
14238  done
14239  done
14240IFS=$as_save_IFS
14241  if test -z "$ac_cv_path_SED"; then
14242    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14243  fi
14244else
14245  ac_cv_path_SED=$SED
14246fi
14247
14248fi
14249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14250$as_echo "$ac_cv_path_SED" >&6; }
14251 SED="$ac_cv_path_SED"
14252  rm -f conftest.sed
14253
14254    else
14255      # If it succeeded, then it was overridden by the user. We will use it
14256      # for the tool.
14257
14258      # First remove it from the list of overridden variables, so we can test
14259      # for unknown variables in the end.
14260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14261
14262      # Check if we try to supply an empty value
14263      if test "x$SED" = x; then
14264        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14265$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14266        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14267$as_echo_n "checking for SED... " >&6; }
14268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14269$as_echo "disabled" >&6; }
14270      else
14271        # Check if the provided tool contains a complete path.
14272        tool_specified="$SED"
14273        tool_basename="${tool_specified##*/}"
14274        if test "x$tool_basename" = "x$tool_specified"; then
14275          # A command without a complete path is provided, search $PATH.
14276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14277$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14278          # Extract the first word of "$tool_basename", so it can be a program name with args.
14279set dummy $tool_basename; ac_word=$2
14280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14281$as_echo_n "checking for $ac_word... " >&6; }
14282if ${ac_cv_path_SED+:} false; then :
14283  $as_echo_n "(cached) " >&6
14284else
14285  case $SED in
14286  [\\/]* | ?:[\\/]*)
14287  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14288  ;;
14289  *)
14290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14291for as_dir in $PATH
14292do
14293  IFS=$as_save_IFS
14294  test -z "$as_dir" && as_dir=.
14295    for ac_exec_ext in '' $ac_executable_extensions; do
14296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14297    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14299    break 2
14300  fi
14301done
14302  done
14303IFS=$as_save_IFS
14304
14305  ;;
14306esac
14307fi
14308SED=$ac_cv_path_SED
14309if test -n "$SED"; then
14310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14311$as_echo "$SED" >&6; }
14312else
14313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14314$as_echo "no" >&6; }
14315fi
14316
14317
14318          if test "x$SED" = x; then
14319            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14320          fi
14321        else
14322          # Otherwise we believe it is a complete path. Use it as it is.
14323          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14324$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14325          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14326$as_echo_n "checking for SED... " >&6; }
14327          if test ! -x "$tool_specified"; then
14328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14329$as_echo "not found" >&6; }
14330            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14331          fi
14332          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14333$as_echo "$tool_specified" >&6; }
14334        fi
14335      fi
14336    fi
14337
14338  fi
14339
14340
14341  if test "x$SED" = x; then
14342    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14343  fi
14344
14345
14346
14347  # Always force rm.
14348  RM="$RM -f"
14349
14350  # pwd behaves differently on various platforms and some don't support the -L flag.
14351  # Always use the bash builtin pwd to get uniform behavior.
14352  THEPWDCMD=pwd
14353
14354  # These are not required on all platforms
14355
14356
14357  # Publish this variable in the help.
14358
14359
14360  if [ -z "${CYGPATH+x}" ]; then
14361    # The variable is not set by user, try to locate tool using the code snippet
14362    for ac_prog in cygpath
14363do
14364  # Extract the first word of "$ac_prog", so it can be a program name with args.
14365set dummy $ac_prog; ac_word=$2
14366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14367$as_echo_n "checking for $ac_word... " >&6; }
14368if ${ac_cv_path_CYGPATH+:} false; then :
14369  $as_echo_n "(cached) " >&6
14370else
14371  case $CYGPATH in
14372  [\\/]* | ?:[\\/]*)
14373  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14374  ;;
14375  *)
14376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14377for as_dir in $PATH
14378do
14379  IFS=$as_save_IFS
14380  test -z "$as_dir" && as_dir=.
14381    for ac_exec_ext in '' $ac_executable_extensions; do
14382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14383    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14385    break 2
14386  fi
14387done
14388  done
14389IFS=$as_save_IFS
14390
14391  ;;
14392esac
14393fi
14394CYGPATH=$ac_cv_path_CYGPATH
14395if test -n "$CYGPATH"; then
14396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14397$as_echo "$CYGPATH" >&6; }
14398else
14399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14400$as_echo "no" >&6; }
14401fi
14402
14403
14404  test -n "$CYGPATH" && break
14405done
14406
14407  else
14408    # The variable is set, but is it from the command line or the environment?
14409
14410    # Try to remove the string !CYGPATH! from our list.
14411    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14412    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14413      # If it failed, the variable was not from the command line. Ignore it,
14414      # but warn the user (except for BASH, which is always set by the calling BASH).
14415      if test "xCYGPATH" != xBASH; then
14416        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14417$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14418      fi
14419      # Try to locate tool using the code snippet
14420      for ac_prog in cygpath
14421do
14422  # Extract the first word of "$ac_prog", so it can be a program name with args.
14423set dummy $ac_prog; ac_word=$2
14424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14425$as_echo_n "checking for $ac_word... " >&6; }
14426if ${ac_cv_path_CYGPATH+:} false; then :
14427  $as_echo_n "(cached) " >&6
14428else
14429  case $CYGPATH in
14430  [\\/]* | ?:[\\/]*)
14431  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14432  ;;
14433  *)
14434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14435for as_dir in $PATH
14436do
14437  IFS=$as_save_IFS
14438  test -z "$as_dir" && as_dir=.
14439    for ac_exec_ext in '' $ac_executable_extensions; do
14440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14441    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14443    break 2
14444  fi
14445done
14446  done
14447IFS=$as_save_IFS
14448
14449  ;;
14450esac
14451fi
14452CYGPATH=$ac_cv_path_CYGPATH
14453if test -n "$CYGPATH"; then
14454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14455$as_echo "$CYGPATH" >&6; }
14456else
14457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14458$as_echo "no" >&6; }
14459fi
14460
14461
14462  test -n "$CYGPATH" && break
14463done
14464
14465    else
14466      # If it succeeded, then it was overridden by the user. We will use it
14467      # for the tool.
14468
14469      # First remove it from the list of overridden variables, so we can test
14470      # for unknown variables in the end.
14471      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14472
14473      # Check if we try to supply an empty value
14474      if test "x$CYGPATH" = x; then
14475        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14476$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14478$as_echo_n "checking for CYGPATH... " >&6; }
14479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14480$as_echo "disabled" >&6; }
14481      else
14482        # Check if the provided tool contains a complete path.
14483        tool_specified="$CYGPATH"
14484        tool_basename="${tool_specified##*/}"
14485        if test "x$tool_basename" = "x$tool_specified"; then
14486          # A command without a complete path is provided, search $PATH.
14487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14488$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14489          # Extract the first word of "$tool_basename", so it can be a program name with args.
14490set dummy $tool_basename; ac_word=$2
14491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14492$as_echo_n "checking for $ac_word... " >&6; }
14493if ${ac_cv_path_CYGPATH+:} false; then :
14494  $as_echo_n "(cached) " >&6
14495else
14496  case $CYGPATH in
14497  [\\/]* | ?:[\\/]*)
14498  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14499  ;;
14500  *)
14501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14502for as_dir in $PATH
14503do
14504  IFS=$as_save_IFS
14505  test -z "$as_dir" && as_dir=.
14506    for ac_exec_ext in '' $ac_executable_extensions; do
14507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14508    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14510    break 2
14511  fi
14512done
14513  done
14514IFS=$as_save_IFS
14515
14516  ;;
14517esac
14518fi
14519CYGPATH=$ac_cv_path_CYGPATH
14520if test -n "$CYGPATH"; then
14521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14522$as_echo "$CYGPATH" >&6; }
14523else
14524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14525$as_echo "no" >&6; }
14526fi
14527
14528
14529          if test "x$CYGPATH" = x; then
14530            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14531          fi
14532        else
14533          # Otherwise we believe it is a complete path. Use it as it is.
14534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14535$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14536          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14537$as_echo_n "checking for CYGPATH... " >&6; }
14538          if test ! -x "$tool_specified"; then
14539            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14540$as_echo "not found" >&6; }
14541            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14542          fi
14543          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14544$as_echo "$tool_specified" >&6; }
14545        fi
14546      fi
14547    fi
14548
14549  fi
14550
14551
14552
14553
14554  # Publish this variable in the help.
14555
14556
14557  if [ -z "${READLINK+x}" ]; then
14558    # The variable is not set by user, try to locate tool using the code snippet
14559    for ac_prog in greadlink readlink
14560do
14561  # Extract the first word of "$ac_prog", so it can be a program name with args.
14562set dummy $ac_prog; ac_word=$2
14563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14564$as_echo_n "checking for $ac_word... " >&6; }
14565if ${ac_cv_path_READLINK+:} false; then :
14566  $as_echo_n "(cached) " >&6
14567else
14568  case $READLINK in
14569  [\\/]* | ?:[\\/]*)
14570  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14571  ;;
14572  *)
14573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14574for as_dir in $PATH
14575do
14576  IFS=$as_save_IFS
14577  test -z "$as_dir" && as_dir=.
14578    for ac_exec_ext in '' $ac_executable_extensions; do
14579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14580    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14582    break 2
14583  fi
14584done
14585  done
14586IFS=$as_save_IFS
14587
14588  ;;
14589esac
14590fi
14591READLINK=$ac_cv_path_READLINK
14592if test -n "$READLINK"; then
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14594$as_echo "$READLINK" >&6; }
14595else
14596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14597$as_echo "no" >&6; }
14598fi
14599
14600
14601  test -n "$READLINK" && break
14602done
14603
14604  else
14605    # The variable is set, but is it from the command line or the environment?
14606
14607    # Try to remove the string !READLINK! from our list.
14608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14610      # If it failed, the variable was not from the command line. Ignore it,
14611      # but warn the user (except for BASH, which is always set by the calling BASH).
14612      if test "xREADLINK" != xBASH; then
14613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14614$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14615      fi
14616      # Try to locate tool using the code snippet
14617      for ac_prog in greadlink readlink
14618do
14619  # Extract the first word of "$ac_prog", so it can be a program name with args.
14620set dummy $ac_prog; ac_word=$2
14621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14622$as_echo_n "checking for $ac_word... " >&6; }
14623if ${ac_cv_path_READLINK+:} false; then :
14624  $as_echo_n "(cached) " >&6
14625else
14626  case $READLINK in
14627  [\\/]* | ?:[\\/]*)
14628  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14629  ;;
14630  *)
14631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14632for as_dir in $PATH
14633do
14634  IFS=$as_save_IFS
14635  test -z "$as_dir" && as_dir=.
14636    for ac_exec_ext in '' $ac_executable_extensions; do
14637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14638    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14640    break 2
14641  fi
14642done
14643  done
14644IFS=$as_save_IFS
14645
14646  ;;
14647esac
14648fi
14649READLINK=$ac_cv_path_READLINK
14650if test -n "$READLINK"; then
14651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14652$as_echo "$READLINK" >&6; }
14653else
14654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14655$as_echo "no" >&6; }
14656fi
14657
14658
14659  test -n "$READLINK" && break
14660done
14661
14662    else
14663      # If it succeeded, then it was overridden by the user. We will use it
14664      # for the tool.
14665
14666      # First remove it from the list of overridden variables, so we can test
14667      # for unknown variables in the end.
14668      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14669
14670      # Check if we try to supply an empty value
14671      if test "x$READLINK" = x; then
14672        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14673$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14675$as_echo_n "checking for READLINK... " >&6; }
14676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14677$as_echo "disabled" >&6; }
14678      else
14679        # Check if the provided tool contains a complete path.
14680        tool_specified="$READLINK"
14681        tool_basename="${tool_specified##*/}"
14682        if test "x$tool_basename" = "x$tool_specified"; then
14683          # A command without a complete path is provided, search $PATH.
14684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14685$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14686          # Extract the first word of "$tool_basename", so it can be a program name with args.
14687set dummy $tool_basename; ac_word=$2
14688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14689$as_echo_n "checking for $ac_word... " >&6; }
14690if ${ac_cv_path_READLINK+:} false; then :
14691  $as_echo_n "(cached) " >&6
14692else
14693  case $READLINK in
14694  [\\/]* | ?:[\\/]*)
14695  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14696  ;;
14697  *)
14698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14699for as_dir in $PATH
14700do
14701  IFS=$as_save_IFS
14702  test -z "$as_dir" && as_dir=.
14703    for ac_exec_ext in '' $ac_executable_extensions; do
14704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14705    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14707    break 2
14708  fi
14709done
14710  done
14711IFS=$as_save_IFS
14712
14713  ;;
14714esac
14715fi
14716READLINK=$ac_cv_path_READLINK
14717if test -n "$READLINK"; then
14718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14719$as_echo "$READLINK" >&6; }
14720else
14721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14722$as_echo "no" >&6; }
14723fi
14724
14725
14726          if test "x$READLINK" = x; then
14727            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14728          fi
14729        else
14730          # Otherwise we believe it is a complete path. Use it as it is.
14731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14732$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14733          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14734$as_echo_n "checking for READLINK... " >&6; }
14735          if test ! -x "$tool_specified"; then
14736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14737$as_echo "not found" >&6; }
14738            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14739          fi
14740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14741$as_echo "$tool_specified" >&6; }
14742        fi
14743      fi
14744    fi
14745
14746  fi
14747
14748
14749
14750
14751  # Publish this variable in the help.
14752
14753
14754  if [ -z "${DF+x}" ]; then
14755    # The variable is not set by user, try to locate tool using the code snippet
14756    for ac_prog in df
14757do
14758  # Extract the first word of "$ac_prog", so it can be a program name with args.
14759set dummy $ac_prog; ac_word=$2
14760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14761$as_echo_n "checking for $ac_word... " >&6; }
14762if ${ac_cv_path_DF+:} false; then :
14763  $as_echo_n "(cached) " >&6
14764else
14765  case $DF in
14766  [\\/]* | ?:[\\/]*)
14767  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14768  ;;
14769  *)
14770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14771for as_dir in $PATH
14772do
14773  IFS=$as_save_IFS
14774  test -z "$as_dir" && as_dir=.
14775    for ac_exec_ext in '' $ac_executable_extensions; do
14776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14777    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14779    break 2
14780  fi
14781done
14782  done
14783IFS=$as_save_IFS
14784
14785  ;;
14786esac
14787fi
14788DF=$ac_cv_path_DF
14789if test -n "$DF"; then
14790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14791$as_echo "$DF" >&6; }
14792else
14793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14794$as_echo "no" >&6; }
14795fi
14796
14797
14798  test -n "$DF" && break
14799done
14800
14801  else
14802    # The variable is set, but is it from the command line or the environment?
14803
14804    # Try to remove the string !DF! from our list.
14805    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14806    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14807      # If it failed, the variable was not from the command line. Ignore it,
14808      # but warn the user (except for BASH, which is always set by the calling BASH).
14809      if test "xDF" != xBASH; then
14810        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14811$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14812      fi
14813      # Try to locate tool using the code snippet
14814      for ac_prog in df
14815do
14816  # Extract the first word of "$ac_prog", so it can be a program name with args.
14817set dummy $ac_prog; ac_word=$2
14818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14819$as_echo_n "checking for $ac_word... " >&6; }
14820if ${ac_cv_path_DF+:} false; then :
14821  $as_echo_n "(cached) " >&6
14822else
14823  case $DF in
14824  [\\/]* | ?:[\\/]*)
14825  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14826  ;;
14827  *)
14828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14829for as_dir in $PATH
14830do
14831  IFS=$as_save_IFS
14832  test -z "$as_dir" && as_dir=.
14833    for ac_exec_ext in '' $ac_executable_extensions; do
14834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14835    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14837    break 2
14838  fi
14839done
14840  done
14841IFS=$as_save_IFS
14842
14843  ;;
14844esac
14845fi
14846DF=$ac_cv_path_DF
14847if test -n "$DF"; then
14848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14849$as_echo "$DF" >&6; }
14850else
14851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14852$as_echo "no" >&6; }
14853fi
14854
14855
14856  test -n "$DF" && break
14857done
14858
14859    else
14860      # If it succeeded, then it was overridden by the user. We will use it
14861      # for the tool.
14862
14863      # First remove it from the list of overridden variables, so we can test
14864      # for unknown variables in the end.
14865      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14866
14867      # Check if we try to supply an empty value
14868      if test "x$DF" = x; then
14869        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14870$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14872$as_echo_n "checking for DF... " >&6; }
14873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14874$as_echo "disabled" >&6; }
14875      else
14876        # Check if the provided tool contains a complete path.
14877        tool_specified="$DF"
14878        tool_basename="${tool_specified##*/}"
14879        if test "x$tool_basename" = "x$tool_specified"; then
14880          # A command without a complete path is provided, search $PATH.
14881          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14882$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14883          # Extract the first word of "$tool_basename", so it can be a program name with args.
14884set dummy $tool_basename; ac_word=$2
14885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14886$as_echo_n "checking for $ac_word... " >&6; }
14887if ${ac_cv_path_DF+:} false; then :
14888  $as_echo_n "(cached) " >&6
14889else
14890  case $DF in
14891  [\\/]* | ?:[\\/]*)
14892  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14893  ;;
14894  *)
14895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14896for as_dir in $PATH
14897do
14898  IFS=$as_save_IFS
14899  test -z "$as_dir" && as_dir=.
14900    for ac_exec_ext in '' $ac_executable_extensions; do
14901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14902    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14904    break 2
14905  fi
14906done
14907  done
14908IFS=$as_save_IFS
14909
14910  ;;
14911esac
14912fi
14913DF=$ac_cv_path_DF
14914if test -n "$DF"; then
14915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14916$as_echo "$DF" >&6; }
14917else
14918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14919$as_echo "no" >&6; }
14920fi
14921
14922
14923          if test "x$DF" = x; then
14924            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14925          fi
14926        else
14927          # Otherwise we believe it is a complete path. Use it as it is.
14928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14929$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14930          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14931$as_echo_n "checking for DF... " >&6; }
14932          if test ! -x "$tool_specified"; then
14933            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14934$as_echo "not found" >&6; }
14935            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14936          fi
14937          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14938$as_echo "$tool_specified" >&6; }
14939        fi
14940      fi
14941    fi
14942
14943  fi
14944
14945
14946
14947
14948  # Publish this variable in the help.
14949
14950
14951  if [ -z "${CPIO+x}" ]; then
14952    # The variable is not set by user, try to locate tool using the code snippet
14953    for ac_prog in cpio bsdcpio
14954do
14955  # Extract the first word of "$ac_prog", so it can be a program name with args.
14956set dummy $ac_prog; ac_word=$2
14957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14958$as_echo_n "checking for $ac_word... " >&6; }
14959if ${ac_cv_path_CPIO+:} false; then :
14960  $as_echo_n "(cached) " >&6
14961else
14962  case $CPIO in
14963  [\\/]* | ?:[\\/]*)
14964  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14965  ;;
14966  *)
14967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14968for as_dir in $PATH
14969do
14970  IFS=$as_save_IFS
14971  test -z "$as_dir" && as_dir=.
14972    for ac_exec_ext in '' $ac_executable_extensions; do
14973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14974    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14976    break 2
14977  fi
14978done
14979  done
14980IFS=$as_save_IFS
14981
14982  ;;
14983esac
14984fi
14985CPIO=$ac_cv_path_CPIO
14986if test -n "$CPIO"; then
14987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14988$as_echo "$CPIO" >&6; }
14989else
14990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14991$as_echo "no" >&6; }
14992fi
14993
14994
14995  test -n "$CPIO" && break
14996done
14997
14998  else
14999    # The variable is set, but is it from the command line or the environment?
15000
15001    # Try to remove the string !CPIO! from our list.
15002    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15003    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15004      # If it failed, the variable was not from the command line. Ignore it,
15005      # but warn the user (except for BASH, which is always set by the calling BASH).
15006      if test "xCPIO" != xBASH; then
15007        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15008$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15009      fi
15010      # Try to locate tool using the code snippet
15011      for ac_prog in cpio bsdcpio
15012do
15013  # Extract the first word of "$ac_prog", so it can be a program name with args.
15014set dummy $ac_prog; ac_word=$2
15015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15016$as_echo_n "checking for $ac_word... " >&6; }
15017if ${ac_cv_path_CPIO+:} false; then :
15018  $as_echo_n "(cached) " >&6
15019else
15020  case $CPIO in
15021  [\\/]* | ?:[\\/]*)
15022  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15023  ;;
15024  *)
15025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15026for as_dir in $PATH
15027do
15028  IFS=$as_save_IFS
15029  test -z "$as_dir" && as_dir=.
15030    for ac_exec_ext in '' $ac_executable_extensions; do
15031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15032    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15034    break 2
15035  fi
15036done
15037  done
15038IFS=$as_save_IFS
15039
15040  ;;
15041esac
15042fi
15043CPIO=$ac_cv_path_CPIO
15044if test -n "$CPIO"; then
15045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15046$as_echo "$CPIO" >&6; }
15047else
15048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15049$as_echo "no" >&6; }
15050fi
15051
15052
15053  test -n "$CPIO" && break
15054done
15055
15056    else
15057      # If it succeeded, then it was overridden by the user. We will use it
15058      # for the tool.
15059
15060      # First remove it from the list of overridden variables, so we can test
15061      # for unknown variables in the end.
15062      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15063
15064      # Check if we try to supply an empty value
15065      if test "x$CPIO" = x; then
15066        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15067$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15068        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15069$as_echo_n "checking for CPIO... " >&6; }
15070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15071$as_echo "disabled" >&6; }
15072      else
15073        # Check if the provided tool contains a complete path.
15074        tool_specified="$CPIO"
15075        tool_basename="${tool_specified##*/}"
15076        if test "x$tool_basename" = "x$tool_specified"; then
15077          # A command without a complete path is provided, search $PATH.
15078          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15079$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15080          # Extract the first word of "$tool_basename", so it can be a program name with args.
15081set dummy $tool_basename; ac_word=$2
15082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15083$as_echo_n "checking for $ac_word... " >&6; }
15084if ${ac_cv_path_CPIO+:} false; then :
15085  $as_echo_n "(cached) " >&6
15086else
15087  case $CPIO in
15088  [\\/]* | ?:[\\/]*)
15089  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15090  ;;
15091  *)
15092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15093for as_dir in $PATH
15094do
15095  IFS=$as_save_IFS
15096  test -z "$as_dir" && as_dir=.
15097    for ac_exec_ext in '' $ac_executable_extensions; do
15098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15099    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15101    break 2
15102  fi
15103done
15104  done
15105IFS=$as_save_IFS
15106
15107  ;;
15108esac
15109fi
15110CPIO=$ac_cv_path_CPIO
15111if test -n "$CPIO"; then
15112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15113$as_echo "$CPIO" >&6; }
15114else
15115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15116$as_echo "no" >&6; }
15117fi
15118
15119
15120          if test "x$CPIO" = x; then
15121            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15122          fi
15123        else
15124          # Otherwise we believe it is a complete path. Use it as it is.
15125          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15126$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15127          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15128$as_echo_n "checking for CPIO... " >&6; }
15129          if test ! -x "$tool_specified"; then
15130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15131$as_echo "not found" >&6; }
15132            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15133          fi
15134          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15135$as_echo "$tool_specified" >&6; }
15136        fi
15137      fi
15138    fi
15139
15140  fi
15141
15142
15143
15144
15145  # Publish this variable in the help.
15146
15147
15148  if [ -z "${NICE+x}" ]; then
15149    # The variable is not set by user, try to locate tool using the code snippet
15150    for ac_prog in nice
15151do
15152  # Extract the first word of "$ac_prog", so it can be a program name with args.
15153set dummy $ac_prog; ac_word=$2
15154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15155$as_echo_n "checking for $ac_word... " >&6; }
15156if ${ac_cv_path_NICE+:} false; then :
15157  $as_echo_n "(cached) " >&6
15158else
15159  case $NICE in
15160  [\\/]* | ?:[\\/]*)
15161  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15162  ;;
15163  *)
15164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15165for as_dir in $PATH
15166do
15167  IFS=$as_save_IFS
15168  test -z "$as_dir" && as_dir=.
15169    for ac_exec_ext in '' $ac_executable_extensions; do
15170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15171    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15173    break 2
15174  fi
15175done
15176  done
15177IFS=$as_save_IFS
15178
15179  ;;
15180esac
15181fi
15182NICE=$ac_cv_path_NICE
15183if test -n "$NICE"; then
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15185$as_echo "$NICE" >&6; }
15186else
15187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15188$as_echo "no" >&6; }
15189fi
15190
15191
15192  test -n "$NICE" && break
15193done
15194
15195  else
15196    # The variable is set, but is it from the command line or the environment?
15197
15198    # Try to remove the string !NICE! from our list.
15199    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15200    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15201      # If it failed, the variable was not from the command line. Ignore it,
15202      # but warn the user (except for BASH, which is always set by the calling BASH).
15203      if test "xNICE" != xBASH; then
15204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15205$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15206      fi
15207      # Try to locate tool using the code snippet
15208      for ac_prog in nice
15209do
15210  # Extract the first word of "$ac_prog", so it can be a program name with args.
15211set dummy $ac_prog; ac_word=$2
15212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15213$as_echo_n "checking for $ac_word... " >&6; }
15214if ${ac_cv_path_NICE+:} false; then :
15215  $as_echo_n "(cached) " >&6
15216else
15217  case $NICE in
15218  [\\/]* | ?:[\\/]*)
15219  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15220  ;;
15221  *)
15222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15223for as_dir in $PATH
15224do
15225  IFS=$as_save_IFS
15226  test -z "$as_dir" && as_dir=.
15227    for ac_exec_ext in '' $ac_executable_extensions; do
15228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15229    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15231    break 2
15232  fi
15233done
15234  done
15235IFS=$as_save_IFS
15236
15237  ;;
15238esac
15239fi
15240NICE=$ac_cv_path_NICE
15241if test -n "$NICE"; then
15242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15243$as_echo "$NICE" >&6; }
15244else
15245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15246$as_echo "no" >&6; }
15247fi
15248
15249
15250  test -n "$NICE" && break
15251done
15252
15253    else
15254      # If it succeeded, then it was overridden by the user. We will use it
15255      # for the tool.
15256
15257      # First remove it from the list of overridden variables, so we can test
15258      # for unknown variables in the end.
15259      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15260
15261      # Check if we try to supply an empty value
15262      if test "x$NICE" = x; then
15263        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15264$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15265        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15266$as_echo_n "checking for NICE... " >&6; }
15267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15268$as_echo "disabled" >&6; }
15269      else
15270        # Check if the provided tool contains a complete path.
15271        tool_specified="$NICE"
15272        tool_basename="${tool_specified##*/}"
15273        if test "x$tool_basename" = "x$tool_specified"; then
15274          # A command without a complete path is provided, search $PATH.
15275          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15276$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15277          # Extract the first word of "$tool_basename", so it can be a program name with args.
15278set dummy $tool_basename; ac_word=$2
15279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15280$as_echo_n "checking for $ac_word... " >&6; }
15281if ${ac_cv_path_NICE+:} false; then :
15282  $as_echo_n "(cached) " >&6
15283else
15284  case $NICE in
15285  [\\/]* | ?:[\\/]*)
15286  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15287  ;;
15288  *)
15289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15290for as_dir in $PATH
15291do
15292  IFS=$as_save_IFS
15293  test -z "$as_dir" && as_dir=.
15294    for ac_exec_ext in '' $ac_executable_extensions; do
15295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15296    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15298    break 2
15299  fi
15300done
15301  done
15302IFS=$as_save_IFS
15303
15304  ;;
15305esac
15306fi
15307NICE=$ac_cv_path_NICE
15308if test -n "$NICE"; then
15309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15310$as_echo "$NICE" >&6; }
15311else
15312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15313$as_echo "no" >&6; }
15314fi
15315
15316
15317          if test "x$NICE" = x; then
15318            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15319          fi
15320        else
15321          # Otherwise we believe it is a complete path. Use it as it is.
15322          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15323$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15324          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15325$as_echo_n "checking for NICE... " >&6; }
15326          if test ! -x "$tool_specified"; then
15327            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15328$as_echo "not found" >&6; }
15329            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15330          fi
15331          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15332$as_echo "$tool_specified" >&6; }
15333        fi
15334      fi
15335    fi
15336
15337  fi
15338
15339
15340
15341
15342  # Publish this variable in the help.
15343
15344
15345  if [ -z "${PANDOC+x}" ]; then
15346    # The variable is not set by user, try to locate tool using the code snippet
15347    for ac_prog in pandoc
15348do
15349  # Extract the first word of "$ac_prog", so it can be a program name with args.
15350set dummy $ac_prog; ac_word=$2
15351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15352$as_echo_n "checking for $ac_word... " >&6; }
15353if ${ac_cv_path_PANDOC+:} false; then :
15354  $as_echo_n "(cached) " >&6
15355else
15356  case $PANDOC in
15357  [\\/]* | ?:[\\/]*)
15358  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15359  ;;
15360  *)
15361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15362for as_dir in $PATH
15363do
15364  IFS=$as_save_IFS
15365  test -z "$as_dir" && as_dir=.
15366    for ac_exec_ext in '' $ac_executable_extensions; do
15367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15368    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15370    break 2
15371  fi
15372done
15373  done
15374IFS=$as_save_IFS
15375
15376  ;;
15377esac
15378fi
15379PANDOC=$ac_cv_path_PANDOC
15380if test -n "$PANDOC"; then
15381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15382$as_echo "$PANDOC" >&6; }
15383else
15384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15385$as_echo "no" >&6; }
15386fi
15387
15388
15389  test -n "$PANDOC" && break
15390done
15391
15392  else
15393    # The variable is set, but is it from the command line or the environment?
15394
15395    # Try to remove the string !PANDOC! from our list.
15396    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15397    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15398      # If it failed, the variable was not from the command line. Ignore it,
15399      # but warn the user (except for BASH, which is always set by the calling BASH).
15400      if test "xPANDOC" != xBASH; then
15401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15402$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15403      fi
15404      # Try to locate tool using the code snippet
15405      for ac_prog in pandoc
15406do
15407  # Extract the first word of "$ac_prog", so it can be a program name with args.
15408set dummy $ac_prog; ac_word=$2
15409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15410$as_echo_n "checking for $ac_word... " >&6; }
15411if ${ac_cv_path_PANDOC+:} false; then :
15412  $as_echo_n "(cached) " >&6
15413else
15414  case $PANDOC in
15415  [\\/]* | ?:[\\/]*)
15416  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15417  ;;
15418  *)
15419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15420for as_dir in $PATH
15421do
15422  IFS=$as_save_IFS
15423  test -z "$as_dir" && as_dir=.
15424    for ac_exec_ext in '' $ac_executable_extensions; do
15425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15426    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15428    break 2
15429  fi
15430done
15431  done
15432IFS=$as_save_IFS
15433
15434  ;;
15435esac
15436fi
15437PANDOC=$ac_cv_path_PANDOC
15438if test -n "$PANDOC"; then
15439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15440$as_echo "$PANDOC" >&6; }
15441else
15442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15443$as_echo "no" >&6; }
15444fi
15445
15446
15447  test -n "$PANDOC" && break
15448done
15449
15450    else
15451      # If it succeeded, then it was overridden by the user. We will use it
15452      # for the tool.
15453
15454      # First remove it from the list of overridden variables, so we can test
15455      # for unknown variables in the end.
15456      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15457
15458      # Check if we try to supply an empty value
15459      if test "x$PANDOC" = x; then
15460        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15461$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15463$as_echo_n "checking for PANDOC... " >&6; }
15464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15465$as_echo "disabled" >&6; }
15466      else
15467        # Check if the provided tool contains a complete path.
15468        tool_specified="$PANDOC"
15469        tool_basename="${tool_specified##*/}"
15470        if test "x$tool_basename" = "x$tool_specified"; then
15471          # A command without a complete path is provided, search $PATH.
15472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15473$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15474          # Extract the first word of "$tool_basename", so it can be a program name with args.
15475set dummy $tool_basename; ac_word=$2
15476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15477$as_echo_n "checking for $ac_word... " >&6; }
15478if ${ac_cv_path_PANDOC+:} false; then :
15479  $as_echo_n "(cached) " >&6
15480else
15481  case $PANDOC in
15482  [\\/]* | ?:[\\/]*)
15483  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15484  ;;
15485  *)
15486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15487for as_dir in $PATH
15488do
15489  IFS=$as_save_IFS
15490  test -z "$as_dir" && as_dir=.
15491    for ac_exec_ext in '' $ac_executable_extensions; do
15492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15493    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15495    break 2
15496  fi
15497done
15498  done
15499IFS=$as_save_IFS
15500
15501  ;;
15502esac
15503fi
15504PANDOC=$ac_cv_path_PANDOC
15505if test -n "$PANDOC"; then
15506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15507$as_echo "$PANDOC" >&6; }
15508else
15509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15510$as_echo "no" >&6; }
15511fi
15512
15513
15514          if test "x$PANDOC" = x; then
15515            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15516          fi
15517        else
15518          # Otherwise we believe it is a complete path. Use it as it is.
15519          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15520$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15521          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15522$as_echo_n "checking for PANDOC... " >&6; }
15523          if test ! -x "$tool_specified"; then
15524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15525$as_echo "not found" >&6; }
15526            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15527          fi
15528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15529$as_echo "$tool_specified" >&6; }
15530        fi
15531      fi
15532    fi
15533
15534  fi
15535
15536
15537
15538
15539# Now we can determine OpenJDK build and target platforms. This is required to
15540# have early on.
15541# Make sure we can run config.sub.
15542$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15543  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15544
15545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15546$as_echo_n "checking build system type... " >&6; }
15547if ${ac_cv_build+:} false; then :
15548  $as_echo_n "(cached) " >&6
15549else
15550  ac_build_alias=$build_alias
15551test "x$ac_build_alias" = x &&
15552  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15553test "x$ac_build_alias" = x &&
15554  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15555ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15556  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15557
15558fi
15559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15560$as_echo "$ac_cv_build" >&6; }
15561case $ac_cv_build in
15562*-*-*) ;;
15563*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15564esac
15565build=$ac_cv_build
15566ac_save_IFS=$IFS; IFS='-'
15567set x $ac_cv_build
15568shift
15569build_cpu=$1
15570build_vendor=$2
15571shift; shift
15572# Remember, the first character of IFS is used to create $*,
15573# except with old shells:
15574build_os=$*
15575IFS=$ac_save_IFS
15576case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15577
15578
15579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15580$as_echo_n "checking host system type... " >&6; }
15581if ${ac_cv_host+:} false; then :
15582  $as_echo_n "(cached) " >&6
15583else
15584  if test "x$host_alias" = x; then
15585  ac_cv_host=$ac_cv_build
15586else
15587  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15588    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15589fi
15590
15591fi
15592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15593$as_echo "$ac_cv_host" >&6; }
15594case $ac_cv_host in
15595*-*-*) ;;
15596*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15597esac
15598host=$ac_cv_host
15599ac_save_IFS=$IFS; IFS='-'
15600set x $ac_cv_host
15601shift
15602host_cpu=$1
15603host_vendor=$2
15604shift; shift
15605# Remember, the first character of IFS is used to create $*,
15606# except with old shells:
15607host_os=$*
15608IFS=$ac_save_IFS
15609case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15610
15611
15612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15613$as_echo_n "checking target system type... " >&6; }
15614if ${ac_cv_target+:} false; then :
15615  $as_echo_n "(cached) " >&6
15616else
15617  if test "x$target_alias" = x; then
15618  ac_cv_target=$ac_cv_host
15619else
15620  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15621    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15622fi
15623
15624fi
15625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15626$as_echo "$ac_cv_target" >&6; }
15627case $ac_cv_target in
15628*-*-*) ;;
15629*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15630esac
15631target=$ac_cv_target
15632ac_save_IFS=$IFS; IFS='-'
15633set x $ac_cv_target
15634shift
15635target_cpu=$1
15636target_vendor=$2
15637shift; shift
15638# Remember, the first character of IFS is used to create $*,
15639# except with old shells:
15640target_os=$*
15641IFS=$ac_save_IFS
15642case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15643
15644
15645# The aliases save the names the user supplied, while $host etc.
15646# will get canonicalized.
15647test -n "$target_alias" &&
15648  test "$program_prefix$program_suffix$program_transform_name" = \
15649    NONENONEs,x,x, &&
15650  program_prefix=${target_alias}-
15651
15652  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15653  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15654  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15655  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15656  # to use the configure naming style.
15657
15658
15659
15660
15661
15662  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15663  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15664  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15665  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15666  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15667  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15668
15669
15670
15671  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15672
15673  case "$build_os" in
15674    *linux*)
15675      VAR_OS=linux
15676      VAR_OS_TYPE=unix
15677      ;;
15678    *solaris*)
15679      VAR_OS=solaris
15680      VAR_OS_TYPE=unix
15681      ;;
15682    *darwin*)
15683      VAR_OS=macosx
15684      VAR_OS_TYPE=unix
15685      ;;
15686    *bsd*)
15687      VAR_OS=bsd
15688      VAR_OS_TYPE=unix
15689      ;;
15690    *cygwin*)
15691      VAR_OS=windows
15692      VAR_OS_ENV=windows.cygwin
15693      ;;
15694    *mingw*)
15695      VAR_OS=windows
15696      VAR_OS_ENV=windows.msys
15697      ;;
15698    *aix*)
15699      VAR_OS=aix
15700      VAR_OS_TYPE=unix
15701      ;;
15702    *)
15703      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15704      ;;
15705  esac
15706
15707
15708  # First argument is the cpu name from the trip/quad
15709  case "$build_cpu" in
15710    x86_64)
15711      VAR_CPU=x86_64
15712      VAR_CPU_ARCH=x86
15713      VAR_CPU_BITS=64
15714      VAR_CPU_ENDIAN=little
15715      ;;
15716    i?86)
15717      VAR_CPU=x86
15718      VAR_CPU_ARCH=x86
15719      VAR_CPU_BITS=32
15720      VAR_CPU_ENDIAN=little
15721      ;;
15722    arm*)
15723      VAR_CPU=arm
15724      VAR_CPU_ARCH=arm
15725      VAR_CPU_BITS=32
15726      VAR_CPU_ENDIAN=little
15727      ;;
15728    aarch64)
15729      VAR_CPU=aarch64
15730      VAR_CPU_ARCH=aarch64
15731      VAR_CPU_BITS=64
15732      VAR_CPU_ENDIAN=little
15733      ;;
15734    powerpc)
15735      VAR_CPU=ppc
15736      VAR_CPU_ARCH=ppc
15737      VAR_CPU_BITS=32
15738      VAR_CPU_ENDIAN=big
15739      ;;
15740    powerpc64)
15741      VAR_CPU=ppc64
15742      VAR_CPU_ARCH=ppc
15743      VAR_CPU_BITS=64
15744      VAR_CPU_ENDIAN=big
15745      ;;
15746    powerpc64le)
15747      VAR_CPU=ppc64le
15748      VAR_CPU_ARCH=ppc
15749      VAR_CPU_BITS=64
15750      VAR_CPU_ENDIAN=little
15751      ;;
15752    s390)
15753      VAR_CPU=s390
15754      VAR_CPU_ARCH=s390
15755      VAR_CPU_BITS=32
15756      VAR_CPU_ENDIAN=big
15757      ;;
15758    s390x)
15759      VAR_CPU=s390x
15760      VAR_CPU_ARCH=s390
15761      VAR_CPU_BITS=64
15762      VAR_CPU_ENDIAN=big
15763      ;;
15764    sparc)
15765      VAR_CPU=sparc
15766      VAR_CPU_ARCH=sparc
15767      VAR_CPU_BITS=32
15768      VAR_CPU_ENDIAN=big
15769      ;;
15770    sparcv9|sparc64)
15771      VAR_CPU=sparcv9
15772      VAR_CPU_ARCH=sparc
15773      VAR_CPU_BITS=64
15774      VAR_CPU_ENDIAN=big
15775      ;;
15776    *)
15777      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15778      ;;
15779  esac
15780
15781  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15782  OPENJDK_BUILD_OS="$VAR_OS"
15783  if test "x$VAR_OS_TYPE" != x; then
15784    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15785  else
15786    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15787  fi
15788  if test "x$VAR_OS_ENV" != x; then
15789    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15790  else
15791    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15792  fi
15793  OPENJDK_BUILD_CPU="$VAR_CPU"
15794  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15795  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15796  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15797
15798
15799
15800
15801
15802
15803
15804
15805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15806$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15808$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15809
15810  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15811
15812  case "$host_os" in
15813    *linux*)
15814      VAR_OS=linux
15815      VAR_OS_TYPE=unix
15816      ;;
15817    *solaris*)
15818      VAR_OS=solaris
15819      VAR_OS_TYPE=unix
15820      ;;
15821    *darwin*)
15822      VAR_OS=macosx
15823      VAR_OS_TYPE=unix
15824      ;;
15825    *bsd*)
15826      VAR_OS=bsd
15827      VAR_OS_TYPE=unix
15828      ;;
15829    *cygwin*)
15830      VAR_OS=windows
15831      VAR_OS_ENV=windows.cygwin
15832      ;;
15833    *mingw*)
15834      VAR_OS=windows
15835      VAR_OS_ENV=windows.msys
15836      ;;
15837    *aix*)
15838      VAR_OS=aix
15839      VAR_OS_TYPE=unix
15840      ;;
15841    *)
15842      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15843      ;;
15844  esac
15845
15846
15847  # First argument is the cpu name from the trip/quad
15848  case "$host_cpu" in
15849    x86_64)
15850      VAR_CPU=x86_64
15851      VAR_CPU_ARCH=x86
15852      VAR_CPU_BITS=64
15853      VAR_CPU_ENDIAN=little
15854      ;;
15855    i?86)
15856      VAR_CPU=x86
15857      VAR_CPU_ARCH=x86
15858      VAR_CPU_BITS=32
15859      VAR_CPU_ENDIAN=little
15860      ;;
15861    arm*)
15862      VAR_CPU=arm
15863      VAR_CPU_ARCH=arm
15864      VAR_CPU_BITS=32
15865      VAR_CPU_ENDIAN=little
15866      ;;
15867    aarch64)
15868      VAR_CPU=aarch64
15869      VAR_CPU_ARCH=aarch64
15870      VAR_CPU_BITS=64
15871      VAR_CPU_ENDIAN=little
15872      ;;
15873    powerpc)
15874      VAR_CPU=ppc
15875      VAR_CPU_ARCH=ppc
15876      VAR_CPU_BITS=32
15877      VAR_CPU_ENDIAN=big
15878      ;;
15879    powerpc64)
15880      VAR_CPU=ppc64
15881      VAR_CPU_ARCH=ppc
15882      VAR_CPU_BITS=64
15883      VAR_CPU_ENDIAN=big
15884      ;;
15885    powerpc64le)
15886      VAR_CPU=ppc64le
15887      VAR_CPU_ARCH=ppc
15888      VAR_CPU_BITS=64
15889      VAR_CPU_ENDIAN=little
15890      ;;
15891    s390)
15892      VAR_CPU=s390
15893      VAR_CPU_ARCH=s390
15894      VAR_CPU_BITS=32
15895      VAR_CPU_ENDIAN=big
15896      ;;
15897    s390x)
15898      VAR_CPU=s390x
15899      VAR_CPU_ARCH=s390
15900      VAR_CPU_BITS=64
15901      VAR_CPU_ENDIAN=big
15902      ;;
15903    sparc)
15904      VAR_CPU=sparc
15905      VAR_CPU_ARCH=sparc
15906      VAR_CPU_BITS=32
15907      VAR_CPU_ENDIAN=big
15908      ;;
15909    sparcv9|sparc64)
15910      VAR_CPU=sparcv9
15911      VAR_CPU_ARCH=sparc
15912      VAR_CPU_BITS=64
15913      VAR_CPU_ENDIAN=big
15914      ;;
15915    *)
15916      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15917      ;;
15918  esac
15919
15920  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15921  OPENJDK_TARGET_OS="$VAR_OS"
15922  if test "x$VAR_OS_TYPE" != x; then
15923    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15924  else
15925    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15926  fi
15927  if test "x$VAR_OS_ENV" != x; then
15928    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15929  else
15930    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15931  fi
15932  OPENJDK_TARGET_CPU="$VAR_CPU"
15933  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15934  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15935  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15936
15937
15938
15939
15940
15941
15942
15943
15944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15945$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15947$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15948
15949
15950
15951# Check whether --with-target-bits was given.
15952if test "${with_target_bits+set}" = set; then :
15953  withval=$with_target_bits;
15954fi
15955
15956
15957  # We have three types of compiles:
15958  # native  == normal compilation, target system == build system
15959  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15960  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15961  #
15962  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15963    # We're doing a proper cross-compilation
15964    COMPILE_TYPE="cross"
15965  else
15966    COMPILE_TYPE="native"
15967  fi
15968
15969  if test "x$with_target_bits" != x; then
15970    if test "x$COMPILE_TYPE" = "xcross"; then
15971      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15972    fi
15973
15974    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15975      # A reduced build is requested
15976      COMPILE_TYPE="reduced"
15977      OPENJDK_TARGET_CPU_BITS=32
15978      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15979        OPENJDK_TARGET_CPU=x86
15980      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15981        OPENJDK_TARGET_CPU=sparc
15982      else
15983        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15984      fi
15985    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15986      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
15987    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15988      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15989$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15990    else
15991      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15992    fi
15993  fi
15994
15995
15996  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15997$as_echo_n "checking compilation type... " >&6; }
15998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15999$as_echo "$COMPILE_TYPE" >&6; }
16000
16001
16002  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16003    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16004  else
16005    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16006  fi
16007
16008  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16009    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16010  else
16011    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16012  fi
16013
16014  OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16015
16016
16017
16018  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16019    RELEASE_FILE_OS_NAME=SunOS
16020  fi
16021  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16022    RELEASE_FILE_OS_NAME=Linux
16023  fi
16024  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16025    RELEASE_FILE_OS_NAME=Windows
16026  fi
16027  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16028    RELEASE_FILE_OS_NAME="Darwin"
16029  fi
16030  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16031    RELEASE_FILE_OS_NAME="AIX"
16032  fi
16033  RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16034
16035
16036
16037
16038
16039
16040  # Also store the legacy naming of the cpu.
16041  # Ie i586 and amd64 instead of x86 and x86_64
16042  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16043  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16044    OPENJDK_TARGET_CPU_LEGACY="i586"
16045  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16046    # On all platforms except MacOSX replace x86_64 with amd64.
16047    OPENJDK_TARGET_CPU_LEGACY="amd64"
16048  fi
16049
16050
16051  # And the second legacy naming of the cpu.
16052  # Ie i386 and amd64 instead of x86 and x86_64.
16053  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16054  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16055    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16056  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16057    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16058  fi
16059
16060
16061  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16062  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16063  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16064  OPENJDK_TARGET_CPU_ISADIR=""
16065  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16066    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16067      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16068    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16069      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16070    fi
16071  fi
16072
16073
16074  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16075  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16076  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16077    # On linux only, we replace x86 with i386.
16078    OPENJDK_TARGET_CPU_OSARCH="i386"
16079  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16080    # On all platforms except macosx, we replace x86_64 with amd64.
16081    OPENJDK_TARGET_CPU_OSARCH="amd64"
16082  fi
16083
16084
16085  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16086  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16087    OPENJDK_TARGET_CPU_JLI="i386"
16088  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16089    # On all platforms except macosx, we replace x86_64 with amd64.
16090    OPENJDK_TARGET_CPU_JLI="amd64"
16091  fi
16092
16093  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16094      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16095  else
16096      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16097  fi
16098
16099
16100  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16101  # Macosx is osx and x86_64 is x64
16102  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16103    OPENJDK_TARGET_OS_BUNDLE="osx"
16104  else
16105    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16106  fi
16107  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16108    OPENJDK_TARGET_CPU_BUNDLE="x64"
16109  else
16110    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16111  fi
16112  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16113
16114
16115  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16116    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16117    # unpack200.exe. This variable is used in
16118    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16119    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16120      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16121    fi
16122  fi
16123
16124  if test "x$COMPILE_TYPE" = "xcross"; then
16125    # FIXME: ... or should this include reduced builds..?
16126    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16127  else
16128    DEFINE_CROSS_COMPILE_ARCH=""
16129  fi
16130
16131
16132  # Convert openjdk platform names to hotspot names
16133
16134  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16135  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16136    HOTSPOT_TARGET_OS=bsd
16137  fi
16138
16139
16140  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16141  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16142    HOTSPOT_TARGET_OS_TYPE=posix
16143  fi
16144
16145
16146  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16147  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16148    HOTSPOT_TARGET_CPU=x86_32
16149  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16150    HOTSPOT_TARGET_CPU=sparc
16151  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16152    HOTSPOT_TARGET_CPU=ppc_64
16153  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16154    HOTSPOT_TARGET_CPU=ppc_64
16155  fi
16156
16157
16158  # This is identical with OPENJDK_*, but define anyway for consistency.
16159  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16160
16161
16162  # Setup HOTSPOT_TARGET_CPU_DEFINE
16163  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16164    HOTSPOT_TARGET_CPU_DEFINE=IA32
16165  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16166    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16167  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16168    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16169  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16170    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16171  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16172    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16173  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16174    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16175
16176  # The cpu defines below are for zero, we don't support them directly.
16177  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16178    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16179  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16180    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16181  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16182    HOTSPOT_TARGET_CPU_DEFINE=S390
16183  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16184    HOTSPOT_TARGET_CPU_DEFINE=S390
16185  elif test "x$OPENJDK_TARGET_CPU" != x; then
16186    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16187  fi
16188
16189
16190
16191
16192  # Also store the legacy naming of the cpu.
16193  # Ie i586 and amd64 instead of x86 and x86_64
16194  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16195  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16196    OPENJDK_BUILD_CPU_LEGACY="i586"
16197  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16198    # On all platforms except MacOSX replace x86_64 with amd64.
16199    OPENJDK_BUILD_CPU_LEGACY="amd64"
16200  fi
16201
16202
16203  # And the second legacy naming of the cpu.
16204  # Ie i386 and amd64 instead of x86 and x86_64.
16205  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16206  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16207    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16208  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16209    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16210  fi
16211
16212
16213  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16214  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16215  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16216  OPENJDK_BUILD_CPU_ISADIR=""
16217  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16218    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16219      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16220    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16221      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16222    fi
16223  fi
16224
16225
16226  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16227  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16228  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16229    # On linux only, we replace x86 with i386.
16230    OPENJDK_BUILD_CPU_OSARCH="i386"
16231  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16232    # On all platforms except macosx, we replace x86_64 with amd64.
16233    OPENJDK_BUILD_CPU_OSARCH="amd64"
16234  fi
16235
16236
16237  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16238  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16239    OPENJDK_BUILD_CPU_JLI="i386"
16240  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16241    # On all platforms except macosx, we replace x86_64 with amd64.
16242    OPENJDK_BUILD_CPU_JLI="amd64"
16243  fi
16244
16245  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16246      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16247  else
16248      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16249  fi
16250
16251
16252  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16253  # Macosx is osx and x86_64 is x64
16254  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16255    OPENJDK_BUILD_OS_BUNDLE="osx"
16256  else
16257    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16258  fi
16259  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16260    OPENJDK_BUILD_CPU_BUNDLE="x64"
16261  else
16262    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16263  fi
16264  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16265
16266
16267  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16268    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16269    # unpack200.exe. This variable is used in
16270    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16271    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16272      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16273    fi
16274  fi
16275
16276  if test "x$COMPILE_TYPE" = "xcross"; then
16277    # FIXME: ... or should this include reduced builds..?
16278    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16279  else
16280    DEFINE_CROSS_COMPILE_ARCH=""
16281  fi
16282
16283
16284  # Convert openjdk platform names to hotspot names
16285
16286  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16287  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16288    HOTSPOT_BUILD_OS=bsd
16289  fi
16290
16291
16292  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16293  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16294    HOTSPOT_BUILD_OS_TYPE=posix
16295  fi
16296
16297
16298  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16299  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16300    HOTSPOT_BUILD_CPU=x86_32
16301  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16302    HOTSPOT_BUILD_CPU=sparc
16303  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16304    HOTSPOT_BUILD_CPU=ppc_64
16305  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16306    HOTSPOT_BUILD_CPU=ppc_64
16307  fi
16308
16309
16310  # This is identical with OPENJDK_*, but define anyway for consistency.
16311  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16312
16313
16314  # Setup HOTSPOT_BUILD_CPU_DEFINE
16315  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16316    HOTSPOT_BUILD_CPU_DEFINE=IA32
16317  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16318    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16319  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16320    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16321  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16322    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16323  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16324    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16325  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16326    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16327
16328  # The cpu defines below are for zero, we don't support them directly.
16329  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16330    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16331  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16332    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16333  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16334    HOTSPOT_BUILD_CPU_DEFINE=S390
16335  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16336    HOTSPOT_BUILD_CPU_DEFINE=S390
16337  elif test "x$OPENJDK_BUILD_CPU" != x; then
16338    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16339  fi
16340
16341
16342
16343
16344
16345
16346# Continue setting up basic stuff. Most remaining code require fundamental tools.
16347
16348  # Save the current directory this script was started from
16349  CURDIR="$PWD"
16350
16351  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16352  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16353  # was not available at that time.
16354  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16355  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16356    ORIGINAL_PATH="$REWRITTEN_PATH"
16357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16358$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16359  fi
16360
16361  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16362    PATH_SEP=";"
16363
16364  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16365  if test $SRC_ROOT_LENGTH -gt 100; then
16366    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16367  fi
16368
16369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16371$as_echo_n "checking cygwin release... " >&6; }
16372    CYGWIN_VERSION=`$UNAME -r`
16373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16374$as_echo "$CYGWIN_VERSION" >&6; }
16375    WINDOWS_ENV_VENDOR='cygwin'
16376    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16377
16378    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16379    if test "x$CYGWIN_VERSION_OLD" != x; then
16380      { $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
16381$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;}
16382      as_fn_error $? "Cannot continue" "$LINENO" 5
16383    fi
16384    if test "x$CYGPATH" = x; then
16385      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16386    fi
16387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16388$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16389    # The cmd output ends with Windows line endings (CR/LF)
16390    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16391    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16392    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16394$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16395    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16396    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16397    if test "x$test_cygdrive_prefix" = x; then
16398      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16399    fi
16400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16402$as_echo_n "checking msys release... " >&6; }
16403    MSYS_VERSION=`$UNAME -r`
16404    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16405$as_echo "$MSYS_VERSION" >&6; }
16406
16407    WINDOWS_ENV_VENDOR='msys'
16408    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16409
16410    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16411$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16412    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16413    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16414
16415  windows_path="$MSYS_ROOT_PATH"
16416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16417    unix_path=`$CYGPATH -u "$windows_path"`
16418    MSYS_ROOT_PATH="$unix_path"
16419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16421    MSYS_ROOT_PATH="$unix_path"
16422  fi
16423
16424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16425$as_echo "$MSYS_ROOT_PATH" >&6; }
16426    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16427  else
16428    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16429  fi
16430
16431  # Test if windows or unix (cygwin/msys) find is first in path.
16432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16433$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16434  FIND_BINARY_OUTPUT=`find --version 2>&1`
16435  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16437$as_echo "unix style" >&6; }
16438  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16440$as_echo "Windows" >&6; }
16441    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16442$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16443    { $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
16444$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16445    as_fn_error $? "Cannot continue" "$LINENO" 5
16446  else
16447    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16448$as_echo "unknown" >&6; }
16449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16450$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16451  fi
16452
16453  else
16454    PATH_SEP=":"
16455  fi
16456
16457
16458  # We get the top-level directory from the supporting wrappers.
16459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16460$as_echo_n "checking for top-level directory... " >&6; }
16461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16462$as_echo "$TOPDIR" >&6; }
16463
16464
16465  # Save the original version of TOPDIR for string comparisons
16466  ORIGINAL_TOPDIR="$TOPDIR"
16467
16468
16469  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16470
16471  # Only process if variable expands to non-empty
16472
16473  if test "x$CURDIR" != x; then
16474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16475
16476  # Input might be given as Windows format, start by converting to
16477  # unix format.
16478  path="$CURDIR"
16479  new_path=`$CYGPATH -u "$path"`
16480
16481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16484  # "foo.exe" is OK but "foo" is an error.
16485  #
16486  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16487  # It is also a way to make sure we got the proper file name for the real test later on.
16488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16489  if test "x$test_shortpath" = x; then
16490    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16491$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16492    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16493  fi
16494
16495  # Call helper function which possibly converts this using DOS-style short mode.
16496  # If so, the updated path is stored in $new_path.
16497
16498  input_path="$new_path"
16499  # Check if we need to convert this using DOS-style short mode. If the path
16500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16501  # take no chances and rewrite it.
16502  # Note: m4 eats our [], so we need to use [ and ] instead.
16503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16504  if test "x$has_forbidden_chars" != x; then
16505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16509      # Going to short mode and back again did indeed matter. Since short mode is
16510      # case insensitive, let's make it lowercase to improve readability.
16511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16512      # Now convert it back to Unix-style (cygpath)
16513      input_path=`$CYGPATH -u "$shortmode_path"`
16514      new_path="$input_path"
16515    fi
16516  fi
16517
16518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16519  if test "x$test_cygdrive_prefix" = x; then
16520    # As a simple fix, exclude /usr/bin since it's not a real path.
16521    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16523      # a path prefixed by /cygdrive for fixpath to work.
16524      new_path="$CYGWIN_ROOT_PATH$input_path"
16525    fi
16526  fi
16527
16528
16529  if test "x$path" != "x$new_path"; then
16530    CURDIR="$new_path"
16531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16532$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16533  fi
16534
16535    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16536
16537  path="$CURDIR"
16538  has_colon=`$ECHO $path | $GREP ^.:`
16539  new_path="$path"
16540  if test "x$has_colon" = x; then
16541    # Not in mixed or Windows style, start by that.
16542    new_path=`cmd //c echo $path`
16543  fi
16544
16545
16546  input_path="$new_path"
16547  # Check if we need to convert this using DOS-style short mode. If the path
16548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16549  # take no chances and rewrite it.
16550  # Note: m4 eats our [], so we need to use [ and ] instead.
16551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16552  if test "x$has_forbidden_chars" != x; then
16553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16555  fi
16556
16557
16558  windows_path="$new_path"
16559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16560    unix_path=`$CYGPATH -u "$windows_path"`
16561    new_path="$unix_path"
16562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16564    new_path="$unix_path"
16565  fi
16566
16567  if test "x$path" != "x$new_path"; then
16568    CURDIR="$new_path"
16569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16570$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16571  fi
16572
16573  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16574  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16575
16576    else
16577      # We're on a unix platform. Hooray! :)
16578      path="$CURDIR"
16579      has_space=`$ECHO "$path" | $GREP " "`
16580      if test "x$has_space" != x; then
16581        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16582$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16583        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16584      fi
16585
16586      # Use eval to expand a potential ~
16587      eval path="$path"
16588      if test ! -f "$path" && test ! -d "$path"; then
16589        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16590      fi
16591
16592      if test -d "$path"; then
16593        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16594      else
16595        dir="`$DIRNAME "$path"`"
16596        base="`$BASENAME "$path"`"
16597        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16598      fi
16599    fi
16600  fi
16601
16602
16603  # Only process if variable expands to non-empty
16604
16605  if test "x$TOPDIR" != x; then
16606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16607
16608  # Input might be given as Windows format, start by converting to
16609  # unix format.
16610  path="$TOPDIR"
16611  new_path=`$CYGPATH -u "$path"`
16612
16613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16616  # "foo.exe" is OK but "foo" is an error.
16617  #
16618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16619  # It is also a way to make sure we got the proper file name for the real test later on.
16620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16621  if test "x$test_shortpath" = x; then
16622    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16623$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16624    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16625  fi
16626
16627  # Call helper function which possibly converts this using DOS-style short mode.
16628  # If so, the updated path is stored in $new_path.
16629
16630  input_path="$new_path"
16631  # Check if we need to convert this using DOS-style short mode. If the path
16632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16633  # take no chances and rewrite it.
16634  # Note: m4 eats our [], so we need to use [ and ] instead.
16635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16636  if test "x$has_forbidden_chars" != x; then
16637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16641      # Going to short mode and back again did indeed matter. Since short mode is
16642      # case insensitive, let's make it lowercase to improve readability.
16643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16644      # Now convert it back to Unix-style (cygpath)
16645      input_path=`$CYGPATH -u "$shortmode_path"`
16646      new_path="$input_path"
16647    fi
16648  fi
16649
16650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16651  if test "x$test_cygdrive_prefix" = x; then
16652    # As a simple fix, exclude /usr/bin since it's not a real path.
16653    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16655      # a path prefixed by /cygdrive for fixpath to work.
16656      new_path="$CYGWIN_ROOT_PATH$input_path"
16657    fi
16658  fi
16659
16660
16661  if test "x$path" != "x$new_path"; then
16662    TOPDIR="$new_path"
16663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16664$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16665  fi
16666
16667    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16668
16669  path="$TOPDIR"
16670  has_colon=`$ECHO $path | $GREP ^.:`
16671  new_path="$path"
16672  if test "x$has_colon" = x; then
16673    # Not in mixed or Windows style, start by that.
16674    new_path=`cmd //c echo $path`
16675  fi
16676
16677
16678  input_path="$new_path"
16679  # Check if we need to convert this using DOS-style short mode. If the path
16680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16681  # take no chances and rewrite it.
16682  # Note: m4 eats our [], so we need to use [ and ] instead.
16683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16684  if test "x$has_forbidden_chars" != x; then
16685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16687  fi
16688
16689
16690  windows_path="$new_path"
16691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16692    unix_path=`$CYGPATH -u "$windows_path"`
16693    new_path="$unix_path"
16694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16696    new_path="$unix_path"
16697  fi
16698
16699  if test "x$path" != "x$new_path"; then
16700    TOPDIR="$new_path"
16701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16702$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16703  fi
16704
16705  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16706  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16707
16708    else
16709      # We're on a unix platform. Hooray! :)
16710      path="$TOPDIR"
16711      has_space=`$ECHO "$path" | $GREP " "`
16712      if test "x$has_space" != x; then
16713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16714$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16715        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16716      fi
16717
16718      # Use eval to expand a potential ~
16719      eval path="$path"
16720      if test ! -f "$path" && test ! -d "$path"; then
16721        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16722      fi
16723
16724      if test -d "$path"; then
16725        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16726      else
16727        dir="`$DIRNAME "$path"`"
16728        base="`$BASENAME "$path"`"
16729        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16730      fi
16731    fi
16732  fi
16733
16734  # SRC_ROOT is a traditional alias for TOPDIR.
16735  SRC_ROOT=$TOPDIR
16736
16737  # Calculate a canonical version of TOPDIR for string comparisons
16738  CANONICAL_TOPDIR=$TOPDIR
16739
16740  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16741    # Follow a chain of symbolic links. Use readlink
16742    # where it exists, else fall back to horribly
16743    # complicated shell code.
16744    if test "x$READLINK_TESTED" != yes; then
16745      # On MacOSX there is a readlink tool with a different
16746      # purpose than the GNU readlink tool. Check the found readlink.
16747      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16748      if test "x$ISGNU" = x; then
16749        # A readlink that we do not know how to use.
16750        # Are there other non-GNU readlinks out there?
16751        READLINK_TESTED=yes
16752        READLINK=
16753      fi
16754    fi
16755
16756    if test "x$READLINK" != x; then
16757      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16758    else
16759      # Save the current directory for restoring afterwards
16760      STARTDIR=$PWD
16761      COUNTER=0
16762      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16763      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16764      cd $sym_link_dir
16765      # Use -P flag to resolve symlinks in directories.
16766      cd `$THEPWDCMD -P`
16767      sym_link_dir=`$THEPWDCMD -P`
16768      # Resolve file symlinks
16769      while test $COUNTER -lt 20; do
16770        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16771        if test "x$ISLINK" == x; then
16772          # This is not a symbolic link! We are done!
16773          break
16774        fi
16775        # Again resolve directory symlinks since the target of the just found
16776        # link could be in a different directory
16777        cd `$DIRNAME $ISLINK`
16778        sym_link_dir=`$THEPWDCMD -P`
16779        sym_link_file=`$BASENAME $ISLINK`
16780        let COUNTER=COUNTER+1
16781      done
16782      cd $STARTDIR
16783      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16784    fi
16785  fi
16786
16787
16788
16789  # Locate the directory of this script.
16790  AUTOCONF_DIR=$TOPDIR/common/autoconf
16791
16792  # Setup username (for use in adhoc version strings etc)
16793  # Outer [ ] to quote m4.
16794   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16795
16796
16797
16798# Check if it's a pure open build or if custom sources are to be used.
16799
16800  # Check whether --enable-openjdk-only was given.
16801if test "${enable_openjdk_only+set}" = set; then :
16802  enableval=$enable_openjdk_only;
16803else
16804  enable_openjdk_only="no"
16805fi
16806
16807
16808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16809$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16811$as_echo "$enable_openjdk_only" >&6; }
16812  if test "x$enable_openjdk_only" = "xyes"; then
16813    SUPPRESS_CUSTOM_EXTENSIONS="true"
16814  elif test "x$enable_openjdk_only" = "xno"; then
16815    SUPPRESS_CUSTOM_EXTENSIONS="false"
16816  else
16817    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16818  fi
16819
16820  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16821  # the IncludeCustomExtension macro.
16822
16823
16824# Check whether --with-custom-make-dir was given.
16825if test "${with_custom_make_dir+set}" = set; then :
16826  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
16827$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16828fi
16829
16830
16831
16832
16833# These are needed to be able to create a configuration name (and thus the output directory)
16834
16835  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16836$as_echo_n "checking which variant of the JDK to build... " >&6; }
16837
16838# Check whether --with-jdk-variant was given.
16839if test "${with_jdk_variant+set}" = set; then :
16840  withval=$with_jdk_variant;
16841fi
16842
16843
16844  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16845    JDK_VARIANT="normal"
16846  else
16847    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16848  fi
16849
16850
16851
16852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16853$as_echo "$JDK_VARIANT" >&6; }
16854
16855
16856  DEBUG_LEVEL="release"
16857  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16858$as_echo_n "checking which debug level to use... " >&6; }
16859  # Check whether --enable-debug was given.
16860if test "${enable_debug+set}" = set; then :
16861  enableval=$enable_debug;
16862        ENABLE_DEBUG="${enableval}"
16863        DEBUG_LEVEL="fastdebug"
16864
16865else
16866  ENABLE_DEBUG="no"
16867fi
16868
16869
16870
16871# Check whether --with-debug-level was given.
16872if test "${with_debug_level+set}" = set; then :
16873  withval=$with_debug_level;
16874        DEBUG_LEVEL="${withval}"
16875        if test "x$ENABLE_DEBUG" = xyes; then
16876          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16877        fi
16878
16879fi
16880
16881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16882$as_echo "$DEBUG_LEVEL" >&6; }
16883
16884  if test "x$DEBUG_LEVEL" != xrelease && \
16885      test "x$DEBUG_LEVEL" != xoptimized && \
16886      test "x$DEBUG_LEVEL" != xfastdebug && \
16887      test "x$DEBUG_LEVEL" != xslowdebug; then
16888    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16889  fi
16890
16891  # Translate DEBUG_LEVEL to debug level used by Hotspot
16892  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16893  if test "x$DEBUG_LEVEL" = xrelease; then
16894    HOTSPOT_DEBUG_LEVEL="product"
16895  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16896    HOTSPOT_DEBUG_LEVEL="debug"
16897  fi
16898
16899  if test "x$DEBUG_LEVEL" = xoptimized; then
16900    # The debug level 'optimized' is a little special because it is currently only
16901    # applicable to the HotSpot build where it means to build a completely
16902    # optimized version of the VM without any debugging code (like for the
16903    # 'release' debug level which is called 'product' in the HotSpot build) but
16904    # with the exception that it can contain additional code which is otherwise
16905    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16906    # test new and/or experimental features which are not intended for customer
16907    # shipment. Because these new features need to be tested and benchmarked in
16908    # real world scenarios, we want to build the containing JDK at the 'release'
16909    # debug level.
16910    DEBUG_LEVEL="release"
16911  fi
16912
16913
16914
16915
16916
16917
16918# Check whether --with-jvm-variants was given.
16919if test "${with_jvm_variants+set}" = set; then :
16920  withval=$with_jvm_variants;
16921fi
16922
16923
16924
16925
16926# Check whether --with-cpu-port was given.
16927if test "${with_cpu_port+set}" = set; then :
16928  withval=$with_cpu_port;
16929fi
16930
16931
16932  if test "x$with_cpu_port" != x; then
16933    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16934      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16935    fi
16936    if test "x$with_cpu_port" != xarm64 && \
16937        test "x$with_cpu_port" != xaarch64; then
16938      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16939    fi
16940    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16941  fi
16942
16943
16944  if test "x$with_jvm_variants" = x; then
16945    with_jvm_variants="server"
16946  fi
16947  JVM_VARIANTS_OPT="$with_jvm_variants"
16948
16949  # Has the user listed more than one variant?
16950  # Additional [] needed to keep m4 from mangling shell constructs.
16951  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16952    BUILDING_MULTIPLE_JVM_VARIANTS=true
16953  else
16954    BUILDING_MULTIPLE_JVM_VARIANTS=false
16955  fi
16956  # Replace the commas with AND for use in the build directory name.
16957  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16958
16959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16960$as_echo_n "checking which variants of the JVM to build... " >&6; }
16961  # JVM_VARIANTS is a space-separated list.
16962  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16963  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16965$as_echo "$JVM_VARIANTS" >&6; }
16966
16967  # Check that the selected variants are valid
16968
16969  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16970  # Notice that the original variant failes on SLES 10 and 11
16971  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16972  STACK=${JVM_VARIANTS// /$'\n'}
16973  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16974  if test "x$INVALID_VARIANTS" != x; then
16975    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16976$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16977    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16978  fi
16979
16980  # All "special" variants share the same output directory ("server")
16981  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16982  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16983  STACK=${JVM_VARIANTS// /$'\n'}
16984  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16985  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16986    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16987  fi
16988
16989  # The "main" variant is the one used by other libs to link against during the
16990  # build.
16991  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16992    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16993    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16994      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16995        JVM_VARIANT_MAIN="$variant"
16996        break
16997      fi
16998    done
16999  else
17000    JVM_VARIANT_MAIN="$JVM_VARIANTS"
17001  fi
17002
17003
17004
17005
17006
17007  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17008    # zero behaves as a platform and rewrites these values. This is really weird. :(
17009    # We are guaranteed that we do not build any other variants when building zero.
17010    HOTSPOT_TARGET_CPU=zero
17011    HOTSPOT_TARGET_CPU_ARCH=zero
17012  fi
17013
17014
17015# With basic setup done, call the custom early hook.
17016
17017
17018# Check if we have devkits, extra paths or sysroot set.
17019
17020
17021# Check whether --with-devkit was given.
17022if test "${with_devkit+set}" = set; then :
17023  withval=$with_devkit;
17024
17025  # Only process if variable expands to non-empty
17026
17027  if test "x$with_devkit" != x; then
17028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17029
17030  # Input might be given as Windows format, start by converting to
17031  # unix format.
17032  path="$with_devkit"
17033  new_path=`$CYGPATH -u "$path"`
17034
17035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17038  # "foo.exe" is OK but "foo" is an error.
17039  #
17040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17041  # It is also a way to make sure we got the proper file name for the real test later on.
17042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17043  if test "x$test_shortpath" = x; then
17044    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17045$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17046    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17047  fi
17048
17049  # Call helper function which possibly converts this using DOS-style short mode.
17050  # If so, the updated path is stored in $new_path.
17051
17052  input_path="$new_path"
17053  # Check if we need to convert this using DOS-style short mode. If the path
17054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17055  # take no chances and rewrite it.
17056  # Note: m4 eats our [], so we need to use [ and ] instead.
17057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17058  if test "x$has_forbidden_chars" != x; then
17059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17063      # Going to short mode and back again did indeed matter. Since short mode is
17064      # case insensitive, let's make it lowercase to improve readability.
17065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17066      # Now convert it back to Unix-style (cygpath)
17067      input_path=`$CYGPATH -u "$shortmode_path"`
17068      new_path="$input_path"
17069    fi
17070  fi
17071
17072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17073  if test "x$test_cygdrive_prefix" = x; then
17074    # As a simple fix, exclude /usr/bin since it's not a real path.
17075    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17077      # a path prefixed by /cygdrive for fixpath to work.
17078      new_path="$CYGWIN_ROOT_PATH$input_path"
17079    fi
17080  fi
17081
17082
17083  if test "x$path" != "x$new_path"; then
17084    with_devkit="$new_path"
17085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17086$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17087  fi
17088
17089    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17090
17091  path="$with_devkit"
17092  has_colon=`$ECHO $path | $GREP ^.:`
17093  new_path="$path"
17094  if test "x$has_colon" = x; then
17095    # Not in mixed or Windows style, start by that.
17096    new_path=`cmd //c echo $path`
17097  fi
17098
17099
17100  input_path="$new_path"
17101  # Check if we need to convert this using DOS-style short mode. If the path
17102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17103  # take no chances and rewrite it.
17104  # Note: m4 eats our [], so we need to use [ and ] instead.
17105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17106  if test "x$has_forbidden_chars" != x; then
17107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17109  fi
17110
17111
17112  windows_path="$new_path"
17113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17114    unix_path=`$CYGPATH -u "$windows_path"`
17115    new_path="$unix_path"
17116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17118    new_path="$unix_path"
17119  fi
17120
17121  if test "x$path" != "x$new_path"; then
17122    with_devkit="$new_path"
17123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17124$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17125  fi
17126
17127  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17128  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17129
17130    else
17131      # We're on a unix platform. Hooray! :)
17132      path="$with_devkit"
17133      has_space=`$ECHO "$path" | $GREP " "`
17134      if test "x$has_space" != x; then
17135        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17136$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17137        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17138      fi
17139
17140      # Use eval to expand a potential ~
17141      eval path="$path"
17142      if test ! -f "$path" && test ! -d "$path"; then
17143        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17144      fi
17145
17146      if test -d "$path"; then
17147        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17148      else
17149        dir="`$DIRNAME "$path"`"
17150        base="`$BASENAME "$path"`"
17151        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17152      fi
17153    fi
17154  fi
17155
17156        DEVKIT_ROOT="$with_devkit"
17157        # Check for a meta data info file in the root of the devkit
17158        if test -f "$DEVKIT_ROOT/devkit.info"; then
17159          . $DEVKIT_ROOT/devkit.info
17160          # This potentially sets the following:
17161          # A descriptive name of the devkit
17162
17163  if test "x$DEVKIT_NAME" = x; then
17164    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17165  fi
17166
17167          # Corresponds to --with-extra-path
17168
17169  if test "x$DEVKIT_EXTRA_PATH" = x; then
17170    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17171  fi
17172
17173          # Corresponds to --with-toolchain-path
17174
17175  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17176    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17177  fi
17178
17179          # Corresponds to --with-sysroot
17180
17181  if test "x$DEVKIT_SYSROOT" = x; then
17182    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17183  fi
17184
17185
17186          # Identifies the Visual Studio version in the devkit
17187
17188  if test "x$DEVKIT_VS_VERSION" = x; then
17189    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17190  fi
17191
17192          # The Visual Studio include environment variable
17193
17194  if test "x$DEVKIT_VS_INCLUDE" = x; then
17195    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17196  fi
17197
17198          # The Visual Studio lib environment variable
17199
17200  if test "x$DEVKIT_VS_LIB" = x; then
17201    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17202  fi
17203
17204          # Corresponds to --with-msvcr-dll
17205
17206  if test "x$DEVKIT_MSVCR_DLL" = x; then
17207    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17208  fi
17209
17210          # Corresponds to --with-msvcp-dll
17211
17212  if test "x$DEVKIT_MSVCP_DLL" = x; then
17213    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17214  fi
17215
17216        fi
17217
17218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17219$as_echo_n "checking for devkit... " >&6; }
17220        if test "x$DEVKIT_NAME" != x; then
17221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17222$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17223        else
17224          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17225$as_echo "$DEVKIT_ROOT" >&6; }
17226        fi
17227
17228
17229  if test "x$DEVKIT_EXTRA_PATH" != x; then
17230    if test "x$EXTRA_PATH" = x; then
17231      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17232    else
17233      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17234    fi
17235  fi
17236
17237
17238        # Fallback default of just /bin if DEVKIT_PATH is not defined
17239        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17240          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17241        fi
17242
17243  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17244    if test "x$TOOLCHAIN_PATH" = x; then
17245      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17246    else
17247      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17248    fi
17249  fi
17250
17251
17252        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17253        # places for backwards compatiblity.
17254        if test "x$DEVKIT_SYSROOT" != x; then
17255          SYSROOT="$DEVKIT_SYSROOT"
17256        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17257          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17258        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17259          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17260        fi
17261
17262
17263fi
17264
17265
17266  # You can force the sysroot if the sysroot encoded into the compiler tools
17267  # is not correct.
17268
17269# Check whether --with-sys-root was given.
17270if test "${with_sys_root+set}" = set; then :
17271  withval=$with_sys_root; SYSROOT=$with_sys_root
17272
17273fi
17274
17275
17276
17277# Check whether --with-sysroot was given.
17278if test "${with_sysroot+set}" = set; then :
17279  withval=$with_sysroot; SYSROOT=$with_sysroot
17280
17281fi
17282
17283
17284
17285# Check whether --with-tools-dir was given.
17286if test "${with_tools_dir+set}" = set; then :
17287  withval=$with_tools_dir;
17288  if test "x$with_tools_dir" != x; then
17289    if test "x$TOOLCHAIN_PATH" = x; then
17290      TOOLCHAIN_PATH="$with_tools_dir"
17291    else
17292      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17293    fi
17294  fi
17295
17296
17297fi
17298
17299
17300
17301# Check whether --with-toolchain-path was given.
17302if test "${with_toolchain_path+set}" = set; then :
17303  withval=$with_toolchain_path;
17304  if test "x$with_toolchain_path" != x; then
17305    if test "x$TOOLCHAIN_PATH" = x; then
17306      TOOLCHAIN_PATH="$with_toolchain_path"
17307    else
17308      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17309    fi
17310  fi
17311
17312
17313fi
17314
17315
17316
17317# Check whether --with-extra-path was given.
17318if test "${with_extra_path+set}" = set; then :
17319  withval=$with_extra_path;
17320  if test "x$with_extra_path" != x; then
17321    if test "x$EXTRA_PATH" = x; then
17322      EXTRA_PATH="$with_extra_path"
17323    else
17324      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17325    fi
17326  fi
17327
17328
17329fi
17330
17331
17332  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17333    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17334    # If not, detect if Xcode is installed by running xcodebuild -version
17335    # if no Xcode installed, xcodebuild exits with 1
17336    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17337    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17338      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17339      # fall back on the stub binary in /usr/bin/xcodebuild
17340      # Extract the first word of "xcodebuild", so it can be a program name with args.
17341set dummy xcodebuild; ac_word=$2
17342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17343$as_echo_n "checking for $ac_word... " >&6; }
17344if ${ac_cv_path_XCODEBUILD+:} false; then :
17345  $as_echo_n "(cached) " >&6
17346else
17347  case $XCODEBUILD in
17348  [\\/]* | ?:[\\/]*)
17349  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17350  ;;
17351  *)
17352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17353for as_dir in $TOOLCHAIN_PATH
17354do
17355  IFS=$as_save_IFS
17356  test -z "$as_dir" && as_dir=.
17357    for ac_exec_ext in '' $ac_executable_extensions; do
17358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17359    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17361    break 2
17362  fi
17363done
17364  done
17365IFS=$as_save_IFS
17366
17367  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17368  ;;
17369esac
17370fi
17371XCODEBUILD=$ac_cv_path_XCODEBUILD
17372if test -n "$XCODEBUILD"; then
17373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17374$as_echo "$XCODEBUILD" >&6; }
17375else
17376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17377$as_echo "no" >&6; }
17378fi
17379
17380
17381    else
17382      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17383      # when only the command line tools are installed there are no SDKs, so headers
17384      # are copied into the system frameworks
17385      XCODEBUILD=
17386
17387    fi
17388
17389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17390$as_echo_n "checking for sdk name... " >&6; }
17391
17392# Check whether --with-sdk-name was given.
17393if test "${with_sdk_name+set}" = set; then :
17394  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17395
17396fi
17397
17398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17399$as_echo "$SDKNAME" >&6; }
17400
17401    # if toolchain path is specified then don't rely on system headers, they may not compile
17402    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17403    test -z "$TOOLCHAIN_PATH" && \
17404      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17405
17406    if test -z "$SYSROOT"; then
17407      if test -n "$XCODEBUILD"; then
17408        # if we don't have system headers, use default SDK name (last resort)
17409        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17410          SDKNAME=${SDKNAME:-macosx}
17411        fi
17412
17413        if test -n "$SDKNAME"; then
17414          # Call xcodebuild to determine SYSROOT
17415          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17416        fi
17417      else
17418        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17419          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
17420        fi
17421      fi
17422    else
17423      # warn user if --with-sdk-name was also set
17424      if test -n "$with_sdk_name"; then
17425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17426$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17427      fi
17428    fi
17429
17430    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17431      # If no system framework headers, then SYSROOT must be set, or we won't build
17432      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
17433    fi
17434
17435    # Perform a basic sanity test
17436    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17437      if test -z "$SYSROOT"; then
17438        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
17439      else
17440        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17441      fi
17442    fi
17443
17444    # set SDKROOT too, Xcode tools will pick it up
17445    SDKROOT="$SYSROOT"
17446
17447  fi
17448
17449  # Prepend the extra path to the global path
17450
17451  if test "x$EXTRA_PATH" != x; then
17452    if test "x$PATH" = x; then
17453      PATH="$EXTRA_PATH"
17454    else
17455      PATH="$EXTRA_PATH:$PATH"
17456    fi
17457  fi
17458
17459
17460  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17461$as_echo_n "checking for sysroot... " >&6; }
17462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17463$as_echo "$SYSROOT" >&6; }
17464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17465$as_echo_n "checking for toolchain path... " >&6; }
17466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17467$as_echo "$TOOLCHAIN_PATH" >&6; }
17468  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17469$as_echo_n "checking for extra path... " >&6; }
17470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17471$as_echo "$EXTRA_PATH" >&6; }
17472
17473
17474# To properly create a configuration name, we need to have the OpenJDK target
17475# and options (variants and debug level) parsed.
17476
17477
17478
17479# Check whether --with-conf-name was given.
17480if test "${with_conf_name+set}" = set; then :
17481  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17482fi
17483
17484
17485  # Test from where we are running configure, in or outside of src root.
17486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17487$as_echo_n "checking where to store configuration... " >&6; }
17488  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17489      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17490      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17491    # We are running configure from the src root.
17492    # Create a default ./build/target-variant-debuglevel output root.
17493    if test "x${CONF_NAME}" = x; then
17494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17495$as_echo "in default location" >&6; }
17496      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17497    else
17498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17499$as_echo "in build directory with custom name" >&6; }
17500    fi
17501    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17502    $MKDIR -p "$OUTPUT_ROOT"
17503    if test ! -d "$OUTPUT_ROOT"; then
17504      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17505    fi
17506  else
17507    # We are running configure from outside of the src dir.
17508    # Then use the current directory as output dir!
17509    # If configuration is situated in normal build directory, just use the build
17510    # directory name as configuration name, otherwise use the complete path.
17511    if test "x${CONF_NAME}" = x; then
17512      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17513    fi
17514    OUTPUT_ROOT="$CURDIR"
17515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17516$as_echo "in current directory" >&6; }
17517
17518    # WARNING: This might be a bad thing to do. You need to be sure you want to
17519    # have a configuration in this directory. Do some sanity checks!
17520
17521    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17522      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17523      # other files
17524      files_present=`$LS $OUTPUT_ROOT`
17525      # Configure has already touched config.log and confdefs.h in the current dir when this check
17526      # is performed.
17527      filtered_files=`$ECHO "$files_present" \
17528          | $SED -e 's/config.log//g' \
17529              -e 's/configure.log//g' \
17530              -e 's/confdefs.h//g' \
17531              -e 's/ //g' \
17532          | $TR -d '\n'`
17533      if test "x$filtered_files" != x; then
17534        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17535$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17536        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17537$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17538        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17539$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17540        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17541$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17542        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17543$as_echo "$as_me: seriously mess up just about everything." >&6;}
17544        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17545$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17546        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17547$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17548        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17549      fi
17550    fi
17551  fi
17552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17553$as_echo_n "checking what configuration name to use... " >&6; }
17554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17555$as_echo "$CONF_NAME" >&6; }
17556
17557
17558  # Only process if variable expands to non-empty
17559
17560  if test "x$OUTPUT_ROOT" != x; then
17561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17562
17563  # Input might be given as Windows format, start by converting to
17564  # unix format.
17565  path="$OUTPUT_ROOT"
17566  new_path=`$CYGPATH -u "$path"`
17567
17568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17571  # "foo.exe" is OK but "foo" is an error.
17572  #
17573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17574  # It is also a way to make sure we got the proper file name for the real test later on.
17575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17576  if test "x$test_shortpath" = x; then
17577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17578$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17579    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17580  fi
17581
17582  # Call helper function which possibly converts this using DOS-style short mode.
17583  # If so, the updated path is stored in $new_path.
17584
17585  input_path="$new_path"
17586  # Check if we need to convert this using DOS-style short mode. If the path
17587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17588  # take no chances and rewrite it.
17589  # Note: m4 eats our [], so we need to use [ and ] instead.
17590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17591  if test "x$has_forbidden_chars" != x; then
17592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17596      # Going to short mode and back again did indeed matter. Since short mode is
17597      # case insensitive, let's make it lowercase to improve readability.
17598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17599      # Now convert it back to Unix-style (cygpath)
17600      input_path=`$CYGPATH -u "$shortmode_path"`
17601      new_path="$input_path"
17602    fi
17603  fi
17604
17605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17606  if test "x$test_cygdrive_prefix" = x; then
17607    # As a simple fix, exclude /usr/bin since it's not a real path.
17608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17610      # a path prefixed by /cygdrive for fixpath to work.
17611      new_path="$CYGWIN_ROOT_PATH$input_path"
17612    fi
17613  fi
17614
17615
17616  if test "x$path" != "x$new_path"; then
17617    OUTPUT_ROOT="$new_path"
17618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17619$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17620  fi
17621
17622    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17623
17624  path="$OUTPUT_ROOT"
17625  has_colon=`$ECHO $path | $GREP ^.:`
17626  new_path="$path"
17627  if test "x$has_colon" = x; then
17628    # Not in mixed or Windows style, start by that.
17629    new_path=`cmd //c echo $path`
17630  fi
17631
17632
17633  input_path="$new_path"
17634  # Check if we need to convert this using DOS-style short mode. If the path
17635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17636  # take no chances and rewrite it.
17637  # Note: m4 eats our [], so we need to use [ and ] instead.
17638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17639  if test "x$has_forbidden_chars" != x; then
17640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17642  fi
17643
17644
17645  windows_path="$new_path"
17646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17647    unix_path=`$CYGPATH -u "$windows_path"`
17648    new_path="$unix_path"
17649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17651    new_path="$unix_path"
17652  fi
17653
17654  if test "x$path" != "x$new_path"; then
17655    OUTPUT_ROOT="$new_path"
17656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17657$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17658  fi
17659
17660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17662
17663    else
17664      # We're on a unix platform. Hooray! :)
17665      path="$OUTPUT_ROOT"
17666      has_space=`$ECHO "$path" | $GREP " "`
17667      if test "x$has_space" != x; then
17668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17669$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17670        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17671      fi
17672
17673      # Use eval to expand a potential ~
17674      eval path="$path"
17675      if test ! -f "$path" && test ! -d "$path"; then
17676        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17677      fi
17678
17679      if test -d "$path"; then
17680        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17681      else
17682        dir="`$DIRNAME "$path"`"
17683        base="`$BASENAME "$path"`"
17684        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17685      fi
17686    fi
17687  fi
17688
17689
17690  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17691  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17692
17693  SPEC="$OUTPUT_ROOT/spec.gmk"
17694
17695
17696
17697
17698
17699  # The spec.gmk file contains all variables for the make system.
17700  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17701
17702  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17703  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17704
17705  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17706  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17707
17708  # The compare.sh is used to compare the build output to other builds.
17709  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17710
17711  # The generated Makefile knows where the spec.gmk is and where the source is.
17712  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17713  # which will look for generated configurations
17714  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17715
17716
17717
17718# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17719
17720  for ac_prog in apt-get yum brew port pkgutil pkgadd
17721do
17722  # Extract the first word of "$ac_prog", so it can be a program name with args.
17723set dummy $ac_prog; ac_word=$2
17724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17725$as_echo_n "checking for $ac_word... " >&6; }
17726if ${ac_cv_prog_PKGHANDLER+:} false; then :
17727  $as_echo_n "(cached) " >&6
17728else
17729  if test -n "$PKGHANDLER"; then
17730  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17731else
17732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17733for as_dir in $PATH
17734do
17735  IFS=$as_save_IFS
17736  test -z "$as_dir" && as_dir=.
17737    for ac_exec_ext in '' $ac_executable_extensions; do
17738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17739    ac_cv_prog_PKGHANDLER="$ac_prog"
17740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17741    break 2
17742  fi
17743done
17744  done
17745IFS=$as_save_IFS
17746
17747fi
17748fi
17749PKGHANDLER=$ac_cv_prog_PKGHANDLER
17750if test -n "$PKGHANDLER"; then
17751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17752$as_echo "$PKGHANDLER" >&6; }
17753else
17754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17755$as_echo "no" >&6; }
17756fi
17757
17758
17759  test -n "$PKGHANDLER" && break
17760done
17761
17762
17763
17764# Setup tools that requires more complex handling, or that is not needed by the configure script.
17765
17766
17767
17768  # Publish this variable in the help.
17769
17770
17771  if [ -z "${MAKE+x}" ]; then
17772    # The variable is not set by user, try to locate tool using the code snippet
17773
17774    # Try our hardest to locate a correct version of GNU make
17775    for ac_prog in gmake
17776do
17777  # Extract the first word of "$ac_prog", so it can be a program name with args.
17778set dummy $ac_prog; ac_word=$2
17779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17780$as_echo_n "checking for $ac_word... " >&6; }
17781if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17782  $as_echo_n "(cached) " >&6
17783else
17784  case $CHECK_GMAKE in
17785  [\\/]* | ?:[\\/]*)
17786  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17787  ;;
17788  *)
17789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17790for as_dir in $PATH
17791do
17792  IFS=$as_save_IFS
17793  test -z "$as_dir" && as_dir=.
17794    for ac_exec_ext in '' $ac_executable_extensions; do
17795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17796    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17798    break 2
17799  fi
17800done
17801  done
17802IFS=$as_save_IFS
17803
17804  ;;
17805esac
17806fi
17807CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17808if test -n "$CHECK_GMAKE"; then
17809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17810$as_echo "$CHECK_GMAKE" >&6; }
17811else
17812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17813$as_echo "no" >&6; }
17814fi
17815
17816
17817  test -n "$CHECK_GMAKE" && break
17818done
17819
17820
17821  MAKE_CANDIDATE=""$CHECK_GMAKE""
17822  DESCRIPTION="gmake in PATH"
17823
17824  # On Cygwin, we require a newer version of make than on other platforms
17825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17826    MAKE_VERSION_EXPR="-e 4\."
17827    MAKE_REQUIRED_VERSION="4.0"
17828   else
17829    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17830    MAKE_REQUIRED_VERSION="3.81"
17831  fi
17832
17833  if test "x$MAKE_CANDIDATE" != x; then
17834    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17835$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17836    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17837    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17838    if test "x$IS_GNU_MAKE" = x; then
17839      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17840$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17841    else
17842      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17843      if test "x$IS_MODERN_MAKE" = x; then
17844        { $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
17845$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;}
17846      else
17847        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17848          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17849            MAKE_EXPECTED_ENV='cygwin'
17850          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17851            MAKE_EXPECTED_ENV='msys'
17852          else
17853            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17854          fi
17855          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17856          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17857        else
17858          # Not relevant for non-Windows
17859          IS_MAKE_CORRECT_ENV=true
17860        fi
17861        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17862          { $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
17863$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;}
17864        else
17865          FOUND_MAKE=$MAKE_CANDIDATE
17866
17867  # Only process if variable expands to non-empty
17868
17869  if test "x$FOUND_MAKE" != x; then
17870    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17871
17872  # First separate the path from the arguments. This will split at the first
17873  # space.
17874  complete="$FOUND_MAKE"
17875  path="${complete%% *}"
17876  tmp="$complete EOL"
17877  arguments="${tmp#* }"
17878
17879  # Input might be given as Windows format, start by converting to
17880  # unix format.
17881  new_path=`$CYGPATH -u "$path"`
17882
17883  # Now try to locate executable using which
17884  new_path=`$WHICH "$new_path" 2> /dev/null`
17885  # bat and cmd files are not always considered executable in cygwin causing which
17886  # to not find them
17887  if test "x$new_path" = x \
17888      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17889      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17890    new_path=`$CYGPATH -u "$path"`
17891  fi
17892  if test "x$new_path" = x; then
17893    # Oops. Which didn't find the executable.
17894    # The splitting of arguments from the executable at a space might have been incorrect,
17895    # since paths with space are more likely in Windows. Give it another try with the whole
17896    # argument.
17897    path="$complete"
17898    arguments="EOL"
17899    new_path=`$CYGPATH -u "$path"`
17900    new_path=`$WHICH "$new_path" 2> /dev/null`
17901    # bat and cmd files are not always considered executable in cygwin causing which
17902    # to not find them
17903    if test "x$new_path" = x \
17904        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17905        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17906      new_path=`$CYGPATH -u "$path"`
17907    fi
17908    if test "x$new_path" = x; then
17909      # It's still not found. Now this is an unrecoverable error.
17910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17911$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17912      has_space=`$ECHO "$complete" | $GREP " "`
17913      if test "x$has_space" != x; then
17914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17916      fi
17917      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17918    fi
17919  fi
17920
17921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17924  # "foo.exe" is OK but "foo" is an error.
17925  #
17926  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17927  # It is also a way to make sure we got the proper file name for the real test later on.
17928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17929  if test "x$test_shortpath" = x; then
17930    # Short path failed, file does not exist as specified.
17931    # Try adding .exe or .cmd
17932    if test -f "${new_path}.exe"; then
17933      input_to_shortpath="${new_path}.exe"
17934    elif test -f "${new_path}.cmd"; then
17935      input_to_shortpath="${new_path}.cmd"
17936    else
17937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17938$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17939      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17940$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17941      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17942    fi
17943  else
17944    input_to_shortpath="$new_path"
17945  fi
17946
17947  # Call helper function which possibly converts this using DOS-style short mode.
17948  # If so, the updated path is stored in $new_path.
17949  new_path="$input_to_shortpath"
17950
17951  input_path="$input_to_shortpath"
17952  # Check if we need to convert this using DOS-style short mode. If the path
17953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17954  # take no chances and rewrite it.
17955  # Note: m4 eats our [], so we need to use [ and ] instead.
17956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17957  if test "x$has_forbidden_chars" != x; then
17958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17962      # Going to short mode and back again did indeed matter. Since short mode is
17963      # case insensitive, let's make it lowercase to improve readability.
17964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17965      # Now convert it back to Unix-style (cygpath)
17966      input_path=`$CYGPATH -u "$shortmode_path"`
17967      new_path="$input_path"
17968    fi
17969  fi
17970
17971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17972  if test "x$test_cygdrive_prefix" = x; then
17973    # As a simple fix, exclude /usr/bin since it's not a real path.
17974    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17976      # a path prefixed by /cygdrive for fixpath to work.
17977      new_path="$CYGWIN_ROOT_PATH$input_path"
17978    fi
17979  fi
17980
17981  # remove trailing .exe if any
17982  new_path="${new_path/%.exe/}"
17983
17984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17985
17986  # First separate the path from the arguments. This will split at the first
17987  # space.
17988  complete="$FOUND_MAKE"
17989  path="${complete%% *}"
17990  tmp="$complete EOL"
17991  arguments="${tmp#* }"
17992
17993  # Input might be given as Windows format, start by converting to
17994  # unix format.
17995  new_path="$path"
17996
17997  windows_path="$new_path"
17998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17999    unix_path=`$CYGPATH -u "$windows_path"`
18000    new_path="$unix_path"
18001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18003    new_path="$unix_path"
18004  fi
18005
18006
18007  # Now try to locate executable using which
18008  new_path=`$WHICH "$new_path" 2> /dev/null`
18009
18010  if test "x$new_path" = x; then
18011    # Oops. Which didn't find the executable.
18012    # The splitting of arguments from the executable at a space might have been incorrect,
18013    # since paths with space are more likely in Windows. Give it another try with the whole
18014    # argument.
18015    path="$complete"
18016    arguments="EOL"
18017    new_path="$path"
18018
18019  windows_path="$new_path"
18020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18021    unix_path=`$CYGPATH -u "$windows_path"`
18022    new_path="$unix_path"
18023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18025    new_path="$unix_path"
18026  fi
18027
18028
18029    new_path=`$WHICH "$new_path" 2> /dev/null`
18030    # bat and cmd files are not always considered executable in MSYS causing which
18031    # to not find them
18032    if test "x$new_path" = x \
18033        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18034        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18035      new_path="$path"
18036
18037  windows_path="$new_path"
18038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18039    unix_path=`$CYGPATH -u "$windows_path"`
18040    new_path="$unix_path"
18041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18043    new_path="$unix_path"
18044  fi
18045
18046    fi
18047
18048    if test "x$new_path" = x; then
18049      # It's still not found. Now this is an unrecoverable error.
18050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18052      has_space=`$ECHO "$complete" | $GREP " "`
18053      if test "x$has_space" != x; then
18054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18056      fi
18057      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18058    fi
18059  fi
18060
18061  # Now new_path has a complete unix path to the binary
18062  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18063    # Keep paths in /bin as-is, but remove trailing .exe if any
18064    new_path="${new_path/%.exe/}"
18065    # Do not save /bin paths to all_fixpath_prefixes!
18066  else
18067    # Not in mixed or Windows style, start by that.
18068    new_path=`cmd //c echo $new_path`
18069
18070  input_path="$new_path"
18071  # Check if we need to convert this using DOS-style short mode. If the path
18072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18073  # take no chances and rewrite it.
18074  # Note: m4 eats our [], so we need to use [ and ] instead.
18075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18076  if test "x$has_forbidden_chars" != x; then
18077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18079  fi
18080
18081    # Output is in $new_path
18082
18083  windows_path="$new_path"
18084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18085    unix_path=`$CYGPATH -u "$windows_path"`
18086    new_path="$unix_path"
18087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18089    new_path="$unix_path"
18090  fi
18091
18092    # remove trailing .exe if any
18093    new_path="${new_path/%.exe/}"
18094
18095    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18096    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18097  fi
18098
18099    else
18100      # We're on a unix platform. Hooray! :)
18101      # First separate the path from the arguments. This will split at the first
18102      # space.
18103      complete="$FOUND_MAKE"
18104      path="${complete%% *}"
18105      tmp="$complete EOL"
18106      arguments="${tmp#* }"
18107
18108      # Cannot rely on the command "which" here since it doesn't always work.
18109      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18110      if test -z "$is_absolute_path"; then
18111        # Path to executable is not absolute. Find it.
18112        IFS_save="$IFS"
18113        IFS=:
18114        for p in $PATH; do
18115          if test -f "$p/$path" && test -x "$p/$path"; then
18116            new_path="$p/$path"
18117            break
18118          fi
18119        done
18120        IFS="$IFS_save"
18121      else
18122        # This is an absolute path, we can use it without further modifications.
18123        new_path="$path"
18124      fi
18125
18126      if test "x$new_path" = x; then
18127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18128$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18129        has_space=`$ECHO "$complete" | $GREP " "`
18130        if test "x$has_space" != x; then
18131          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18132$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18133        fi
18134        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18135      fi
18136    fi
18137
18138    # Now join together the path and the arguments once again
18139    if test "x$arguments" != xEOL; then
18140      new_complete="$new_path ${arguments% *}"
18141    else
18142      new_complete="$new_path"
18143    fi
18144
18145    if test "x$complete" != "x$new_complete"; then
18146      FOUND_MAKE="$new_complete"
18147      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18148$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18149    fi
18150  fi
18151
18152        fi
18153      fi
18154    fi
18155  fi
18156
18157
18158    if test "x$FOUND_MAKE" = x; then
18159      for ac_prog in make
18160do
18161  # Extract the first word of "$ac_prog", so it can be a program name with args.
18162set dummy $ac_prog; ac_word=$2
18163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18164$as_echo_n "checking for $ac_word... " >&6; }
18165if ${ac_cv_path_CHECK_MAKE+:} false; then :
18166  $as_echo_n "(cached) " >&6
18167else
18168  case $CHECK_MAKE in
18169  [\\/]* | ?:[\\/]*)
18170  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18171  ;;
18172  *)
18173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18174for as_dir in $PATH
18175do
18176  IFS=$as_save_IFS
18177  test -z "$as_dir" && as_dir=.
18178    for ac_exec_ext in '' $ac_executable_extensions; do
18179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18180    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18182    break 2
18183  fi
18184done
18185  done
18186IFS=$as_save_IFS
18187
18188  ;;
18189esac
18190fi
18191CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18192if test -n "$CHECK_MAKE"; then
18193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18194$as_echo "$CHECK_MAKE" >&6; }
18195else
18196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18197$as_echo "no" >&6; }
18198fi
18199
18200
18201  test -n "$CHECK_MAKE" && break
18202done
18203
18204
18205  MAKE_CANDIDATE=""$CHECK_MAKE""
18206  DESCRIPTION="make in PATH"
18207
18208  # On Cygwin, we require a newer version of make than on other platforms
18209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18210    MAKE_VERSION_EXPR="-e 4\."
18211    MAKE_REQUIRED_VERSION="4.0"
18212   else
18213    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18214    MAKE_REQUIRED_VERSION="3.81"
18215  fi
18216
18217  if test "x$MAKE_CANDIDATE" != x; then
18218    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18219$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18220    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18221    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18222    if test "x$IS_GNU_MAKE" = x; then
18223      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18224$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18225    else
18226      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18227      if test "x$IS_MODERN_MAKE" = x; then
18228        { $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
18229$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;}
18230      else
18231        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18232          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18233            MAKE_EXPECTED_ENV='cygwin'
18234          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18235            MAKE_EXPECTED_ENV='msys'
18236          else
18237            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18238          fi
18239          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18240          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18241        else
18242          # Not relevant for non-Windows
18243          IS_MAKE_CORRECT_ENV=true
18244        fi
18245        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18246          { $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
18247$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;}
18248        else
18249          FOUND_MAKE=$MAKE_CANDIDATE
18250
18251  # Only process if variable expands to non-empty
18252
18253  if test "x$FOUND_MAKE" != x; then
18254    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18255
18256  # First separate the path from the arguments. This will split at the first
18257  # space.
18258  complete="$FOUND_MAKE"
18259  path="${complete%% *}"
18260  tmp="$complete EOL"
18261  arguments="${tmp#* }"
18262
18263  # Input might be given as Windows format, start by converting to
18264  # unix format.
18265  new_path=`$CYGPATH -u "$path"`
18266
18267  # Now try to locate executable using which
18268  new_path=`$WHICH "$new_path" 2> /dev/null`
18269  # bat and cmd files are not always considered executable in cygwin causing which
18270  # to not find them
18271  if test "x$new_path" = x \
18272      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18273      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18274    new_path=`$CYGPATH -u "$path"`
18275  fi
18276  if test "x$new_path" = x; then
18277    # Oops. Which didn't find the executable.
18278    # The splitting of arguments from the executable at a space might have been incorrect,
18279    # since paths with space are more likely in Windows. Give it another try with the whole
18280    # argument.
18281    path="$complete"
18282    arguments="EOL"
18283    new_path=`$CYGPATH -u "$path"`
18284    new_path=`$WHICH "$new_path" 2> /dev/null`
18285    # bat and cmd files are not always considered executable in cygwin causing which
18286    # to not find them
18287    if test "x$new_path" = x \
18288        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18289        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18290      new_path=`$CYGPATH -u "$path"`
18291    fi
18292    if test "x$new_path" = x; then
18293      # It's still not found. Now this is an unrecoverable error.
18294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18295$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18296      has_space=`$ECHO "$complete" | $GREP " "`
18297      if test "x$has_space" != x; then
18298        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18299$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18300      fi
18301      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18302    fi
18303  fi
18304
18305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18308  # "foo.exe" is OK but "foo" is an error.
18309  #
18310  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18311  # It is also a way to make sure we got the proper file name for the real test later on.
18312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18313  if test "x$test_shortpath" = x; then
18314    # Short path failed, file does not exist as specified.
18315    # Try adding .exe or .cmd
18316    if test -f "${new_path}.exe"; then
18317      input_to_shortpath="${new_path}.exe"
18318    elif test -f "${new_path}.cmd"; then
18319      input_to_shortpath="${new_path}.cmd"
18320    else
18321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18322$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18323      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18324$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18325      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18326    fi
18327  else
18328    input_to_shortpath="$new_path"
18329  fi
18330
18331  # Call helper function which possibly converts this using DOS-style short mode.
18332  # If so, the updated path is stored in $new_path.
18333  new_path="$input_to_shortpath"
18334
18335  input_path="$input_to_shortpath"
18336  # Check if we need to convert this using DOS-style short mode. If the path
18337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18338  # take no chances and rewrite it.
18339  # Note: m4 eats our [], so we need to use [ and ] instead.
18340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18341  if test "x$has_forbidden_chars" != x; then
18342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18343    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18344    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18345    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18346      # Going to short mode and back again did indeed matter. Since short mode is
18347      # case insensitive, let's make it lowercase to improve readability.
18348      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18349      # Now convert it back to Unix-style (cygpath)
18350      input_path=`$CYGPATH -u "$shortmode_path"`
18351      new_path="$input_path"
18352    fi
18353  fi
18354
18355  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18356  if test "x$test_cygdrive_prefix" = x; then
18357    # As a simple fix, exclude /usr/bin since it's not a real path.
18358    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18359      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18360      # a path prefixed by /cygdrive for fixpath to work.
18361      new_path="$CYGWIN_ROOT_PATH$input_path"
18362    fi
18363  fi
18364
18365  # remove trailing .exe if any
18366  new_path="${new_path/%.exe/}"
18367
18368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18369
18370  # First separate the path from the arguments. This will split at the first
18371  # space.
18372  complete="$FOUND_MAKE"
18373  path="${complete%% *}"
18374  tmp="$complete EOL"
18375  arguments="${tmp#* }"
18376
18377  # Input might be given as Windows format, start by converting to
18378  # unix format.
18379  new_path="$path"
18380
18381  windows_path="$new_path"
18382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18383    unix_path=`$CYGPATH -u "$windows_path"`
18384    new_path="$unix_path"
18385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18387    new_path="$unix_path"
18388  fi
18389
18390
18391  # Now try to locate executable using which
18392  new_path=`$WHICH "$new_path" 2> /dev/null`
18393
18394  if test "x$new_path" = x; then
18395    # Oops. Which didn't find the executable.
18396    # The splitting of arguments from the executable at a space might have been incorrect,
18397    # since paths with space are more likely in Windows. Give it another try with the whole
18398    # argument.
18399    path="$complete"
18400    arguments="EOL"
18401    new_path="$path"
18402
18403  windows_path="$new_path"
18404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18405    unix_path=`$CYGPATH -u "$windows_path"`
18406    new_path="$unix_path"
18407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18409    new_path="$unix_path"
18410  fi
18411
18412
18413    new_path=`$WHICH "$new_path" 2> /dev/null`
18414    # bat and cmd files are not always considered executable in MSYS causing which
18415    # to not find them
18416    if test "x$new_path" = x \
18417        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18418        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18419      new_path="$path"
18420
18421  windows_path="$new_path"
18422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18423    unix_path=`$CYGPATH -u "$windows_path"`
18424    new_path="$unix_path"
18425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18427    new_path="$unix_path"
18428  fi
18429
18430    fi
18431
18432    if test "x$new_path" = x; then
18433      # It's still not found. Now this is an unrecoverable error.
18434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18435$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18436      has_space=`$ECHO "$complete" | $GREP " "`
18437      if test "x$has_space" != x; then
18438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18440      fi
18441      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18442    fi
18443  fi
18444
18445  # Now new_path has a complete unix path to the binary
18446  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18447    # Keep paths in /bin as-is, but remove trailing .exe if any
18448    new_path="${new_path/%.exe/}"
18449    # Do not save /bin paths to all_fixpath_prefixes!
18450  else
18451    # Not in mixed or Windows style, start by that.
18452    new_path=`cmd //c echo $new_path`
18453
18454  input_path="$new_path"
18455  # Check if we need to convert this using DOS-style short mode. If the path
18456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18457  # take no chances and rewrite it.
18458  # Note: m4 eats our [], so we need to use [ and ] instead.
18459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18460  if test "x$has_forbidden_chars" != x; then
18461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18462    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18463  fi
18464
18465    # Output is in $new_path
18466
18467  windows_path="$new_path"
18468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18469    unix_path=`$CYGPATH -u "$windows_path"`
18470    new_path="$unix_path"
18471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18473    new_path="$unix_path"
18474  fi
18475
18476    # remove trailing .exe if any
18477    new_path="${new_path/%.exe/}"
18478
18479    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18480    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18481  fi
18482
18483    else
18484      # We're on a unix platform. Hooray! :)
18485      # First separate the path from the arguments. This will split at the first
18486      # space.
18487      complete="$FOUND_MAKE"
18488      path="${complete%% *}"
18489      tmp="$complete EOL"
18490      arguments="${tmp#* }"
18491
18492      # Cannot rely on the command "which" here since it doesn't always work.
18493      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18494      if test -z "$is_absolute_path"; then
18495        # Path to executable is not absolute. Find it.
18496        IFS_save="$IFS"
18497        IFS=:
18498        for p in $PATH; do
18499          if test -f "$p/$path" && test -x "$p/$path"; then
18500            new_path="$p/$path"
18501            break
18502          fi
18503        done
18504        IFS="$IFS_save"
18505      else
18506        # This is an absolute path, we can use it without further modifications.
18507        new_path="$path"
18508      fi
18509
18510      if test "x$new_path" = x; then
18511        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18512$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18513        has_space=`$ECHO "$complete" | $GREP " "`
18514        if test "x$has_space" != x; then
18515          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18516$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18517        fi
18518        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18519      fi
18520    fi
18521
18522    # Now join together the path and the arguments once again
18523    if test "x$arguments" != xEOL; then
18524      new_complete="$new_path ${arguments% *}"
18525    else
18526      new_complete="$new_path"
18527    fi
18528
18529    if test "x$complete" != "x$new_complete"; then
18530      FOUND_MAKE="$new_complete"
18531      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18532$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18533    fi
18534  fi
18535
18536        fi
18537      fi
18538    fi
18539  fi
18540
18541    fi
18542
18543    if test "x$FOUND_MAKE" = x; then
18544      if test "x$TOOLCHAIN_PATH" != x; then
18545        # We have a toolchain path, check that as well before giving up.
18546        OLD_PATH=$PATH
18547        PATH=$TOOLCHAIN_PATH:$PATH
18548        for ac_prog in gmake
18549do
18550  # Extract the first word of "$ac_prog", so it can be a program name with args.
18551set dummy $ac_prog; ac_word=$2
18552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18553$as_echo_n "checking for $ac_word... " >&6; }
18554if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18555  $as_echo_n "(cached) " >&6
18556else
18557  case $CHECK_TOOLSDIR_GMAKE in
18558  [\\/]* | ?:[\\/]*)
18559  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18560  ;;
18561  *)
18562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18563for as_dir in $PATH
18564do
18565  IFS=$as_save_IFS
18566  test -z "$as_dir" && as_dir=.
18567    for ac_exec_ext in '' $ac_executable_extensions; do
18568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18569    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18571    break 2
18572  fi
18573done
18574  done
18575IFS=$as_save_IFS
18576
18577  ;;
18578esac
18579fi
18580CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18581if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18583$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18584else
18585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18586$as_echo "no" >&6; }
18587fi
18588
18589
18590  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18591done
18592
18593
18594  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18595  DESCRIPTION="gmake in tools-dir"
18596
18597  # On Cygwin, we require a newer version of make than on other platforms
18598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18599    MAKE_VERSION_EXPR="-e 4\."
18600    MAKE_REQUIRED_VERSION="4.0"
18601   else
18602    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18603    MAKE_REQUIRED_VERSION="3.81"
18604  fi
18605
18606  if test "x$MAKE_CANDIDATE" != x; then
18607    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18608$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18609    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18610    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18611    if test "x$IS_GNU_MAKE" = x; then
18612      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18613$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18614    else
18615      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18616      if test "x$IS_MODERN_MAKE" = x; then
18617        { $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
18618$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;}
18619      else
18620        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18621          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18622            MAKE_EXPECTED_ENV='cygwin'
18623          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18624            MAKE_EXPECTED_ENV='msys'
18625          else
18626            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18627          fi
18628          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18629          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18630        else
18631          # Not relevant for non-Windows
18632          IS_MAKE_CORRECT_ENV=true
18633        fi
18634        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18635          { $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
18636$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;}
18637        else
18638          FOUND_MAKE=$MAKE_CANDIDATE
18639
18640  # Only process if variable expands to non-empty
18641
18642  if test "x$FOUND_MAKE" != x; then
18643    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18644
18645  # First separate the path from the arguments. This will split at the first
18646  # space.
18647  complete="$FOUND_MAKE"
18648  path="${complete%% *}"
18649  tmp="$complete EOL"
18650  arguments="${tmp#* }"
18651
18652  # Input might be given as Windows format, start by converting to
18653  # unix format.
18654  new_path=`$CYGPATH -u "$path"`
18655
18656  # Now try to locate executable using which
18657  new_path=`$WHICH "$new_path" 2> /dev/null`
18658  # bat and cmd files are not always considered executable in cygwin causing which
18659  # to not find them
18660  if test "x$new_path" = x \
18661      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18662      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18663    new_path=`$CYGPATH -u "$path"`
18664  fi
18665  if test "x$new_path" = x; then
18666    # Oops. Which didn't find the executable.
18667    # The splitting of arguments from the executable at a space might have been incorrect,
18668    # since paths with space are more likely in Windows. Give it another try with the whole
18669    # argument.
18670    path="$complete"
18671    arguments="EOL"
18672    new_path=`$CYGPATH -u "$path"`
18673    new_path=`$WHICH "$new_path" 2> /dev/null`
18674    # bat and cmd files are not always considered executable in cygwin causing which
18675    # to not find them
18676    if test "x$new_path" = x \
18677        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18678        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18679      new_path=`$CYGPATH -u "$path"`
18680    fi
18681    if test "x$new_path" = x; then
18682      # It's still not found. Now this is an unrecoverable error.
18683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18684$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18685      has_space=`$ECHO "$complete" | $GREP " "`
18686      if test "x$has_space" != x; then
18687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18689      fi
18690      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18691    fi
18692  fi
18693
18694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18697  # "foo.exe" is OK but "foo" is an error.
18698  #
18699  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18700  # It is also a way to make sure we got the proper file name for the real test later on.
18701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18702  if test "x$test_shortpath" = x; then
18703    # Short path failed, file does not exist as specified.
18704    # Try adding .exe or .cmd
18705    if test -f "${new_path}.exe"; then
18706      input_to_shortpath="${new_path}.exe"
18707    elif test -f "${new_path}.cmd"; then
18708      input_to_shortpath="${new_path}.cmd"
18709    else
18710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18711$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18712      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18713$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18714      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18715    fi
18716  else
18717    input_to_shortpath="$new_path"
18718  fi
18719
18720  # Call helper function which possibly converts this using DOS-style short mode.
18721  # If so, the updated path is stored in $new_path.
18722  new_path="$input_to_shortpath"
18723
18724  input_path="$input_to_shortpath"
18725  # Check if we need to convert this using DOS-style short mode. If the path
18726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18727  # take no chances and rewrite it.
18728  # Note: m4 eats our [], so we need to use [ and ] instead.
18729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18730  if test "x$has_forbidden_chars" != x; then
18731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18735      # Going to short mode and back again did indeed matter. Since short mode is
18736      # case insensitive, let's make it lowercase to improve readability.
18737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18738      # Now convert it back to Unix-style (cygpath)
18739      input_path=`$CYGPATH -u "$shortmode_path"`
18740      new_path="$input_path"
18741    fi
18742  fi
18743
18744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18745  if test "x$test_cygdrive_prefix" = x; then
18746    # As a simple fix, exclude /usr/bin since it's not a real path.
18747    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18749      # a path prefixed by /cygdrive for fixpath to work.
18750      new_path="$CYGWIN_ROOT_PATH$input_path"
18751    fi
18752  fi
18753
18754  # remove trailing .exe if any
18755  new_path="${new_path/%.exe/}"
18756
18757    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18758
18759  # First separate the path from the arguments. This will split at the first
18760  # space.
18761  complete="$FOUND_MAKE"
18762  path="${complete%% *}"
18763  tmp="$complete EOL"
18764  arguments="${tmp#* }"
18765
18766  # Input might be given as Windows format, start by converting to
18767  # unix format.
18768  new_path="$path"
18769
18770  windows_path="$new_path"
18771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18772    unix_path=`$CYGPATH -u "$windows_path"`
18773    new_path="$unix_path"
18774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18776    new_path="$unix_path"
18777  fi
18778
18779
18780  # Now try to locate executable using which
18781  new_path=`$WHICH "$new_path" 2> /dev/null`
18782
18783  if test "x$new_path" = x; then
18784    # Oops. Which didn't find the executable.
18785    # The splitting of arguments from the executable at a space might have been incorrect,
18786    # since paths with space are more likely in Windows. Give it another try with the whole
18787    # argument.
18788    path="$complete"
18789    arguments="EOL"
18790    new_path="$path"
18791
18792  windows_path="$new_path"
18793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18794    unix_path=`$CYGPATH -u "$windows_path"`
18795    new_path="$unix_path"
18796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18798    new_path="$unix_path"
18799  fi
18800
18801
18802    new_path=`$WHICH "$new_path" 2> /dev/null`
18803    # bat and cmd files are not always considered executable in MSYS causing which
18804    # to not find them
18805    if test "x$new_path" = x \
18806        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18807        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18808      new_path="$path"
18809
18810  windows_path="$new_path"
18811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18812    unix_path=`$CYGPATH -u "$windows_path"`
18813    new_path="$unix_path"
18814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18816    new_path="$unix_path"
18817  fi
18818
18819    fi
18820
18821    if test "x$new_path" = x; then
18822      # It's still not found. Now this is an unrecoverable error.
18823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18824$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18825      has_space=`$ECHO "$complete" | $GREP " "`
18826      if test "x$has_space" != x; then
18827        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18828$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18829      fi
18830      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18831    fi
18832  fi
18833
18834  # Now new_path has a complete unix path to the binary
18835  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18836    # Keep paths in /bin as-is, but remove trailing .exe if any
18837    new_path="${new_path/%.exe/}"
18838    # Do not save /bin paths to all_fixpath_prefixes!
18839  else
18840    # Not in mixed or Windows style, start by that.
18841    new_path=`cmd //c echo $new_path`
18842
18843  input_path="$new_path"
18844  # Check if we need to convert this using DOS-style short mode. If the path
18845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18846  # take no chances and rewrite it.
18847  # Note: m4 eats our [], so we need to use [ and ] instead.
18848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18849  if test "x$has_forbidden_chars" != x; then
18850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18852  fi
18853
18854    # Output is in $new_path
18855
18856  windows_path="$new_path"
18857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18858    unix_path=`$CYGPATH -u "$windows_path"`
18859    new_path="$unix_path"
18860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18862    new_path="$unix_path"
18863  fi
18864
18865    # remove trailing .exe if any
18866    new_path="${new_path/%.exe/}"
18867
18868    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18869    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18870  fi
18871
18872    else
18873      # We're on a unix platform. Hooray! :)
18874      # First separate the path from the arguments. This will split at the first
18875      # space.
18876      complete="$FOUND_MAKE"
18877      path="${complete%% *}"
18878      tmp="$complete EOL"
18879      arguments="${tmp#* }"
18880
18881      # Cannot rely on the command "which" here since it doesn't always work.
18882      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18883      if test -z "$is_absolute_path"; then
18884        # Path to executable is not absolute. Find it.
18885        IFS_save="$IFS"
18886        IFS=:
18887        for p in $PATH; do
18888          if test -f "$p/$path" && test -x "$p/$path"; then
18889            new_path="$p/$path"
18890            break
18891          fi
18892        done
18893        IFS="$IFS_save"
18894      else
18895        # This is an absolute path, we can use it without further modifications.
18896        new_path="$path"
18897      fi
18898
18899      if test "x$new_path" = x; then
18900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18901$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18902        has_space=`$ECHO "$complete" | $GREP " "`
18903        if test "x$has_space" != x; then
18904          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18905$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18906        fi
18907        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18908      fi
18909    fi
18910
18911    # Now join together the path and the arguments once again
18912    if test "x$arguments" != xEOL; then
18913      new_complete="$new_path ${arguments% *}"
18914    else
18915      new_complete="$new_path"
18916    fi
18917
18918    if test "x$complete" != "x$new_complete"; then
18919      FOUND_MAKE="$new_complete"
18920      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18921$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18922    fi
18923  fi
18924
18925        fi
18926      fi
18927    fi
18928  fi
18929
18930        if test "x$FOUND_MAKE" = x; then
18931          for ac_prog in make
18932do
18933  # Extract the first word of "$ac_prog", so it can be a program name with args.
18934set dummy $ac_prog; ac_word=$2
18935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18936$as_echo_n "checking for $ac_word... " >&6; }
18937if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18938  $as_echo_n "(cached) " >&6
18939else
18940  case $CHECK_TOOLSDIR_MAKE in
18941  [\\/]* | ?:[\\/]*)
18942  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18943  ;;
18944  *)
18945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18946for as_dir in $PATH
18947do
18948  IFS=$as_save_IFS
18949  test -z "$as_dir" && as_dir=.
18950    for ac_exec_ext in '' $ac_executable_extensions; do
18951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18952    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18954    break 2
18955  fi
18956done
18957  done
18958IFS=$as_save_IFS
18959
18960  ;;
18961esac
18962fi
18963CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18964if test -n "$CHECK_TOOLSDIR_MAKE"; then
18965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18966$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18967else
18968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18969$as_echo "no" >&6; }
18970fi
18971
18972
18973  test -n "$CHECK_TOOLSDIR_MAKE" && break
18974done
18975
18976
18977  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18978  DESCRIPTION="make in tools-dir"
18979
18980  # On Cygwin, we require a newer version of make than on other platforms
18981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18982    MAKE_VERSION_EXPR="-e 4\."
18983    MAKE_REQUIRED_VERSION="4.0"
18984   else
18985    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18986    MAKE_REQUIRED_VERSION="3.81"
18987  fi
18988
18989  if test "x$MAKE_CANDIDATE" != x; then
18990    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18991$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18992    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18993    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18994    if test "x$IS_GNU_MAKE" = x; then
18995      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18996$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18997    else
18998      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18999      if test "x$IS_MODERN_MAKE" = x; then
19000        { $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
19001$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;}
19002      else
19003        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19004          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19005            MAKE_EXPECTED_ENV='cygwin'
19006          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19007            MAKE_EXPECTED_ENV='msys'
19008          else
19009            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19010          fi
19011          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19012          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19013        else
19014          # Not relevant for non-Windows
19015          IS_MAKE_CORRECT_ENV=true
19016        fi
19017        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19018          { $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
19019$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;}
19020        else
19021          FOUND_MAKE=$MAKE_CANDIDATE
19022
19023  # Only process if variable expands to non-empty
19024
19025  if test "x$FOUND_MAKE" != x; then
19026    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19027
19028  # First separate the path from the arguments. This will split at the first
19029  # space.
19030  complete="$FOUND_MAKE"
19031  path="${complete%% *}"
19032  tmp="$complete EOL"
19033  arguments="${tmp#* }"
19034
19035  # Input might be given as Windows format, start by converting to
19036  # unix format.
19037  new_path=`$CYGPATH -u "$path"`
19038
19039  # Now try to locate executable using which
19040  new_path=`$WHICH "$new_path" 2> /dev/null`
19041  # bat and cmd files are not always considered executable in cygwin causing which
19042  # to not find them
19043  if test "x$new_path" = x \
19044      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19045      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19046    new_path=`$CYGPATH -u "$path"`
19047  fi
19048  if test "x$new_path" = x; then
19049    # Oops. Which didn't find the executable.
19050    # The splitting of arguments from the executable at a space might have been incorrect,
19051    # since paths with space are more likely in Windows. Give it another try with the whole
19052    # argument.
19053    path="$complete"
19054    arguments="EOL"
19055    new_path=`$CYGPATH -u "$path"`
19056    new_path=`$WHICH "$new_path" 2> /dev/null`
19057    # bat and cmd files are not always considered executable in cygwin causing which
19058    # to not find them
19059    if test "x$new_path" = x \
19060        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19061        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19062      new_path=`$CYGPATH -u "$path"`
19063    fi
19064    if test "x$new_path" = x; then
19065      # It's still not found. Now this is an unrecoverable error.
19066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19067$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19068      has_space=`$ECHO "$complete" | $GREP " "`
19069      if test "x$has_space" != x; then
19070        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19071$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19072      fi
19073      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19074    fi
19075  fi
19076
19077  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19078  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19079  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19080  # "foo.exe" is OK but "foo" is an error.
19081  #
19082  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19083  # It is also a way to make sure we got the proper file name for the real test later on.
19084  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19085  if test "x$test_shortpath" = x; then
19086    # Short path failed, file does not exist as specified.
19087    # Try adding .exe or .cmd
19088    if test -f "${new_path}.exe"; then
19089      input_to_shortpath="${new_path}.exe"
19090    elif test -f "${new_path}.cmd"; then
19091      input_to_shortpath="${new_path}.cmd"
19092    else
19093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19094$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19095      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19096$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19097      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19098    fi
19099  else
19100    input_to_shortpath="$new_path"
19101  fi
19102
19103  # Call helper function which possibly converts this using DOS-style short mode.
19104  # If so, the updated path is stored in $new_path.
19105  new_path="$input_to_shortpath"
19106
19107  input_path="$input_to_shortpath"
19108  # Check if we need to convert this using DOS-style short mode. If the path
19109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19110  # take no chances and rewrite it.
19111  # Note: m4 eats our [], so we need to use [ and ] instead.
19112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19113  if test "x$has_forbidden_chars" != x; then
19114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19118      # Going to short mode and back again did indeed matter. Since short mode is
19119      # case insensitive, let's make it lowercase to improve readability.
19120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19121      # Now convert it back to Unix-style (cygpath)
19122      input_path=`$CYGPATH -u "$shortmode_path"`
19123      new_path="$input_path"
19124    fi
19125  fi
19126
19127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19128  if test "x$test_cygdrive_prefix" = x; then
19129    # As a simple fix, exclude /usr/bin since it's not a real path.
19130    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19132      # a path prefixed by /cygdrive for fixpath to work.
19133      new_path="$CYGWIN_ROOT_PATH$input_path"
19134    fi
19135  fi
19136
19137  # remove trailing .exe if any
19138  new_path="${new_path/%.exe/}"
19139
19140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19141
19142  # First separate the path from the arguments. This will split at the first
19143  # space.
19144  complete="$FOUND_MAKE"
19145  path="${complete%% *}"
19146  tmp="$complete EOL"
19147  arguments="${tmp#* }"
19148
19149  # Input might be given as Windows format, start by converting to
19150  # unix format.
19151  new_path="$path"
19152
19153  windows_path="$new_path"
19154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19155    unix_path=`$CYGPATH -u "$windows_path"`
19156    new_path="$unix_path"
19157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19159    new_path="$unix_path"
19160  fi
19161
19162
19163  # Now try to locate executable using which
19164  new_path=`$WHICH "$new_path" 2> /dev/null`
19165
19166  if test "x$new_path" = x; then
19167    # Oops. Which didn't find the executable.
19168    # The splitting of arguments from the executable at a space might have been incorrect,
19169    # since paths with space are more likely in Windows. Give it another try with the whole
19170    # argument.
19171    path="$complete"
19172    arguments="EOL"
19173    new_path="$path"
19174
19175  windows_path="$new_path"
19176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19177    unix_path=`$CYGPATH -u "$windows_path"`
19178    new_path="$unix_path"
19179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19181    new_path="$unix_path"
19182  fi
19183
19184
19185    new_path=`$WHICH "$new_path" 2> /dev/null`
19186    # bat and cmd files are not always considered executable in MSYS causing which
19187    # to not find them
19188    if test "x$new_path" = x \
19189        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19190        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19191      new_path="$path"
19192
19193  windows_path="$new_path"
19194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19195    unix_path=`$CYGPATH -u "$windows_path"`
19196    new_path="$unix_path"
19197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19199    new_path="$unix_path"
19200  fi
19201
19202    fi
19203
19204    if test "x$new_path" = x; then
19205      # It's still not found. Now this is an unrecoverable error.
19206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19207$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19208      has_space=`$ECHO "$complete" | $GREP " "`
19209      if test "x$has_space" != x; then
19210        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19211$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19212      fi
19213      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19214    fi
19215  fi
19216
19217  # Now new_path has a complete unix path to the binary
19218  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19219    # Keep paths in /bin as-is, but remove trailing .exe if any
19220    new_path="${new_path/%.exe/}"
19221    # Do not save /bin paths to all_fixpath_prefixes!
19222  else
19223    # Not in mixed or Windows style, start by that.
19224    new_path=`cmd //c echo $new_path`
19225
19226  input_path="$new_path"
19227  # Check if we need to convert this using DOS-style short mode. If the path
19228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19229  # take no chances and rewrite it.
19230  # Note: m4 eats our [], so we need to use [ and ] instead.
19231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19232  if test "x$has_forbidden_chars" != x; then
19233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19235  fi
19236
19237    # Output is in $new_path
19238
19239  windows_path="$new_path"
19240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19241    unix_path=`$CYGPATH -u "$windows_path"`
19242    new_path="$unix_path"
19243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19245    new_path="$unix_path"
19246  fi
19247
19248    # remove trailing .exe if any
19249    new_path="${new_path/%.exe/}"
19250
19251    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19252    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19253  fi
19254
19255    else
19256      # We're on a unix platform. Hooray! :)
19257      # First separate the path from the arguments. This will split at the first
19258      # space.
19259      complete="$FOUND_MAKE"
19260      path="${complete%% *}"
19261      tmp="$complete EOL"
19262      arguments="${tmp#* }"
19263
19264      # Cannot rely on the command "which" here since it doesn't always work.
19265      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19266      if test -z "$is_absolute_path"; then
19267        # Path to executable is not absolute. Find it.
19268        IFS_save="$IFS"
19269        IFS=:
19270        for p in $PATH; do
19271          if test -f "$p/$path" && test -x "$p/$path"; then
19272            new_path="$p/$path"
19273            break
19274          fi
19275        done
19276        IFS="$IFS_save"
19277      else
19278        # This is an absolute path, we can use it without further modifications.
19279        new_path="$path"
19280      fi
19281
19282      if test "x$new_path" = x; then
19283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19284$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19285        has_space=`$ECHO "$complete" | $GREP " "`
19286        if test "x$has_space" != x; then
19287          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19288$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19289        fi
19290        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19291      fi
19292    fi
19293
19294    # Now join together the path and the arguments once again
19295    if test "x$arguments" != xEOL; then
19296      new_complete="$new_path ${arguments% *}"
19297    else
19298      new_complete="$new_path"
19299    fi
19300
19301    if test "x$complete" != "x$new_complete"; then
19302      FOUND_MAKE="$new_complete"
19303      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19304$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19305    fi
19306  fi
19307
19308        fi
19309      fi
19310    fi
19311  fi
19312
19313        fi
19314        PATH=$OLD_PATH
19315      fi
19316    fi
19317
19318    if test "x$FOUND_MAKE" = x; then
19319      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
19320    fi
19321
19322  else
19323    # The variable is set, but is it from the command line or the environment?
19324
19325    # Try to remove the string !MAKE! from our list.
19326    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19327    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19328      # If it failed, the variable was not from the command line. Ignore it,
19329      # but warn the user (except for BASH, which is always set by the calling BASH).
19330      if test "xMAKE" != xBASH; then
19331        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19332$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19333      fi
19334      # Try to locate tool using the code snippet
19335
19336    # Try our hardest to locate a correct version of GNU make
19337    for ac_prog in gmake
19338do
19339  # Extract the first word of "$ac_prog", so it can be a program name with args.
19340set dummy $ac_prog; ac_word=$2
19341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19342$as_echo_n "checking for $ac_word... " >&6; }
19343if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19344  $as_echo_n "(cached) " >&6
19345else
19346  case $CHECK_GMAKE in
19347  [\\/]* | ?:[\\/]*)
19348  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19349  ;;
19350  *)
19351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19352for as_dir in $PATH
19353do
19354  IFS=$as_save_IFS
19355  test -z "$as_dir" && as_dir=.
19356    for ac_exec_ext in '' $ac_executable_extensions; do
19357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19358    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19360    break 2
19361  fi
19362done
19363  done
19364IFS=$as_save_IFS
19365
19366  ;;
19367esac
19368fi
19369CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19370if test -n "$CHECK_GMAKE"; then
19371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19372$as_echo "$CHECK_GMAKE" >&6; }
19373else
19374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19375$as_echo "no" >&6; }
19376fi
19377
19378
19379  test -n "$CHECK_GMAKE" && break
19380done
19381
19382
19383  MAKE_CANDIDATE=""$CHECK_GMAKE""
19384  DESCRIPTION="gmake in PATH"
19385
19386  # On Cygwin, we require a newer version of make than on other platforms
19387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19388    MAKE_VERSION_EXPR="-e 4\."
19389    MAKE_REQUIRED_VERSION="4.0"
19390   else
19391    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19392    MAKE_REQUIRED_VERSION="3.81"
19393  fi
19394
19395  if test "x$MAKE_CANDIDATE" != x; then
19396    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19397$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19398    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19399    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19400    if test "x$IS_GNU_MAKE" = x; then
19401      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19402$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19403    else
19404      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19405      if test "x$IS_MODERN_MAKE" = x; then
19406        { $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
19407$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;}
19408      else
19409        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19410          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19411            MAKE_EXPECTED_ENV='cygwin'
19412          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19413            MAKE_EXPECTED_ENV='msys'
19414          else
19415            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19416          fi
19417          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19418          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19419        else
19420          # Not relevant for non-Windows
19421          IS_MAKE_CORRECT_ENV=true
19422        fi
19423        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19424          { $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
19425$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;}
19426        else
19427          FOUND_MAKE=$MAKE_CANDIDATE
19428
19429  # Only process if variable expands to non-empty
19430
19431  if test "x$FOUND_MAKE" != x; then
19432    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19433
19434  # First separate the path from the arguments. This will split at the first
19435  # space.
19436  complete="$FOUND_MAKE"
19437  path="${complete%% *}"
19438  tmp="$complete EOL"
19439  arguments="${tmp#* }"
19440
19441  # Input might be given as Windows format, start by converting to
19442  # unix format.
19443  new_path=`$CYGPATH -u "$path"`
19444
19445  # Now try to locate executable using which
19446  new_path=`$WHICH "$new_path" 2> /dev/null`
19447  # bat and cmd files are not always considered executable in cygwin causing which
19448  # to not find them
19449  if test "x$new_path" = x \
19450      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19451      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19452    new_path=`$CYGPATH -u "$path"`
19453  fi
19454  if test "x$new_path" = x; then
19455    # Oops. Which didn't find the executable.
19456    # The splitting of arguments from the executable at a space might have been incorrect,
19457    # since paths with space are more likely in Windows. Give it another try with the whole
19458    # argument.
19459    path="$complete"
19460    arguments="EOL"
19461    new_path=`$CYGPATH -u "$path"`
19462    new_path=`$WHICH "$new_path" 2> /dev/null`
19463    # bat and cmd files are not always considered executable in cygwin causing which
19464    # to not find them
19465    if test "x$new_path" = x \
19466        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19467        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19468      new_path=`$CYGPATH -u "$path"`
19469    fi
19470    if test "x$new_path" = x; then
19471      # It's still not found. Now this is an unrecoverable error.
19472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19473$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19474      has_space=`$ECHO "$complete" | $GREP " "`
19475      if test "x$has_space" != x; then
19476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19478      fi
19479      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19480    fi
19481  fi
19482
19483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19486  # "foo.exe" is OK but "foo" is an error.
19487  #
19488  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19489  # It is also a way to make sure we got the proper file name for the real test later on.
19490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19491  if test "x$test_shortpath" = x; then
19492    # Short path failed, file does not exist as specified.
19493    # Try adding .exe or .cmd
19494    if test -f "${new_path}.exe"; then
19495      input_to_shortpath="${new_path}.exe"
19496    elif test -f "${new_path}.cmd"; then
19497      input_to_shortpath="${new_path}.cmd"
19498    else
19499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19500$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19501      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19502$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19503      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19504    fi
19505  else
19506    input_to_shortpath="$new_path"
19507  fi
19508
19509  # Call helper function which possibly converts this using DOS-style short mode.
19510  # If so, the updated path is stored in $new_path.
19511  new_path="$input_to_shortpath"
19512
19513  input_path="$input_to_shortpath"
19514  # Check if we need to convert this using DOS-style short mode. If the path
19515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19516  # take no chances and rewrite it.
19517  # Note: m4 eats our [], so we need to use [ and ] instead.
19518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19519  if test "x$has_forbidden_chars" != x; then
19520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19524      # Going to short mode and back again did indeed matter. Since short mode is
19525      # case insensitive, let's make it lowercase to improve readability.
19526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19527      # Now convert it back to Unix-style (cygpath)
19528      input_path=`$CYGPATH -u "$shortmode_path"`
19529      new_path="$input_path"
19530    fi
19531  fi
19532
19533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19534  if test "x$test_cygdrive_prefix" = x; then
19535    # As a simple fix, exclude /usr/bin since it's not a real path.
19536    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19538      # a path prefixed by /cygdrive for fixpath to work.
19539      new_path="$CYGWIN_ROOT_PATH$input_path"
19540    fi
19541  fi
19542
19543  # remove trailing .exe if any
19544  new_path="${new_path/%.exe/}"
19545
19546    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19547
19548  # First separate the path from the arguments. This will split at the first
19549  # space.
19550  complete="$FOUND_MAKE"
19551  path="${complete%% *}"
19552  tmp="$complete EOL"
19553  arguments="${tmp#* }"
19554
19555  # Input might be given as Windows format, start by converting to
19556  # unix format.
19557  new_path="$path"
19558
19559  windows_path="$new_path"
19560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19561    unix_path=`$CYGPATH -u "$windows_path"`
19562    new_path="$unix_path"
19563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19565    new_path="$unix_path"
19566  fi
19567
19568
19569  # Now try to locate executable using which
19570  new_path=`$WHICH "$new_path" 2> /dev/null`
19571
19572  if test "x$new_path" = x; then
19573    # Oops. Which didn't find the executable.
19574    # The splitting of arguments from the executable at a space might have been incorrect,
19575    # since paths with space are more likely in Windows. Give it another try with the whole
19576    # argument.
19577    path="$complete"
19578    arguments="EOL"
19579    new_path="$path"
19580
19581  windows_path="$new_path"
19582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19583    unix_path=`$CYGPATH -u "$windows_path"`
19584    new_path="$unix_path"
19585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19587    new_path="$unix_path"
19588  fi
19589
19590
19591    new_path=`$WHICH "$new_path" 2> /dev/null`
19592    # bat and cmd files are not always considered executable in MSYS causing which
19593    # to not find them
19594    if test "x$new_path" = x \
19595        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19596        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19597      new_path="$path"
19598
19599  windows_path="$new_path"
19600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19601    unix_path=`$CYGPATH -u "$windows_path"`
19602    new_path="$unix_path"
19603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19605    new_path="$unix_path"
19606  fi
19607
19608    fi
19609
19610    if test "x$new_path" = x; then
19611      # It's still not found. Now this is an unrecoverable error.
19612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19613$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19614      has_space=`$ECHO "$complete" | $GREP " "`
19615      if test "x$has_space" != x; then
19616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19618      fi
19619      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19620    fi
19621  fi
19622
19623  # Now new_path has a complete unix path to the binary
19624  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19625    # Keep paths in /bin as-is, but remove trailing .exe if any
19626    new_path="${new_path/%.exe/}"
19627    # Do not save /bin paths to all_fixpath_prefixes!
19628  else
19629    # Not in mixed or Windows style, start by that.
19630    new_path=`cmd //c echo $new_path`
19631
19632  input_path="$new_path"
19633  # Check if we need to convert this using DOS-style short mode. If the path
19634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19635  # take no chances and rewrite it.
19636  # Note: m4 eats our [], so we need to use [ and ] instead.
19637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19638  if test "x$has_forbidden_chars" != x; then
19639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19641  fi
19642
19643    # Output is in $new_path
19644
19645  windows_path="$new_path"
19646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19647    unix_path=`$CYGPATH -u "$windows_path"`
19648    new_path="$unix_path"
19649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19651    new_path="$unix_path"
19652  fi
19653
19654    # remove trailing .exe if any
19655    new_path="${new_path/%.exe/}"
19656
19657    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19658    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19659  fi
19660
19661    else
19662      # We're on a unix platform. Hooray! :)
19663      # First separate the path from the arguments. This will split at the first
19664      # space.
19665      complete="$FOUND_MAKE"
19666      path="${complete%% *}"
19667      tmp="$complete EOL"
19668      arguments="${tmp#* }"
19669
19670      # Cannot rely on the command "which" here since it doesn't always work.
19671      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19672      if test -z "$is_absolute_path"; then
19673        # Path to executable is not absolute. Find it.
19674        IFS_save="$IFS"
19675        IFS=:
19676        for p in $PATH; do
19677          if test -f "$p/$path" && test -x "$p/$path"; then
19678            new_path="$p/$path"
19679            break
19680          fi
19681        done
19682        IFS="$IFS_save"
19683      else
19684        # This is an absolute path, we can use it without further modifications.
19685        new_path="$path"
19686      fi
19687
19688      if test "x$new_path" = x; then
19689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19690$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19691        has_space=`$ECHO "$complete" | $GREP " "`
19692        if test "x$has_space" != x; then
19693          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19694$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19695        fi
19696        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19697      fi
19698    fi
19699
19700    # Now join together the path and the arguments once again
19701    if test "x$arguments" != xEOL; then
19702      new_complete="$new_path ${arguments% *}"
19703    else
19704      new_complete="$new_path"
19705    fi
19706
19707    if test "x$complete" != "x$new_complete"; then
19708      FOUND_MAKE="$new_complete"
19709      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19710$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19711    fi
19712  fi
19713
19714        fi
19715      fi
19716    fi
19717  fi
19718
19719
19720    if test "x$FOUND_MAKE" = x; then
19721      for ac_prog in make
19722do
19723  # Extract the first word of "$ac_prog", so it can be a program name with args.
19724set dummy $ac_prog; ac_word=$2
19725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19726$as_echo_n "checking for $ac_word... " >&6; }
19727if ${ac_cv_path_CHECK_MAKE+:} false; then :
19728  $as_echo_n "(cached) " >&6
19729else
19730  case $CHECK_MAKE in
19731  [\\/]* | ?:[\\/]*)
19732  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19733  ;;
19734  *)
19735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19736for as_dir in $PATH
19737do
19738  IFS=$as_save_IFS
19739  test -z "$as_dir" && as_dir=.
19740    for ac_exec_ext in '' $ac_executable_extensions; do
19741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19742    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19744    break 2
19745  fi
19746done
19747  done
19748IFS=$as_save_IFS
19749
19750  ;;
19751esac
19752fi
19753CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19754if test -n "$CHECK_MAKE"; then
19755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19756$as_echo "$CHECK_MAKE" >&6; }
19757else
19758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19759$as_echo "no" >&6; }
19760fi
19761
19762
19763  test -n "$CHECK_MAKE" && break
19764done
19765
19766
19767  MAKE_CANDIDATE=""$CHECK_MAKE""
19768  DESCRIPTION="make in PATH"
19769
19770  # On Cygwin, we require a newer version of make than on other platforms
19771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19772    MAKE_VERSION_EXPR="-e 4\."
19773    MAKE_REQUIRED_VERSION="4.0"
19774   else
19775    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19776    MAKE_REQUIRED_VERSION="3.81"
19777  fi
19778
19779  if test "x$MAKE_CANDIDATE" != x; then
19780    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19781$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19782    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19783    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19784    if test "x$IS_GNU_MAKE" = x; then
19785      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19786$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19787    else
19788      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19789      if test "x$IS_MODERN_MAKE" = x; then
19790        { $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
19791$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;}
19792      else
19793        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19794          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19795            MAKE_EXPECTED_ENV='cygwin'
19796          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19797            MAKE_EXPECTED_ENV='msys'
19798          else
19799            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19800          fi
19801          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19802          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19803        else
19804          # Not relevant for non-Windows
19805          IS_MAKE_CORRECT_ENV=true
19806        fi
19807        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19808          { $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
19809$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;}
19810        else
19811          FOUND_MAKE=$MAKE_CANDIDATE
19812
19813  # Only process if variable expands to non-empty
19814
19815  if test "x$FOUND_MAKE" != x; then
19816    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19817
19818  # First separate the path from the arguments. This will split at the first
19819  # space.
19820  complete="$FOUND_MAKE"
19821  path="${complete%% *}"
19822  tmp="$complete EOL"
19823  arguments="${tmp#* }"
19824
19825  # Input might be given as Windows format, start by converting to
19826  # unix format.
19827  new_path=`$CYGPATH -u "$path"`
19828
19829  # Now try to locate executable using which
19830  new_path=`$WHICH "$new_path" 2> /dev/null`
19831  # bat and cmd files are not always considered executable in cygwin causing which
19832  # to not find them
19833  if test "x$new_path" = x \
19834      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19835      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19836    new_path=`$CYGPATH -u "$path"`
19837  fi
19838  if test "x$new_path" = x; then
19839    # Oops. Which didn't find the executable.
19840    # The splitting of arguments from the executable at a space might have been incorrect,
19841    # since paths with space are more likely in Windows. Give it another try with the whole
19842    # argument.
19843    path="$complete"
19844    arguments="EOL"
19845    new_path=`$CYGPATH -u "$path"`
19846    new_path=`$WHICH "$new_path" 2> /dev/null`
19847    # bat and cmd files are not always considered executable in cygwin causing which
19848    # to not find them
19849    if test "x$new_path" = x \
19850        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19851        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19852      new_path=`$CYGPATH -u "$path"`
19853    fi
19854    if test "x$new_path" = x; then
19855      # It's still not found. Now this is an unrecoverable error.
19856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19857$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19858      has_space=`$ECHO "$complete" | $GREP " "`
19859      if test "x$has_space" != x; then
19860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19862      fi
19863      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19864    fi
19865  fi
19866
19867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19870  # "foo.exe" is OK but "foo" is an error.
19871  #
19872  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19873  # It is also a way to make sure we got the proper file name for the real test later on.
19874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19875  if test "x$test_shortpath" = x; then
19876    # Short path failed, file does not exist as specified.
19877    # Try adding .exe or .cmd
19878    if test -f "${new_path}.exe"; then
19879      input_to_shortpath="${new_path}.exe"
19880    elif test -f "${new_path}.cmd"; then
19881      input_to_shortpath="${new_path}.cmd"
19882    else
19883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19884$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19885      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19886$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19887      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19888    fi
19889  else
19890    input_to_shortpath="$new_path"
19891  fi
19892
19893  # Call helper function which possibly converts this using DOS-style short mode.
19894  # If so, the updated path is stored in $new_path.
19895  new_path="$input_to_shortpath"
19896
19897  input_path="$input_to_shortpath"
19898  # Check if we need to convert this using DOS-style short mode. If the path
19899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19900  # take no chances and rewrite it.
19901  # Note: m4 eats our [], so we need to use [ and ] instead.
19902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19903  if test "x$has_forbidden_chars" != x; then
19904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19908      # Going to short mode and back again did indeed matter. Since short mode is
19909      # case insensitive, let's make it lowercase to improve readability.
19910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19911      # Now convert it back to Unix-style (cygpath)
19912      input_path=`$CYGPATH -u "$shortmode_path"`
19913      new_path="$input_path"
19914    fi
19915  fi
19916
19917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19918  if test "x$test_cygdrive_prefix" = x; then
19919    # As a simple fix, exclude /usr/bin since it's not a real path.
19920    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19922      # a path prefixed by /cygdrive for fixpath to work.
19923      new_path="$CYGWIN_ROOT_PATH$input_path"
19924    fi
19925  fi
19926
19927  # remove trailing .exe if any
19928  new_path="${new_path/%.exe/}"
19929
19930    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19931
19932  # First separate the path from the arguments. This will split at the first
19933  # space.
19934  complete="$FOUND_MAKE"
19935  path="${complete%% *}"
19936  tmp="$complete EOL"
19937  arguments="${tmp#* }"
19938
19939  # Input might be given as Windows format, start by converting to
19940  # unix format.
19941  new_path="$path"
19942
19943  windows_path="$new_path"
19944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19945    unix_path=`$CYGPATH -u "$windows_path"`
19946    new_path="$unix_path"
19947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19949    new_path="$unix_path"
19950  fi
19951
19952
19953  # Now try to locate executable using which
19954  new_path=`$WHICH "$new_path" 2> /dev/null`
19955
19956  if test "x$new_path" = x; then
19957    # Oops. Which didn't find the executable.
19958    # The splitting of arguments from the executable at a space might have been incorrect,
19959    # since paths with space are more likely in Windows. Give it another try with the whole
19960    # argument.
19961    path="$complete"
19962    arguments="EOL"
19963    new_path="$path"
19964
19965  windows_path="$new_path"
19966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19967    unix_path=`$CYGPATH -u "$windows_path"`
19968    new_path="$unix_path"
19969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19971    new_path="$unix_path"
19972  fi
19973
19974
19975    new_path=`$WHICH "$new_path" 2> /dev/null`
19976    # bat and cmd files are not always considered executable in MSYS causing which
19977    # to not find them
19978    if test "x$new_path" = x \
19979        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19980        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19981      new_path="$path"
19982
19983  windows_path="$new_path"
19984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19985    unix_path=`$CYGPATH -u "$windows_path"`
19986    new_path="$unix_path"
19987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19989    new_path="$unix_path"
19990  fi
19991
19992    fi
19993
19994    if test "x$new_path" = x; then
19995      # It's still not found. Now this is an unrecoverable error.
19996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19997$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19998      has_space=`$ECHO "$complete" | $GREP " "`
19999      if test "x$has_space" != x; then
20000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20002      fi
20003      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20004    fi
20005  fi
20006
20007  # Now new_path has a complete unix path to the binary
20008  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20009    # Keep paths in /bin as-is, but remove trailing .exe if any
20010    new_path="${new_path/%.exe/}"
20011    # Do not save /bin paths to all_fixpath_prefixes!
20012  else
20013    # Not in mixed or Windows style, start by that.
20014    new_path=`cmd //c echo $new_path`
20015
20016  input_path="$new_path"
20017  # Check if we need to convert this using DOS-style short mode. If the path
20018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20019  # take no chances and rewrite it.
20020  # Note: m4 eats our [], so we need to use [ and ] instead.
20021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20022  if test "x$has_forbidden_chars" != x; then
20023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20025  fi
20026
20027    # Output is in $new_path
20028
20029  windows_path="$new_path"
20030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20031    unix_path=`$CYGPATH -u "$windows_path"`
20032    new_path="$unix_path"
20033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20035    new_path="$unix_path"
20036  fi
20037
20038    # remove trailing .exe if any
20039    new_path="${new_path/%.exe/}"
20040
20041    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20042    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20043  fi
20044
20045    else
20046      # We're on a unix platform. Hooray! :)
20047      # First separate the path from the arguments. This will split at the first
20048      # space.
20049      complete="$FOUND_MAKE"
20050      path="${complete%% *}"
20051      tmp="$complete EOL"
20052      arguments="${tmp#* }"
20053
20054      # Cannot rely on the command "which" here since it doesn't always work.
20055      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20056      if test -z "$is_absolute_path"; then
20057        # Path to executable is not absolute. Find it.
20058        IFS_save="$IFS"
20059        IFS=:
20060        for p in $PATH; do
20061          if test -f "$p/$path" && test -x "$p/$path"; then
20062            new_path="$p/$path"
20063            break
20064          fi
20065        done
20066        IFS="$IFS_save"
20067      else
20068        # This is an absolute path, we can use it without further modifications.
20069        new_path="$path"
20070      fi
20071
20072      if test "x$new_path" = x; then
20073        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20074$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20075        has_space=`$ECHO "$complete" | $GREP " "`
20076        if test "x$has_space" != x; then
20077          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20078$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20079        fi
20080        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20081      fi
20082    fi
20083
20084    # Now join together the path and the arguments once again
20085    if test "x$arguments" != xEOL; then
20086      new_complete="$new_path ${arguments% *}"
20087    else
20088      new_complete="$new_path"
20089    fi
20090
20091    if test "x$complete" != "x$new_complete"; then
20092      FOUND_MAKE="$new_complete"
20093      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20094$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20095    fi
20096  fi
20097
20098        fi
20099      fi
20100    fi
20101  fi
20102
20103    fi
20104
20105    if test "x$FOUND_MAKE" = x; then
20106      if test "x$TOOLCHAIN_PATH" != x; then
20107        # We have a toolchain path, check that as well before giving up.
20108        OLD_PATH=$PATH
20109        PATH=$TOOLCHAIN_PATH:$PATH
20110        for ac_prog in gmake
20111do
20112  # Extract the first word of "$ac_prog", so it can be a program name with args.
20113set dummy $ac_prog; ac_word=$2
20114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20115$as_echo_n "checking for $ac_word... " >&6; }
20116if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20117  $as_echo_n "(cached) " >&6
20118else
20119  case $CHECK_TOOLSDIR_GMAKE in
20120  [\\/]* | ?:[\\/]*)
20121  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20122  ;;
20123  *)
20124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20125for as_dir in $PATH
20126do
20127  IFS=$as_save_IFS
20128  test -z "$as_dir" && as_dir=.
20129    for ac_exec_ext in '' $ac_executable_extensions; do
20130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20131    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20133    break 2
20134  fi
20135done
20136  done
20137IFS=$as_save_IFS
20138
20139  ;;
20140esac
20141fi
20142CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20143if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20145$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20146else
20147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20148$as_echo "no" >&6; }
20149fi
20150
20151
20152  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20153done
20154
20155
20156  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20157  DESCRIPTION="gmake in tools-dir"
20158
20159  # On Cygwin, we require a newer version of make than on other platforms
20160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20161    MAKE_VERSION_EXPR="-e 4\."
20162    MAKE_REQUIRED_VERSION="4.0"
20163   else
20164    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20165    MAKE_REQUIRED_VERSION="3.81"
20166  fi
20167
20168  if test "x$MAKE_CANDIDATE" != x; then
20169    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20170$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20171    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20172    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20173    if test "x$IS_GNU_MAKE" = x; then
20174      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20175$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20176    else
20177      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20178      if test "x$IS_MODERN_MAKE" = x; then
20179        { $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
20180$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;}
20181      else
20182        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20183          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20184            MAKE_EXPECTED_ENV='cygwin'
20185          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20186            MAKE_EXPECTED_ENV='msys'
20187          else
20188            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20189          fi
20190          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20191          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20192        else
20193          # Not relevant for non-Windows
20194          IS_MAKE_CORRECT_ENV=true
20195        fi
20196        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20197          { $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
20198$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;}
20199        else
20200          FOUND_MAKE=$MAKE_CANDIDATE
20201
20202  # Only process if variable expands to non-empty
20203
20204  if test "x$FOUND_MAKE" != x; then
20205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20206
20207  # First separate the path from the arguments. This will split at the first
20208  # space.
20209  complete="$FOUND_MAKE"
20210  path="${complete%% *}"
20211  tmp="$complete EOL"
20212  arguments="${tmp#* }"
20213
20214  # Input might be given as Windows format, start by converting to
20215  # unix format.
20216  new_path=`$CYGPATH -u "$path"`
20217
20218  # Now try to locate executable using which
20219  new_path=`$WHICH "$new_path" 2> /dev/null`
20220  # bat and cmd files are not always considered executable in cygwin causing which
20221  # to not find them
20222  if test "x$new_path" = x \
20223      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20224      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20225    new_path=`$CYGPATH -u "$path"`
20226  fi
20227  if test "x$new_path" = x; then
20228    # Oops. Which didn't find the executable.
20229    # The splitting of arguments from the executable at a space might have been incorrect,
20230    # since paths with space are more likely in Windows. Give it another try with the whole
20231    # argument.
20232    path="$complete"
20233    arguments="EOL"
20234    new_path=`$CYGPATH -u "$path"`
20235    new_path=`$WHICH "$new_path" 2> /dev/null`
20236    # bat and cmd files are not always considered executable in cygwin causing which
20237    # to not find them
20238    if test "x$new_path" = x \
20239        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20240        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20241      new_path=`$CYGPATH -u "$path"`
20242    fi
20243    if test "x$new_path" = x; then
20244      # It's still not found. Now this is an unrecoverable error.
20245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20246$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20247      has_space=`$ECHO "$complete" | $GREP " "`
20248      if test "x$has_space" != x; then
20249        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20250$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20251      fi
20252      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20253    fi
20254  fi
20255
20256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20259  # "foo.exe" is OK but "foo" is an error.
20260  #
20261  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20262  # It is also a way to make sure we got the proper file name for the real test later on.
20263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20264  if test "x$test_shortpath" = x; then
20265    # Short path failed, file does not exist as specified.
20266    # Try adding .exe or .cmd
20267    if test -f "${new_path}.exe"; then
20268      input_to_shortpath="${new_path}.exe"
20269    elif test -f "${new_path}.cmd"; then
20270      input_to_shortpath="${new_path}.cmd"
20271    else
20272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20273$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20274      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20275$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20276      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20277    fi
20278  else
20279    input_to_shortpath="$new_path"
20280  fi
20281
20282  # Call helper function which possibly converts this using DOS-style short mode.
20283  # If so, the updated path is stored in $new_path.
20284  new_path="$input_to_shortpath"
20285
20286  input_path="$input_to_shortpath"
20287  # Check if we need to convert this using DOS-style short mode. If the path
20288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20289  # take no chances and rewrite it.
20290  # Note: m4 eats our [], so we need to use [ and ] instead.
20291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20292  if test "x$has_forbidden_chars" != x; then
20293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20297      # Going to short mode and back again did indeed matter. Since short mode is
20298      # case insensitive, let's make it lowercase to improve readability.
20299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20300      # Now convert it back to Unix-style (cygpath)
20301      input_path=`$CYGPATH -u "$shortmode_path"`
20302      new_path="$input_path"
20303    fi
20304  fi
20305
20306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20307  if test "x$test_cygdrive_prefix" = x; then
20308    # As a simple fix, exclude /usr/bin since it's not a real path.
20309    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20311      # a path prefixed by /cygdrive for fixpath to work.
20312      new_path="$CYGWIN_ROOT_PATH$input_path"
20313    fi
20314  fi
20315
20316  # remove trailing .exe if any
20317  new_path="${new_path/%.exe/}"
20318
20319    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20320
20321  # First separate the path from the arguments. This will split at the first
20322  # space.
20323  complete="$FOUND_MAKE"
20324  path="${complete%% *}"
20325  tmp="$complete EOL"
20326  arguments="${tmp#* }"
20327
20328  # Input might be given as Windows format, start by converting to
20329  # unix format.
20330  new_path="$path"
20331
20332  windows_path="$new_path"
20333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20334    unix_path=`$CYGPATH -u "$windows_path"`
20335    new_path="$unix_path"
20336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20338    new_path="$unix_path"
20339  fi
20340
20341
20342  # Now try to locate executable using which
20343  new_path=`$WHICH "$new_path" 2> /dev/null`
20344
20345  if test "x$new_path" = x; then
20346    # Oops. Which didn't find the executable.
20347    # The splitting of arguments from the executable at a space might have been incorrect,
20348    # since paths with space are more likely in Windows. Give it another try with the whole
20349    # argument.
20350    path="$complete"
20351    arguments="EOL"
20352    new_path="$path"
20353
20354  windows_path="$new_path"
20355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20356    unix_path=`$CYGPATH -u "$windows_path"`
20357    new_path="$unix_path"
20358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20360    new_path="$unix_path"
20361  fi
20362
20363
20364    new_path=`$WHICH "$new_path" 2> /dev/null`
20365    # bat and cmd files are not always considered executable in MSYS causing which
20366    # to not find them
20367    if test "x$new_path" = x \
20368        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20369        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20370      new_path="$path"
20371
20372  windows_path="$new_path"
20373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20374    unix_path=`$CYGPATH -u "$windows_path"`
20375    new_path="$unix_path"
20376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20378    new_path="$unix_path"
20379  fi
20380
20381    fi
20382
20383    if test "x$new_path" = x; then
20384      # It's still not found. Now this is an unrecoverable error.
20385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20386$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20387      has_space=`$ECHO "$complete" | $GREP " "`
20388      if test "x$has_space" != x; then
20389        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20390$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20391      fi
20392      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20393    fi
20394  fi
20395
20396  # Now new_path has a complete unix path to the binary
20397  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20398    # Keep paths in /bin as-is, but remove trailing .exe if any
20399    new_path="${new_path/%.exe/}"
20400    # Do not save /bin paths to all_fixpath_prefixes!
20401  else
20402    # Not in mixed or Windows style, start by that.
20403    new_path=`cmd //c echo $new_path`
20404
20405  input_path="$new_path"
20406  # Check if we need to convert this using DOS-style short mode. If the path
20407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20408  # take no chances and rewrite it.
20409  # Note: m4 eats our [], so we need to use [ and ] instead.
20410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20411  if test "x$has_forbidden_chars" != x; then
20412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20414  fi
20415
20416    # Output is in $new_path
20417
20418  windows_path="$new_path"
20419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20420    unix_path=`$CYGPATH -u "$windows_path"`
20421    new_path="$unix_path"
20422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20424    new_path="$unix_path"
20425  fi
20426
20427    # remove trailing .exe if any
20428    new_path="${new_path/%.exe/}"
20429
20430    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20431    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20432  fi
20433
20434    else
20435      # We're on a unix platform. Hooray! :)
20436      # First separate the path from the arguments. This will split at the first
20437      # space.
20438      complete="$FOUND_MAKE"
20439      path="${complete%% *}"
20440      tmp="$complete EOL"
20441      arguments="${tmp#* }"
20442
20443      # Cannot rely on the command "which" here since it doesn't always work.
20444      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20445      if test -z "$is_absolute_path"; then
20446        # Path to executable is not absolute. Find it.
20447        IFS_save="$IFS"
20448        IFS=:
20449        for p in $PATH; do
20450          if test -f "$p/$path" && test -x "$p/$path"; then
20451            new_path="$p/$path"
20452            break
20453          fi
20454        done
20455        IFS="$IFS_save"
20456      else
20457        # This is an absolute path, we can use it without further modifications.
20458        new_path="$path"
20459      fi
20460
20461      if test "x$new_path" = x; then
20462        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20463$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20464        has_space=`$ECHO "$complete" | $GREP " "`
20465        if test "x$has_space" != x; then
20466          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20467$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20468        fi
20469        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20470      fi
20471    fi
20472
20473    # Now join together the path and the arguments once again
20474    if test "x$arguments" != xEOL; then
20475      new_complete="$new_path ${arguments% *}"
20476    else
20477      new_complete="$new_path"
20478    fi
20479
20480    if test "x$complete" != "x$new_complete"; then
20481      FOUND_MAKE="$new_complete"
20482      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20483$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20484    fi
20485  fi
20486
20487        fi
20488      fi
20489    fi
20490  fi
20491
20492        if test "x$FOUND_MAKE" = x; then
20493          for ac_prog in make
20494do
20495  # Extract the first word of "$ac_prog", so it can be a program name with args.
20496set dummy $ac_prog; ac_word=$2
20497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20498$as_echo_n "checking for $ac_word... " >&6; }
20499if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20500  $as_echo_n "(cached) " >&6
20501else
20502  case $CHECK_TOOLSDIR_MAKE in
20503  [\\/]* | ?:[\\/]*)
20504  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20505  ;;
20506  *)
20507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20508for as_dir in $PATH
20509do
20510  IFS=$as_save_IFS
20511  test -z "$as_dir" && as_dir=.
20512    for ac_exec_ext in '' $ac_executable_extensions; do
20513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20514    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20516    break 2
20517  fi
20518done
20519  done
20520IFS=$as_save_IFS
20521
20522  ;;
20523esac
20524fi
20525CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20526if test -n "$CHECK_TOOLSDIR_MAKE"; then
20527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20528$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20529else
20530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20531$as_echo "no" >&6; }
20532fi
20533
20534
20535  test -n "$CHECK_TOOLSDIR_MAKE" && break
20536done
20537
20538
20539  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20540  DESCRIPTION="make in tools-dir"
20541
20542  # On Cygwin, we require a newer version of make than on other platforms
20543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20544    MAKE_VERSION_EXPR="-e 4\."
20545    MAKE_REQUIRED_VERSION="4.0"
20546   else
20547    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20548    MAKE_REQUIRED_VERSION="3.81"
20549  fi
20550
20551  if test "x$MAKE_CANDIDATE" != x; then
20552    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20553$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20554    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20555    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20556    if test "x$IS_GNU_MAKE" = x; then
20557      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20558$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20559    else
20560      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20561      if test "x$IS_MODERN_MAKE" = x; then
20562        { $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
20563$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;}
20564      else
20565        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20566          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20567            MAKE_EXPECTED_ENV='cygwin'
20568          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20569            MAKE_EXPECTED_ENV='msys'
20570          else
20571            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20572          fi
20573          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20574          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20575        else
20576          # Not relevant for non-Windows
20577          IS_MAKE_CORRECT_ENV=true
20578        fi
20579        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20580          { $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
20581$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;}
20582        else
20583          FOUND_MAKE=$MAKE_CANDIDATE
20584
20585  # Only process if variable expands to non-empty
20586
20587  if test "x$FOUND_MAKE" != x; then
20588    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20589
20590  # First separate the path from the arguments. This will split at the first
20591  # space.
20592  complete="$FOUND_MAKE"
20593  path="${complete%% *}"
20594  tmp="$complete EOL"
20595  arguments="${tmp#* }"
20596
20597  # Input might be given as Windows format, start by converting to
20598  # unix format.
20599  new_path=`$CYGPATH -u "$path"`
20600
20601  # Now try to locate executable using which
20602  new_path=`$WHICH "$new_path" 2> /dev/null`
20603  # bat and cmd files are not always considered executable in cygwin causing which
20604  # to not find them
20605  if test "x$new_path" = x \
20606      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20607      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20608    new_path=`$CYGPATH -u "$path"`
20609  fi
20610  if test "x$new_path" = x; then
20611    # Oops. Which didn't find the executable.
20612    # The splitting of arguments from the executable at a space might have been incorrect,
20613    # since paths with space are more likely in Windows. Give it another try with the whole
20614    # argument.
20615    path="$complete"
20616    arguments="EOL"
20617    new_path=`$CYGPATH -u "$path"`
20618    new_path=`$WHICH "$new_path" 2> /dev/null`
20619    # bat and cmd files are not always considered executable in cygwin causing which
20620    # to not find them
20621    if test "x$new_path" = x \
20622        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20623        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20624      new_path=`$CYGPATH -u "$path"`
20625    fi
20626    if test "x$new_path" = x; then
20627      # It's still not found. Now this is an unrecoverable error.
20628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20629$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20630      has_space=`$ECHO "$complete" | $GREP " "`
20631      if test "x$has_space" != x; then
20632        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20633$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20634      fi
20635      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20636    fi
20637  fi
20638
20639  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20640  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20641  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20642  # "foo.exe" is OK but "foo" is an error.
20643  #
20644  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20645  # It is also a way to make sure we got the proper file name for the real test later on.
20646  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20647  if test "x$test_shortpath" = x; then
20648    # Short path failed, file does not exist as specified.
20649    # Try adding .exe or .cmd
20650    if test -f "${new_path}.exe"; then
20651      input_to_shortpath="${new_path}.exe"
20652    elif test -f "${new_path}.cmd"; then
20653      input_to_shortpath="${new_path}.cmd"
20654    else
20655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20656$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20657      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20658$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20659      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20660    fi
20661  else
20662    input_to_shortpath="$new_path"
20663  fi
20664
20665  # Call helper function which possibly converts this using DOS-style short mode.
20666  # If so, the updated path is stored in $new_path.
20667  new_path="$input_to_shortpath"
20668
20669  input_path="$input_to_shortpath"
20670  # Check if we need to convert this using DOS-style short mode. If the path
20671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20672  # take no chances and rewrite it.
20673  # Note: m4 eats our [], so we need to use [ and ] instead.
20674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20675  if test "x$has_forbidden_chars" != x; then
20676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20677    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20678    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20679    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20680      # Going to short mode and back again did indeed matter. Since short mode is
20681      # case insensitive, let's make it lowercase to improve readability.
20682      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20683      # Now convert it back to Unix-style (cygpath)
20684      input_path=`$CYGPATH -u "$shortmode_path"`
20685      new_path="$input_path"
20686    fi
20687  fi
20688
20689  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20690  if test "x$test_cygdrive_prefix" = x; then
20691    # As a simple fix, exclude /usr/bin since it's not a real path.
20692    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20693      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20694      # a path prefixed by /cygdrive for fixpath to work.
20695      new_path="$CYGWIN_ROOT_PATH$input_path"
20696    fi
20697  fi
20698
20699  # remove trailing .exe if any
20700  new_path="${new_path/%.exe/}"
20701
20702    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20703
20704  # First separate the path from the arguments. This will split at the first
20705  # space.
20706  complete="$FOUND_MAKE"
20707  path="${complete%% *}"
20708  tmp="$complete EOL"
20709  arguments="${tmp#* }"
20710
20711  # Input might be given as Windows format, start by converting to
20712  # unix format.
20713  new_path="$path"
20714
20715  windows_path="$new_path"
20716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20717    unix_path=`$CYGPATH -u "$windows_path"`
20718    new_path="$unix_path"
20719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20721    new_path="$unix_path"
20722  fi
20723
20724
20725  # Now try to locate executable using which
20726  new_path=`$WHICH "$new_path" 2> /dev/null`
20727
20728  if test "x$new_path" = x; then
20729    # Oops. Which didn't find the executable.
20730    # The splitting of arguments from the executable at a space might have been incorrect,
20731    # since paths with space are more likely in Windows. Give it another try with the whole
20732    # argument.
20733    path="$complete"
20734    arguments="EOL"
20735    new_path="$path"
20736
20737  windows_path="$new_path"
20738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20739    unix_path=`$CYGPATH -u "$windows_path"`
20740    new_path="$unix_path"
20741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20743    new_path="$unix_path"
20744  fi
20745
20746
20747    new_path=`$WHICH "$new_path" 2> /dev/null`
20748    # bat and cmd files are not always considered executable in MSYS causing which
20749    # to not find them
20750    if test "x$new_path" = x \
20751        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20752        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20753      new_path="$path"
20754
20755  windows_path="$new_path"
20756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20757    unix_path=`$CYGPATH -u "$windows_path"`
20758    new_path="$unix_path"
20759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20761    new_path="$unix_path"
20762  fi
20763
20764    fi
20765
20766    if test "x$new_path" = x; then
20767      # It's still not found. Now this is an unrecoverable error.
20768      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20769$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20770      has_space=`$ECHO "$complete" | $GREP " "`
20771      if test "x$has_space" != x; then
20772        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20773$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20774      fi
20775      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20776    fi
20777  fi
20778
20779  # Now new_path has a complete unix path to the binary
20780  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20781    # Keep paths in /bin as-is, but remove trailing .exe if any
20782    new_path="${new_path/%.exe/}"
20783    # Do not save /bin paths to all_fixpath_prefixes!
20784  else
20785    # Not in mixed or Windows style, start by that.
20786    new_path=`cmd //c echo $new_path`
20787
20788  input_path="$new_path"
20789  # Check if we need to convert this using DOS-style short mode. If the path
20790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20791  # take no chances and rewrite it.
20792  # Note: m4 eats our [], so we need to use [ and ] instead.
20793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20794  if test "x$has_forbidden_chars" != x; then
20795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20797  fi
20798
20799    # Output is in $new_path
20800
20801  windows_path="$new_path"
20802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20803    unix_path=`$CYGPATH -u "$windows_path"`
20804    new_path="$unix_path"
20805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20807    new_path="$unix_path"
20808  fi
20809
20810    # remove trailing .exe if any
20811    new_path="${new_path/%.exe/}"
20812
20813    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20814    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20815  fi
20816
20817    else
20818      # We're on a unix platform. Hooray! :)
20819      # First separate the path from the arguments. This will split at the first
20820      # space.
20821      complete="$FOUND_MAKE"
20822      path="${complete%% *}"
20823      tmp="$complete EOL"
20824      arguments="${tmp#* }"
20825
20826      # Cannot rely on the command "which" here since it doesn't always work.
20827      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20828      if test -z "$is_absolute_path"; then
20829        # Path to executable is not absolute. Find it.
20830        IFS_save="$IFS"
20831        IFS=:
20832        for p in $PATH; do
20833          if test -f "$p/$path" && test -x "$p/$path"; then
20834            new_path="$p/$path"
20835            break
20836          fi
20837        done
20838        IFS="$IFS_save"
20839      else
20840        # This is an absolute path, we can use it without further modifications.
20841        new_path="$path"
20842      fi
20843
20844      if test "x$new_path" = x; then
20845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20846$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20847        has_space=`$ECHO "$complete" | $GREP " "`
20848        if test "x$has_space" != x; then
20849          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20850$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20851        fi
20852        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20853      fi
20854    fi
20855
20856    # Now join together the path and the arguments once again
20857    if test "x$arguments" != xEOL; then
20858      new_complete="$new_path ${arguments% *}"
20859    else
20860      new_complete="$new_path"
20861    fi
20862
20863    if test "x$complete" != "x$new_complete"; then
20864      FOUND_MAKE="$new_complete"
20865      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20866$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20867    fi
20868  fi
20869
20870        fi
20871      fi
20872    fi
20873  fi
20874
20875        fi
20876        PATH=$OLD_PATH
20877      fi
20878    fi
20879
20880    if test "x$FOUND_MAKE" = x; then
20881      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
20882    fi
20883
20884    else
20885      # If it succeeded, then it was overridden by the user. We will use it
20886      # for the tool.
20887
20888      # First remove it from the list of overridden variables, so we can test
20889      # for unknown variables in the end.
20890      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20891
20892      # Check if we try to supply an empty value
20893      if test "x$MAKE" = x; then
20894        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20895$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20896        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20897$as_echo_n "checking for MAKE... " >&6; }
20898        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20899$as_echo "disabled" >&6; }
20900      else
20901        # Check if the provided tool contains a complete path.
20902        tool_specified="$MAKE"
20903        tool_basename="${tool_specified##*/}"
20904        if test "x$tool_basename" = "x$tool_specified"; then
20905          # A command without a complete path is provided, search $PATH.
20906          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20907$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20908          # Extract the first word of "$tool_basename", so it can be a program name with args.
20909set dummy $tool_basename; ac_word=$2
20910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20911$as_echo_n "checking for $ac_word... " >&6; }
20912if ${ac_cv_path_MAKE+:} false; then :
20913  $as_echo_n "(cached) " >&6
20914else
20915  case $MAKE in
20916  [\\/]* | ?:[\\/]*)
20917  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20918  ;;
20919  *)
20920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20921for as_dir in $PATH
20922do
20923  IFS=$as_save_IFS
20924  test -z "$as_dir" && as_dir=.
20925    for ac_exec_ext in '' $ac_executable_extensions; do
20926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20927    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20929    break 2
20930  fi
20931done
20932  done
20933IFS=$as_save_IFS
20934
20935  ;;
20936esac
20937fi
20938MAKE=$ac_cv_path_MAKE
20939if test -n "$MAKE"; then
20940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20941$as_echo "$MAKE" >&6; }
20942else
20943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20944$as_echo "no" >&6; }
20945fi
20946
20947
20948          if test "x$MAKE" = x; then
20949            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20950          fi
20951        else
20952          # Otherwise we believe it is a complete path. Use it as it is.
20953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20954$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20955          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20956$as_echo_n "checking for MAKE... " >&6; }
20957          if test ! -x "$tool_specified"; then
20958            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20959$as_echo "not found" >&6; }
20960            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20961          fi
20962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20963$as_echo "$tool_specified" >&6; }
20964        fi
20965      fi
20966    fi
20967
20968    # If MAKE was set by user, verify the version
20969
20970  MAKE_CANDIDATE=""$MAKE""
20971  DESCRIPTION="user supplied MAKE=$MAKE"
20972
20973  # On Cygwin, we require a newer version of make than on other platforms
20974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20975    MAKE_VERSION_EXPR="-e 4\."
20976    MAKE_REQUIRED_VERSION="4.0"
20977   else
20978    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20979    MAKE_REQUIRED_VERSION="3.81"
20980  fi
20981
20982  if test "x$MAKE_CANDIDATE" != x; then
20983    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20984$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20985    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20986    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20987    if test "x$IS_GNU_MAKE" = x; then
20988      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20989$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20990    else
20991      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20992      if test "x$IS_MODERN_MAKE" = x; then
20993        { $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
20994$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;}
20995      else
20996        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20997          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20998            MAKE_EXPECTED_ENV='cygwin'
20999          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21000            MAKE_EXPECTED_ENV='msys'
21001          else
21002            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21003          fi
21004          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21005          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21006        else
21007          # Not relevant for non-Windows
21008          IS_MAKE_CORRECT_ENV=true
21009        fi
21010        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21011          { $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
21012$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;}
21013        else
21014          FOUND_MAKE=$MAKE_CANDIDATE
21015
21016  # Only process if variable expands to non-empty
21017
21018  if test "x$FOUND_MAKE" != x; then
21019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21020
21021  # First separate the path from the arguments. This will split at the first
21022  # space.
21023  complete="$FOUND_MAKE"
21024  path="${complete%% *}"
21025  tmp="$complete EOL"
21026  arguments="${tmp#* }"
21027
21028  # Input might be given as Windows format, start by converting to
21029  # unix format.
21030  new_path=`$CYGPATH -u "$path"`
21031
21032  # Now try to locate executable using which
21033  new_path=`$WHICH "$new_path" 2> /dev/null`
21034  # bat and cmd files are not always considered executable in cygwin causing which
21035  # to not find them
21036  if test "x$new_path" = x \
21037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21039    new_path=`$CYGPATH -u "$path"`
21040  fi
21041  if test "x$new_path" = x; then
21042    # Oops. Which didn't find the executable.
21043    # The splitting of arguments from the executable at a space might have been incorrect,
21044    # since paths with space are more likely in Windows. Give it another try with the whole
21045    # argument.
21046    path="$complete"
21047    arguments="EOL"
21048    new_path=`$CYGPATH -u "$path"`
21049    new_path=`$WHICH "$new_path" 2> /dev/null`
21050    # bat and cmd files are not always considered executable in cygwin causing which
21051    # to not find them
21052    if test "x$new_path" = x \
21053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21055      new_path=`$CYGPATH -u "$path"`
21056    fi
21057    if test "x$new_path" = x; then
21058      # It's still not found. Now this is an unrecoverable error.
21059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21060$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21061      has_space=`$ECHO "$complete" | $GREP " "`
21062      if test "x$has_space" != x; then
21063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21065      fi
21066      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21067    fi
21068  fi
21069
21070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21073  # "foo.exe" is OK but "foo" is an error.
21074  #
21075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21076  # It is also a way to make sure we got the proper file name for the real test later on.
21077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21078  if test "x$test_shortpath" = x; then
21079    # Short path failed, file does not exist as specified.
21080    # Try adding .exe or .cmd
21081    if test -f "${new_path}.exe"; then
21082      input_to_shortpath="${new_path}.exe"
21083    elif test -f "${new_path}.cmd"; then
21084      input_to_shortpath="${new_path}.cmd"
21085    else
21086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21087$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21090      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21091    fi
21092  else
21093    input_to_shortpath="$new_path"
21094  fi
21095
21096  # Call helper function which possibly converts this using DOS-style short mode.
21097  # If so, the updated path is stored in $new_path.
21098  new_path="$input_to_shortpath"
21099
21100  input_path="$input_to_shortpath"
21101  # Check if we need to convert this using DOS-style short mode. If the path
21102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21103  # take no chances and rewrite it.
21104  # Note: m4 eats our [], so we need to use [ and ] instead.
21105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21106  if test "x$has_forbidden_chars" != x; then
21107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21111      # Going to short mode and back again did indeed matter. Since short mode is
21112      # case insensitive, let's make it lowercase to improve readability.
21113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21114      # Now convert it back to Unix-style (cygpath)
21115      input_path=`$CYGPATH -u "$shortmode_path"`
21116      new_path="$input_path"
21117    fi
21118  fi
21119
21120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21121  if test "x$test_cygdrive_prefix" = x; then
21122    # As a simple fix, exclude /usr/bin since it's not a real path.
21123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21125      # a path prefixed by /cygdrive for fixpath to work.
21126      new_path="$CYGWIN_ROOT_PATH$input_path"
21127    fi
21128  fi
21129
21130  # remove trailing .exe if any
21131  new_path="${new_path/%.exe/}"
21132
21133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21134
21135  # First separate the path from the arguments. This will split at the first
21136  # space.
21137  complete="$FOUND_MAKE"
21138  path="${complete%% *}"
21139  tmp="$complete EOL"
21140  arguments="${tmp#* }"
21141
21142  # Input might be given as Windows format, start by converting to
21143  # unix format.
21144  new_path="$path"
21145
21146  windows_path="$new_path"
21147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21148    unix_path=`$CYGPATH -u "$windows_path"`
21149    new_path="$unix_path"
21150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21152    new_path="$unix_path"
21153  fi
21154
21155
21156  # Now try to locate executable using which
21157  new_path=`$WHICH "$new_path" 2> /dev/null`
21158
21159  if test "x$new_path" = x; then
21160    # Oops. Which didn't find the executable.
21161    # The splitting of arguments from the executable at a space might have been incorrect,
21162    # since paths with space are more likely in Windows. Give it another try with the whole
21163    # argument.
21164    path="$complete"
21165    arguments="EOL"
21166    new_path="$path"
21167
21168  windows_path="$new_path"
21169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21170    unix_path=`$CYGPATH -u "$windows_path"`
21171    new_path="$unix_path"
21172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21174    new_path="$unix_path"
21175  fi
21176
21177
21178    new_path=`$WHICH "$new_path" 2> /dev/null`
21179    # bat and cmd files are not always considered executable in MSYS causing which
21180    # to not find them
21181    if test "x$new_path" = x \
21182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21184      new_path="$path"
21185
21186  windows_path="$new_path"
21187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21188    unix_path=`$CYGPATH -u "$windows_path"`
21189    new_path="$unix_path"
21190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21192    new_path="$unix_path"
21193  fi
21194
21195    fi
21196
21197    if test "x$new_path" = x; then
21198      # It's still not found. Now this is an unrecoverable error.
21199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21200$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21201      has_space=`$ECHO "$complete" | $GREP " "`
21202      if test "x$has_space" != x; then
21203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21205      fi
21206      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21207    fi
21208  fi
21209
21210  # Now new_path has a complete unix path to the binary
21211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21212    # Keep paths in /bin as-is, but remove trailing .exe if any
21213    new_path="${new_path/%.exe/}"
21214    # Do not save /bin paths to all_fixpath_prefixes!
21215  else
21216    # Not in mixed or Windows style, start by that.
21217    new_path=`cmd //c echo $new_path`
21218
21219  input_path="$new_path"
21220  # Check if we need to convert this using DOS-style short mode. If the path
21221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21222  # take no chances and rewrite it.
21223  # Note: m4 eats our [], so we need to use [ and ] instead.
21224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21225  if test "x$has_forbidden_chars" != x; then
21226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21228  fi
21229
21230    # Output is in $new_path
21231
21232  windows_path="$new_path"
21233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21234    unix_path=`$CYGPATH -u "$windows_path"`
21235    new_path="$unix_path"
21236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21238    new_path="$unix_path"
21239  fi
21240
21241    # remove trailing .exe if any
21242    new_path="${new_path/%.exe/}"
21243
21244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21246  fi
21247
21248    else
21249      # We're on a unix platform. Hooray! :)
21250      # First separate the path from the arguments. This will split at the first
21251      # space.
21252      complete="$FOUND_MAKE"
21253      path="${complete%% *}"
21254      tmp="$complete EOL"
21255      arguments="${tmp#* }"
21256
21257      # Cannot rely on the command "which" here since it doesn't always work.
21258      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21259      if test -z "$is_absolute_path"; then
21260        # Path to executable is not absolute. Find it.
21261        IFS_save="$IFS"
21262        IFS=:
21263        for p in $PATH; do
21264          if test -f "$p/$path" && test -x "$p/$path"; then
21265            new_path="$p/$path"
21266            break
21267          fi
21268        done
21269        IFS="$IFS_save"
21270      else
21271        # This is an absolute path, we can use it without further modifications.
21272        new_path="$path"
21273      fi
21274
21275      if test "x$new_path" = x; then
21276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21277$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21278        has_space=`$ECHO "$complete" | $GREP " "`
21279        if test "x$has_space" != x; then
21280          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21282        fi
21283        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21284      fi
21285    fi
21286
21287    # Now join together the path and the arguments once again
21288    if test "x$arguments" != xEOL; then
21289      new_complete="$new_path ${arguments% *}"
21290    else
21291      new_complete="$new_path"
21292    fi
21293
21294    if test "x$complete" != "x$new_complete"; then
21295      FOUND_MAKE="$new_complete"
21296      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21297$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21298    fi
21299  fi
21300
21301        fi
21302      fi
21303    fi
21304  fi
21305
21306    if test "x$FOUND_MAKE" = x; then
21307      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21308    fi
21309
21310  fi
21311
21312
21313  MAKE=$FOUND_MAKE
21314
21315  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21316$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21317
21318
21319  # Check if make supports the output sync option and if so, setup using it.
21320  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21321$as_echo_n "checking if make --output-sync is supported... " >&6; }
21322  if $MAKE --version -O > /dev/null 2>&1; then
21323    OUTPUT_SYNC_SUPPORTED=true
21324    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21325$as_echo "yes" >&6; }
21326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21327$as_echo_n "checking for output-sync value... " >&6; }
21328
21329# Check whether --with-output-sync was given.
21330if test "${with_output_sync+set}" = set; then :
21331  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21332fi
21333
21334    if test "x$OUTPUT_SYNC" = "x"; then
21335      OUTPUT_SYNC=none
21336    fi
21337    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21338$as_echo "$OUTPUT_SYNC" >&6; }
21339    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21340      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21341    fi
21342  else
21343    OUTPUT_SYNC_SUPPORTED=false
21344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21345$as_echo "no" >&6; }
21346  fi
21347
21348
21349
21350
21351
21352
21353  # Test if find supports -delete
21354  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21355$as_echo_n "checking if find supports -delete... " >&6; }
21356  FIND_DELETE="-delete"
21357
21358  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21359
21360  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21361
21362  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21363  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21364    # No, it does not.
21365    $RM $DELETEDIR/TestIfFindSupportsDelete
21366    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21367      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21368      FIND_DELETE="-print | $XARGS $RM"
21369    else
21370      FIND_DELETE="-exec $RM \{\} \+"
21371    fi
21372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21373$as_echo "no" >&6; }
21374  else
21375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21376$as_echo "yes" >&6; }
21377  fi
21378  $RMDIR $DELETEDIR
21379
21380
21381
21382  # Test which kind of tar was found
21383  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21384    TAR_TYPE="gnu"
21385  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21386    TAR_TYPE="bsd"
21387  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21388    TAR_TYPE="bsd"
21389  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21390    TAR_TYPE="solaris"
21391  fi
21392  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21393$as_echo_n "checking what type of tar was found... " >&6; }
21394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21395$as_echo "$TAR_TYPE" >&6; }
21396
21397  TAR_CREATE_FILE_PARAM=""
21398
21399  if test "x$TAR_TYPE" = "xgnu"; then
21400    TAR_INCLUDE_PARAM="T"
21401    TAR_SUPPORTS_TRANSFORM="true"
21402    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21403      # When using gnu tar for Solaris targets, need to use compatibility mode
21404      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21405    fi
21406  else
21407    TAR_INCLUDE_PARAM="I"
21408    TAR_SUPPORTS_TRANSFORM="false"
21409  fi
21410
21411
21412
21413
21414
21415
21416  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21417  # This is a problem for the grep resident on AIX.
21418  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21419$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21420  # Multiple subsequent spaces..
21421  STACK_SPACES='aaa   bbb   ccc'
21422  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21423  # patterns in it.
21424  STACK_LIST=${STACK_SPACES// /$'\n'}
21425  NEEDLE_SPACES='ccc bbb aaa'
21426  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21427  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21428  if test "x$RESULT" == "x"; then
21429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21430$as_echo "yes" >&6; }
21431  else
21432    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21433      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21434    fi
21435    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21436  fi
21437
21438
21439  # These tools might not be installed by default,
21440  # need hint on how to install them.
21441
21442
21443
21444  # Publish this variable in the help.
21445
21446
21447  if [ -z "${UNZIP+x}" ]; then
21448    # The variable is not set by user, try to locate tool using the code snippet
21449    for ac_prog in unzip
21450do
21451  # Extract the first word of "$ac_prog", so it can be a program name with args.
21452set dummy $ac_prog; ac_word=$2
21453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21454$as_echo_n "checking for $ac_word... " >&6; }
21455if ${ac_cv_path_UNZIP+:} false; then :
21456  $as_echo_n "(cached) " >&6
21457else
21458  case $UNZIP in
21459  [\\/]* | ?:[\\/]*)
21460  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21461  ;;
21462  *)
21463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21464for as_dir in $PATH
21465do
21466  IFS=$as_save_IFS
21467  test -z "$as_dir" && as_dir=.
21468    for ac_exec_ext in '' $ac_executable_extensions; do
21469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21470    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21472    break 2
21473  fi
21474done
21475  done
21476IFS=$as_save_IFS
21477
21478  ;;
21479esac
21480fi
21481UNZIP=$ac_cv_path_UNZIP
21482if test -n "$UNZIP"; then
21483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21484$as_echo "$UNZIP" >&6; }
21485else
21486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21487$as_echo "no" >&6; }
21488fi
21489
21490
21491  test -n "$UNZIP" && break
21492done
21493
21494  else
21495    # The variable is set, but is it from the command line or the environment?
21496
21497    # Try to remove the string !UNZIP! from our list.
21498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21500      # If it failed, the variable was not from the command line. Ignore it,
21501      # but warn the user (except for BASH, which is always set by the calling BASH).
21502      if test "xUNZIP" != xBASH; then
21503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21504$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21505      fi
21506      # Try to locate tool using the code snippet
21507      for ac_prog in unzip
21508do
21509  # Extract the first word of "$ac_prog", so it can be a program name with args.
21510set dummy $ac_prog; ac_word=$2
21511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21512$as_echo_n "checking for $ac_word... " >&6; }
21513if ${ac_cv_path_UNZIP+:} false; then :
21514  $as_echo_n "(cached) " >&6
21515else
21516  case $UNZIP in
21517  [\\/]* | ?:[\\/]*)
21518  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21519  ;;
21520  *)
21521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21522for as_dir in $PATH
21523do
21524  IFS=$as_save_IFS
21525  test -z "$as_dir" && as_dir=.
21526    for ac_exec_ext in '' $ac_executable_extensions; do
21527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21528    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21530    break 2
21531  fi
21532done
21533  done
21534IFS=$as_save_IFS
21535
21536  ;;
21537esac
21538fi
21539UNZIP=$ac_cv_path_UNZIP
21540if test -n "$UNZIP"; then
21541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21542$as_echo "$UNZIP" >&6; }
21543else
21544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21545$as_echo "no" >&6; }
21546fi
21547
21548
21549  test -n "$UNZIP" && break
21550done
21551
21552    else
21553      # If it succeeded, then it was overridden by the user. We will use it
21554      # for the tool.
21555
21556      # First remove it from the list of overridden variables, so we can test
21557      # for unknown variables in the end.
21558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21559
21560      # Check if we try to supply an empty value
21561      if test "x$UNZIP" = x; then
21562        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21563$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21565$as_echo_n "checking for UNZIP... " >&6; }
21566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21567$as_echo "disabled" >&6; }
21568      else
21569        # Check if the provided tool contains a complete path.
21570        tool_specified="$UNZIP"
21571        tool_basename="${tool_specified##*/}"
21572        if test "x$tool_basename" = "x$tool_specified"; then
21573          # A command without a complete path is provided, search $PATH.
21574          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21575$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21576          # Extract the first word of "$tool_basename", so it can be a program name with args.
21577set dummy $tool_basename; ac_word=$2
21578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21579$as_echo_n "checking for $ac_word... " >&6; }
21580if ${ac_cv_path_UNZIP+:} false; then :
21581  $as_echo_n "(cached) " >&6
21582else
21583  case $UNZIP in
21584  [\\/]* | ?:[\\/]*)
21585  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21586  ;;
21587  *)
21588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21589for as_dir in $PATH
21590do
21591  IFS=$as_save_IFS
21592  test -z "$as_dir" && as_dir=.
21593    for ac_exec_ext in '' $ac_executable_extensions; do
21594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21595    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21597    break 2
21598  fi
21599done
21600  done
21601IFS=$as_save_IFS
21602
21603  ;;
21604esac
21605fi
21606UNZIP=$ac_cv_path_UNZIP
21607if test -n "$UNZIP"; then
21608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21609$as_echo "$UNZIP" >&6; }
21610else
21611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21612$as_echo "no" >&6; }
21613fi
21614
21615
21616          if test "x$UNZIP" = x; then
21617            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21618          fi
21619        else
21620          # Otherwise we believe it is a complete path. Use it as it is.
21621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21622$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21623          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21624$as_echo_n "checking for UNZIP... " >&6; }
21625          if test ! -x "$tool_specified"; then
21626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21627$as_echo "not found" >&6; }
21628            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21629          fi
21630          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21631$as_echo "$tool_specified" >&6; }
21632        fi
21633      fi
21634    fi
21635
21636  fi
21637
21638
21639
21640  if test "x$UNZIP" = x; then
21641    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21642  fi
21643
21644
21645  # Since zip uses "ZIP" as a environment variable for passing options, we need
21646  # to name our variable differently, hence ZIPEXE.
21647
21648
21649
21650  # Publish this variable in the help.
21651
21652
21653  if [ -z "${ZIPEXE+x}" ]; then
21654    # The variable is not set by user, try to locate tool using the code snippet
21655    for ac_prog in zip
21656do
21657  # Extract the first word of "$ac_prog", so it can be a program name with args.
21658set dummy $ac_prog; ac_word=$2
21659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21660$as_echo_n "checking for $ac_word... " >&6; }
21661if ${ac_cv_path_ZIPEXE+:} false; then :
21662  $as_echo_n "(cached) " >&6
21663else
21664  case $ZIPEXE in
21665  [\\/]* | ?:[\\/]*)
21666  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21667  ;;
21668  *)
21669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21670for as_dir in $PATH
21671do
21672  IFS=$as_save_IFS
21673  test -z "$as_dir" && as_dir=.
21674    for ac_exec_ext in '' $ac_executable_extensions; do
21675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21676    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21678    break 2
21679  fi
21680done
21681  done
21682IFS=$as_save_IFS
21683
21684  ;;
21685esac
21686fi
21687ZIPEXE=$ac_cv_path_ZIPEXE
21688if test -n "$ZIPEXE"; then
21689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21690$as_echo "$ZIPEXE" >&6; }
21691else
21692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21693$as_echo "no" >&6; }
21694fi
21695
21696
21697  test -n "$ZIPEXE" && break
21698done
21699
21700  else
21701    # The variable is set, but is it from the command line or the environment?
21702
21703    # Try to remove the string !ZIPEXE! from our list.
21704    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21705    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21706      # If it failed, the variable was not from the command line. Ignore it,
21707      # but warn the user (except for BASH, which is always set by the calling BASH).
21708      if test "xZIPEXE" != xBASH; then
21709        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21710$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21711      fi
21712      # Try to locate tool using the code snippet
21713      for ac_prog in zip
21714do
21715  # Extract the first word of "$ac_prog", so it can be a program name with args.
21716set dummy $ac_prog; ac_word=$2
21717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21718$as_echo_n "checking for $ac_word... " >&6; }
21719if ${ac_cv_path_ZIPEXE+:} false; then :
21720  $as_echo_n "(cached) " >&6
21721else
21722  case $ZIPEXE in
21723  [\\/]* | ?:[\\/]*)
21724  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21725  ;;
21726  *)
21727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21728for as_dir in $PATH
21729do
21730  IFS=$as_save_IFS
21731  test -z "$as_dir" && as_dir=.
21732    for ac_exec_ext in '' $ac_executable_extensions; do
21733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21734    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21736    break 2
21737  fi
21738done
21739  done
21740IFS=$as_save_IFS
21741
21742  ;;
21743esac
21744fi
21745ZIPEXE=$ac_cv_path_ZIPEXE
21746if test -n "$ZIPEXE"; then
21747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21748$as_echo "$ZIPEXE" >&6; }
21749else
21750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21751$as_echo "no" >&6; }
21752fi
21753
21754
21755  test -n "$ZIPEXE" && break
21756done
21757
21758    else
21759      # If it succeeded, then it was overridden by the user. We will use it
21760      # for the tool.
21761
21762      # First remove it from the list of overridden variables, so we can test
21763      # for unknown variables in the end.
21764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21765
21766      # Check if we try to supply an empty value
21767      if test "x$ZIPEXE" = x; then
21768        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21769$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21771$as_echo_n "checking for ZIPEXE... " >&6; }
21772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21773$as_echo "disabled" >&6; }
21774      else
21775        # Check if the provided tool contains a complete path.
21776        tool_specified="$ZIPEXE"
21777        tool_basename="${tool_specified##*/}"
21778        if test "x$tool_basename" = "x$tool_specified"; then
21779          # A command without a complete path is provided, search $PATH.
21780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21781$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21782          # Extract the first word of "$tool_basename", so it can be a program name with args.
21783set dummy $tool_basename; ac_word=$2
21784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21785$as_echo_n "checking for $ac_word... " >&6; }
21786if ${ac_cv_path_ZIPEXE+:} false; then :
21787  $as_echo_n "(cached) " >&6
21788else
21789  case $ZIPEXE in
21790  [\\/]* | ?:[\\/]*)
21791  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21792  ;;
21793  *)
21794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21795for as_dir in $PATH
21796do
21797  IFS=$as_save_IFS
21798  test -z "$as_dir" && as_dir=.
21799    for ac_exec_ext in '' $ac_executable_extensions; do
21800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21801    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21803    break 2
21804  fi
21805done
21806  done
21807IFS=$as_save_IFS
21808
21809  ;;
21810esac
21811fi
21812ZIPEXE=$ac_cv_path_ZIPEXE
21813if test -n "$ZIPEXE"; then
21814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21815$as_echo "$ZIPEXE" >&6; }
21816else
21817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21818$as_echo "no" >&6; }
21819fi
21820
21821
21822          if test "x$ZIPEXE" = x; then
21823            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21824          fi
21825        else
21826          # Otherwise we believe it is a complete path. Use it as it is.
21827          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21828$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21830$as_echo_n "checking for ZIPEXE... " >&6; }
21831          if test ! -x "$tool_specified"; then
21832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21833$as_echo "not found" >&6; }
21834            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21835          fi
21836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21837$as_echo "$tool_specified" >&6; }
21838        fi
21839      fi
21840    fi
21841
21842  fi
21843
21844
21845
21846  if test "x$ZIPEXE" = x; then
21847    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21848  fi
21849
21850
21851
21852  # Non-required basic tools
21853
21854
21855
21856  # Publish this variable in the help.
21857
21858
21859  if [ -z "${LDD+x}" ]; then
21860    # The variable is not set by user, try to locate tool using the code snippet
21861    for ac_prog in ldd
21862do
21863  # Extract the first word of "$ac_prog", so it can be a program name with args.
21864set dummy $ac_prog; ac_word=$2
21865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21866$as_echo_n "checking for $ac_word... " >&6; }
21867if ${ac_cv_path_LDD+:} false; then :
21868  $as_echo_n "(cached) " >&6
21869else
21870  case $LDD in
21871  [\\/]* | ?:[\\/]*)
21872  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21873  ;;
21874  *)
21875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21876for as_dir in $PATH
21877do
21878  IFS=$as_save_IFS
21879  test -z "$as_dir" && as_dir=.
21880    for ac_exec_ext in '' $ac_executable_extensions; do
21881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21882    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21884    break 2
21885  fi
21886done
21887  done
21888IFS=$as_save_IFS
21889
21890  ;;
21891esac
21892fi
21893LDD=$ac_cv_path_LDD
21894if test -n "$LDD"; then
21895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21896$as_echo "$LDD" >&6; }
21897else
21898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21899$as_echo "no" >&6; }
21900fi
21901
21902
21903  test -n "$LDD" && break
21904done
21905
21906  else
21907    # The variable is set, but is it from the command line or the environment?
21908
21909    # Try to remove the string !LDD! from our list.
21910    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21911    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21912      # If it failed, the variable was not from the command line. Ignore it,
21913      # but warn the user (except for BASH, which is always set by the calling BASH).
21914      if test "xLDD" != xBASH; then
21915        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21916$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21917      fi
21918      # Try to locate tool using the code snippet
21919      for ac_prog in ldd
21920do
21921  # Extract the first word of "$ac_prog", so it can be a program name with args.
21922set dummy $ac_prog; ac_word=$2
21923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21924$as_echo_n "checking for $ac_word... " >&6; }
21925if ${ac_cv_path_LDD+:} false; then :
21926  $as_echo_n "(cached) " >&6
21927else
21928  case $LDD in
21929  [\\/]* | ?:[\\/]*)
21930  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21931  ;;
21932  *)
21933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21934for as_dir in $PATH
21935do
21936  IFS=$as_save_IFS
21937  test -z "$as_dir" && as_dir=.
21938    for ac_exec_ext in '' $ac_executable_extensions; do
21939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21940    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21942    break 2
21943  fi
21944done
21945  done
21946IFS=$as_save_IFS
21947
21948  ;;
21949esac
21950fi
21951LDD=$ac_cv_path_LDD
21952if test -n "$LDD"; then
21953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21954$as_echo "$LDD" >&6; }
21955else
21956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21957$as_echo "no" >&6; }
21958fi
21959
21960
21961  test -n "$LDD" && break
21962done
21963
21964    else
21965      # If it succeeded, then it was overridden by the user. We will use it
21966      # for the tool.
21967
21968      # First remove it from the list of overridden variables, so we can test
21969      # for unknown variables in the end.
21970      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21971
21972      # Check if we try to supply an empty value
21973      if test "x$LDD" = x; then
21974        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21975$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21977$as_echo_n "checking for LDD... " >&6; }
21978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21979$as_echo "disabled" >&6; }
21980      else
21981        # Check if the provided tool contains a complete path.
21982        tool_specified="$LDD"
21983        tool_basename="${tool_specified##*/}"
21984        if test "x$tool_basename" = "x$tool_specified"; then
21985          # A command without a complete path is provided, search $PATH.
21986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21987$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21988          # Extract the first word of "$tool_basename", so it can be a program name with args.
21989set dummy $tool_basename; ac_word=$2
21990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21991$as_echo_n "checking for $ac_word... " >&6; }
21992if ${ac_cv_path_LDD+:} false; then :
21993  $as_echo_n "(cached) " >&6
21994else
21995  case $LDD in
21996  [\\/]* | ?:[\\/]*)
21997  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21998  ;;
21999  *)
22000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22001for as_dir in $PATH
22002do
22003  IFS=$as_save_IFS
22004  test -z "$as_dir" && as_dir=.
22005    for ac_exec_ext in '' $ac_executable_extensions; do
22006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22007    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22009    break 2
22010  fi
22011done
22012  done
22013IFS=$as_save_IFS
22014
22015  ;;
22016esac
22017fi
22018LDD=$ac_cv_path_LDD
22019if test -n "$LDD"; then
22020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22021$as_echo "$LDD" >&6; }
22022else
22023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22024$as_echo "no" >&6; }
22025fi
22026
22027
22028          if test "x$LDD" = x; then
22029            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22030          fi
22031        else
22032          # Otherwise we believe it is a complete path. Use it as it is.
22033          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22034$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22035          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22036$as_echo_n "checking for LDD... " >&6; }
22037          if test ! -x "$tool_specified"; then
22038            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22039$as_echo "not found" >&6; }
22040            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22041          fi
22042          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22043$as_echo "$tool_specified" >&6; }
22044        fi
22045      fi
22046    fi
22047
22048  fi
22049
22050
22051  if test "x$LDD" = "x"; then
22052    # List shared lib dependencies is used for
22053    # debug output and checking for forbidden dependencies.
22054    # We can build without it.
22055    LDD="true"
22056  fi
22057
22058
22059  # Publish this variable in the help.
22060
22061
22062  if [ -z "${OTOOL+x}" ]; then
22063    # The variable is not set by user, try to locate tool using the code snippet
22064    for ac_prog in otool
22065do
22066  # Extract the first word of "$ac_prog", so it can be a program name with args.
22067set dummy $ac_prog; ac_word=$2
22068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22069$as_echo_n "checking for $ac_word... " >&6; }
22070if ${ac_cv_path_OTOOL+:} false; then :
22071  $as_echo_n "(cached) " >&6
22072else
22073  case $OTOOL in
22074  [\\/]* | ?:[\\/]*)
22075  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22076  ;;
22077  *)
22078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22079for as_dir in $PATH
22080do
22081  IFS=$as_save_IFS
22082  test -z "$as_dir" && as_dir=.
22083    for ac_exec_ext in '' $ac_executable_extensions; do
22084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22085    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22087    break 2
22088  fi
22089done
22090  done
22091IFS=$as_save_IFS
22092
22093  ;;
22094esac
22095fi
22096OTOOL=$ac_cv_path_OTOOL
22097if test -n "$OTOOL"; then
22098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22099$as_echo "$OTOOL" >&6; }
22100else
22101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22102$as_echo "no" >&6; }
22103fi
22104
22105
22106  test -n "$OTOOL" && break
22107done
22108
22109  else
22110    # The variable is set, but is it from the command line or the environment?
22111
22112    # Try to remove the string !OTOOL! from our list.
22113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22115      # If it failed, the variable was not from the command line. Ignore it,
22116      # but warn the user (except for BASH, which is always set by the calling BASH).
22117      if test "xOTOOL" != xBASH; then
22118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22119$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22120      fi
22121      # Try to locate tool using the code snippet
22122      for ac_prog in otool
22123do
22124  # Extract the first word of "$ac_prog", so it can be a program name with args.
22125set dummy $ac_prog; ac_word=$2
22126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22127$as_echo_n "checking for $ac_word... " >&6; }
22128if ${ac_cv_path_OTOOL+:} false; then :
22129  $as_echo_n "(cached) " >&6
22130else
22131  case $OTOOL in
22132  [\\/]* | ?:[\\/]*)
22133  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22134  ;;
22135  *)
22136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22137for as_dir in $PATH
22138do
22139  IFS=$as_save_IFS
22140  test -z "$as_dir" && as_dir=.
22141    for ac_exec_ext in '' $ac_executable_extensions; do
22142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22143    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22145    break 2
22146  fi
22147done
22148  done
22149IFS=$as_save_IFS
22150
22151  ;;
22152esac
22153fi
22154OTOOL=$ac_cv_path_OTOOL
22155if test -n "$OTOOL"; then
22156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22157$as_echo "$OTOOL" >&6; }
22158else
22159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22160$as_echo "no" >&6; }
22161fi
22162
22163
22164  test -n "$OTOOL" && break
22165done
22166
22167    else
22168      # If it succeeded, then it was overridden by the user. We will use it
22169      # for the tool.
22170
22171      # First remove it from the list of overridden variables, so we can test
22172      # for unknown variables in the end.
22173      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22174
22175      # Check if we try to supply an empty value
22176      if test "x$OTOOL" = x; then
22177        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22178$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22179        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22180$as_echo_n "checking for OTOOL... " >&6; }
22181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22182$as_echo "disabled" >&6; }
22183      else
22184        # Check if the provided tool contains a complete path.
22185        tool_specified="$OTOOL"
22186        tool_basename="${tool_specified##*/}"
22187        if test "x$tool_basename" = "x$tool_specified"; then
22188          # A command without a complete path is provided, search $PATH.
22189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22190$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22191          # Extract the first word of "$tool_basename", so it can be a program name with args.
22192set dummy $tool_basename; ac_word=$2
22193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22194$as_echo_n "checking for $ac_word... " >&6; }
22195if ${ac_cv_path_OTOOL+:} false; then :
22196  $as_echo_n "(cached) " >&6
22197else
22198  case $OTOOL in
22199  [\\/]* | ?:[\\/]*)
22200  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22201  ;;
22202  *)
22203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22204for as_dir in $PATH
22205do
22206  IFS=$as_save_IFS
22207  test -z "$as_dir" && as_dir=.
22208    for ac_exec_ext in '' $ac_executable_extensions; do
22209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22210    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22212    break 2
22213  fi
22214done
22215  done
22216IFS=$as_save_IFS
22217
22218  ;;
22219esac
22220fi
22221OTOOL=$ac_cv_path_OTOOL
22222if test -n "$OTOOL"; then
22223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22224$as_echo "$OTOOL" >&6; }
22225else
22226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22227$as_echo "no" >&6; }
22228fi
22229
22230
22231          if test "x$OTOOL" = x; then
22232            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22233          fi
22234        else
22235          # Otherwise we believe it is a complete path. Use it as it is.
22236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22237$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22238          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22239$as_echo_n "checking for OTOOL... " >&6; }
22240          if test ! -x "$tool_specified"; then
22241            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22242$as_echo "not found" >&6; }
22243            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22244          fi
22245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22246$as_echo "$tool_specified" >&6; }
22247        fi
22248      fi
22249    fi
22250
22251  fi
22252
22253
22254  if test "x$OTOOL" = "x"; then
22255    OTOOL="true"
22256  fi
22257
22258
22259  # Publish this variable in the help.
22260
22261
22262  if [ -z "${READELF+x}" ]; then
22263    # The variable is not set by user, try to locate tool using the code snippet
22264    for ac_prog in greadelf readelf
22265do
22266  # Extract the first word of "$ac_prog", so it can be a program name with args.
22267set dummy $ac_prog; ac_word=$2
22268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22269$as_echo_n "checking for $ac_word... " >&6; }
22270if ${ac_cv_path_READELF+:} false; then :
22271  $as_echo_n "(cached) " >&6
22272else
22273  case $READELF in
22274  [\\/]* | ?:[\\/]*)
22275  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22276  ;;
22277  *)
22278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22279for as_dir in $PATH
22280do
22281  IFS=$as_save_IFS
22282  test -z "$as_dir" && as_dir=.
22283    for ac_exec_ext in '' $ac_executable_extensions; do
22284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22285    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22287    break 2
22288  fi
22289done
22290  done
22291IFS=$as_save_IFS
22292
22293  ;;
22294esac
22295fi
22296READELF=$ac_cv_path_READELF
22297if test -n "$READELF"; then
22298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22299$as_echo "$READELF" >&6; }
22300else
22301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22302$as_echo "no" >&6; }
22303fi
22304
22305
22306  test -n "$READELF" && break
22307done
22308
22309  else
22310    # The variable is set, but is it from the command line or the environment?
22311
22312    # Try to remove the string !READELF! from our list.
22313    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22314    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22315      # If it failed, the variable was not from the command line. Ignore it,
22316      # but warn the user (except for BASH, which is always set by the calling BASH).
22317      if test "xREADELF" != xBASH; then
22318        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22319$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22320      fi
22321      # Try to locate tool using the code snippet
22322      for ac_prog in greadelf readelf
22323do
22324  # Extract the first word of "$ac_prog", so it can be a program name with args.
22325set dummy $ac_prog; ac_word=$2
22326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22327$as_echo_n "checking for $ac_word... " >&6; }
22328if ${ac_cv_path_READELF+:} false; then :
22329  $as_echo_n "(cached) " >&6
22330else
22331  case $READELF in
22332  [\\/]* | ?:[\\/]*)
22333  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22334  ;;
22335  *)
22336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22337for as_dir in $PATH
22338do
22339  IFS=$as_save_IFS
22340  test -z "$as_dir" && as_dir=.
22341    for ac_exec_ext in '' $ac_executable_extensions; do
22342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22343    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22345    break 2
22346  fi
22347done
22348  done
22349IFS=$as_save_IFS
22350
22351  ;;
22352esac
22353fi
22354READELF=$ac_cv_path_READELF
22355if test -n "$READELF"; then
22356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22357$as_echo "$READELF" >&6; }
22358else
22359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22360$as_echo "no" >&6; }
22361fi
22362
22363
22364  test -n "$READELF" && break
22365done
22366
22367    else
22368      # If it succeeded, then it was overridden by the user. We will use it
22369      # for the tool.
22370
22371      # First remove it from the list of overridden variables, so we can test
22372      # for unknown variables in the end.
22373      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22374
22375      # Check if we try to supply an empty value
22376      if test "x$READELF" = x; then
22377        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22378$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22380$as_echo_n "checking for READELF... " >&6; }
22381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22382$as_echo "disabled" >&6; }
22383      else
22384        # Check if the provided tool contains a complete path.
22385        tool_specified="$READELF"
22386        tool_basename="${tool_specified##*/}"
22387        if test "x$tool_basename" = "x$tool_specified"; then
22388          # A command without a complete path is provided, search $PATH.
22389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22390$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22391          # Extract the first word of "$tool_basename", so it can be a program name with args.
22392set dummy $tool_basename; ac_word=$2
22393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22394$as_echo_n "checking for $ac_word... " >&6; }
22395if ${ac_cv_path_READELF+:} false; then :
22396  $as_echo_n "(cached) " >&6
22397else
22398  case $READELF in
22399  [\\/]* | ?:[\\/]*)
22400  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22401  ;;
22402  *)
22403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22404for as_dir in $PATH
22405do
22406  IFS=$as_save_IFS
22407  test -z "$as_dir" && as_dir=.
22408    for ac_exec_ext in '' $ac_executable_extensions; do
22409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22410    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22412    break 2
22413  fi
22414done
22415  done
22416IFS=$as_save_IFS
22417
22418  ;;
22419esac
22420fi
22421READELF=$ac_cv_path_READELF
22422if test -n "$READELF"; then
22423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22424$as_echo "$READELF" >&6; }
22425else
22426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22427$as_echo "no" >&6; }
22428fi
22429
22430
22431          if test "x$READELF" = x; then
22432            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22433          fi
22434        else
22435          # Otherwise we believe it is a complete path. Use it as it is.
22436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22437$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22438          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22439$as_echo_n "checking for READELF... " >&6; }
22440          if test ! -x "$tool_specified"; then
22441            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22442$as_echo "not found" >&6; }
22443            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22444          fi
22445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22446$as_echo "$tool_specified" >&6; }
22447        fi
22448      fi
22449    fi
22450
22451  fi
22452
22453
22454
22455
22456  # Publish this variable in the help.
22457
22458
22459  if [ -z "${DOT+x}" ]; then
22460    # The variable is not set by user, try to locate tool using the code snippet
22461    for ac_prog in dot
22462do
22463  # Extract the first word of "$ac_prog", so it can be a program name with args.
22464set dummy $ac_prog; ac_word=$2
22465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22466$as_echo_n "checking for $ac_word... " >&6; }
22467if ${ac_cv_path_DOT+:} false; then :
22468  $as_echo_n "(cached) " >&6
22469else
22470  case $DOT in
22471  [\\/]* | ?:[\\/]*)
22472  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22473  ;;
22474  *)
22475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22476for as_dir in $PATH
22477do
22478  IFS=$as_save_IFS
22479  test -z "$as_dir" && as_dir=.
22480    for ac_exec_ext in '' $ac_executable_extensions; do
22481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22482    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22484    break 2
22485  fi
22486done
22487  done
22488IFS=$as_save_IFS
22489
22490  ;;
22491esac
22492fi
22493DOT=$ac_cv_path_DOT
22494if test -n "$DOT"; then
22495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22496$as_echo "$DOT" >&6; }
22497else
22498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22499$as_echo "no" >&6; }
22500fi
22501
22502
22503  test -n "$DOT" && break
22504done
22505
22506  else
22507    # The variable is set, but is it from the command line or the environment?
22508
22509    # Try to remove the string !DOT! from our list.
22510    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22511    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22512      # If it failed, the variable was not from the command line. Ignore it,
22513      # but warn the user (except for BASH, which is always set by the calling BASH).
22514      if test "xDOT" != xBASH; then
22515        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22516$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22517      fi
22518      # Try to locate tool using the code snippet
22519      for ac_prog in dot
22520do
22521  # Extract the first word of "$ac_prog", so it can be a program name with args.
22522set dummy $ac_prog; ac_word=$2
22523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22524$as_echo_n "checking for $ac_word... " >&6; }
22525if ${ac_cv_path_DOT+:} false; then :
22526  $as_echo_n "(cached) " >&6
22527else
22528  case $DOT in
22529  [\\/]* | ?:[\\/]*)
22530  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22531  ;;
22532  *)
22533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22534for as_dir in $PATH
22535do
22536  IFS=$as_save_IFS
22537  test -z "$as_dir" && as_dir=.
22538    for ac_exec_ext in '' $ac_executable_extensions; do
22539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22540    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22542    break 2
22543  fi
22544done
22545  done
22546IFS=$as_save_IFS
22547
22548  ;;
22549esac
22550fi
22551DOT=$ac_cv_path_DOT
22552if test -n "$DOT"; then
22553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22554$as_echo "$DOT" >&6; }
22555else
22556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22557$as_echo "no" >&6; }
22558fi
22559
22560
22561  test -n "$DOT" && break
22562done
22563
22564    else
22565      # If it succeeded, then it was overridden by the user. We will use it
22566      # for the tool.
22567
22568      # First remove it from the list of overridden variables, so we can test
22569      # for unknown variables in the end.
22570      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22571
22572      # Check if we try to supply an empty value
22573      if test "x$DOT" = x; then
22574        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22575$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22577$as_echo_n "checking for DOT... " >&6; }
22578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22579$as_echo "disabled" >&6; }
22580      else
22581        # Check if the provided tool contains a complete path.
22582        tool_specified="$DOT"
22583        tool_basename="${tool_specified##*/}"
22584        if test "x$tool_basename" = "x$tool_specified"; then
22585          # A command without a complete path is provided, search $PATH.
22586          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22587$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22588          # Extract the first word of "$tool_basename", so it can be a program name with args.
22589set dummy $tool_basename; ac_word=$2
22590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22591$as_echo_n "checking for $ac_word... " >&6; }
22592if ${ac_cv_path_DOT+:} false; then :
22593  $as_echo_n "(cached) " >&6
22594else
22595  case $DOT in
22596  [\\/]* | ?:[\\/]*)
22597  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22598  ;;
22599  *)
22600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22601for as_dir in $PATH
22602do
22603  IFS=$as_save_IFS
22604  test -z "$as_dir" && as_dir=.
22605    for ac_exec_ext in '' $ac_executable_extensions; do
22606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22607    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22609    break 2
22610  fi
22611done
22612  done
22613IFS=$as_save_IFS
22614
22615  ;;
22616esac
22617fi
22618DOT=$ac_cv_path_DOT
22619if test -n "$DOT"; then
22620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22621$as_echo "$DOT" >&6; }
22622else
22623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22624$as_echo "no" >&6; }
22625fi
22626
22627
22628          if test "x$DOT" = x; then
22629            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22630          fi
22631        else
22632          # Otherwise we believe it is a complete path. Use it as it is.
22633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22634$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22635          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22636$as_echo_n "checking for DOT... " >&6; }
22637          if test ! -x "$tool_specified"; then
22638            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22639$as_echo "not found" >&6; }
22640            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22641          fi
22642          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22643$as_echo "$tool_specified" >&6; }
22644        fi
22645      fi
22646    fi
22647
22648  fi
22649
22650
22651
22652
22653  # Publish this variable in the help.
22654
22655
22656  if [ -z "${HG+x}" ]; then
22657    # The variable is not set by user, try to locate tool using the code snippet
22658    for ac_prog in hg
22659do
22660  # Extract the first word of "$ac_prog", so it can be a program name with args.
22661set dummy $ac_prog; ac_word=$2
22662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22663$as_echo_n "checking for $ac_word... " >&6; }
22664if ${ac_cv_path_HG+:} false; then :
22665  $as_echo_n "(cached) " >&6
22666else
22667  case $HG in
22668  [\\/]* | ?:[\\/]*)
22669  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22670  ;;
22671  *)
22672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22673for as_dir in $PATH
22674do
22675  IFS=$as_save_IFS
22676  test -z "$as_dir" && as_dir=.
22677    for ac_exec_ext in '' $ac_executable_extensions; do
22678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22679    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22681    break 2
22682  fi
22683done
22684  done
22685IFS=$as_save_IFS
22686
22687  ;;
22688esac
22689fi
22690HG=$ac_cv_path_HG
22691if test -n "$HG"; then
22692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22693$as_echo "$HG" >&6; }
22694else
22695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22696$as_echo "no" >&6; }
22697fi
22698
22699
22700  test -n "$HG" && break
22701done
22702
22703  else
22704    # The variable is set, but is it from the command line or the environment?
22705
22706    # Try to remove the string !HG! from our list.
22707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22709      # If it failed, the variable was not from the command line. Ignore it,
22710      # but warn the user (except for BASH, which is always set by the calling BASH).
22711      if test "xHG" != xBASH; then
22712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22713$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22714      fi
22715      # Try to locate tool using the code snippet
22716      for ac_prog in hg
22717do
22718  # Extract the first word of "$ac_prog", so it can be a program name with args.
22719set dummy $ac_prog; ac_word=$2
22720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22721$as_echo_n "checking for $ac_word... " >&6; }
22722if ${ac_cv_path_HG+:} false; then :
22723  $as_echo_n "(cached) " >&6
22724else
22725  case $HG in
22726  [\\/]* | ?:[\\/]*)
22727  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22728  ;;
22729  *)
22730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22731for as_dir in $PATH
22732do
22733  IFS=$as_save_IFS
22734  test -z "$as_dir" && as_dir=.
22735    for ac_exec_ext in '' $ac_executable_extensions; do
22736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22737    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22739    break 2
22740  fi
22741done
22742  done
22743IFS=$as_save_IFS
22744
22745  ;;
22746esac
22747fi
22748HG=$ac_cv_path_HG
22749if test -n "$HG"; then
22750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22751$as_echo "$HG" >&6; }
22752else
22753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22754$as_echo "no" >&6; }
22755fi
22756
22757
22758  test -n "$HG" && break
22759done
22760
22761    else
22762      # If it succeeded, then it was overridden by the user. We will use it
22763      # for the tool.
22764
22765      # First remove it from the list of overridden variables, so we can test
22766      # for unknown variables in the end.
22767      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22768
22769      # Check if we try to supply an empty value
22770      if test "x$HG" = x; then
22771        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22772$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22773        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22774$as_echo_n "checking for HG... " >&6; }
22775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22776$as_echo "disabled" >&6; }
22777      else
22778        # Check if the provided tool contains a complete path.
22779        tool_specified="$HG"
22780        tool_basename="${tool_specified##*/}"
22781        if test "x$tool_basename" = "x$tool_specified"; then
22782          # A command without a complete path is provided, search $PATH.
22783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22784$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22785          # Extract the first word of "$tool_basename", so it can be a program name with args.
22786set dummy $tool_basename; ac_word=$2
22787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22788$as_echo_n "checking for $ac_word... " >&6; }
22789if ${ac_cv_path_HG+:} false; then :
22790  $as_echo_n "(cached) " >&6
22791else
22792  case $HG in
22793  [\\/]* | ?:[\\/]*)
22794  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22795  ;;
22796  *)
22797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22798for as_dir in $PATH
22799do
22800  IFS=$as_save_IFS
22801  test -z "$as_dir" && as_dir=.
22802    for ac_exec_ext in '' $ac_executable_extensions; do
22803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22804    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22806    break 2
22807  fi
22808done
22809  done
22810IFS=$as_save_IFS
22811
22812  ;;
22813esac
22814fi
22815HG=$ac_cv_path_HG
22816if test -n "$HG"; then
22817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22818$as_echo "$HG" >&6; }
22819else
22820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22821$as_echo "no" >&6; }
22822fi
22823
22824
22825          if test "x$HG" = x; then
22826            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22827          fi
22828        else
22829          # Otherwise we believe it is a complete path. Use it as it is.
22830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22831$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22832          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22833$as_echo_n "checking for HG... " >&6; }
22834          if test ! -x "$tool_specified"; then
22835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22836$as_echo "not found" >&6; }
22837            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22838          fi
22839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22840$as_echo "$tool_specified" >&6; }
22841        fi
22842      fi
22843    fi
22844
22845  fi
22846
22847
22848
22849
22850  # Publish this variable in the help.
22851
22852
22853  if [ -z "${STAT+x}" ]; then
22854    # The variable is not set by user, try to locate tool using the code snippet
22855    for ac_prog in stat
22856do
22857  # Extract the first word of "$ac_prog", so it can be a program name with args.
22858set dummy $ac_prog; ac_word=$2
22859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22860$as_echo_n "checking for $ac_word... " >&6; }
22861if ${ac_cv_path_STAT+:} false; then :
22862  $as_echo_n "(cached) " >&6
22863else
22864  case $STAT in
22865  [\\/]* | ?:[\\/]*)
22866  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22867  ;;
22868  *)
22869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22870for as_dir in $PATH
22871do
22872  IFS=$as_save_IFS
22873  test -z "$as_dir" && as_dir=.
22874    for ac_exec_ext in '' $ac_executable_extensions; do
22875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22876    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22878    break 2
22879  fi
22880done
22881  done
22882IFS=$as_save_IFS
22883
22884  ;;
22885esac
22886fi
22887STAT=$ac_cv_path_STAT
22888if test -n "$STAT"; then
22889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22890$as_echo "$STAT" >&6; }
22891else
22892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22893$as_echo "no" >&6; }
22894fi
22895
22896
22897  test -n "$STAT" && break
22898done
22899
22900  else
22901    # The variable is set, but is it from the command line or the environment?
22902
22903    # Try to remove the string !STAT! from our list.
22904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22906      # If it failed, the variable was not from the command line. Ignore it,
22907      # but warn the user (except for BASH, which is always set by the calling BASH).
22908      if test "xSTAT" != xBASH; then
22909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22910$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22911      fi
22912      # Try to locate tool using the code snippet
22913      for ac_prog in stat
22914do
22915  # Extract the first word of "$ac_prog", so it can be a program name with args.
22916set dummy $ac_prog; ac_word=$2
22917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22918$as_echo_n "checking for $ac_word... " >&6; }
22919if ${ac_cv_path_STAT+:} false; then :
22920  $as_echo_n "(cached) " >&6
22921else
22922  case $STAT in
22923  [\\/]* | ?:[\\/]*)
22924  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22925  ;;
22926  *)
22927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22928for as_dir in $PATH
22929do
22930  IFS=$as_save_IFS
22931  test -z "$as_dir" && as_dir=.
22932    for ac_exec_ext in '' $ac_executable_extensions; do
22933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22934    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22936    break 2
22937  fi
22938done
22939  done
22940IFS=$as_save_IFS
22941
22942  ;;
22943esac
22944fi
22945STAT=$ac_cv_path_STAT
22946if test -n "$STAT"; then
22947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22948$as_echo "$STAT" >&6; }
22949else
22950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22951$as_echo "no" >&6; }
22952fi
22953
22954
22955  test -n "$STAT" && break
22956done
22957
22958    else
22959      # If it succeeded, then it was overridden by the user. We will use it
22960      # for the tool.
22961
22962      # First remove it from the list of overridden variables, so we can test
22963      # for unknown variables in the end.
22964      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22965
22966      # Check if we try to supply an empty value
22967      if test "x$STAT" = x; then
22968        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22969$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22971$as_echo_n "checking for STAT... " >&6; }
22972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22973$as_echo "disabled" >&6; }
22974      else
22975        # Check if the provided tool contains a complete path.
22976        tool_specified="$STAT"
22977        tool_basename="${tool_specified##*/}"
22978        if test "x$tool_basename" = "x$tool_specified"; then
22979          # A command without a complete path is provided, search $PATH.
22980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22981$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22982          # Extract the first word of "$tool_basename", so it can be a program name with args.
22983set dummy $tool_basename; ac_word=$2
22984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22985$as_echo_n "checking for $ac_word... " >&6; }
22986if ${ac_cv_path_STAT+:} false; then :
22987  $as_echo_n "(cached) " >&6
22988else
22989  case $STAT in
22990  [\\/]* | ?:[\\/]*)
22991  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22992  ;;
22993  *)
22994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22995for as_dir in $PATH
22996do
22997  IFS=$as_save_IFS
22998  test -z "$as_dir" && as_dir=.
22999    for ac_exec_ext in '' $ac_executable_extensions; do
23000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23001    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23003    break 2
23004  fi
23005done
23006  done
23007IFS=$as_save_IFS
23008
23009  ;;
23010esac
23011fi
23012STAT=$ac_cv_path_STAT
23013if test -n "$STAT"; then
23014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23015$as_echo "$STAT" >&6; }
23016else
23017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23018$as_echo "no" >&6; }
23019fi
23020
23021
23022          if test "x$STAT" = x; then
23023            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23024          fi
23025        else
23026          # Otherwise we believe it is a complete path. Use it as it is.
23027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23028$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23029          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23030$as_echo_n "checking for STAT... " >&6; }
23031          if test ! -x "$tool_specified"; then
23032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23033$as_echo "not found" >&6; }
23034            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23035          fi
23036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23037$as_echo "$tool_specified" >&6; }
23038        fi
23039      fi
23040    fi
23041
23042  fi
23043
23044
23045
23046
23047  # Publish this variable in the help.
23048
23049
23050  if [ -z "${TIME+x}" ]; then
23051    # The variable is not set by user, try to locate tool using the code snippet
23052    for ac_prog in time
23053do
23054  # Extract the first word of "$ac_prog", so it can be a program name with args.
23055set dummy $ac_prog; ac_word=$2
23056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23057$as_echo_n "checking for $ac_word... " >&6; }
23058if ${ac_cv_path_TIME+:} false; then :
23059  $as_echo_n "(cached) " >&6
23060else
23061  case $TIME in
23062  [\\/]* | ?:[\\/]*)
23063  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23064  ;;
23065  *)
23066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23067for as_dir in $PATH
23068do
23069  IFS=$as_save_IFS
23070  test -z "$as_dir" && as_dir=.
23071    for ac_exec_ext in '' $ac_executable_extensions; do
23072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23073    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23075    break 2
23076  fi
23077done
23078  done
23079IFS=$as_save_IFS
23080
23081  ;;
23082esac
23083fi
23084TIME=$ac_cv_path_TIME
23085if test -n "$TIME"; then
23086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23087$as_echo "$TIME" >&6; }
23088else
23089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23090$as_echo "no" >&6; }
23091fi
23092
23093
23094  test -n "$TIME" && break
23095done
23096
23097  else
23098    # The variable is set, but is it from the command line or the environment?
23099
23100    # Try to remove the string !TIME! from our list.
23101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23103      # If it failed, the variable was not from the command line. Ignore it,
23104      # but warn the user (except for BASH, which is always set by the calling BASH).
23105      if test "xTIME" != xBASH; then
23106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23107$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23108      fi
23109      # Try to locate tool using the code snippet
23110      for ac_prog in time
23111do
23112  # Extract the first word of "$ac_prog", so it can be a program name with args.
23113set dummy $ac_prog; ac_word=$2
23114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23115$as_echo_n "checking for $ac_word... " >&6; }
23116if ${ac_cv_path_TIME+:} false; then :
23117  $as_echo_n "(cached) " >&6
23118else
23119  case $TIME in
23120  [\\/]* | ?:[\\/]*)
23121  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23122  ;;
23123  *)
23124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23125for as_dir in $PATH
23126do
23127  IFS=$as_save_IFS
23128  test -z "$as_dir" && as_dir=.
23129    for ac_exec_ext in '' $ac_executable_extensions; do
23130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23131    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23133    break 2
23134  fi
23135done
23136  done
23137IFS=$as_save_IFS
23138
23139  ;;
23140esac
23141fi
23142TIME=$ac_cv_path_TIME
23143if test -n "$TIME"; then
23144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23145$as_echo "$TIME" >&6; }
23146else
23147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23148$as_echo "no" >&6; }
23149fi
23150
23151
23152  test -n "$TIME" && break
23153done
23154
23155    else
23156      # If it succeeded, then it was overridden by the user. We will use it
23157      # for the tool.
23158
23159      # First remove it from the list of overridden variables, so we can test
23160      # for unknown variables in the end.
23161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23162
23163      # Check if we try to supply an empty value
23164      if test "x$TIME" = x; then
23165        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23166$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23168$as_echo_n "checking for TIME... " >&6; }
23169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23170$as_echo "disabled" >&6; }
23171      else
23172        # Check if the provided tool contains a complete path.
23173        tool_specified="$TIME"
23174        tool_basename="${tool_specified##*/}"
23175        if test "x$tool_basename" = "x$tool_specified"; then
23176          # A command without a complete path is provided, search $PATH.
23177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23178$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23179          # Extract the first word of "$tool_basename", so it can be a program name with args.
23180set dummy $tool_basename; ac_word=$2
23181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23182$as_echo_n "checking for $ac_word... " >&6; }
23183if ${ac_cv_path_TIME+:} false; then :
23184  $as_echo_n "(cached) " >&6
23185else
23186  case $TIME in
23187  [\\/]* | ?:[\\/]*)
23188  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23189  ;;
23190  *)
23191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23192for as_dir in $PATH
23193do
23194  IFS=$as_save_IFS
23195  test -z "$as_dir" && as_dir=.
23196    for ac_exec_ext in '' $ac_executable_extensions; do
23197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23198    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23200    break 2
23201  fi
23202done
23203  done
23204IFS=$as_save_IFS
23205
23206  ;;
23207esac
23208fi
23209TIME=$ac_cv_path_TIME
23210if test -n "$TIME"; then
23211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23212$as_echo "$TIME" >&6; }
23213else
23214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23215$as_echo "no" >&6; }
23216fi
23217
23218
23219          if test "x$TIME" = x; then
23220            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23221          fi
23222        else
23223          # Otherwise we believe it is a complete path. Use it as it is.
23224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23225$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23226          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23227$as_echo_n "checking for TIME... " >&6; }
23228          if test ! -x "$tool_specified"; then
23229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23230$as_echo "not found" >&6; }
23231            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23232          fi
23233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23234$as_echo "$tool_specified" >&6; }
23235        fi
23236      fi
23237    fi
23238
23239  fi
23240
23241
23242
23243
23244  # Publish this variable in the help.
23245
23246
23247  if [ -z "${FLOCK+x}" ]; then
23248    # The variable is not set by user, try to locate tool using the code snippet
23249    for ac_prog in flock
23250do
23251  # Extract the first word of "$ac_prog", so it can be a program name with args.
23252set dummy $ac_prog; ac_word=$2
23253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23254$as_echo_n "checking for $ac_word... " >&6; }
23255if ${ac_cv_path_FLOCK+:} false; then :
23256  $as_echo_n "(cached) " >&6
23257else
23258  case $FLOCK in
23259  [\\/]* | ?:[\\/]*)
23260  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23261  ;;
23262  *)
23263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23264for as_dir in $PATH
23265do
23266  IFS=$as_save_IFS
23267  test -z "$as_dir" && as_dir=.
23268    for ac_exec_ext in '' $ac_executable_extensions; do
23269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23270    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23272    break 2
23273  fi
23274done
23275  done
23276IFS=$as_save_IFS
23277
23278  ;;
23279esac
23280fi
23281FLOCK=$ac_cv_path_FLOCK
23282if test -n "$FLOCK"; then
23283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23284$as_echo "$FLOCK" >&6; }
23285else
23286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23287$as_echo "no" >&6; }
23288fi
23289
23290
23291  test -n "$FLOCK" && break
23292done
23293
23294  else
23295    # The variable is set, but is it from the command line or the environment?
23296
23297    # Try to remove the string !FLOCK! from our list.
23298    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23299    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23300      # If it failed, the variable was not from the command line. Ignore it,
23301      # but warn the user (except for BASH, which is always set by the calling BASH).
23302      if test "xFLOCK" != xBASH; then
23303        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23304$as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23305      fi
23306      # Try to locate tool using the code snippet
23307      for ac_prog in flock
23308do
23309  # Extract the first word of "$ac_prog", so it can be a program name with args.
23310set dummy $ac_prog; ac_word=$2
23311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23312$as_echo_n "checking for $ac_word... " >&6; }
23313if ${ac_cv_path_FLOCK+:} false; then :
23314  $as_echo_n "(cached) " >&6
23315else
23316  case $FLOCK in
23317  [\\/]* | ?:[\\/]*)
23318  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23319  ;;
23320  *)
23321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23322for as_dir in $PATH
23323do
23324  IFS=$as_save_IFS
23325  test -z "$as_dir" && as_dir=.
23326    for ac_exec_ext in '' $ac_executable_extensions; do
23327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23328    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23330    break 2
23331  fi
23332done
23333  done
23334IFS=$as_save_IFS
23335
23336  ;;
23337esac
23338fi
23339FLOCK=$ac_cv_path_FLOCK
23340if test -n "$FLOCK"; then
23341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23342$as_echo "$FLOCK" >&6; }
23343else
23344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23345$as_echo "no" >&6; }
23346fi
23347
23348
23349  test -n "$FLOCK" && break
23350done
23351
23352    else
23353      # If it succeeded, then it was overridden by the user. We will use it
23354      # for the tool.
23355
23356      # First remove it from the list of overridden variables, so we can test
23357      # for unknown variables in the end.
23358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23359
23360      # Check if we try to supply an empty value
23361      if test "x$FLOCK" = x; then
23362        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23363$as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23364        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23365$as_echo_n "checking for FLOCK... " >&6; }
23366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23367$as_echo "disabled" >&6; }
23368      else
23369        # Check if the provided tool contains a complete path.
23370        tool_specified="$FLOCK"
23371        tool_basename="${tool_specified##*/}"
23372        if test "x$tool_basename" = "x$tool_specified"; then
23373          # A command without a complete path is provided, search $PATH.
23374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23375$as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23376          # Extract the first word of "$tool_basename", so it can be a program name with args.
23377set dummy $tool_basename; ac_word=$2
23378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23379$as_echo_n "checking for $ac_word... " >&6; }
23380if ${ac_cv_path_FLOCK+:} false; then :
23381  $as_echo_n "(cached) " >&6
23382else
23383  case $FLOCK in
23384  [\\/]* | ?:[\\/]*)
23385  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23386  ;;
23387  *)
23388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23389for as_dir in $PATH
23390do
23391  IFS=$as_save_IFS
23392  test -z "$as_dir" && as_dir=.
23393    for ac_exec_ext in '' $ac_executable_extensions; do
23394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23395    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23397    break 2
23398  fi
23399done
23400  done
23401IFS=$as_save_IFS
23402
23403  ;;
23404esac
23405fi
23406FLOCK=$ac_cv_path_FLOCK
23407if test -n "$FLOCK"; then
23408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23409$as_echo "$FLOCK" >&6; }
23410else
23411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23412$as_echo "no" >&6; }
23413fi
23414
23415
23416          if test "x$FLOCK" = x; then
23417            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23418          fi
23419        else
23420          # Otherwise we believe it is a complete path. Use it as it is.
23421          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23422$as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23423          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23424$as_echo_n "checking for FLOCK... " >&6; }
23425          if test ! -x "$tool_specified"; then
23426            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23427$as_echo "not found" >&6; }
23428            as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23429          fi
23430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23431$as_echo "$tool_specified" >&6; }
23432        fi
23433      fi
23434    fi
23435
23436  fi
23437
23438
23439  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23440  # be in the user path.
23441
23442
23443  # Publish this variable in the help.
23444
23445
23446  if [ -z "${DTRACE+x}" ]; then
23447    # The variable is not set by user, try to locate tool using the code snippet
23448    for ac_prog in dtrace
23449do
23450  # Extract the first word of "$ac_prog", so it can be a program name with args.
23451set dummy $ac_prog; ac_word=$2
23452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23453$as_echo_n "checking for $ac_word... " >&6; }
23454if ${ac_cv_path_DTRACE+:} false; then :
23455  $as_echo_n "(cached) " >&6
23456else
23457  case $DTRACE in
23458  [\\/]* | ?:[\\/]*)
23459  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23460  ;;
23461  *)
23462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23463as_dummy="$PATH:/usr/sbin"
23464for as_dir in $as_dummy
23465do
23466  IFS=$as_save_IFS
23467  test -z "$as_dir" && as_dir=.
23468    for ac_exec_ext in '' $ac_executable_extensions; do
23469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23470    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23472    break 2
23473  fi
23474done
23475  done
23476IFS=$as_save_IFS
23477
23478  ;;
23479esac
23480fi
23481DTRACE=$ac_cv_path_DTRACE
23482if test -n "$DTRACE"; then
23483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23484$as_echo "$DTRACE" >&6; }
23485else
23486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23487$as_echo "no" >&6; }
23488fi
23489
23490
23491  test -n "$DTRACE" && break
23492done
23493
23494  else
23495    # The variable is set, but is it from the command line or the environment?
23496
23497    # Try to remove the string !DTRACE! from our list.
23498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23500      # If it failed, the variable was not from the command line. Ignore it,
23501      # but warn the user (except for BASH, which is always set by the calling BASH).
23502      if test "xDTRACE" != xBASH; then
23503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23504$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23505      fi
23506      # Try to locate tool using the code snippet
23507      for ac_prog in dtrace
23508do
23509  # Extract the first word of "$ac_prog", so it can be a program name with args.
23510set dummy $ac_prog; ac_word=$2
23511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23512$as_echo_n "checking for $ac_word... " >&6; }
23513if ${ac_cv_path_DTRACE+:} false; then :
23514  $as_echo_n "(cached) " >&6
23515else
23516  case $DTRACE in
23517  [\\/]* | ?:[\\/]*)
23518  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23519  ;;
23520  *)
23521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23522as_dummy="$PATH:/usr/sbin"
23523for as_dir in $as_dummy
23524do
23525  IFS=$as_save_IFS
23526  test -z "$as_dir" && as_dir=.
23527    for ac_exec_ext in '' $ac_executable_extensions; do
23528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23529    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23531    break 2
23532  fi
23533done
23534  done
23535IFS=$as_save_IFS
23536
23537  ;;
23538esac
23539fi
23540DTRACE=$ac_cv_path_DTRACE
23541if test -n "$DTRACE"; then
23542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23543$as_echo "$DTRACE" >&6; }
23544else
23545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23546$as_echo "no" >&6; }
23547fi
23548
23549
23550  test -n "$DTRACE" && break
23551done
23552
23553    else
23554      # If it succeeded, then it was overridden by the user. We will use it
23555      # for the tool.
23556
23557      # First remove it from the list of overridden variables, so we can test
23558      # for unknown variables in the end.
23559      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23560
23561      # Check if we try to supply an empty value
23562      if test "x$DTRACE" = x; then
23563        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23564$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23565        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23566$as_echo_n "checking for DTRACE... " >&6; }
23567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23568$as_echo "disabled" >&6; }
23569      else
23570        # Check if the provided tool contains a complete path.
23571        tool_specified="$DTRACE"
23572        tool_basename="${tool_specified##*/}"
23573        if test "x$tool_basename" = "x$tool_specified"; then
23574          # A command without a complete path is provided, search $PATH.
23575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23576$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23577          # Extract the first word of "$tool_basename", so it can be a program name with args.
23578set dummy $tool_basename; ac_word=$2
23579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23580$as_echo_n "checking for $ac_word... " >&6; }
23581if ${ac_cv_path_DTRACE+:} false; then :
23582  $as_echo_n "(cached) " >&6
23583else
23584  case $DTRACE in
23585  [\\/]* | ?:[\\/]*)
23586  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23587  ;;
23588  *)
23589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23590for as_dir in $PATH
23591do
23592  IFS=$as_save_IFS
23593  test -z "$as_dir" && as_dir=.
23594    for ac_exec_ext in '' $ac_executable_extensions; do
23595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23596    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23598    break 2
23599  fi
23600done
23601  done
23602IFS=$as_save_IFS
23603
23604  ;;
23605esac
23606fi
23607DTRACE=$ac_cv_path_DTRACE
23608if test -n "$DTRACE"; then
23609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23610$as_echo "$DTRACE" >&6; }
23611else
23612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23613$as_echo "no" >&6; }
23614fi
23615
23616
23617          if test "x$DTRACE" = x; then
23618            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23619          fi
23620        else
23621          # Otherwise we believe it is a complete path. Use it as it is.
23622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23623$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23624          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23625$as_echo_n "checking for DTRACE... " >&6; }
23626          if test ! -x "$tool_specified"; then
23627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23628$as_echo "not found" >&6; }
23629            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23630          fi
23631          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23632$as_echo "$tool_specified" >&6; }
23633        fi
23634      fi
23635    fi
23636
23637  fi
23638
23639
23640
23641
23642  # Publish this variable in the help.
23643
23644
23645  if [ -z "${PATCH+x}" ]; then
23646    # The variable is not set by user, try to locate tool using the code snippet
23647    for ac_prog in gpatch patch
23648do
23649  # Extract the first word of "$ac_prog", so it can be a program name with args.
23650set dummy $ac_prog; ac_word=$2
23651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23652$as_echo_n "checking for $ac_word... " >&6; }
23653if ${ac_cv_path_PATCH+:} false; then :
23654  $as_echo_n "(cached) " >&6
23655else
23656  case $PATCH in
23657  [\\/]* | ?:[\\/]*)
23658  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23659  ;;
23660  *)
23661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23662for as_dir in $PATH
23663do
23664  IFS=$as_save_IFS
23665  test -z "$as_dir" && as_dir=.
23666    for ac_exec_ext in '' $ac_executable_extensions; do
23667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23668    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23670    break 2
23671  fi
23672done
23673  done
23674IFS=$as_save_IFS
23675
23676  ;;
23677esac
23678fi
23679PATCH=$ac_cv_path_PATCH
23680if test -n "$PATCH"; then
23681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23682$as_echo "$PATCH" >&6; }
23683else
23684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23685$as_echo "no" >&6; }
23686fi
23687
23688
23689  test -n "$PATCH" && break
23690done
23691
23692  else
23693    # The variable is set, but is it from the command line or the environment?
23694
23695    # Try to remove the string !PATCH! from our list.
23696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23698      # If it failed, the variable was not from the command line. Ignore it,
23699      # but warn the user (except for BASH, which is always set by the calling BASH).
23700      if test "xPATCH" != xBASH; then
23701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23702$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23703      fi
23704      # Try to locate tool using the code snippet
23705      for ac_prog in gpatch patch
23706do
23707  # Extract the first word of "$ac_prog", so it can be a program name with args.
23708set dummy $ac_prog; ac_word=$2
23709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23710$as_echo_n "checking for $ac_word... " >&6; }
23711if ${ac_cv_path_PATCH+:} false; then :
23712  $as_echo_n "(cached) " >&6
23713else
23714  case $PATCH in
23715  [\\/]* | ?:[\\/]*)
23716  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23717  ;;
23718  *)
23719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23720for as_dir in $PATH
23721do
23722  IFS=$as_save_IFS
23723  test -z "$as_dir" && as_dir=.
23724    for ac_exec_ext in '' $ac_executable_extensions; do
23725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23726    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23728    break 2
23729  fi
23730done
23731  done
23732IFS=$as_save_IFS
23733
23734  ;;
23735esac
23736fi
23737PATCH=$ac_cv_path_PATCH
23738if test -n "$PATCH"; then
23739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23740$as_echo "$PATCH" >&6; }
23741else
23742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23743$as_echo "no" >&6; }
23744fi
23745
23746
23747  test -n "$PATCH" && break
23748done
23749
23750    else
23751      # If it succeeded, then it was overridden by the user. We will use it
23752      # for the tool.
23753
23754      # First remove it from the list of overridden variables, so we can test
23755      # for unknown variables in the end.
23756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23757
23758      # Check if we try to supply an empty value
23759      if test "x$PATCH" = x; then
23760        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23761$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23763$as_echo_n "checking for PATCH... " >&6; }
23764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23765$as_echo "disabled" >&6; }
23766      else
23767        # Check if the provided tool contains a complete path.
23768        tool_specified="$PATCH"
23769        tool_basename="${tool_specified##*/}"
23770        if test "x$tool_basename" = "x$tool_specified"; then
23771          # A command without a complete path is provided, search $PATH.
23772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23773$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23774          # Extract the first word of "$tool_basename", so it can be a program name with args.
23775set dummy $tool_basename; ac_word=$2
23776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23777$as_echo_n "checking for $ac_word... " >&6; }
23778if ${ac_cv_path_PATCH+:} false; then :
23779  $as_echo_n "(cached) " >&6
23780else
23781  case $PATCH in
23782  [\\/]* | ?:[\\/]*)
23783  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23784  ;;
23785  *)
23786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23787for as_dir in $PATH
23788do
23789  IFS=$as_save_IFS
23790  test -z "$as_dir" && as_dir=.
23791    for ac_exec_ext in '' $ac_executable_extensions; do
23792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23793    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23795    break 2
23796  fi
23797done
23798  done
23799IFS=$as_save_IFS
23800
23801  ;;
23802esac
23803fi
23804PATCH=$ac_cv_path_PATCH
23805if test -n "$PATCH"; then
23806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23807$as_echo "$PATCH" >&6; }
23808else
23809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23810$as_echo "no" >&6; }
23811fi
23812
23813
23814          if test "x$PATCH" = x; then
23815            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23816          fi
23817        else
23818          # Otherwise we believe it is a complete path. Use it as it is.
23819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23820$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23822$as_echo_n "checking for PATCH... " >&6; }
23823          if test ! -x "$tool_specified"; then
23824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23825$as_echo "not found" >&6; }
23826            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23827          fi
23828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23829$as_echo "$tool_specified" >&6; }
23830        fi
23831      fi
23832    fi
23833
23834  fi
23835
23836
23837  # Check if it's GNU time
23838  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23839  if test "x$IS_GNU_TIME" != x; then
23840    IS_GNU_TIME=yes
23841  else
23842    IS_GNU_TIME=no
23843  fi
23844
23845
23846  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23847
23848
23849
23850  # Publish this variable in the help.
23851
23852
23853  if [ -z "${DSYMUTIL+x}" ]; then
23854    # The variable is not set by user, try to locate tool using the code snippet
23855    for ac_prog in dsymutil
23856do
23857  # Extract the first word of "$ac_prog", so it can be a program name with args.
23858set dummy $ac_prog; ac_word=$2
23859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23860$as_echo_n "checking for $ac_word... " >&6; }
23861if ${ac_cv_path_DSYMUTIL+:} false; then :
23862  $as_echo_n "(cached) " >&6
23863else
23864  case $DSYMUTIL in
23865  [\\/]* | ?:[\\/]*)
23866  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23867  ;;
23868  *)
23869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23870for as_dir in $PATH
23871do
23872  IFS=$as_save_IFS
23873  test -z "$as_dir" && as_dir=.
23874    for ac_exec_ext in '' $ac_executable_extensions; do
23875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23876    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23878    break 2
23879  fi
23880done
23881  done
23882IFS=$as_save_IFS
23883
23884  ;;
23885esac
23886fi
23887DSYMUTIL=$ac_cv_path_DSYMUTIL
23888if test -n "$DSYMUTIL"; then
23889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23890$as_echo "$DSYMUTIL" >&6; }
23891else
23892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23893$as_echo "no" >&6; }
23894fi
23895
23896
23897  test -n "$DSYMUTIL" && break
23898done
23899
23900  else
23901    # The variable is set, but is it from the command line or the environment?
23902
23903    # Try to remove the string !DSYMUTIL! from our list.
23904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23906      # If it failed, the variable was not from the command line. Ignore it,
23907      # but warn the user (except for BASH, which is always set by the calling BASH).
23908      if test "xDSYMUTIL" != xBASH; then
23909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23910$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23911      fi
23912      # Try to locate tool using the code snippet
23913      for ac_prog in dsymutil
23914do
23915  # Extract the first word of "$ac_prog", so it can be a program name with args.
23916set dummy $ac_prog; ac_word=$2
23917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23918$as_echo_n "checking for $ac_word... " >&6; }
23919if ${ac_cv_path_DSYMUTIL+:} false; then :
23920  $as_echo_n "(cached) " >&6
23921else
23922  case $DSYMUTIL in
23923  [\\/]* | ?:[\\/]*)
23924  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23925  ;;
23926  *)
23927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23928for as_dir in $PATH
23929do
23930  IFS=$as_save_IFS
23931  test -z "$as_dir" && as_dir=.
23932    for ac_exec_ext in '' $ac_executable_extensions; do
23933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23934    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23936    break 2
23937  fi
23938done
23939  done
23940IFS=$as_save_IFS
23941
23942  ;;
23943esac
23944fi
23945DSYMUTIL=$ac_cv_path_DSYMUTIL
23946if test -n "$DSYMUTIL"; then
23947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23948$as_echo "$DSYMUTIL" >&6; }
23949else
23950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23951$as_echo "no" >&6; }
23952fi
23953
23954
23955  test -n "$DSYMUTIL" && break
23956done
23957
23958    else
23959      # If it succeeded, then it was overridden by the user. We will use it
23960      # for the tool.
23961
23962      # First remove it from the list of overridden variables, so we can test
23963      # for unknown variables in the end.
23964      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23965
23966      # Check if we try to supply an empty value
23967      if test "x$DSYMUTIL" = x; then
23968        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23969$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23971$as_echo_n "checking for DSYMUTIL... " >&6; }
23972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23973$as_echo "disabled" >&6; }
23974      else
23975        # Check if the provided tool contains a complete path.
23976        tool_specified="$DSYMUTIL"
23977        tool_basename="${tool_specified##*/}"
23978        if test "x$tool_basename" = "x$tool_specified"; then
23979          # A command without a complete path is provided, search $PATH.
23980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23981$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23982          # Extract the first word of "$tool_basename", so it can be a program name with args.
23983set dummy $tool_basename; ac_word=$2
23984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23985$as_echo_n "checking for $ac_word... " >&6; }
23986if ${ac_cv_path_DSYMUTIL+:} false; then :
23987  $as_echo_n "(cached) " >&6
23988else
23989  case $DSYMUTIL in
23990  [\\/]* | ?:[\\/]*)
23991  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23992  ;;
23993  *)
23994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23995for as_dir in $PATH
23996do
23997  IFS=$as_save_IFS
23998  test -z "$as_dir" && as_dir=.
23999    for ac_exec_ext in '' $ac_executable_extensions; do
24000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24001    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24003    break 2
24004  fi
24005done
24006  done
24007IFS=$as_save_IFS
24008
24009  ;;
24010esac
24011fi
24012DSYMUTIL=$ac_cv_path_DSYMUTIL
24013if test -n "$DSYMUTIL"; then
24014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24015$as_echo "$DSYMUTIL" >&6; }
24016else
24017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24018$as_echo "no" >&6; }
24019fi
24020
24021
24022          if test "x$DSYMUTIL" = x; then
24023            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24024          fi
24025        else
24026          # Otherwise we believe it is a complete path. Use it as it is.
24027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
24028$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
24029          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24030$as_echo_n "checking for DSYMUTIL... " >&6; }
24031          if test ! -x "$tool_specified"; then
24032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24033$as_echo "not found" >&6; }
24034            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
24035          fi
24036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24037$as_echo "$tool_specified" >&6; }
24038        fi
24039      fi
24040    fi
24041
24042  fi
24043
24044
24045
24046  if test "x$DSYMUTIL" = x; then
24047    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
24048  fi
24049
24050
24051
24052
24053
24054  # Publish this variable in the help.
24055
24056
24057  if [ -z "${XATTR+x}" ]; then
24058    # The variable is not set by user, try to locate tool using the code snippet
24059    for ac_prog in xattr
24060do
24061  # Extract the first word of "$ac_prog", so it can be a program name with args.
24062set dummy $ac_prog; ac_word=$2
24063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24064$as_echo_n "checking for $ac_word... " >&6; }
24065if ${ac_cv_path_XATTR+:} false; then :
24066  $as_echo_n "(cached) " >&6
24067else
24068  case $XATTR in
24069  [\\/]* | ?:[\\/]*)
24070  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24071  ;;
24072  *)
24073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24074for as_dir in $PATH
24075do
24076  IFS=$as_save_IFS
24077  test -z "$as_dir" && as_dir=.
24078    for ac_exec_ext in '' $ac_executable_extensions; do
24079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24080    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24082    break 2
24083  fi
24084done
24085  done
24086IFS=$as_save_IFS
24087
24088  ;;
24089esac
24090fi
24091XATTR=$ac_cv_path_XATTR
24092if test -n "$XATTR"; then
24093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24094$as_echo "$XATTR" >&6; }
24095else
24096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24097$as_echo "no" >&6; }
24098fi
24099
24100
24101  test -n "$XATTR" && break
24102done
24103
24104  else
24105    # The variable is set, but is it from the command line or the environment?
24106
24107    # Try to remove the string !XATTR! from our list.
24108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24110      # If it failed, the variable was not from the command line. Ignore it,
24111      # but warn the user (except for BASH, which is always set by the calling BASH).
24112      if test "xXATTR" != xBASH; then
24113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24114$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24115      fi
24116      # Try to locate tool using the code snippet
24117      for ac_prog in xattr
24118do
24119  # Extract the first word of "$ac_prog", so it can be a program name with args.
24120set dummy $ac_prog; ac_word=$2
24121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24122$as_echo_n "checking for $ac_word... " >&6; }
24123if ${ac_cv_path_XATTR+:} false; then :
24124  $as_echo_n "(cached) " >&6
24125else
24126  case $XATTR in
24127  [\\/]* | ?:[\\/]*)
24128  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24129  ;;
24130  *)
24131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24132for as_dir in $PATH
24133do
24134  IFS=$as_save_IFS
24135  test -z "$as_dir" && as_dir=.
24136    for ac_exec_ext in '' $ac_executable_extensions; do
24137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24138    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24140    break 2
24141  fi
24142done
24143  done
24144IFS=$as_save_IFS
24145
24146  ;;
24147esac
24148fi
24149XATTR=$ac_cv_path_XATTR
24150if test -n "$XATTR"; then
24151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24152$as_echo "$XATTR" >&6; }
24153else
24154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24155$as_echo "no" >&6; }
24156fi
24157
24158
24159  test -n "$XATTR" && break
24160done
24161
24162    else
24163      # If it succeeded, then it was overridden by the user. We will use it
24164      # for the tool.
24165
24166      # First remove it from the list of overridden variables, so we can test
24167      # for unknown variables in the end.
24168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24169
24170      # Check if we try to supply an empty value
24171      if test "x$XATTR" = x; then
24172        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24173$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24175$as_echo_n "checking for XATTR... " >&6; }
24176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24177$as_echo "disabled" >&6; }
24178      else
24179        # Check if the provided tool contains a complete path.
24180        tool_specified="$XATTR"
24181        tool_basename="${tool_specified##*/}"
24182        if test "x$tool_basename" = "x$tool_specified"; then
24183          # A command without a complete path is provided, search $PATH.
24184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24185$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24186          # Extract the first word of "$tool_basename", so it can be a program name with args.
24187set dummy $tool_basename; ac_word=$2
24188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24189$as_echo_n "checking for $ac_word... " >&6; }
24190if ${ac_cv_path_XATTR+:} false; then :
24191  $as_echo_n "(cached) " >&6
24192else
24193  case $XATTR in
24194  [\\/]* | ?:[\\/]*)
24195  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24196  ;;
24197  *)
24198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24199for as_dir in $PATH
24200do
24201  IFS=$as_save_IFS
24202  test -z "$as_dir" && as_dir=.
24203    for ac_exec_ext in '' $ac_executable_extensions; do
24204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24205    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24207    break 2
24208  fi
24209done
24210  done
24211IFS=$as_save_IFS
24212
24213  ;;
24214esac
24215fi
24216XATTR=$ac_cv_path_XATTR
24217if test -n "$XATTR"; then
24218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24219$as_echo "$XATTR" >&6; }
24220else
24221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24222$as_echo "no" >&6; }
24223fi
24224
24225
24226          if test "x$XATTR" = x; then
24227            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24228          fi
24229        else
24230          # Otherwise we believe it is a complete path. Use it as it is.
24231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24232$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24234$as_echo_n "checking for XATTR... " >&6; }
24235          if test ! -x "$tool_specified"; then
24236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24237$as_echo "not found" >&6; }
24238            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24239          fi
24240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24241$as_echo "$tool_specified" >&6; }
24242        fi
24243      fi
24244    fi
24245
24246  fi
24247
24248
24249
24250  if test "x$XATTR" = x; then
24251    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24252  fi
24253
24254
24255
24256
24257  # Publish this variable in the help.
24258
24259
24260  if [ -z "${CODESIGN+x}" ]; then
24261    # The variable is not set by user, try to locate tool using the code snippet
24262    for ac_prog in codesign
24263do
24264  # Extract the first word of "$ac_prog", so it can be a program name with args.
24265set dummy $ac_prog; ac_word=$2
24266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24267$as_echo_n "checking for $ac_word... " >&6; }
24268if ${ac_cv_path_CODESIGN+:} false; then :
24269  $as_echo_n "(cached) " >&6
24270else
24271  case $CODESIGN in
24272  [\\/]* | ?:[\\/]*)
24273  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24274  ;;
24275  *)
24276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24277for as_dir in $PATH
24278do
24279  IFS=$as_save_IFS
24280  test -z "$as_dir" && as_dir=.
24281    for ac_exec_ext in '' $ac_executable_extensions; do
24282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24283    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24285    break 2
24286  fi
24287done
24288  done
24289IFS=$as_save_IFS
24290
24291  ;;
24292esac
24293fi
24294CODESIGN=$ac_cv_path_CODESIGN
24295if test -n "$CODESIGN"; then
24296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24297$as_echo "$CODESIGN" >&6; }
24298else
24299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24300$as_echo "no" >&6; }
24301fi
24302
24303
24304  test -n "$CODESIGN" && break
24305done
24306
24307  else
24308    # The variable is set, but is it from the command line or the environment?
24309
24310    # Try to remove the string !CODESIGN! from our list.
24311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24313      # If it failed, the variable was not from the command line. Ignore it,
24314      # but warn the user (except for BASH, which is always set by the calling BASH).
24315      if test "xCODESIGN" != xBASH; then
24316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24317$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24318      fi
24319      # Try to locate tool using the code snippet
24320      for ac_prog in codesign
24321do
24322  # Extract the first word of "$ac_prog", so it can be a program name with args.
24323set dummy $ac_prog; ac_word=$2
24324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24325$as_echo_n "checking for $ac_word... " >&6; }
24326if ${ac_cv_path_CODESIGN+:} false; then :
24327  $as_echo_n "(cached) " >&6
24328else
24329  case $CODESIGN in
24330  [\\/]* | ?:[\\/]*)
24331  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24332  ;;
24333  *)
24334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24335for as_dir in $PATH
24336do
24337  IFS=$as_save_IFS
24338  test -z "$as_dir" && as_dir=.
24339    for ac_exec_ext in '' $ac_executable_extensions; do
24340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24341    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24343    break 2
24344  fi
24345done
24346  done
24347IFS=$as_save_IFS
24348
24349  ;;
24350esac
24351fi
24352CODESIGN=$ac_cv_path_CODESIGN
24353if test -n "$CODESIGN"; then
24354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24355$as_echo "$CODESIGN" >&6; }
24356else
24357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24358$as_echo "no" >&6; }
24359fi
24360
24361
24362  test -n "$CODESIGN" && break
24363done
24364
24365    else
24366      # If it succeeded, then it was overridden by the user. We will use it
24367      # for the tool.
24368
24369      # First remove it from the list of overridden variables, so we can test
24370      # for unknown variables in the end.
24371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24372
24373      # Check if we try to supply an empty value
24374      if test "x$CODESIGN" = x; then
24375        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24376$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24378$as_echo_n "checking for CODESIGN... " >&6; }
24379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24380$as_echo "disabled" >&6; }
24381      else
24382        # Check if the provided tool contains a complete path.
24383        tool_specified="$CODESIGN"
24384        tool_basename="${tool_specified##*/}"
24385        if test "x$tool_basename" = "x$tool_specified"; then
24386          # A command without a complete path is provided, search $PATH.
24387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24388$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24389          # Extract the first word of "$tool_basename", so it can be a program name with args.
24390set dummy $tool_basename; ac_word=$2
24391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24392$as_echo_n "checking for $ac_word... " >&6; }
24393if ${ac_cv_path_CODESIGN+:} false; then :
24394  $as_echo_n "(cached) " >&6
24395else
24396  case $CODESIGN in
24397  [\\/]* | ?:[\\/]*)
24398  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24399  ;;
24400  *)
24401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24402for as_dir in $PATH
24403do
24404  IFS=$as_save_IFS
24405  test -z "$as_dir" && as_dir=.
24406    for ac_exec_ext in '' $ac_executable_extensions; do
24407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24408    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24410    break 2
24411  fi
24412done
24413  done
24414IFS=$as_save_IFS
24415
24416  ;;
24417esac
24418fi
24419CODESIGN=$ac_cv_path_CODESIGN
24420if test -n "$CODESIGN"; then
24421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24422$as_echo "$CODESIGN" >&6; }
24423else
24424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24425$as_echo "no" >&6; }
24426fi
24427
24428
24429          if test "x$CODESIGN" = x; then
24430            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24431          fi
24432        else
24433          # Otherwise we believe it is a complete path. Use it as it is.
24434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24435$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24436          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24437$as_echo_n "checking for CODESIGN... " >&6; }
24438          if test ! -x "$tool_specified"; then
24439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24440$as_echo "not found" >&6; }
24441            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24442          fi
24443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24444$as_echo "$tool_specified" >&6; }
24445        fi
24446      fi
24447    fi
24448
24449  fi
24450
24451
24452    if test "x$CODESIGN" != "x"; then
24453      # Verify that the openjdk_codesign certificate is present
24454      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24455$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24456      $RM codesign-testfile
24457      $TOUCH codesign-testfile
24458      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24459      $RM codesign-testfile
24460      if test "x$CODESIGN" = x; then
24461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24462$as_echo "no" >&6; }
24463      else
24464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24465$as_echo "yes" >&6; }
24466      fi
24467    fi
24468
24469
24470
24471  # Publish this variable in the help.
24472
24473
24474  if [ -z "${SETFILE+x}" ]; then
24475    # The variable is not set by user, try to locate tool using the code snippet
24476    for ac_prog in SetFile
24477do
24478  # Extract the first word of "$ac_prog", so it can be a program name with args.
24479set dummy $ac_prog; ac_word=$2
24480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24481$as_echo_n "checking for $ac_word... " >&6; }
24482if ${ac_cv_path_SETFILE+:} false; then :
24483  $as_echo_n "(cached) " >&6
24484else
24485  case $SETFILE in
24486  [\\/]* | ?:[\\/]*)
24487  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24488  ;;
24489  *)
24490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24491for as_dir in $PATH
24492do
24493  IFS=$as_save_IFS
24494  test -z "$as_dir" && as_dir=.
24495    for ac_exec_ext in '' $ac_executable_extensions; do
24496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24497    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24499    break 2
24500  fi
24501done
24502  done
24503IFS=$as_save_IFS
24504
24505  ;;
24506esac
24507fi
24508SETFILE=$ac_cv_path_SETFILE
24509if test -n "$SETFILE"; then
24510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24511$as_echo "$SETFILE" >&6; }
24512else
24513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24514$as_echo "no" >&6; }
24515fi
24516
24517
24518  test -n "$SETFILE" && break
24519done
24520
24521  else
24522    # The variable is set, but is it from the command line or the environment?
24523
24524    # Try to remove the string !SETFILE! from our list.
24525    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24526    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24527      # If it failed, the variable was not from the command line. Ignore it,
24528      # but warn the user (except for BASH, which is always set by the calling BASH).
24529      if test "xSETFILE" != xBASH; then
24530        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24531$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24532      fi
24533      # Try to locate tool using the code snippet
24534      for ac_prog in SetFile
24535do
24536  # Extract the first word of "$ac_prog", so it can be a program name with args.
24537set dummy $ac_prog; ac_word=$2
24538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24539$as_echo_n "checking for $ac_word... " >&6; }
24540if ${ac_cv_path_SETFILE+:} false; then :
24541  $as_echo_n "(cached) " >&6
24542else
24543  case $SETFILE in
24544  [\\/]* | ?:[\\/]*)
24545  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24546  ;;
24547  *)
24548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24549for as_dir in $PATH
24550do
24551  IFS=$as_save_IFS
24552  test -z "$as_dir" && as_dir=.
24553    for ac_exec_ext in '' $ac_executable_extensions; do
24554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24555    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24557    break 2
24558  fi
24559done
24560  done
24561IFS=$as_save_IFS
24562
24563  ;;
24564esac
24565fi
24566SETFILE=$ac_cv_path_SETFILE
24567if test -n "$SETFILE"; then
24568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24569$as_echo "$SETFILE" >&6; }
24570else
24571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24572$as_echo "no" >&6; }
24573fi
24574
24575
24576  test -n "$SETFILE" && break
24577done
24578
24579    else
24580      # If it succeeded, then it was overridden by the user. We will use it
24581      # for the tool.
24582
24583      # First remove it from the list of overridden variables, so we can test
24584      # for unknown variables in the end.
24585      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24586
24587      # Check if we try to supply an empty value
24588      if test "x$SETFILE" = x; then
24589        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24590$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24591        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24592$as_echo_n "checking for SETFILE... " >&6; }
24593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24594$as_echo "disabled" >&6; }
24595      else
24596        # Check if the provided tool contains a complete path.
24597        tool_specified="$SETFILE"
24598        tool_basename="${tool_specified##*/}"
24599        if test "x$tool_basename" = "x$tool_specified"; then
24600          # A command without a complete path is provided, search $PATH.
24601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24602$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24603          # Extract the first word of "$tool_basename", so it can be a program name with args.
24604set dummy $tool_basename; ac_word=$2
24605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24606$as_echo_n "checking for $ac_word... " >&6; }
24607if ${ac_cv_path_SETFILE+:} false; then :
24608  $as_echo_n "(cached) " >&6
24609else
24610  case $SETFILE in
24611  [\\/]* | ?:[\\/]*)
24612  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24613  ;;
24614  *)
24615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24616for as_dir in $PATH
24617do
24618  IFS=$as_save_IFS
24619  test -z "$as_dir" && as_dir=.
24620    for ac_exec_ext in '' $ac_executable_extensions; do
24621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24622    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24624    break 2
24625  fi
24626done
24627  done
24628IFS=$as_save_IFS
24629
24630  ;;
24631esac
24632fi
24633SETFILE=$ac_cv_path_SETFILE
24634if test -n "$SETFILE"; then
24635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24636$as_echo "$SETFILE" >&6; }
24637else
24638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24639$as_echo "no" >&6; }
24640fi
24641
24642
24643          if test "x$SETFILE" = x; then
24644            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24645          fi
24646        else
24647          # Otherwise we believe it is a complete path. Use it as it is.
24648          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24649$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24650          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24651$as_echo_n "checking for SETFILE... " >&6; }
24652          if test ! -x "$tool_specified"; then
24653            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24654$as_echo "not found" >&6; }
24655            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24656          fi
24657          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24658$as_echo "$tool_specified" >&6; }
24659        fi
24660      fi
24661    fi
24662
24663  fi
24664
24665
24666
24667  if test "x$SETFILE" = x; then
24668    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24669  fi
24670
24671
24672  fi
24673
24674
24675  # Check bash version
24676  # Extra [ ] to stop m4 mangling
24677   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24678  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24679$as_echo_n "checking bash version... " >&6; }
24680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24681$as_echo "$BASH_VER" >&6; }
24682
24683  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24684  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24685  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24686    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24687  fi
24688
24689  # Test if bash supports pipefail.
24690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24691$as_echo_n "checking if bash supports pipefail... " >&6; }
24692  if ${BASH} -c 'set -o pipefail'; then
24693    BASH_ARGS="$BASH_ARGS -o pipefail"
24694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24695$as_echo "yes" >&6; }
24696  else
24697    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24698$as_echo "no" >&6; }
24699  fi
24700
24701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24702$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24703  if ${BASH} -e -c 'true'; then
24704    BASH_ARGS="$BASH_ARGS -e"
24705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24706$as_echo "yes" >&6; }
24707  else
24708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24709$as_echo "no" >&6; }
24710  fi
24711
24712
24713
24714
24715# Check if pkg-config is available.
24716
24717
24718if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24719	if test -n "$ac_tool_prefix"; then
24720  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24721set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24723$as_echo_n "checking for $ac_word... " >&6; }
24724if ${ac_cv_path_PKG_CONFIG+:} false; then :
24725  $as_echo_n "(cached) " >&6
24726else
24727  case $PKG_CONFIG in
24728  [\\/]* | ?:[\\/]*)
24729  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24730  ;;
24731  *)
24732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24733for as_dir in $PATH
24734do
24735  IFS=$as_save_IFS
24736  test -z "$as_dir" && as_dir=.
24737    for ac_exec_ext in '' $ac_executable_extensions; do
24738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24739    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24741    break 2
24742  fi
24743done
24744  done
24745IFS=$as_save_IFS
24746
24747  ;;
24748esac
24749fi
24750PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24751if test -n "$PKG_CONFIG"; then
24752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24753$as_echo "$PKG_CONFIG" >&6; }
24754else
24755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24756$as_echo "no" >&6; }
24757fi
24758
24759
24760fi
24761if test -z "$ac_cv_path_PKG_CONFIG"; then
24762  ac_pt_PKG_CONFIG=$PKG_CONFIG
24763  # Extract the first word of "pkg-config", so it can be a program name with args.
24764set dummy pkg-config; ac_word=$2
24765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24766$as_echo_n "checking for $ac_word... " >&6; }
24767if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24768  $as_echo_n "(cached) " >&6
24769else
24770  case $ac_pt_PKG_CONFIG in
24771  [\\/]* | ?:[\\/]*)
24772  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24773  ;;
24774  *)
24775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24776for as_dir in $PATH
24777do
24778  IFS=$as_save_IFS
24779  test -z "$as_dir" && as_dir=.
24780    for ac_exec_ext in '' $ac_executable_extensions; do
24781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24782    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24784    break 2
24785  fi
24786done
24787  done
24788IFS=$as_save_IFS
24789
24790  ;;
24791esac
24792fi
24793ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24794if test -n "$ac_pt_PKG_CONFIG"; then
24795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24796$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24797else
24798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24799$as_echo "no" >&6; }
24800fi
24801
24802  if test "x$ac_pt_PKG_CONFIG" = x; then
24803    PKG_CONFIG=""
24804  else
24805    case $cross_compiling:$ac_tool_warned in
24806yes:)
24807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24809ac_tool_warned=yes ;;
24810esac
24811    PKG_CONFIG=$ac_pt_PKG_CONFIG
24812  fi
24813else
24814  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24815fi
24816
24817fi
24818if test -n "$PKG_CONFIG"; then
24819	_pkg_min_version=0.9.0
24820	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24821$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24822	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24823		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24824$as_echo "yes" >&6; }
24825	else
24826		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24827$as_echo "no" >&6; }
24828		PKG_CONFIG=""
24829	fi
24830
24831fi
24832
24833# After basic tools have been setup, we can check build os specific details.
24834
24835  ###############################################################################
24836
24837  # Note that this is the build platform OS version!
24838
24839  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24840  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24841  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24842  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24843
24844
24845
24846
24847
24848# Misc basic settings
24849
24850
24851# Check whether --with-default-make-target was given.
24852if test "${with_default_make_target+set}" = set; then :
24853  withval=$with_default_make_target;
24854fi
24855
24856  if test "x$with_default_make_target" = "x" \
24857      || test "x$with_default_make_target" = "xyes"; then
24858    DEFAULT_MAKE_TARGET="exploded-image"
24859  elif test "x$with_default_make_target" = "xno"; then
24860    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24861  else
24862    DEFAULT_MAKE_TARGET="$with_default_make_target"
24863  fi
24864
24865
24866
24867
24868###############################################################################
24869#
24870# Determine OpenJDK variants, options and version numbers.
24871#
24872###############################################################################
24873
24874# We need build & target for this.
24875
24876  # Should we build a JDK without a graphical UI?
24877  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24878$as_echo_n "checking headless only... " >&6; }
24879  # Check whether --enable-headless-only was given.
24880if test "${enable_headless_only+set}" = set; then :
24881  enableval=$enable_headless_only;
24882fi
24883
24884
24885  if test "x$enable_headless_only" = "xyes"; then
24886    ENABLE_HEADLESS_ONLY="true"
24887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24888$as_echo "yes" >&6; }
24889  elif test "x$enable_headless_only" = "xno"; then
24890    ENABLE_HEADLESS_ONLY="false"
24891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24892$as_echo "no" >&6; }
24893  elif test "x$enable_headless_only" = "x"; then
24894    ENABLE_HEADLESS_ONLY="false"
24895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24896$as_echo "no" >&6; }
24897  else
24898    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24899  fi
24900
24901
24902
24903  # Should we build the complete docs, or just a lightweight version?
24904  # Check whether --enable-full-docs was given.
24905if test "${enable_full_docs+set}" = set; then :
24906  enableval=$enable_full_docs;
24907fi
24908
24909
24910  # Verify dependencies
24911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24912$as_echo_n "checking for graphviz dot... " >&6; }
24913  if test "x$DOT" != "x"; then
24914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24915$as_echo "yes" >&6; }
24916  else
24917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24918$as_echo "no, cannot generate full docs" >&6; }
24919    FULL_DOCS_DEP_MISSING=true
24920  fi
24921
24922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
24923$as_echo_n "checking for pandoc... " >&6; }
24924  if test "x$PANDOC" != "x"; then
24925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24926$as_echo "yes" >&6; }
24927  else
24928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24929$as_echo "no, cannot generate full docs" >&6; }
24930    FULL_DOCS_DEP_MISSING=true
24931  fi
24932
24933  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24934$as_echo_n "checking full docs... " >&6; }
24935  if test "x$enable_full_docs" = xyes; then
24936    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24937      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24938$as_echo "no, missing dependencies" >&6; }
24939
24940  # Print a helpful message on how to acquire the necessary build dependency.
24941  # dot is the help tag: freetype, cups, alsa etc
24942  MISSING_DEPENDENCY=dot
24943
24944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24945    cygwin_help $MISSING_DEPENDENCY
24946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24947    msys_help $MISSING_DEPENDENCY
24948  else
24949    PKGHANDLER_COMMAND=
24950
24951    case $PKGHANDLER in
24952      apt-get)
24953        apt_help     $MISSING_DEPENDENCY ;;
24954      yum)
24955        yum_help     $MISSING_DEPENDENCY ;;
24956      brew)
24957        brew_help    $MISSING_DEPENDENCY ;;
24958      port)
24959        port_help    $MISSING_DEPENDENCY ;;
24960      pkgutil)
24961        pkgutil_help $MISSING_DEPENDENCY ;;
24962      pkgadd)
24963        pkgadd_help  $MISSING_DEPENDENCY ;;
24964    esac
24965
24966    if test "x$PKGHANDLER_COMMAND" != x; then
24967      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24968    fi
24969  fi
24970
24971      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
24972    else
24973      ENABLE_FULL_DOCS=true
24974      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
24975$as_echo "yes, forced" >&6; }
24976    fi
24977  elif test "x$enable_full_docs" = xno; then
24978    ENABLE_FULL_DOCS=false
24979    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
24980$as_echo "no, forced" >&6; }
24981  elif test "x$enable_full_docs" = x; then
24982    # Check for prerequisites
24983    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
24984      ENABLE_FULL_DOCS=false
24985      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24986$as_echo "no, missing dependencies" >&6; }
24987    else
24988      ENABLE_FULL_DOCS=true
24989      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
24990$as_echo "yes, dependencies present" >&6; }
24991    fi
24992  else
24993    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
24994  fi
24995
24996
24997
24998  # Choose cacerts source file
24999
25000# Check whether --with-cacerts-file was given.
25001if test "${with_cacerts_file+set}" = set; then :
25002  withval=$with_cacerts_file;
25003fi
25004
25005  if test "x$with_cacerts_file" != x; then
25006    CACERTS_FILE=$with_cacerts_file
25007  fi
25008
25009
25010  # Enable or disable unlimited crypto
25011  # Check whether --enable-unlimited-crypto was given.
25012if test "${enable_unlimited_crypto+set}" = set; then :
25013  enableval=$enable_unlimited_crypto;
25014else
25015  enable_unlimited_crypto=yes
25016fi
25017
25018  if test "x$enable_unlimited_crypto" = "xyes"; then
25019    UNLIMITED_CRYPTO=true
25020  else
25021    UNLIMITED_CRYPTO=false
25022  fi
25023
25024
25025  # Should we build the serviceability agent (SA)?
25026  INCLUDE_SA=true
25027  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
25028    INCLUDE_SA=false
25029  fi
25030  if test "x$OPENJDK_TARGET_OS" = xaix ; then
25031    INCLUDE_SA=false
25032  fi
25033
25034
25035  # Compress jars
25036  COMPRESS_JARS=false
25037
25038
25039
25040  # Setup default copyright year. Mostly overridden when building close to a new year.
25041
25042# Check whether --with-copyright-year was given.
25043if test "${with_copyright_year+set}" = set; then :
25044  withval=$with_copyright_year;
25045fi
25046
25047  if test "x$with_copyright_year" = xyes; then
25048    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
25049  elif test "x$with_copyright_year" != x; then
25050    COPYRIGHT_YEAR="$with_copyright_year"
25051  else
25052    COPYRIGHT_YEAR=`$DATE +'%Y'`
25053  fi
25054
25055
25056
25057  # Check whether --enable-keep-packaged-modules was given.
25058if test "${enable_keep_packaged_modules+set}" = set; then :
25059  enableval=$enable_keep_packaged_modules;
25060fi
25061
25062
25063  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25064$as_echo_n "checking if packaged modules are kept... " >&6; }
25065  if test "x$enable_keep_packaged_modules" = "xyes"; then
25066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25067$as_echo "yes" >&6; }
25068    JLINK_KEEP_PACKAGED_MODULES=true
25069  elif test "x$enable_keep_packaged_modules" = "xno"; then
25070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25071$as_echo "no" >&6; }
25072    JLINK_KEEP_PACKAGED_MODULES=false
25073  elif test "x$enable_keep_packaged_modules" = "x"; then
25074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25075$as_echo "yes (default)" >&6; }
25076    JLINK_KEEP_PACKAGED_MODULES=true
25077  else
25078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25079$as_echo "error" >&6; }
25080    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25081  fi
25082
25083
25084
25085
25086  # Warn user that old version arguments are deprecated.
25087
25088
25089# Check whether --with-milestone was given.
25090if test "${with_milestone+set}" = set; then :
25091  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25092$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25093fi
25094
25095
25096
25097
25098# Check whether --with-update-version was given.
25099if test "${with_update_version+set}" = set; then :
25100  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25101$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25102fi
25103
25104
25105
25106
25107# Check whether --with-user-release-suffix was given.
25108if test "${with_user_release_suffix+set}" = set; then :
25109  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
25110$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25111fi
25112
25113
25114
25115
25116# Check whether --with-build-number was given.
25117if test "${with_build_number+set}" = set; then :
25118  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25119$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25120fi
25121
25122
25123
25124  # Source the version numbers file
25125  . $AUTOCONF_DIR/version-numbers
25126
25127  # Some non-version number information is set in that file
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137  # Override version from arguments
25138
25139  # If --with-version-string is set, process it first. It is possible to
25140  # override parts with more specific flags, since these are processed later.
25141
25142# Check whether --with-version-string was given.
25143if test "${with_version_string+set}" = set; then :
25144  withval=$with_version_string;
25145fi
25146
25147  if test "x$with_version_string" = xyes; then
25148    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25149  elif test "x$with_version_string" != x; then
25150    # Additional [] needed to keep m4 from mangling shell constructs.
25151    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25152      VERSION_MAJOR=${BASH_REMATCH[1]}
25153      VERSION_MINOR=${BASH_REMATCH[3]}
25154      VERSION_SECURITY=${BASH_REMATCH[5]}
25155      VERSION_PATCH=${BASH_REMATCH[7]}
25156      VERSION_PRE=${BASH_REMATCH[9]}
25157      version_plus_separator=${BASH_REMATCH[11]}
25158      VERSION_BUILD=${BASH_REMATCH[12]}
25159      VERSION_OPT=${BASH_REMATCH[14]}
25160      # Unspecified numerical fields are interpreted as 0.
25161      if test "x$VERSION_MINOR" = x; then
25162        VERSION_MINOR=0
25163      fi
25164      if test "x$VERSION_SECURITY" = x; then
25165        VERSION_SECURITY=0
25166      fi
25167      if test "x$VERSION_PATCH" = x; then
25168        VERSION_PATCH=0
25169      fi
25170      if test "x$version_plus_separator" != x \
25171          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25172        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25173      fi
25174      # Stop the version part process from setting default values.
25175      # We still allow them to explicitly override though.
25176      NO_DEFAULT_VERSION_PARTS=true
25177    else
25178      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25179    fi
25180  fi
25181
25182
25183# Check whether --with-version-pre was given.
25184if test "${with_version_pre+set}" = set; then :
25185  withval=$with_version_pre; with_version_pre_present=true
25186else
25187  with_version_pre_present=false
25188fi
25189
25190
25191  if test "x$with_version_pre_present" = xtrue; then
25192    if test "x$with_version_pre" = xyes; then
25193      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25194    elif test "x$with_version_pre" = xno; then
25195      # Interpret --without-* as empty string instead of the literal "no"
25196      VERSION_PRE=
25197    else
25198      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25199       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25200      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25201        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25202$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25203      fi
25204    fi
25205  else
25206    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25207      # Default is to use "internal" as pre
25208      VERSION_PRE="internal"
25209    fi
25210  fi
25211
25212
25213# Check whether --with-version-opt was given.
25214if test "${with_version_opt+set}" = set; then :
25215  withval=$with_version_opt; with_version_opt_present=true
25216else
25217  with_version_opt_present=false
25218fi
25219
25220
25221  if test "x$with_version_opt_present" = xtrue; then
25222    if test "x$with_version_opt" = xyes; then
25223      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25224    elif test "x$with_version_opt" = xno; then
25225      # Interpret --without-* as empty string instead of the literal "no"
25226      VERSION_OPT=
25227    else
25228      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25229       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25230      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25231        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25232$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25233      fi
25234    fi
25235  else
25236    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25237      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25238      # Outer [ ] to quote m4.
25239       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25240      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25241    fi
25242  fi
25243
25244
25245# Check whether --with-version-build was given.
25246if test "${with_version_build+set}" = set; then :
25247  withval=$with_version_build; with_version_build_present=true
25248else
25249  with_version_build_present=false
25250fi
25251
25252
25253  if test "x$with_version_build_present" = xtrue; then
25254    if test "x$with_version_build" = xyes; then
25255      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25256    elif test "x$with_version_build" = xno; then
25257      # Interpret --without-* as empty string instead of the literal "no"
25258      VERSION_BUILD=
25259    elif test "x$with_version_build" = x; then
25260      VERSION_BUILD=
25261    else
25262
25263  # Additional [] needed to keep m4 from mangling shell constructs.
25264  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25265    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25266  fi
25267  # Extract the version number without leading zeros.
25268  cleaned_value=${BASH_REMATCH[1]}
25269  if test "x$cleaned_value" = x; then
25270    # Special case for zero
25271    cleaned_value=${BASH_REMATCH[2]}
25272  fi
25273
25274  if test $cleaned_value -gt 255; then
25275    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25276  fi
25277  if test "x$cleaned_value" != "x$with_version_build"; then
25278    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25279$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25280  fi
25281  VERSION_BUILD=$cleaned_value
25282
25283    fi
25284  else
25285    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25286      # Default is to not have a build number.
25287      VERSION_BUILD=""
25288      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25289      VERSION_BUILD=0
25290    fi
25291  fi
25292
25293
25294# Check whether --with-version-major was given.
25295if test "${with_version_major+set}" = set; then :
25296  withval=$with_version_major; with_version_major_present=true
25297else
25298  with_version_major_present=false
25299fi
25300
25301
25302  if test "x$with_version_major_present" = xtrue; then
25303    if test "x$with_version_major" = xyes; then
25304      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25305    else
25306
25307  # Additional [] needed to keep m4 from mangling shell constructs.
25308  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25309    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25310  fi
25311  # Extract the version number without leading zeros.
25312  cleaned_value=${BASH_REMATCH[1]}
25313  if test "x$cleaned_value" = x; then
25314    # Special case for zero
25315    cleaned_value=${BASH_REMATCH[2]}
25316  fi
25317
25318  if test $cleaned_value -gt 255; then
25319    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25320  fi
25321  if test "x$cleaned_value" != "x$with_version_major"; then
25322    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25323$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25324  fi
25325  VERSION_MAJOR=$cleaned_value
25326
25327    fi
25328  else
25329    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25330      # Default is to get value from version-numbers
25331      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25332    fi
25333  fi
25334
25335
25336# Check whether --with-version-minor was given.
25337if test "${with_version_minor+set}" = set; then :
25338  withval=$with_version_minor; with_version_minor_present=true
25339else
25340  with_version_minor_present=false
25341fi
25342
25343
25344  if test "x$with_version_minor_present" = xtrue; then
25345    if test "x$with_version_minor" = xyes; then
25346      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25347    elif test "x$with_version_minor" = xno; then
25348      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25349      VERSION_MINOR=0
25350    elif test "x$with_version_minor" = x; then
25351      VERSION_MINOR=0
25352    else
25353
25354  # Additional [] needed to keep m4 from mangling shell constructs.
25355  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25356    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25357  fi
25358  # Extract the version number without leading zeros.
25359  cleaned_value=${BASH_REMATCH[1]}
25360  if test "x$cleaned_value" = x; then
25361    # Special case for zero
25362    cleaned_value=${BASH_REMATCH[2]}
25363  fi
25364
25365  if test $cleaned_value -gt 255; then
25366    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25367  fi
25368  if test "x$cleaned_value" != "x$with_version_minor"; then
25369    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25370$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25371  fi
25372  VERSION_MINOR=$cleaned_value
25373
25374    fi
25375  else
25376    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25377      # Default is 0, if unspecified
25378      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25379    fi
25380  fi
25381
25382
25383# Check whether --with-version-security was given.
25384if test "${with_version_security+set}" = set; then :
25385  withval=$with_version_security; with_version_security_present=true
25386else
25387  with_version_security_present=false
25388fi
25389
25390
25391  if test "x$with_version_security_present" = xtrue; then
25392    if test "x$with_version_security" = xyes; then
25393      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25394    elif test "x$with_version_security" = xno; then
25395      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25396      VERSION_SECURITY=0
25397    elif test "x$with_version_security" = x; then
25398      VERSION_SECURITY=0
25399    else
25400
25401  # Additional [] needed to keep m4 from mangling shell constructs.
25402  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25403    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25404  fi
25405  # Extract the version number without leading zeros.
25406  cleaned_value=${BASH_REMATCH[1]}
25407  if test "x$cleaned_value" = x; then
25408    # Special case for zero
25409    cleaned_value=${BASH_REMATCH[2]}
25410  fi
25411
25412  if test $cleaned_value -gt 255; then
25413    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25414  fi
25415  if test "x$cleaned_value" != "x$with_version_security"; then
25416    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25417$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25418  fi
25419  VERSION_SECURITY=$cleaned_value
25420
25421    fi
25422  else
25423    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25424      # Default is 0, if unspecified
25425      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25426    fi
25427  fi
25428
25429
25430# Check whether --with-version-patch was given.
25431if test "${with_version_patch+set}" = set; then :
25432  withval=$with_version_patch; with_version_patch_present=true
25433else
25434  with_version_patch_present=false
25435fi
25436
25437
25438  if test "x$with_version_patch_present" = xtrue; then
25439    if test "x$with_version_patch" = xyes; then
25440      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25441    elif test "x$with_version_patch" = xno; then
25442      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25443      VERSION_PATCH=0
25444    elif test "x$with_version_patch" = x; then
25445      VERSION_PATCH=0
25446    else
25447
25448  # Additional [] needed to keep m4 from mangling shell constructs.
25449  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25450    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25451  fi
25452  # Extract the version number without leading zeros.
25453  cleaned_value=${BASH_REMATCH[1]}
25454  if test "x$cleaned_value" = x; then
25455    # Special case for zero
25456    cleaned_value=${BASH_REMATCH[2]}
25457  fi
25458
25459  if test $cleaned_value -gt 255; then
25460    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25461  fi
25462  if test "x$cleaned_value" != "x$with_version_patch"; then
25463    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25464$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25465  fi
25466  VERSION_PATCH=$cleaned_value
25467
25468    fi
25469  else
25470    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25471      # Default is 0, if unspecified
25472      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25473    fi
25474  fi
25475
25476  # Calculate derived version properties
25477
25478  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25479  if test "x$VERSION_PRE" = x; then
25480    VERSION_IS_GA=true
25481  else
25482    VERSION_IS_GA=false
25483  fi
25484
25485  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25486  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25487
25488  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25489  # Strip trailing zeroes from stripped_version_number
25490  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25491  VERSION_NUMBER=$stripped_version_number
25492
25493  # The complete version string, with additional build information
25494  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25495    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25496  else
25497    # If either build or opt is set, we need a + separator
25498    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25499  fi
25500
25501  # The short version string, just VERSION_NUMBER and PRE, if present.
25502  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25503
25504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25505$as_echo_n "checking for version string... " >&6; }
25506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25507$as_echo "$VERSION_STRING" >&6; }
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523###############################################################################
25524#
25525# Setup BootJDK, used to bootstrap the build.
25526#
25527###############################################################################
25528
25529
25530  BOOT_JDK_FOUND=no
25531
25532# Check whether --with-boot-jdk was given.
25533if test "${with_boot_jdk+set}" = set; then :
25534  withval=$with_boot_jdk;
25535fi
25536
25537
25538  # We look for the Boot JDK through various means, going from more certain to
25539  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25540  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25541  # must check if this is indeed valid; otherwise we'll continue looking.
25542
25543  # Test: Is bootjdk explicitly set by command line arguments?
25544
25545  if test "x$BOOT_JDK_FOUND" = xno; then
25546    # Now execute the test
25547
25548  if test "x$with_boot_jdk" != x; then
25549    BOOT_JDK=$with_boot_jdk
25550    BOOT_JDK_FOUND=maybe
25551    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25552$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25553  fi
25554
25555
25556    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25557    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25558      # Do we have a bin/java?
25559      if test ! -x "$BOOT_JDK/bin/java"; then
25560        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25562        BOOT_JDK_FOUND=no
25563      else
25564        # Do we have a bin/javac?
25565        if test ! -x "$BOOT_JDK/bin/javac"; then
25566          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25568          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25569$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25570          BOOT_JDK_FOUND=no
25571        else
25572          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25573          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25574
25575          # Extra M4 quote needed to protect [] in grep expression.
25576          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25577          if test "x$FOUND_CORRECT_VERSION" = x; then
25578            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25580            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25581$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25582            BOOT_JDK_FOUND=no
25583          else
25584            # We're done! :-)
25585            BOOT_JDK_FOUND=yes
25586
25587  # Only process if variable expands to non-empty
25588
25589  if test "x$BOOT_JDK" != x; then
25590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25591
25592  # Input might be given as Windows format, start by converting to
25593  # unix format.
25594  path="$BOOT_JDK"
25595  new_path=`$CYGPATH -u "$path"`
25596
25597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25600  # "foo.exe" is OK but "foo" is an error.
25601  #
25602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25603  # It is also a way to make sure we got the proper file name for the real test later on.
25604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25605  if test "x$test_shortpath" = x; then
25606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25607$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25608    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25609  fi
25610
25611  # Call helper function which possibly converts this using DOS-style short mode.
25612  # If so, the updated path is stored in $new_path.
25613
25614  input_path="$new_path"
25615  # Check if we need to convert this using DOS-style short mode. If the path
25616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25617  # take no chances and rewrite it.
25618  # Note: m4 eats our [], so we need to use [ and ] instead.
25619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25620  if test "x$has_forbidden_chars" != x; then
25621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25625      # Going to short mode and back again did indeed matter. Since short mode is
25626      # case insensitive, let's make it lowercase to improve readability.
25627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25628      # Now convert it back to Unix-style (cygpath)
25629      input_path=`$CYGPATH -u "$shortmode_path"`
25630      new_path="$input_path"
25631    fi
25632  fi
25633
25634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25635  if test "x$test_cygdrive_prefix" = x; then
25636    # As a simple fix, exclude /usr/bin since it's not a real path.
25637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25639      # a path prefixed by /cygdrive for fixpath to work.
25640      new_path="$CYGWIN_ROOT_PATH$input_path"
25641    fi
25642  fi
25643
25644
25645  if test "x$path" != "x$new_path"; then
25646    BOOT_JDK="$new_path"
25647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25648$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25649  fi
25650
25651    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25652
25653  path="$BOOT_JDK"
25654  has_colon=`$ECHO $path | $GREP ^.:`
25655  new_path="$path"
25656  if test "x$has_colon" = x; then
25657    # Not in mixed or Windows style, start by that.
25658    new_path=`cmd //c echo $path`
25659  fi
25660
25661
25662  input_path="$new_path"
25663  # Check if we need to convert this using DOS-style short mode. If the path
25664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25665  # take no chances and rewrite it.
25666  # Note: m4 eats our [], so we need to use [ and ] instead.
25667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25668  if test "x$has_forbidden_chars" != x; then
25669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25671  fi
25672
25673
25674  windows_path="$new_path"
25675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25676    unix_path=`$CYGPATH -u "$windows_path"`
25677    new_path="$unix_path"
25678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25680    new_path="$unix_path"
25681  fi
25682
25683  if test "x$path" != "x$new_path"; then
25684    BOOT_JDK="$new_path"
25685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25686$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25687  fi
25688
25689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25691
25692    else
25693      # We're on a unix platform. Hooray! :)
25694      path="$BOOT_JDK"
25695      has_space=`$ECHO "$path" | $GREP " "`
25696      if test "x$has_space" != x; then
25697        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25699        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25700      fi
25701
25702      # Use eval to expand a potential ~
25703      eval path="$path"
25704      if test ! -f "$path" && test ! -d "$path"; then
25705        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25706      fi
25707
25708      if test -d "$path"; then
25709        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25710      else
25711        dir="`$DIRNAME "$path"`"
25712        base="`$BASENAME "$path"`"
25713        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25714      fi
25715    fi
25716  fi
25717
25718            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25719$as_echo_n "checking for Boot JDK... " >&6; }
25720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25721$as_echo "$BOOT_JDK" >&6; }
25722            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25723$as_echo_n "checking Boot JDK version... " >&6; }
25724            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25726$as_echo "$BOOT_JDK_VERSION" >&6; }
25727          fi # end check jdk version
25728        fi # end check javac
25729      fi # end check java
25730    fi # end check boot jdk found
25731  fi
25732
25733  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25734    # Having specified an argument which is incorrect will produce an instant failure;
25735    # we should not go on looking
25736    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25737  fi
25738
25739  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25740
25741  if test "x$BOOT_JDK_FOUND" = xno; then
25742    # Now execute the test
25743
25744  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25745    # First check at user selected default
25746
25747  if test "x$BOOT_JDK_FOUND" = xno; then
25748    # Now execute the test
25749
25750  if test -x /usr/libexec/java_home; then
25751    BOOT_JDK=`/usr/libexec/java_home `
25752    BOOT_JDK_FOUND=maybe
25753    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25754$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25755  fi
25756
25757
25758    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25759    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25760      # Do we have a bin/java?
25761      if test ! -x "$BOOT_JDK/bin/java"; then
25762        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25763$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25764        BOOT_JDK_FOUND=no
25765      else
25766        # Do we have a bin/javac?
25767        if test ! -x "$BOOT_JDK/bin/javac"; then
25768          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25769$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25770          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25771$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25772          BOOT_JDK_FOUND=no
25773        else
25774          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25775          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25776
25777          # Extra M4 quote needed to protect [] in grep expression.
25778          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25779          if test "x$FOUND_CORRECT_VERSION" = x; then
25780            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25782            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25783$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25784            BOOT_JDK_FOUND=no
25785          else
25786            # We're done! :-)
25787            BOOT_JDK_FOUND=yes
25788
25789  # Only process if variable expands to non-empty
25790
25791  if test "x$BOOT_JDK" != x; then
25792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25793
25794  # Input might be given as Windows format, start by converting to
25795  # unix format.
25796  path="$BOOT_JDK"
25797  new_path=`$CYGPATH -u "$path"`
25798
25799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25802  # "foo.exe" is OK but "foo" is an error.
25803  #
25804  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25805  # It is also a way to make sure we got the proper file name for the real test later on.
25806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25807  if test "x$test_shortpath" = x; then
25808    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25809$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25810    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25811  fi
25812
25813  # Call helper function which possibly converts this using DOS-style short mode.
25814  # If so, the updated path is stored in $new_path.
25815
25816  input_path="$new_path"
25817  # Check if we need to convert this using DOS-style short mode. If the path
25818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25819  # take no chances and rewrite it.
25820  # Note: m4 eats our [], so we need to use [ and ] instead.
25821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25822  if test "x$has_forbidden_chars" != x; then
25823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25824    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25825    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25826    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25827      # Going to short mode and back again did indeed matter. Since short mode is
25828      # case insensitive, let's make it lowercase to improve readability.
25829      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25830      # Now convert it back to Unix-style (cygpath)
25831      input_path=`$CYGPATH -u "$shortmode_path"`
25832      new_path="$input_path"
25833    fi
25834  fi
25835
25836  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25837  if test "x$test_cygdrive_prefix" = x; then
25838    # As a simple fix, exclude /usr/bin since it's not a real path.
25839    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25840      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25841      # a path prefixed by /cygdrive for fixpath to work.
25842      new_path="$CYGWIN_ROOT_PATH$input_path"
25843    fi
25844  fi
25845
25846
25847  if test "x$path" != "x$new_path"; then
25848    BOOT_JDK="$new_path"
25849    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25850$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25851  fi
25852
25853    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25854
25855  path="$BOOT_JDK"
25856  has_colon=`$ECHO $path | $GREP ^.:`
25857  new_path="$path"
25858  if test "x$has_colon" = x; then
25859    # Not in mixed or Windows style, start by that.
25860    new_path=`cmd //c echo $path`
25861  fi
25862
25863
25864  input_path="$new_path"
25865  # Check if we need to convert this using DOS-style short mode. If the path
25866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25867  # take no chances and rewrite it.
25868  # Note: m4 eats our [], so we need to use [ and ] instead.
25869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25870  if test "x$has_forbidden_chars" != x; then
25871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25872    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25873  fi
25874
25875
25876  windows_path="$new_path"
25877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25878    unix_path=`$CYGPATH -u "$windows_path"`
25879    new_path="$unix_path"
25880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25882    new_path="$unix_path"
25883  fi
25884
25885  if test "x$path" != "x$new_path"; then
25886    BOOT_JDK="$new_path"
25887    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25888$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25889  fi
25890
25891  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25892  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25893
25894    else
25895      # We're on a unix platform. Hooray! :)
25896      path="$BOOT_JDK"
25897      has_space=`$ECHO "$path" | $GREP " "`
25898      if test "x$has_space" != x; then
25899        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25900$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25901        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25902      fi
25903
25904      # Use eval to expand a potential ~
25905      eval path="$path"
25906      if test ! -f "$path" && test ! -d "$path"; then
25907        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25908      fi
25909
25910      if test -d "$path"; then
25911        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25912      else
25913        dir="`$DIRNAME "$path"`"
25914        base="`$BASENAME "$path"`"
25915        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25916      fi
25917    fi
25918  fi
25919
25920            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25921$as_echo_n "checking for Boot JDK... " >&6; }
25922            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25923$as_echo "$BOOT_JDK" >&6; }
25924            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25925$as_echo_n "checking Boot JDK version... " >&6; }
25926            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25927            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25928$as_echo "$BOOT_JDK_VERSION" >&6; }
25929          fi # end check jdk version
25930        fi # end check javac
25931      fi # end check java
25932    fi # end check boot jdk found
25933  fi
25934
25935    # If that did not work out (e.g. too old), try explicit versions instead
25936
25937  if test "x$BOOT_JDK_FOUND" = xno; then
25938    # Now execute the test
25939
25940  if test -x /usr/libexec/java_home; then
25941    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25942    BOOT_JDK_FOUND=maybe
25943    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25944$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25945  fi
25946
25947
25948    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25949    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25950      # Do we have a bin/java?
25951      if test ! -x "$BOOT_JDK/bin/java"; then
25952        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25954        BOOT_JDK_FOUND=no
25955      else
25956        # Do we have a bin/javac?
25957        if test ! -x "$BOOT_JDK/bin/javac"; then
25958          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25960          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25961$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25962          BOOT_JDK_FOUND=no
25963        else
25964          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25965          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25966
25967          # Extra M4 quote needed to protect [] in grep expression.
25968          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25969          if test "x$FOUND_CORRECT_VERSION" = x; then
25970            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25972            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25973$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25974            BOOT_JDK_FOUND=no
25975          else
25976            # We're done! :-)
25977            BOOT_JDK_FOUND=yes
25978
25979  # Only process if variable expands to non-empty
25980
25981  if test "x$BOOT_JDK" != x; then
25982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25983
25984  # Input might be given as Windows format, start by converting to
25985  # unix format.
25986  path="$BOOT_JDK"
25987  new_path=`$CYGPATH -u "$path"`
25988
25989  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25990  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25991  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25992  # "foo.exe" is OK but "foo" is an error.
25993  #
25994  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25995  # It is also a way to make sure we got the proper file name for the real test later on.
25996  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25997  if test "x$test_shortpath" = x; then
25998    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25999$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26000    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26001  fi
26002
26003  # Call helper function which possibly converts this using DOS-style short mode.
26004  # If so, the updated path is stored in $new_path.
26005
26006  input_path="$new_path"
26007  # Check if we need to convert this using DOS-style short mode. If the path
26008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26009  # take no chances and rewrite it.
26010  # Note: m4 eats our [], so we need to use [ and ] instead.
26011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26012  if test "x$has_forbidden_chars" != x; then
26013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26017      # Going to short mode and back again did indeed matter. Since short mode is
26018      # case insensitive, let's make it lowercase to improve readability.
26019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26020      # Now convert it back to Unix-style (cygpath)
26021      input_path=`$CYGPATH -u "$shortmode_path"`
26022      new_path="$input_path"
26023    fi
26024  fi
26025
26026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26027  if test "x$test_cygdrive_prefix" = x; then
26028    # As a simple fix, exclude /usr/bin since it's not a real path.
26029    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26031      # a path prefixed by /cygdrive for fixpath to work.
26032      new_path="$CYGWIN_ROOT_PATH$input_path"
26033    fi
26034  fi
26035
26036
26037  if test "x$path" != "x$new_path"; then
26038    BOOT_JDK="$new_path"
26039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26040$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26041  fi
26042
26043    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26044
26045  path="$BOOT_JDK"
26046  has_colon=`$ECHO $path | $GREP ^.:`
26047  new_path="$path"
26048  if test "x$has_colon" = x; then
26049    # Not in mixed or Windows style, start by that.
26050    new_path=`cmd //c echo $path`
26051  fi
26052
26053
26054  input_path="$new_path"
26055  # Check if we need to convert this using DOS-style short mode. If the path
26056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26057  # take no chances and rewrite it.
26058  # Note: m4 eats our [], so we need to use [ and ] instead.
26059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26060  if test "x$has_forbidden_chars" != x; then
26061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26063  fi
26064
26065
26066  windows_path="$new_path"
26067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26068    unix_path=`$CYGPATH -u "$windows_path"`
26069    new_path="$unix_path"
26070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26072    new_path="$unix_path"
26073  fi
26074
26075  if test "x$path" != "x$new_path"; then
26076    BOOT_JDK="$new_path"
26077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26078$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26079  fi
26080
26081  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26082  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26083
26084    else
26085      # We're on a unix platform. Hooray! :)
26086      path="$BOOT_JDK"
26087      has_space=`$ECHO "$path" | $GREP " "`
26088      if test "x$has_space" != x; then
26089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26091        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26092      fi
26093
26094      # Use eval to expand a potential ~
26095      eval path="$path"
26096      if test ! -f "$path" && test ! -d "$path"; then
26097        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26098      fi
26099
26100      if test -d "$path"; then
26101        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26102      else
26103        dir="`$DIRNAME "$path"`"
26104        base="`$BASENAME "$path"`"
26105        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26106      fi
26107    fi
26108  fi
26109
26110            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26111$as_echo_n "checking for Boot JDK... " >&6; }
26112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26113$as_echo "$BOOT_JDK" >&6; }
26114            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26115$as_echo_n "checking Boot JDK version... " >&6; }
26116            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26117            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26118$as_echo "$BOOT_JDK_VERSION" >&6; }
26119          fi # end check jdk version
26120        fi # end check javac
26121      fi # end check java
26122    fi # end check boot jdk found
26123  fi
26124
26125
26126  if test "x$BOOT_JDK_FOUND" = xno; then
26127    # Now execute the test
26128
26129  if test -x /usr/libexec/java_home; then
26130    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26131    BOOT_JDK_FOUND=maybe
26132    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26133$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26134  fi
26135
26136
26137    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26138    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26139      # Do we have a bin/java?
26140      if test ! -x "$BOOT_JDK/bin/java"; then
26141        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26142$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26143        BOOT_JDK_FOUND=no
26144      else
26145        # Do we have a bin/javac?
26146        if test ! -x "$BOOT_JDK/bin/javac"; then
26147          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26149          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26150$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26151          BOOT_JDK_FOUND=no
26152        else
26153          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26154          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26155
26156          # Extra M4 quote needed to protect [] in grep expression.
26157          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26158          if test "x$FOUND_CORRECT_VERSION" = x; then
26159            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26161            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26162$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26163            BOOT_JDK_FOUND=no
26164          else
26165            # We're done! :-)
26166            BOOT_JDK_FOUND=yes
26167
26168  # Only process if variable expands to non-empty
26169
26170  if test "x$BOOT_JDK" != x; then
26171    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26172
26173  # Input might be given as Windows format, start by converting to
26174  # unix format.
26175  path="$BOOT_JDK"
26176  new_path=`$CYGPATH -u "$path"`
26177
26178  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26179  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26180  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26181  # "foo.exe" is OK but "foo" is an error.
26182  #
26183  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26184  # It is also a way to make sure we got the proper file name for the real test later on.
26185  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26186  if test "x$test_shortpath" = x; then
26187    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26188$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26189    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26190  fi
26191
26192  # Call helper function which possibly converts this using DOS-style short mode.
26193  # If so, the updated path is stored in $new_path.
26194
26195  input_path="$new_path"
26196  # Check if we need to convert this using DOS-style short mode. If the path
26197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26198  # take no chances and rewrite it.
26199  # Note: m4 eats our [], so we need to use [ and ] instead.
26200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26201  if test "x$has_forbidden_chars" != x; then
26202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26206      # Going to short mode and back again did indeed matter. Since short mode is
26207      # case insensitive, let's make it lowercase to improve readability.
26208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26209      # Now convert it back to Unix-style (cygpath)
26210      input_path=`$CYGPATH -u "$shortmode_path"`
26211      new_path="$input_path"
26212    fi
26213  fi
26214
26215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26216  if test "x$test_cygdrive_prefix" = x; then
26217    # As a simple fix, exclude /usr/bin since it's not a real path.
26218    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26220      # a path prefixed by /cygdrive for fixpath to work.
26221      new_path="$CYGWIN_ROOT_PATH$input_path"
26222    fi
26223  fi
26224
26225
26226  if test "x$path" != "x$new_path"; then
26227    BOOT_JDK="$new_path"
26228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26230  fi
26231
26232    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26233
26234  path="$BOOT_JDK"
26235  has_colon=`$ECHO $path | $GREP ^.:`
26236  new_path="$path"
26237  if test "x$has_colon" = x; then
26238    # Not in mixed or Windows style, start by that.
26239    new_path=`cmd //c echo $path`
26240  fi
26241
26242
26243  input_path="$new_path"
26244  # Check if we need to convert this using DOS-style short mode. If the path
26245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26246  # take no chances and rewrite it.
26247  # Note: m4 eats our [], so we need to use [ and ] instead.
26248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26249  if test "x$has_forbidden_chars" != x; then
26250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26252  fi
26253
26254
26255  windows_path="$new_path"
26256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26257    unix_path=`$CYGPATH -u "$windows_path"`
26258    new_path="$unix_path"
26259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26261    new_path="$unix_path"
26262  fi
26263
26264  if test "x$path" != "x$new_path"; then
26265    BOOT_JDK="$new_path"
26266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26267$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26268  fi
26269
26270  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26271  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26272
26273    else
26274      # We're on a unix platform. Hooray! :)
26275      path="$BOOT_JDK"
26276      has_space=`$ECHO "$path" | $GREP " "`
26277      if test "x$has_space" != x; then
26278        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26279$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26280        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26281      fi
26282
26283      # Use eval to expand a potential ~
26284      eval path="$path"
26285      if test ! -f "$path" && test ! -d "$path"; then
26286        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26287      fi
26288
26289      if test -d "$path"; then
26290        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26291      else
26292        dir="`$DIRNAME "$path"`"
26293        base="`$BASENAME "$path"`"
26294        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26295      fi
26296    fi
26297  fi
26298
26299            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26300$as_echo_n "checking for Boot JDK... " >&6; }
26301            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26302$as_echo "$BOOT_JDK" >&6; }
26303            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26304$as_echo_n "checking Boot JDK version... " >&6; }
26305            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26306            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26307$as_echo "$BOOT_JDK_VERSION" >&6; }
26308          fi # end check jdk version
26309        fi # end check javac
26310      fi # end check java
26311    fi # end check boot jdk found
26312  fi
26313
26314
26315  if test "x$BOOT_JDK_FOUND" = xno; then
26316    # Now execute the test
26317
26318  if test -x /usr/libexec/java_home; then
26319    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26320    BOOT_JDK_FOUND=maybe
26321    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26322$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26323  fi
26324
26325
26326    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26327    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26328      # Do we have a bin/java?
26329      if test ! -x "$BOOT_JDK/bin/java"; then
26330        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26332        BOOT_JDK_FOUND=no
26333      else
26334        # Do we have a bin/javac?
26335        if test ! -x "$BOOT_JDK/bin/javac"; then
26336          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26338          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26339$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26340          BOOT_JDK_FOUND=no
26341        else
26342          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26343          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26344
26345          # Extra M4 quote needed to protect [] in grep expression.
26346          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26347          if test "x$FOUND_CORRECT_VERSION" = x; then
26348            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26350            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26351$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26352            BOOT_JDK_FOUND=no
26353          else
26354            # We're done! :-)
26355            BOOT_JDK_FOUND=yes
26356
26357  # Only process if variable expands to non-empty
26358
26359  if test "x$BOOT_JDK" != x; then
26360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26361
26362  # Input might be given as Windows format, start by converting to
26363  # unix format.
26364  path="$BOOT_JDK"
26365  new_path=`$CYGPATH -u "$path"`
26366
26367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26370  # "foo.exe" is OK but "foo" is an error.
26371  #
26372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26373  # It is also a way to make sure we got the proper file name for the real test later on.
26374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26375  if test "x$test_shortpath" = x; then
26376    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26377$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26378    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26379  fi
26380
26381  # Call helper function which possibly converts this using DOS-style short mode.
26382  # If so, the updated path is stored in $new_path.
26383
26384  input_path="$new_path"
26385  # Check if we need to convert this using DOS-style short mode. If the path
26386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26387  # take no chances and rewrite it.
26388  # Note: m4 eats our [], so we need to use [ and ] instead.
26389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26390  if test "x$has_forbidden_chars" != x; then
26391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26395      # Going to short mode and back again did indeed matter. Since short mode is
26396      # case insensitive, let's make it lowercase to improve readability.
26397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26398      # Now convert it back to Unix-style (cygpath)
26399      input_path=`$CYGPATH -u "$shortmode_path"`
26400      new_path="$input_path"
26401    fi
26402  fi
26403
26404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26405  if test "x$test_cygdrive_prefix" = x; then
26406    # As a simple fix, exclude /usr/bin since it's not a real path.
26407    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26409      # a path prefixed by /cygdrive for fixpath to work.
26410      new_path="$CYGWIN_ROOT_PATH$input_path"
26411    fi
26412  fi
26413
26414
26415  if test "x$path" != "x$new_path"; then
26416    BOOT_JDK="$new_path"
26417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26418$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26419  fi
26420
26421    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26422
26423  path="$BOOT_JDK"
26424  has_colon=`$ECHO $path | $GREP ^.:`
26425  new_path="$path"
26426  if test "x$has_colon" = x; then
26427    # Not in mixed or Windows style, start by that.
26428    new_path=`cmd //c echo $path`
26429  fi
26430
26431
26432  input_path="$new_path"
26433  # Check if we need to convert this using DOS-style short mode. If the path
26434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26435  # take no chances and rewrite it.
26436  # Note: m4 eats our [], so we need to use [ and ] instead.
26437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26438  if test "x$has_forbidden_chars" != x; then
26439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26441  fi
26442
26443
26444  windows_path="$new_path"
26445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26446    unix_path=`$CYGPATH -u "$windows_path"`
26447    new_path="$unix_path"
26448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26450    new_path="$unix_path"
26451  fi
26452
26453  if test "x$path" != "x$new_path"; then
26454    BOOT_JDK="$new_path"
26455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26457  fi
26458
26459  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26460  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26461
26462    else
26463      # We're on a unix platform. Hooray! :)
26464      path="$BOOT_JDK"
26465      has_space=`$ECHO "$path" | $GREP " "`
26466      if test "x$has_space" != x; then
26467        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26468$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26469        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26470      fi
26471
26472      # Use eval to expand a potential ~
26473      eval path="$path"
26474      if test ! -f "$path" && test ! -d "$path"; then
26475        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26476      fi
26477
26478      if test -d "$path"; then
26479        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26480      else
26481        dir="`$DIRNAME "$path"`"
26482        base="`$BASENAME "$path"`"
26483        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26484      fi
26485    fi
26486  fi
26487
26488            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26489$as_echo_n "checking for Boot JDK... " >&6; }
26490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26491$as_echo "$BOOT_JDK" >&6; }
26492            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26493$as_echo_n "checking Boot JDK version... " >&6; }
26494            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26495            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26496$as_echo "$BOOT_JDK_VERSION" >&6; }
26497          fi # end check jdk version
26498        fi # end check javac
26499      fi # end check java
26500    fi # end check boot jdk found
26501  fi
26502
26503  fi
26504
26505
26506    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26507    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26508      # Do we have a bin/java?
26509      if test ! -x "$BOOT_JDK/bin/java"; then
26510        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26512        BOOT_JDK_FOUND=no
26513      else
26514        # Do we have a bin/javac?
26515        if test ! -x "$BOOT_JDK/bin/javac"; then
26516          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26517$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26518          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26519$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26520          BOOT_JDK_FOUND=no
26521        else
26522          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26523          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26524
26525          # Extra M4 quote needed to protect [] in grep expression.
26526          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26527          if test "x$FOUND_CORRECT_VERSION" = x; then
26528            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26530            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26531$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26532            BOOT_JDK_FOUND=no
26533          else
26534            # We're done! :-)
26535            BOOT_JDK_FOUND=yes
26536
26537  # Only process if variable expands to non-empty
26538
26539  if test "x$BOOT_JDK" != x; then
26540    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26541
26542  # Input might be given as Windows format, start by converting to
26543  # unix format.
26544  path="$BOOT_JDK"
26545  new_path=`$CYGPATH -u "$path"`
26546
26547  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26548  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26549  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26550  # "foo.exe" is OK but "foo" is an error.
26551  #
26552  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26553  # It is also a way to make sure we got the proper file name for the real test later on.
26554  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26555  if test "x$test_shortpath" = x; then
26556    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26557$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26558    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26559  fi
26560
26561  # Call helper function which possibly converts this using DOS-style short mode.
26562  # If so, the updated path is stored in $new_path.
26563
26564  input_path="$new_path"
26565  # Check if we need to convert this using DOS-style short mode. If the path
26566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26567  # take no chances and rewrite it.
26568  # Note: m4 eats our [], so we need to use [ and ] instead.
26569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26570  if test "x$has_forbidden_chars" != x; then
26571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26572    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26573    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26574    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26575      # Going to short mode and back again did indeed matter. Since short mode is
26576      # case insensitive, let's make it lowercase to improve readability.
26577      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26578      # Now convert it back to Unix-style (cygpath)
26579      input_path=`$CYGPATH -u "$shortmode_path"`
26580      new_path="$input_path"
26581    fi
26582  fi
26583
26584  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26585  if test "x$test_cygdrive_prefix" = x; then
26586    # As a simple fix, exclude /usr/bin since it's not a real path.
26587    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26588      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26589      # a path prefixed by /cygdrive for fixpath to work.
26590      new_path="$CYGWIN_ROOT_PATH$input_path"
26591    fi
26592  fi
26593
26594
26595  if test "x$path" != "x$new_path"; then
26596    BOOT_JDK="$new_path"
26597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26598$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26599  fi
26600
26601    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26602
26603  path="$BOOT_JDK"
26604  has_colon=`$ECHO $path | $GREP ^.:`
26605  new_path="$path"
26606  if test "x$has_colon" = x; then
26607    # Not in mixed or Windows style, start by that.
26608    new_path=`cmd //c echo $path`
26609  fi
26610
26611
26612  input_path="$new_path"
26613  # Check if we need to convert this using DOS-style short mode. If the path
26614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26615  # take no chances and rewrite it.
26616  # Note: m4 eats our [], so we need to use [ and ] instead.
26617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26618  if test "x$has_forbidden_chars" != x; then
26619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26620    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26621  fi
26622
26623
26624  windows_path="$new_path"
26625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26626    unix_path=`$CYGPATH -u "$windows_path"`
26627    new_path="$unix_path"
26628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26630    new_path="$unix_path"
26631  fi
26632
26633  if test "x$path" != "x$new_path"; then
26634    BOOT_JDK="$new_path"
26635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26636$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26637  fi
26638
26639  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26640  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26641
26642    else
26643      # We're on a unix platform. Hooray! :)
26644      path="$BOOT_JDK"
26645      has_space=`$ECHO "$path" | $GREP " "`
26646      if test "x$has_space" != x; then
26647        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26648$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26649        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26650      fi
26651
26652      # Use eval to expand a potential ~
26653      eval path="$path"
26654      if test ! -f "$path" && test ! -d "$path"; then
26655        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26656      fi
26657
26658      if test -d "$path"; then
26659        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26660      else
26661        dir="`$DIRNAME "$path"`"
26662        base="`$BASENAME "$path"`"
26663        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26664      fi
26665    fi
26666  fi
26667
26668            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26669$as_echo_n "checking for Boot JDK... " >&6; }
26670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26671$as_echo "$BOOT_JDK" >&6; }
26672            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26673$as_echo_n "checking Boot JDK version... " >&6; }
26674            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26676$as_echo "$BOOT_JDK_VERSION" >&6; }
26677          fi # end check jdk version
26678        fi # end check javac
26679      fi # end check java
26680    fi # end check boot jdk found
26681  fi
26682
26683
26684  # Test: Is $JAVA_HOME set?
26685
26686  if test "x$BOOT_JDK_FOUND" = xno; then
26687    # Now execute the test
26688
26689  if test "x$JAVA_HOME" != x; then
26690    JAVA_HOME_PROCESSED="$JAVA_HOME"
26691
26692  # Only process if variable expands to non-empty
26693
26694  if test "x$JAVA_HOME_PROCESSED" != x; then
26695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26696
26697  # Input might be given as Windows format, start by converting to
26698  # unix format.
26699  path="$JAVA_HOME_PROCESSED"
26700  new_path=`$CYGPATH -u "$path"`
26701
26702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26705  # "foo.exe" is OK but "foo" is an error.
26706  #
26707  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26708  # It is also a way to make sure we got the proper file name for the real test later on.
26709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26710  if test "x$test_shortpath" = x; then
26711    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26712$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26713    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26714  fi
26715
26716  # Call helper function which possibly converts this using DOS-style short mode.
26717  # If so, the updated path is stored in $new_path.
26718
26719  input_path="$new_path"
26720  # Check if we need to convert this using DOS-style short mode. If the path
26721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26722  # take no chances and rewrite it.
26723  # Note: m4 eats our [], so we need to use [ and ] instead.
26724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26725  if test "x$has_forbidden_chars" != x; then
26726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26730      # Going to short mode and back again did indeed matter. Since short mode is
26731      # case insensitive, let's make it lowercase to improve readability.
26732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26733      # Now convert it back to Unix-style (cygpath)
26734      input_path=`$CYGPATH -u "$shortmode_path"`
26735      new_path="$input_path"
26736    fi
26737  fi
26738
26739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26740  if test "x$test_cygdrive_prefix" = x; then
26741    # As a simple fix, exclude /usr/bin since it's not a real path.
26742    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26744      # a path prefixed by /cygdrive for fixpath to work.
26745      new_path="$CYGWIN_ROOT_PATH$input_path"
26746    fi
26747  fi
26748
26749
26750  if test "x$path" != "x$new_path"; then
26751    JAVA_HOME_PROCESSED="$new_path"
26752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26753$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26754  fi
26755
26756    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26757
26758  path="$JAVA_HOME_PROCESSED"
26759  has_colon=`$ECHO $path | $GREP ^.:`
26760  new_path="$path"
26761  if test "x$has_colon" = x; then
26762    # Not in mixed or Windows style, start by that.
26763    new_path=`cmd //c echo $path`
26764  fi
26765
26766
26767  input_path="$new_path"
26768  # Check if we need to convert this using DOS-style short mode. If the path
26769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26770  # take no chances and rewrite it.
26771  # Note: m4 eats our [], so we need to use [ and ] instead.
26772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26773  if test "x$has_forbidden_chars" != x; then
26774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26776  fi
26777
26778
26779  windows_path="$new_path"
26780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26781    unix_path=`$CYGPATH -u "$windows_path"`
26782    new_path="$unix_path"
26783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26785    new_path="$unix_path"
26786  fi
26787
26788  if test "x$path" != "x$new_path"; then
26789    JAVA_HOME_PROCESSED="$new_path"
26790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26791$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26792  fi
26793
26794  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26795  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26796
26797    else
26798      # We're on a unix platform. Hooray! :)
26799      path="$JAVA_HOME_PROCESSED"
26800      has_space=`$ECHO "$path" | $GREP " "`
26801      if test "x$has_space" != x; then
26802        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26803$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26804        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26805      fi
26806
26807      # Use eval to expand a potential ~
26808      eval path="$path"
26809      if test ! -f "$path" && test ! -d "$path"; then
26810        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26811      fi
26812
26813      if test -d "$path"; then
26814        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26815      else
26816        dir="`$DIRNAME "$path"`"
26817        base="`$BASENAME "$path"`"
26818        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26819      fi
26820    fi
26821  fi
26822
26823    if test ! -d "$JAVA_HOME_PROCESSED"; then
26824      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26825$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26826    else
26827      # Aha, the user has set a JAVA_HOME
26828      # let us use that as the Boot JDK.
26829      BOOT_JDK="$JAVA_HOME_PROCESSED"
26830      BOOT_JDK_FOUND=maybe
26831      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26832$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26833    fi
26834  fi
26835
26836
26837    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26838    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26839      # Do we have a bin/java?
26840      if test ! -x "$BOOT_JDK/bin/java"; then
26841        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26843        BOOT_JDK_FOUND=no
26844      else
26845        # Do we have a bin/javac?
26846        if test ! -x "$BOOT_JDK/bin/javac"; then
26847          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26849          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26850$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26851          BOOT_JDK_FOUND=no
26852        else
26853          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26854          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26855
26856          # Extra M4 quote needed to protect [] in grep expression.
26857          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26858          if test "x$FOUND_CORRECT_VERSION" = x; then
26859            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26861            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26862$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26863            BOOT_JDK_FOUND=no
26864          else
26865            # We're done! :-)
26866            BOOT_JDK_FOUND=yes
26867
26868  # Only process if variable expands to non-empty
26869
26870  if test "x$BOOT_JDK" != x; then
26871    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26872
26873  # Input might be given as Windows format, start by converting to
26874  # unix format.
26875  path="$BOOT_JDK"
26876  new_path=`$CYGPATH -u "$path"`
26877
26878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26881  # "foo.exe" is OK but "foo" is an error.
26882  #
26883  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26884  # It is also a way to make sure we got the proper file name for the real test later on.
26885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26886  if test "x$test_shortpath" = x; then
26887    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26888$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26889    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26890  fi
26891
26892  # Call helper function which possibly converts this using DOS-style short mode.
26893  # If so, the updated path is stored in $new_path.
26894
26895  input_path="$new_path"
26896  # Check if we need to convert this using DOS-style short mode. If the path
26897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26898  # take no chances and rewrite it.
26899  # Note: m4 eats our [], so we need to use [ and ] instead.
26900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26901  if test "x$has_forbidden_chars" != x; then
26902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26906      # Going to short mode and back again did indeed matter. Since short mode is
26907      # case insensitive, let's make it lowercase to improve readability.
26908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26909      # Now convert it back to Unix-style (cygpath)
26910      input_path=`$CYGPATH -u "$shortmode_path"`
26911      new_path="$input_path"
26912    fi
26913  fi
26914
26915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26916  if test "x$test_cygdrive_prefix" = x; then
26917    # As a simple fix, exclude /usr/bin since it's not a real path.
26918    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26920      # a path prefixed by /cygdrive for fixpath to work.
26921      new_path="$CYGWIN_ROOT_PATH$input_path"
26922    fi
26923  fi
26924
26925
26926  if test "x$path" != "x$new_path"; then
26927    BOOT_JDK="$new_path"
26928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26929$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26930  fi
26931
26932    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26933
26934  path="$BOOT_JDK"
26935  has_colon=`$ECHO $path | $GREP ^.:`
26936  new_path="$path"
26937  if test "x$has_colon" = x; then
26938    # Not in mixed or Windows style, start by that.
26939    new_path=`cmd //c echo $path`
26940  fi
26941
26942
26943  input_path="$new_path"
26944  # Check if we need to convert this using DOS-style short mode. If the path
26945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26946  # take no chances and rewrite it.
26947  # Note: m4 eats our [], so we need to use [ and ] instead.
26948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26949  if test "x$has_forbidden_chars" != x; then
26950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26952  fi
26953
26954
26955  windows_path="$new_path"
26956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26957    unix_path=`$CYGPATH -u "$windows_path"`
26958    new_path="$unix_path"
26959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26961    new_path="$unix_path"
26962  fi
26963
26964  if test "x$path" != "x$new_path"; then
26965    BOOT_JDK="$new_path"
26966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26967$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26968  fi
26969
26970  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26971  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26972
26973    else
26974      # We're on a unix platform. Hooray! :)
26975      path="$BOOT_JDK"
26976      has_space=`$ECHO "$path" | $GREP " "`
26977      if test "x$has_space" != x; then
26978        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26979$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26980        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26981      fi
26982
26983      # Use eval to expand a potential ~
26984      eval path="$path"
26985      if test ! -f "$path" && test ! -d "$path"; then
26986        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26987      fi
26988
26989      if test -d "$path"; then
26990        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26991      else
26992        dir="`$DIRNAME "$path"`"
26993        base="`$BASENAME "$path"`"
26994        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26995      fi
26996    fi
26997  fi
26998
26999            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27000$as_echo_n "checking for Boot JDK... " >&6; }
27001            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27002$as_echo "$BOOT_JDK" >&6; }
27003            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27004$as_echo_n "checking Boot JDK version... " >&6; }
27005            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27006            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27007$as_echo "$BOOT_JDK_VERSION" >&6; }
27008          fi # end check jdk version
27009        fi # end check javac
27010      fi # end check java
27011    fi # end check boot jdk found
27012  fi
27013
27014
27015  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27016
27017  if test "x$BOOT_JDK_FOUND" = xno; then
27018    # Now execute the test
27019
27020  # Extract the first word of "javac", so it can be a program name with args.
27021set dummy javac; ac_word=$2
27022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27023$as_echo_n "checking for $ac_word... " >&6; }
27024if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27025  $as_echo_n "(cached) " >&6
27026else
27027  case $JAVAC_CHECK in
27028  [\\/]* | ?:[\\/]*)
27029  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27030  ;;
27031  *)
27032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27033for as_dir in $PATH
27034do
27035  IFS=$as_save_IFS
27036  test -z "$as_dir" && as_dir=.
27037    for ac_exec_ext in '' $ac_executable_extensions; do
27038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27039    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27041    break 2
27042  fi
27043done
27044  done
27045IFS=$as_save_IFS
27046
27047  ;;
27048esac
27049fi
27050JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27051if test -n "$JAVAC_CHECK"; then
27052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27053$as_echo "$JAVAC_CHECK" >&6; }
27054else
27055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27056$as_echo "no" >&6; }
27057fi
27058
27059
27060  # Extract the first word of "java", so it can be a program name with args.
27061set dummy java; ac_word=$2
27062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27063$as_echo_n "checking for $ac_word... " >&6; }
27064if ${ac_cv_path_JAVA_CHECK+:} false; then :
27065  $as_echo_n "(cached) " >&6
27066else
27067  case $JAVA_CHECK in
27068  [\\/]* | ?:[\\/]*)
27069  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27070  ;;
27071  *)
27072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27073for as_dir in $PATH
27074do
27075  IFS=$as_save_IFS
27076  test -z "$as_dir" && as_dir=.
27077    for ac_exec_ext in '' $ac_executable_extensions; do
27078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27079    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27081    break 2
27082  fi
27083done
27084  done
27085IFS=$as_save_IFS
27086
27087  ;;
27088esac
27089fi
27090JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27091if test -n "$JAVA_CHECK"; then
27092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27093$as_echo "$JAVA_CHECK" >&6; }
27094else
27095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27096$as_echo "no" >&6; }
27097fi
27098
27099
27100  BINARY="$JAVAC_CHECK"
27101  if test "x$JAVAC_CHECK" = x; then
27102    BINARY="$JAVA_CHECK"
27103  fi
27104  if test "x$BINARY" != x; then
27105    # So there is a java(c) binary, it might be part of a JDK.
27106    # Lets find the JDK/JRE directory by following symbolic links.
27107    # Linux/GNU systems often have links from /usr/bin/java to
27108    # /etc/alternatives/java to the real JDK binary.
27109
27110  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27111    # Follow a chain of symbolic links. Use readlink
27112    # where it exists, else fall back to horribly
27113    # complicated shell code.
27114    if test "x$READLINK_TESTED" != yes; then
27115      # On MacOSX there is a readlink tool with a different
27116      # purpose than the GNU readlink tool. Check the found readlink.
27117      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27118      if test "x$ISGNU" = x; then
27119        # A readlink that we do not know how to use.
27120        # Are there other non-GNU readlinks out there?
27121        READLINK_TESTED=yes
27122        READLINK=
27123      fi
27124    fi
27125
27126    if test "x$READLINK" != x; then
27127      BINARY=`$READLINK -f $BINARY`
27128    else
27129      # Save the current directory for restoring afterwards
27130      STARTDIR=$PWD
27131      COUNTER=0
27132      sym_link_dir=`$DIRNAME $BINARY`
27133      sym_link_file=`$BASENAME $BINARY`
27134      cd $sym_link_dir
27135      # Use -P flag to resolve symlinks in directories.
27136      cd `$THEPWDCMD -P`
27137      sym_link_dir=`$THEPWDCMD -P`
27138      # Resolve file symlinks
27139      while test $COUNTER -lt 20; do
27140        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27141        if test "x$ISLINK" == x; then
27142          # This is not a symbolic link! We are done!
27143          break
27144        fi
27145        # Again resolve directory symlinks since the target of the just found
27146        # link could be in a different directory
27147        cd `$DIRNAME $ISLINK`
27148        sym_link_dir=`$THEPWDCMD -P`
27149        sym_link_file=`$BASENAME $ISLINK`
27150        let COUNTER=COUNTER+1
27151      done
27152      cd $STARTDIR
27153      BINARY=$sym_link_dir/$sym_link_file
27154    fi
27155  fi
27156
27157    BOOT_JDK=`dirname "$BINARY"`
27158    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27159    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27160      # Looks like we found ourselves an JDK
27161      BOOT_JDK_FOUND=maybe
27162      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27163$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27164    fi
27165  fi
27166
27167
27168    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27169    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27170      # Do we have a bin/java?
27171      if test ! -x "$BOOT_JDK/bin/java"; then
27172        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27174        BOOT_JDK_FOUND=no
27175      else
27176        # Do we have a bin/javac?
27177        if test ! -x "$BOOT_JDK/bin/javac"; then
27178          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27180          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27181$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27182          BOOT_JDK_FOUND=no
27183        else
27184          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27185          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27186
27187          # Extra M4 quote needed to protect [] in grep expression.
27188          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27189          if test "x$FOUND_CORRECT_VERSION" = x; then
27190            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27192            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27193$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27194            BOOT_JDK_FOUND=no
27195          else
27196            # We're done! :-)
27197            BOOT_JDK_FOUND=yes
27198
27199  # Only process if variable expands to non-empty
27200
27201  if test "x$BOOT_JDK" != x; then
27202    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27203
27204  # Input might be given as Windows format, start by converting to
27205  # unix format.
27206  path="$BOOT_JDK"
27207  new_path=`$CYGPATH -u "$path"`
27208
27209  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27210  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27211  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27212  # "foo.exe" is OK but "foo" is an error.
27213  #
27214  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27215  # It is also a way to make sure we got the proper file name for the real test later on.
27216  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27217  if test "x$test_shortpath" = x; then
27218    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27219$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27220    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27221  fi
27222
27223  # Call helper function which possibly converts this using DOS-style short mode.
27224  # If so, the updated path is stored in $new_path.
27225
27226  input_path="$new_path"
27227  # Check if we need to convert this using DOS-style short mode. If the path
27228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27229  # take no chances and rewrite it.
27230  # Note: m4 eats our [], so we need to use [ and ] instead.
27231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27232  if test "x$has_forbidden_chars" != x; then
27233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27234    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27235    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27236    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27237      # Going to short mode and back again did indeed matter. Since short mode is
27238      # case insensitive, let's make it lowercase to improve readability.
27239      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27240      # Now convert it back to Unix-style (cygpath)
27241      input_path=`$CYGPATH -u "$shortmode_path"`
27242      new_path="$input_path"
27243    fi
27244  fi
27245
27246  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27247  if test "x$test_cygdrive_prefix" = x; then
27248    # As a simple fix, exclude /usr/bin since it's not a real path.
27249    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27250      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27251      # a path prefixed by /cygdrive for fixpath to work.
27252      new_path="$CYGWIN_ROOT_PATH$input_path"
27253    fi
27254  fi
27255
27256
27257  if test "x$path" != "x$new_path"; then
27258    BOOT_JDK="$new_path"
27259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27261  fi
27262
27263    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27264
27265  path="$BOOT_JDK"
27266  has_colon=`$ECHO $path | $GREP ^.:`
27267  new_path="$path"
27268  if test "x$has_colon" = x; then
27269    # Not in mixed or Windows style, start by that.
27270    new_path=`cmd //c echo $path`
27271  fi
27272
27273
27274  input_path="$new_path"
27275  # Check if we need to convert this using DOS-style short mode. If the path
27276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27277  # take no chances and rewrite it.
27278  # Note: m4 eats our [], so we need to use [ and ] instead.
27279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27280  if test "x$has_forbidden_chars" != x; then
27281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27282    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27283  fi
27284
27285
27286  windows_path="$new_path"
27287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27288    unix_path=`$CYGPATH -u "$windows_path"`
27289    new_path="$unix_path"
27290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27292    new_path="$unix_path"
27293  fi
27294
27295  if test "x$path" != "x$new_path"; then
27296    BOOT_JDK="$new_path"
27297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27298$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27299  fi
27300
27301  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27302  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27303
27304    else
27305      # We're on a unix platform. Hooray! :)
27306      path="$BOOT_JDK"
27307      has_space=`$ECHO "$path" | $GREP " "`
27308      if test "x$has_space" != x; then
27309        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27310$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27311        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27312      fi
27313
27314      # Use eval to expand a potential ~
27315      eval path="$path"
27316      if test ! -f "$path" && test ! -d "$path"; then
27317        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27318      fi
27319
27320      if test -d "$path"; then
27321        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27322      else
27323        dir="`$DIRNAME "$path"`"
27324        base="`$BASENAME "$path"`"
27325        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27326      fi
27327    fi
27328  fi
27329
27330            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27331$as_echo_n "checking for Boot JDK... " >&6; }
27332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27333$as_echo "$BOOT_JDK" >&6; }
27334            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27335$as_echo_n "checking Boot JDK version... " >&6; }
27336            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27338$as_echo "$BOOT_JDK_VERSION" >&6; }
27339          fi # end check jdk version
27340        fi # end check javac
27341      fi # end check java
27342    fi # end check boot jdk found
27343  fi
27344
27345
27346  # Test: Is there a JDK installed in default, well-known locations?
27347
27348  if test "x$BOOT_JDK_FOUND" = xno; then
27349    # Now execute the test
27350
27351  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27352
27353  if test "x$BOOT_JDK_FOUND" = xno; then
27354    # Now execute the test
27355
27356  if test "x$ProgramW6432" != x; then
27357    VIRTUAL_DIR="$ProgramW6432/Java"
27358
27359  windows_path="$VIRTUAL_DIR"
27360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27361    unix_path=`$CYGPATH -u "$windows_path"`
27362    VIRTUAL_DIR="$unix_path"
27363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27365    VIRTUAL_DIR="$unix_path"
27366  fi
27367
27368
27369  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27370  BOOT_JDK_SUFFIX=""
27371  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27372  if test "x$ALL_JDKS_FOUND" != x; then
27373    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27374
27375  if test "x$BOOT_JDK_FOUND" = xno; then
27376    # Now execute the test
27377
27378        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27379        if test -d "$BOOT_JDK"; then
27380          BOOT_JDK_FOUND=maybe
27381          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27382$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27383        fi
27384
27385
27386    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27387    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27388      # Do we have a bin/java?
27389      if test ! -x "$BOOT_JDK/bin/java"; then
27390        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27392        BOOT_JDK_FOUND=no
27393      else
27394        # Do we have a bin/javac?
27395        if test ! -x "$BOOT_JDK/bin/javac"; then
27396          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27398          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27399$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27400          BOOT_JDK_FOUND=no
27401        else
27402          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27403          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27404
27405          # Extra M4 quote needed to protect [] in grep expression.
27406          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27407          if test "x$FOUND_CORRECT_VERSION" = x; then
27408            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27410            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27411$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27412            BOOT_JDK_FOUND=no
27413          else
27414            # We're done! :-)
27415            BOOT_JDK_FOUND=yes
27416
27417  # Only process if variable expands to non-empty
27418
27419  if test "x$BOOT_JDK" != x; then
27420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27421
27422  # Input might be given as Windows format, start by converting to
27423  # unix format.
27424  path="$BOOT_JDK"
27425  new_path=`$CYGPATH -u "$path"`
27426
27427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27430  # "foo.exe" is OK but "foo" is an error.
27431  #
27432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27433  # It is also a way to make sure we got the proper file name for the real test later on.
27434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27435  if test "x$test_shortpath" = x; then
27436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27437$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27438    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27439  fi
27440
27441  # Call helper function which possibly converts this using DOS-style short mode.
27442  # If so, the updated path is stored in $new_path.
27443
27444  input_path="$new_path"
27445  # Check if we need to convert this using DOS-style short mode. If the path
27446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27447  # take no chances and rewrite it.
27448  # Note: m4 eats our [], so we need to use [ and ] instead.
27449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27450  if test "x$has_forbidden_chars" != x; then
27451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27455      # Going to short mode and back again did indeed matter. Since short mode is
27456      # case insensitive, let's make it lowercase to improve readability.
27457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27458      # Now convert it back to Unix-style (cygpath)
27459      input_path=`$CYGPATH -u "$shortmode_path"`
27460      new_path="$input_path"
27461    fi
27462  fi
27463
27464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27465  if test "x$test_cygdrive_prefix" = x; then
27466    # As a simple fix, exclude /usr/bin since it's not a real path.
27467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27469      # a path prefixed by /cygdrive for fixpath to work.
27470      new_path="$CYGWIN_ROOT_PATH$input_path"
27471    fi
27472  fi
27473
27474
27475  if test "x$path" != "x$new_path"; then
27476    BOOT_JDK="$new_path"
27477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27478$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27479  fi
27480
27481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27482
27483  path="$BOOT_JDK"
27484  has_colon=`$ECHO $path | $GREP ^.:`
27485  new_path="$path"
27486  if test "x$has_colon" = x; then
27487    # Not in mixed or Windows style, start by that.
27488    new_path=`cmd //c echo $path`
27489  fi
27490
27491
27492  input_path="$new_path"
27493  # Check if we need to convert this using DOS-style short mode. If the path
27494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27495  # take no chances and rewrite it.
27496  # Note: m4 eats our [], so we need to use [ and ] instead.
27497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27498  if test "x$has_forbidden_chars" != x; then
27499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27501  fi
27502
27503
27504  windows_path="$new_path"
27505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27506    unix_path=`$CYGPATH -u "$windows_path"`
27507    new_path="$unix_path"
27508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27510    new_path="$unix_path"
27511  fi
27512
27513  if test "x$path" != "x$new_path"; then
27514    BOOT_JDK="$new_path"
27515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27516$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27517  fi
27518
27519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27521
27522    else
27523      # We're on a unix platform. Hooray! :)
27524      path="$BOOT_JDK"
27525      has_space=`$ECHO "$path" | $GREP " "`
27526      if test "x$has_space" != x; then
27527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27528$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27529        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27530      fi
27531
27532      # Use eval to expand a potential ~
27533      eval path="$path"
27534      if test ! -f "$path" && test ! -d "$path"; then
27535        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27536      fi
27537
27538      if test -d "$path"; then
27539        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27540      else
27541        dir="`$DIRNAME "$path"`"
27542        base="`$BASENAME "$path"`"
27543        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27544      fi
27545    fi
27546  fi
27547
27548            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27549$as_echo_n "checking for Boot JDK... " >&6; }
27550            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27551$as_echo "$BOOT_JDK" >&6; }
27552            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27553$as_echo_n "checking Boot JDK version... " >&6; }
27554            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27556$as_echo "$BOOT_JDK_VERSION" >&6; }
27557          fi # end check jdk version
27558        fi # end check javac
27559      fi # end check java
27560    fi # end check boot jdk found
27561  fi
27562
27563    done
27564  fi
27565
27566  fi
27567
27568
27569    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27570    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27571      # Do we have a bin/java?
27572      if test ! -x "$BOOT_JDK/bin/java"; then
27573        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27575        BOOT_JDK_FOUND=no
27576      else
27577        # Do we have a bin/javac?
27578        if test ! -x "$BOOT_JDK/bin/javac"; then
27579          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27581          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27582$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27583          BOOT_JDK_FOUND=no
27584        else
27585          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27586          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27587
27588          # Extra M4 quote needed to protect [] in grep expression.
27589          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27590          if test "x$FOUND_CORRECT_VERSION" = x; then
27591            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27593            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27594$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27595            BOOT_JDK_FOUND=no
27596          else
27597            # We're done! :-)
27598            BOOT_JDK_FOUND=yes
27599
27600  # Only process if variable expands to non-empty
27601
27602  if test "x$BOOT_JDK" != x; then
27603    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27604
27605  # Input might be given as Windows format, start by converting to
27606  # unix format.
27607  path="$BOOT_JDK"
27608  new_path=`$CYGPATH -u "$path"`
27609
27610  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27611  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27612  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27613  # "foo.exe" is OK but "foo" is an error.
27614  #
27615  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27616  # It is also a way to make sure we got the proper file name for the real test later on.
27617  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27618  if test "x$test_shortpath" = x; then
27619    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27620$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27621    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27622  fi
27623
27624  # Call helper function which possibly converts this using DOS-style short mode.
27625  # If so, the updated path is stored in $new_path.
27626
27627  input_path="$new_path"
27628  # Check if we need to convert this using DOS-style short mode. If the path
27629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27630  # take no chances and rewrite it.
27631  # Note: m4 eats our [], so we need to use [ and ] instead.
27632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27633  if test "x$has_forbidden_chars" != x; then
27634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27635    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27636    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27637    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27638      # Going to short mode and back again did indeed matter. Since short mode is
27639      # case insensitive, let's make it lowercase to improve readability.
27640      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27641      # Now convert it back to Unix-style (cygpath)
27642      input_path=`$CYGPATH -u "$shortmode_path"`
27643      new_path="$input_path"
27644    fi
27645  fi
27646
27647  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27648  if test "x$test_cygdrive_prefix" = x; then
27649    # As a simple fix, exclude /usr/bin since it's not a real path.
27650    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27651      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27652      # a path prefixed by /cygdrive for fixpath to work.
27653      new_path="$CYGWIN_ROOT_PATH$input_path"
27654    fi
27655  fi
27656
27657
27658  if test "x$path" != "x$new_path"; then
27659    BOOT_JDK="$new_path"
27660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27661$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27662  fi
27663
27664    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27665
27666  path="$BOOT_JDK"
27667  has_colon=`$ECHO $path | $GREP ^.:`
27668  new_path="$path"
27669  if test "x$has_colon" = x; then
27670    # Not in mixed or Windows style, start by that.
27671    new_path=`cmd //c echo $path`
27672  fi
27673
27674
27675  input_path="$new_path"
27676  # Check if we need to convert this using DOS-style short mode. If the path
27677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27678  # take no chances and rewrite it.
27679  # Note: m4 eats our [], so we need to use [ and ] instead.
27680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27681  if test "x$has_forbidden_chars" != x; then
27682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27684  fi
27685
27686
27687  windows_path="$new_path"
27688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27689    unix_path=`$CYGPATH -u "$windows_path"`
27690    new_path="$unix_path"
27691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27693    new_path="$unix_path"
27694  fi
27695
27696  if test "x$path" != "x$new_path"; then
27697    BOOT_JDK="$new_path"
27698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27699$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27700  fi
27701
27702  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27703  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27704
27705    else
27706      # We're on a unix platform. Hooray! :)
27707      path="$BOOT_JDK"
27708      has_space=`$ECHO "$path" | $GREP " "`
27709      if test "x$has_space" != x; then
27710        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27711$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27712        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27713      fi
27714
27715      # Use eval to expand a potential ~
27716      eval path="$path"
27717      if test ! -f "$path" && test ! -d "$path"; then
27718        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27719      fi
27720
27721      if test -d "$path"; then
27722        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27723      else
27724        dir="`$DIRNAME "$path"`"
27725        base="`$BASENAME "$path"`"
27726        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27727      fi
27728    fi
27729  fi
27730
27731            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27732$as_echo_n "checking for Boot JDK... " >&6; }
27733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27734$as_echo "$BOOT_JDK" >&6; }
27735            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27736$as_echo_n "checking Boot JDK version... " >&6; }
27737            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27739$as_echo "$BOOT_JDK_VERSION" >&6; }
27740          fi # end check jdk version
27741        fi # end check javac
27742      fi # end check java
27743    fi # end check boot jdk found
27744  fi
27745
27746
27747  if test "x$BOOT_JDK_FOUND" = xno; then
27748    # Now execute the test
27749
27750  if test "x$PROGRAMW6432" != x; then
27751    VIRTUAL_DIR="$PROGRAMW6432/Java"
27752
27753  windows_path="$VIRTUAL_DIR"
27754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27755    unix_path=`$CYGPATH -u "$windows_path"`
27756    VIRTUAL_DIR="$unix_path"
27757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27759    VIRTUAL_DIR="$unix_path"
27760  fi
27761
27762
27763  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27764  BOOT_JDK_SUFFIX=""
27765  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27766  if test "x$ALL_JDKS_FOUND" != x; then
27767    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27768
27769  if test "x$BOOT_JDK_FOUND" = xno; then
27770    # Now execute the test
27771
27772        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27773        if test -d "$BOOT_JDK"; then
27774          BOOT_JDK_FOUND=maybe
27775          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27776$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27777        fi
27778
27779
27780    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27781    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27782      # Do we have a bin/java?
27783      if test ! -x "$BOOT_JDK/bin/java"; then
27784        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27786        BOOT_JDK_FOUND=no
27787      else
27788        # Do we have a bin/javac?
27789        if test ! -x "$BOOT_JDK/bin/javac"; then
27790          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27792          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27793$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27794          BOOT_JDK_FOUND=no
27795        else
27796          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27797          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27798
27799          # Extra M4 quote needed to protect [] in grep expression.
27800          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27801          if test "x$FOUND_CORRECT_VERSION" = x; then
27802            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27804            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27805$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27806            BOOT_JDK_FOUND=no
27807          else
27808            # We're done! :-)
27809            BOOT_JDK_FOUND=yes
27810
27811  # Only process if variable expands to non-empty
27812
27813  if test "x$BOOT_JDK" != x; then
27814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27815
27816  # Input might be given as Windows format, start by converting to
27817  # unix format.
27818  path="$BOOT_JDK"
27819  new_path=`$CYGPATH -u "$path"`
27820
27821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27824  # "foo.exe" is OK but "foo" is an error.
27825  #
27826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27827  # It is also a way to make sure we got the proper file name for the real test later on.
27828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27829  if test "x$test_shortpath" = x; then
27830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27831$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27832    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27833  fi
27834
27835  # Call helper function which possibly converts this using DOS-style short mode.
27836  # If so, the updated path is stored in $new_path.
27837
27838  input_path="$new_path"
27839  # Check if we need to convert this using DOS-style short mode. If the path
27840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27841  # take no chances and rewrite it.
27842  # Note: m4 eats our [], so we need to use [ and ] instead.
27843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27844  if test "x$has_forbidden_chars" != x; then
27845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27849      # Going to short mode and back again did indeed matter. Since short mode is
27850      # case insensitive, let's make it lowercase to improve readability.
27851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27852      # Now convert it back to Unix-style (cygpath)
27853      input_path=`$CYGPATH -u "$shortmode_path"`
27854      new_path="$input_path"
27855    fi
27856  fi
27857
27858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27859  if test "x$test_cygdrive_prefix" = x; then
27860    # As a simple fix, exclude /usr/bin since it's not a real path.
27861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27863      # a path prefixed by /cygdrive for fixpath to work.
27864      new_path="$CYGWIN_ROOT_PATH$input_path"
27865    fi
27866  fi
27867
27868
27869  if test "x$path" != "x$new_path"; then
27870    BOOT_JDK="$new_path"
27871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27873  fi
27874
27875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27876
27877  path="$BOOT_JDK"
27878  has_colon=`$ECHO $path | $GREP ^.:`
27879  new_path="$path"
27880  if test "x$has_colon" = x; then
27881    # Not in mixed or Windows style, start by that.
27882    new_path=`cmd //c echo $path`
27883  fi
27884
27885
27886  input_path="$new_path"
27887  # Check if we need to convert this using DOS-style short mode. If the path
27888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27889  # take no chances and rewrite it.
27890  # Note: m4 eats our [], so we need to use [ and ] instead.
27891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27892  if test "x$has_forbidden_chars" != x; then
27893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27895  fi
27896
27897
27898  windows_path="$new_path"
27899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27900    unix_path=`$CYGPATH -u "$windows_path"`
27901    new_path="$unix_path"
27902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27904    new_path="$unix_path"
27905  fi
27906
27907  if test "x$path" != "x$new_path"; then
27908    BOOT_JDK="$new_path"
27909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27910$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27911  fi
27912
27913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27915
27916    else
27917      # We're on a unix platform. Hooray! :)
27918      path="$BOOT_JDK"
27919      has_space=`$ECHO "$path" | $GREP " "`
27920      if test "x$has_space" != x; then
27921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27922$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27923        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27924      fi
27925
27926      # Use eval to expand a potential ~
27927      eval path="$path"
27928      if test ! -f "$path" && test ! -d "$path"; then
27929        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27930      fi
27931
27932      if test -d "$path"; then
27933        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27934      else
27935        dir="`$DIRNAME "$path"`"
27936        base="`$BASENAME "$path"`"
27937        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27938      fi
27939    fi
27940  fi
27941
27942            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27943$as_echo_n "checking for Boot JDK... " >&6; }
27944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27945$as_echo "$BOOT_JDK" >&6; }
27946            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27947$as_echo_n "checking Boot JDK version... " >&6; }
27948            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27950$as_echo "$BOOT_JDK_VERSION" >&6; }
27951          fi # end check jdk version
27952        fi # end check javac
27953      fi # end check java
27954    fi # end check boot jdk found
27955  fi
27956
27957    done
27958  fi
27959
27960  fi
27961
27962
27963    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27964    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27965      # Do we have a bin/java?
27966      if test ! -x "$BOOT_JDK/bin/java"; then
27967        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27969        BOOT_JDK_FOUND=no
27970      else
27971        # Do we have a bin/javac?
27972        if test ! -x "$BOOT_JDK/bin/javac"; then
27973          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27974$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27975          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27976$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27977          BOOT_JDK_FOUND=no
27978        else
27979          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27980          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27981
27982          # Extra M4 quote needed to protect [] in grep expression.
27983          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27984          if test "x$FOUND_CORRECT_VERSION" = x; then
27985            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27987            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27988$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27989            BOOT_JDK_FOUND=no
27990          else
27991            # We're done! :-)
27992            BOOT_JDK_FOUND=yes
27993
27994  # Only process if variable expands to non-empty
27995
27996  if test "x$BOOT_JDK" != x; then
27997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27998
27999  # Input might be given as Windows format, start by converting to
28000  # unix format.
28001  path="$BOOT_JDK"
28002  new_path=`$CYGPATH -u "$path"`
28003
28004  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28005  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28006  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28007  # "foo.exe" is OK but "foo" is an error.
28008  #
28009  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28010  # It is also a way to make sure we got the proper file name for the real test later on.
28011  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28012  if test "x$test_shortpath" = x; then
28013    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28014$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28015    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28016  fi
28017
28018  # Call helper function which possibly converts this using DOS-style short mode.
28019  # If so, the updated path is stored in $new_path.
28020
28021  input_path="$new_path"
28022  # Check if we need to convert this using DOS-style short mode. If the path
28023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28024  # take no chances and rewrite it.
28025  # Note: m4 eats our [], so we need to use [ and ] instead.
28026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28027  if test "x$has_forbidden_chars" != x; then
28028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28032      # Going to short mode and back again did indeed matter. Since short mode is
28033      # case insensitive, let's make it lowercase to improve readability.
28034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28035      # Now convert it back to Unix-style (cygpath)
28036      input_path=`$CYGPATH -u "$shortmode_path"`
28037      new_path="$input_path"
28038    fi
28039  fi
28040
28041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28042  if test "x$test_cygdrive_prefix" = x; then
28043    # As a simple fix, exclude /usr/bin since it's not a real path.
28044    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28046      # a path prefixed by /cygdrive for fixpath to work.
28047      new_path="$CYGWIN_ROOT_PATH$input_path"
28048    fi
28049  fi
28050
28051
28052  if test "x$path" != "x$new_path"; then
28053    BOOT_JDK="$new_path"
28054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28055$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28056  fi
28057
28058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28059
28060  path="$BOOT_JDK"
28061  has_colon=`$ECHO $path | $GREP ^.:`
28062  new_path="$path"
28063  if test "x$has_colon" = x; then
28064    # Not in mixed or Windows style, start by that.
28065    new_path=`cmd //c echo $path`
28066  fi
28067
28068
28069  input_path="$new_path"
28070  # Check if we need to convert this using DOS-style short mode. If the path
28071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28072  # take no chances and rewrite it.
28073  # Note: m4 eats our [], so we need to use [ and ] instead.
28074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28075  if test "x$has_forbidden_chars" != x; then
28076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28078  fi
28079
28080
28081  windows_path="$new_path"
28082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28083    unix_path=`$CYGPATH -u "$windows_path"`
28084    new_path="$unix_path"
28085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28087    new_path="$unix_path"
28088  fi
28089
28090  if test "x$path" != "x$new_path"; then
28091    BOOT_JDK="$new_path"
28092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28093$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28094  fi
28095
28096  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28097  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28098
28099    else
28100      # We're on a unix platform. Hooray! :)
28101      path="$BOOT_JDK"
28102      has_space=`$ECHO "$path" | $GREP " "`
28103      if test "x$has_space" != x; then
28104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28105$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28106        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28107      fi
28108
28109      # Use eval to expand a potential ~
28110      eval path="$path"
28111      if test ! -f "$path" && test ! -d "$path"; then
28112        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28113      fi
28114
28115      if test -d "$path"; then
28116        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28117      else
28118        dir="`$DIRNAME "$path"`"
28119        base="`$BASENAME "$path"`"
28120        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28121      fi
28122    fi
28123  fi
28124
28125            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28126$as_echo_n "checking for Boot JDK... " >&6; }
28127            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28128$as_echo "$BOOT_JDK" >&6; }
28129            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28130$as_echo_n "checking Boot JDK version... " >&6; }
28131            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28132            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28133$as_echo "$BOOT_JDK_VERSION" >&6; }
28134          fi # end check jdk version
28135        fi # end check javac
28136      fi # end check java
28137    fi # end check boot jdk found
28138  fi
28139
28140
28141  if test "x$BOOT_JDK_FOUND" = xno; then
28142    # Now execute the test
28143
28144  if test "x$PROGRAMFILES" != x; then
28145    VIRTUAL_DIR="$PROGRAMFILES/Java"
28146
28147  windows_path="$VIRTUAL_DIR"
28148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28149    unix_path=`$CYGPATH -u "$windows_path"`
28150    VIRTUAL_DIR="$unix_path"
28151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28153    VIRTUAL_DIR="$unix_path"
28154  fi
28155
28156
28157  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28158  BOOT_JDK_SUFFIX=""
28159  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28160  if test "x$ALL_JDKS_FOUND" != x; then
28161    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28162
28163  if test "x$BOOT_JDK_FOUND" = xno; then
28164    # Now execute the test
28165
28166        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28167        if test -d "$BOOT_JDK"; then
28168          BOOT_JDK_FOUND=maybe
28169          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28170$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28171        fi
28172
28173
28174    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28175    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28176      # Do we have a bin/java?
28177      if test ! -x "$BOOT_JDK/bin/java"; then
28178        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28180        BOOT_JDK_FOUND=no
28181      else
28182        # Do we have a bin/javac?
28183        if test ! -x "$BOOT_JDK/bin/javac"; then
28184          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28186          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28187$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28188          BOOT_JDK_FOUND=no
28189        else
28190          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28191          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28192
28193          # Extra M4 quote needed to protect [] in grep expression.
28194          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28195          if test "x$FOUND_CORRECT_VERSION" = x; then
28196            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28198            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28199$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28200            BOOT_JDK_FOUND=no
28201          else
28202            # We're done! :-)
28203            BOOT_JDK_FOUND=yes
28204
28205  # Only process if variable expands to non-empty
28206
28207  if test "x$BOOT_JDK" != x; then
28208    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28209
28210  # Input might be given as Windows format, start by converting to
28211  # unix format.
28212  path="$BOOT_JDK"
28213  new_path=`$CYGPATH -u "$path"`
28214
28215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28218  # "foo.exe" is OK but "foo" is an error.
28219  #
28220  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28221  # It is also a way to make sure we got the proper file name for the real test later on.
28222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28223  if test "x$test_shortpath" = x; then
28224    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28226    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28227  fi
28228
28229  # Call helper function which possibly converts this using DOS-style short mode.
28230  # If so, the updated path is stored in $new_path.
28231
28232  input_path="$new_path"
28233  # Check if we need to convert this using DOS-style short mode. If the path
28234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28235  # take no chances and rewrite it.
28236  # Note: m4 eats our [], so we need to use [ and ] instead.
28237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28238  if test "x$has_forbidden_chars" != x; then
28239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28243      # Going to short mode and back again did indeed matter. Since short mode is
28244      # case insensitive, let's make it lowercase to improve readability.
28245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28246      # Now convert it back to Unix-style (cygpath)
28247      input_path=`$CYGPATH -u "$shortmode_path"`
28248      new_path="$input_path"
28249    fi
28250  fi
28251
28252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28253  if test "x$test_cygdrive_prefix" = x; then
28254    # As a simple fix, exclude /usr/bin since it's not a real path.
28255    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28257      # a path prefixed by /cygdrive for fixpath to work.
28258      new_path="$CYGWIN_ROOT_PATH$input_path"
28259    fi
28260  fi
28261
28262
28263  if test "x$path" != "x$new_path"; then
28264    BOOT_JDK="$new_path"
28265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28267  fi
28268
28269    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28270
28271  path="$BOOT_JDK"
28272  has_colon=`$ECHO $path | $GREP ^.:`
28273  new_path="$path"
28274  if test "x$has_colon" = x; then
28275    # Not in mixed or Windows style, start by that.
28276    new_path=`cmd //c echo $path`
28277  fi
28278
28279
28280  input_path="$new_path"
28281  # Check if we need to convert this using DOS-style short mode. If the path
28282  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28283  # take no chances and rewrite it.
28284  # Note: m4 eats our [], so we need to use [ and ] instead.
28285  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28286  if test "x$has_forbidden_chars" != x; then
28287    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28288    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28289  fi
28290
28291
28292  windows_path="$new_path"
28293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28294    unix_path=`$CYGPATH -u "$windows_path"`
28295    new_path="$unix_path"
28296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28298    new_path="$unix_path"
28299  fi
28300
28301  if test "x$path" != "x$new_path"; then
28302    BOOT_JDK="$new_path"
28303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28304$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28305  fi
28306
28307  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28308  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28309
28310    else
28311      # We're on a unix platform. Hooray! :)
28312      path="$BOOT_JDK"
28313      has_space=`$ECHO "$path" | $GREP " "`
28314      if test "x$has_space" != x; then
28315        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28317        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28318      fi
28319
28320      # Use eval to expand a potential ~
28321      eval path="$path"
28322      if test ! -f "$path" && test ! -d "$path"; then
28323        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28324      fi
28325
28326      if test -d "$path"; then
28327        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28328      else
28329        dir="`$DIRNAME "$path"`"
28330        base="`$BASENAME "$path"`"
28331        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28332      fi
28333    fi
28334  fi
28335
28336            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28337$as_echo_n "checking for Boot JDK... " >&6; }
28338            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28339$as_echo "$BOOT_JDK" >&6; }
28340            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28341$as_echo_n "checking Boot JDK version... " >&6; }
28342            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28344$as_echo "$BOOT_JDK_VERSION" >&6; }
28345          fi # end check jdk version
28346        fi # end check javac
28347      fi # end check java
28348    fi # end check boot jdk found
28349  fi
28350
28351    done
28352  fi
28353
28354  fi
28355
28356
28357    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28358    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28359      # Do we have a bin/java?
28360      if test ! -x "$BOOT_JDK/bin/java"; then
28361        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28362$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28363        BOOT_JDK_FOUND=no
28364      else
28365        # Do we have a bin/javac?
28366        if test ! -x "$BOOT_JDK/bin/javac"; then
28367          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28369          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28370$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28371          BOOT_JDK_FOUND=no
28372        else
28373          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28374          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28375
28376          # Extra M4 quote needed to protect [] in grep expression.
28377          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28378          if test "x$FOUND_CORRECT_VERSION" = x; then
28379            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28381            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28382$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28383            BOOT_JDK_FOUND=no
28384          else
28385            # We're done! :-)
28386            BOOT_JDK_FOUND=yes
28387
28388  # Only process if variable expands to non-empty
28389
28390  if test "x$BOOT_JDK" != x; then
28391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28392
28393  # Input might be given as Windows format, start by converting to
28394  # unix format.
28395  path="$BOOT_JDK"
28396  new_path=`$CYGPATH -u "$path"`
28397
28398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28401  # "foo.exe" is OK but "foo" is an error.
28402  #
28403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28404  # It is also a way to make sure we got the proper file name for the real test later on.
28405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28406  if test "x$test_shortpath" = x; then
28407    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28408$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28409    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28410  fi
28411
28412  # Call helper function which possibly converts this using DOS-style short mode.
28413  # If so, the updated path is stored in $new_path.
28414
28415  input_path="$new_path"
28416  # Check if we need to convert this using DOS-style short mode. If the path
28417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28418  # take no chances and rewrite it.
28419  # Note: m4 eats our [], so we need to use [ and ] instead.
28420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28421  if test "x$has_forbidden_chars" != x; then
28422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28426      # Going to short mode and back again did indeed matter. Since short mode is
28427      # case insensitive, let's make it lowercase to improve readability.
28428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28429      # Now convert it back to Unix-style (cygpath)
28430      input_path=`$CYGPATH -u "$shortmode_path"`
28431      new_path="$input_path"
28432    fi
28433  fi
28434
28435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28436  if test "x$test_cygdrive_prefix" = x; then
28437    # As a simple fix, exclude /usr/bin since it's not a real path.
28438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28440      # a path prefixed by /cygdrive for fixpath to work.
28441      new_path="$CYGWIN_ROOT_PATH$input_path"
28442    fi
28443  fi
28444
28445
28446  if test "x$path" != "x$new_path"; then
28447    BOOT_JDK="$new_path"
28448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28450  fi
28451
28452    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28453
28454  path="$BOOT_JDK"
28455  has_colon=`$ECHO $path | $GREP ^.:`
28456  new_path="$path"
28457  if test "x$has_colon" = x; then
28458    # Not in mixed or Windows style, start by that.
28459    new_path=`cmd //c echo $path`
28460  fi
28461
28462
28463  input_path="$new_path"
28464  # Check if we need to convert this using DOS-style short mode. If the path
28465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28466  # take no chances and rewrite it.
28467  # Note: m4 eats our [], so we need to use [ and ] instead.
28468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28469  if test "x$has_forbidden_chars" != x; then
28470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28472  fi
28473
28474
28475  windows_path="$new_path"
28476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28477    unix_path=`$CYGPATH -u "$windows_path"`
28478    new_path="$unix_path"
28479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28481    new_path="$unix_path"
28482  fi
28483
28484  if test "x$path" != "x$new_path"; then
28485    BOOT_JDK="$new_path"
28486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28487$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28488  fi
28489
28490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28492
28493    else
28494      # We're on a unix platform. Hooray! :)
28495      path="$BOOT_JDK"
28496      has_space=`$ECHO "$path" | $GREP " "`
28497      if test "x$has_space" != x; then
28498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28499$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28500        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28501      fi
28502
28503      # Use eval to expand a potential ~
28504      eval path="$path"
28505      if test ! -f "$path" && test ! -d "$path"; then
28506        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28507      fi
28508
28509      if test -d "$path"; then
28510        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28511      else
28512        dir="`$DIRNAME "$path"`"
28513        base="`$BASENAME "$path"`"
28514        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28515      fi
28516    fi
28517  fi
28518
28519            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28520$as_echo_n "checking for Boot JDK... " >&6; }
28521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28522$as_echo "$BOOT_JDK" >&6; }
28523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28524$as_echo_n "checking Boot JDK version... " >&6; }
28525            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28527$as_echo "$BOOT_JDK_VERSION" >&6; }
28528          fi # end check jdk version
28529        fi # end check javac
28530      fi # end check java
28531    fi # end check boot jdk found
28532  fi
28533
28534
28535  if test "x$BOOT_JDK_FOUND" = xno; then
28536    # Now execute the test
28537
28538  if test "x$ProgramFiles" != x; then
28539    VIRTUAL_DIR="$ProgramFiles/Java"
28540
28541  windows_path="$VIRTUAL_DIR"
28542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28543    unix_path=`$CYGPATH -u "$windows_path"`
28544    VIRTUAL_DIR="$unix_path"
28545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28547    VIRTUAL_DIR="$unix_path"
28548  fi
28549
28550
28551  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28552  BOOT_JDK_SUFFIX=""
28553  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28554  if test "x$ALL_JDKS_FOUND" != x; then
28555    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28556
28557  if test "x$BOOT_JDK_FOUND" = xno; then
28558    # Now execute the test
28559
28560        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28561        if test -d "$BOOT_JDK"; then
28562          BOOT_JDK_FOUND=maybe
28563          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28564$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28565        fi
28566
28567
28568    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28569    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28570      # Do we have a bin/java?
28571      if test ! -x "$BOOT_JDK/bin/java"; then
28572        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28574        BOOT_JDK_FOUND=no
28575      else
28576        # Do we have a bin/javac?
28577        if test ! -x "$BOOT_JDK/bin/javac"; then
28578          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28580          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28581$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28582          BOOT_JDK_FOUND=no
28583        else
28584          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28585          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28586
28587          # Extra M4 quote needed to protect [] in grep expression.
28588          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28589          if test "x$FOUND_CORRECT_VERSION" = x; then
28590            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28592            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28593$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28594            BOOT_JDK_FOUND=no
28595          else
28596            # We're done! :-)
28597            BOOT_JDK_FOUND=yes
28598
28599  # Only process if variable expands to non-empty
28600
28601  if test "x$BOOT_JDK" != x; then
28602    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28603
28604  # Input might be given as Windows format, start by converting to
28605  # unix format.
28606  path="$BOOT_JDK"
28607  new_path=`$CYGPATH -u "$path"`
28608
28609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28612  # "foo.exe" is OK but "foo" is an error.
28613  #
28614  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28615  # It is also a way to make sure we got the proper file name for the real test later on.
28616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28617  if test "x$test_shortpath" = x; then
28618    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28619$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28620    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28621  fi
28622
28623  # Call helper function which possibly converts this using DOS-style short mode.
28624  # If so, the updated path is stored in $new_path.
28625
28626  input_path="$new_path"
28627  # Check if we need to convert this using DOS-style short mode. If the path
28628  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28629  # take no chances and rewrite it.
28630  # Note: m4 eats our [], so we need to use [ and ] instead.
28631  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28632  if test "x$has_forbidden_chars" != x; then
28633    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28634    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28635    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28636    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28637      # Going to short mode and back again did indeed matter. Since short mode is
28638      # case insensitive, let's make it lowercase to improve readability.
28639      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28640      # Now convert it back to Unix-style (cygpath)
28641      input_path=`$CYGPATH -u "$shortmode_path"`
28642      new_path="$input_path"
28643    fi
28644  fi
28645
28646  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28647  if test "x$test_cygdrive_prefix" = x; then
28648    # As a simple fix, exclude /usr/bin since it's not a real path.
28649    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28650      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28651      # a path prefixed by /cygdrive for fixpath to work.
28652      new_path="$CYGWIN_ROOT_PATH$input_path"
28653    fi
28654  fi
28655
28656
28657  if test "x$path" != "x$new_path"; then
28658    BOOT_JDK="$new_path"
28659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28660$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28661  fi
28662
28663    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28664
28665  path="$BOOT_JDK"
28666  has_colon=`$ECHO $path | $GREP ^.:`
28667  new_path="$path"
28668  if test "x$has_colon" = x; then
28669    # Not in mixed or Windows style, start by that.
28670    new_path=`cmd //c echo $path`
28671  fi
28672
28673
28674  input_path="$new_path"
28675  # Check if we need to convert this using DOS-style short mode. If the path
28676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28677  # take no chances and rewrite it.
28678  # Note: m4 eats our [], so we need to use [ and ] instead.
28679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28680  if test "x$has_forbidden_chars" != x; then
28681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28683  fi
28684
28685
28686  windows_path="$new_path"
28687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28688    unix_path=`$CYGPATH -u "$windows_path"`
28689    new_path="$unix_path"
28690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28692    new_path="$unix_path"
28693  fi
28694
28695  if test "x$path" != "x$new_path"; then
28696    BOOT_JDK="$new_path"
28697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28698$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28699  fi
28700
28701  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28702  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28703
28704    else
28705      # We're on a unix platform. Hooray! :)
28706      path="$BOOT_JDK"
28707      has_space=`$ECHO "$path" | $GREP " "`
28708      if test "x$has_space" != x; then
28709        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28710$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28711        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28712      fi
28713
28714      # Use eval to expand a potential ~
28715      eval path="$path"
28716      if test ! -f "$path" && test ! -d "$path"; then
28717        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28718      fi
28719
28720      if test -d "$path"; then
28721        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28722      else
28723        dir="`$DIRNAME "$path"`"
28724        base="`$BASENAME "$path"`"
28725        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28726      fi
28727    fi
28728  fi
28729
28730            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28731$as_echo_n "checking for Boot JDK... " >&6; }
28732            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28733$as_echo "$BOOT_JDK" >&6; }
28734            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28735$as_echo_n "checking Boot JDK version... " >&6; }
28736            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28737            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28738$as_echo "$BOOT_JDK_VERSION" >&6; }
28739          fi # end check jdk version
28740        fi # end check javac
28741      fi # end check java
28742    fi # end check boot jdk found
28743  fi
28744
28745    done
28746  fi
28747
28748  fi
28749
28750
28751    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28752    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28753      # Do we have a bin/java?
28754      if test ! -x "$BOOT_JDK/bin/java"; then
28755        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28757        BOOT_JDK_FOUND=no
28758      else
28759        # Do we have a bin/javac?
28760        if test ! -x "$BOOT_JDK/bin/javac"; then
28761          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28763          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28764$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28765          BOOT_JDK_FOUND=no
28766        else
28767          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28768          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28769
28770          # Extra M4 quote needed to protect [] in grep expression.
28771          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28772          if test "x$FOUND_CORRECT_VERSION" = x; then
28773            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28775            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28776$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28777            BOOT_JDK_FOUND=no
28778          else
28779            # We're done! :-)
28780            BOOT_JDK_FOUND=yes
28781
28782  # Only process if variable expands to non-empty
28783
28784  if test "x$BOOT_JDK" != x; then
28785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28786
28787  # Input might be given as Windows format, start by converting to
28788  # unix format.
28789  path="$BOOT_JDK"
28790  new_path=`$CYGPATH -u "$path"`
28791
28792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28795  # "foo.exe" is OK but "foo" is an error.
28796  #
28797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28798  # It is also a way to make sure we got the proper file name for the real test later on.
28799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28800  if test "x$test_shortpath" = x; then
28801    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28802$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28803    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28804  fi
28805
28806  # Call helper function which possibly converts this using DOS-style short mode.
28807  # If so, the updated path is stored in $new_path.
28808
28809  input_path="$new_path"
28810  # Check if we need to convert this using DOS-style short mode. If the path
28811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28812  # take no chances and rewrite it.
28813  # Note: m4 eats our [], so we need to use [ and ] instead.
28814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28815  if test "x$has_forbidden_chars" != x; then
28816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28820      # Going to short mode and back again did indeed matter. Since short mode is
28821      # case insensitive, let's make it lowercase to improve readability.
28822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28823      # Now convert it back to Unix-style (cygpath)
28824      input_path=`$CYGPATH -u "$shortmode_path"`
28825      new_path="$input_path"
28826    fi
28827  fi
28828
28829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28830  if test "x$test_cygdrive_prefix" = x; then
28831    # As a simple fix, exclude /usr/bin since it's not a real path.
28832    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28834      # a path prefixed by /cygdrive for fixpath to work.
28835      new_path="$CYGWIN_ROOT_PATH$input_path"
28836    fi
28837  fi
28838
28839
28840  if test "x$path" != "x$new_path"; then
28841    BOOT_JDK="$new_path"
28842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28843$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28844  fi
28845
28846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28847
28848  path="$BOOT_JDK"
28849  has_colon=`$ECHO $path | $GREP ^.:`
28850  new_path="$path"
28851  if test "x$has_colon" = x; then
28852    # Not in mixed or Windows style, start by that.
28853    new_path=`cmd //c echo $path`
28854  fi
28855
28856
28857  input_path="$new_path"
28858  # Check if we need to convert this using DOS-style short mode. If the path
28859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28860  # take no chances and rewrite it.
28861  # Note: m4 eats our [], so we need to use [ and ] instead.
28862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28863  if test "x$has_forbidden_chars" != x; then
28864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28866  fi
28867
28868
28869  windows_path="$new_path"
28870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28871    unix_path=`$CYGPATH -u "$windows_path"`
28872    new_path="$unix_path"
28873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28875    new_path="$unix_path"
28876  fi
28877
28878  if test "x$path" != "x$new_path"; then
28879    BOOT_JDK="$new_path"
28880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28882  fi
28883
28884  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28885  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28886
28887    else
28888      # We're on a unix platform. Hooray! :)
28889      path="$BOOT_JDK"
28890      has_space=`$ECHO "$path" | $GREP " "`
28891      if test "x$has_space" != x; then
28892        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28893$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28894        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28895      fi
28896
28897      # Use eval to expand a potential ~
28898      eval path="$path"
28899      if test ! -f "$path" && test ! -d "$path"; then
28900        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28901      fi
28902
28903      if test -d "$path"; then
28904        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28905      else
28906        dir="`$DIRNAME "$path"`"
28907        base="`$BASENAME "$path"`"
28908        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28909      fi
28910    fi
28911  fi
28912
28913            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28914$as_echo_n "checking for Boot JDK... " >&6; }
28915            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28916$as_echo "$BOOT_JDK" >&6; }
28917            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28918$as_echo_n "checking Boot JDK version... " >&6; }
28919            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28920            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28921$as_echo "$BOOT_JDK_VERSION" >&6; }
28922          fi # end check jdk version
28923        fi # end check javac
28924      fi # end check java
28925    fi # end check boot jdk found
28926  fi
28927
28928
28929  if test "x$BOOT_JDK_FOUND" = xno; then
28930    # Now execute the test
28931
28932  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28933  BOOT_JDK_SUFFIX=""
28934  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28935  if test "x$ALL_JDKS_FOUND" != x; then
28936    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28937
28938  if test "x$BOOT_JDK_FOUND" = xno; then
28939    # Now execute the test
28940
28941        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28942        if test -d "$BOOT_JDK"; then
28943          BOOT_JDK_FOUND=maybe
28944          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28945$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28946        fi
28947
28948
28949    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28950    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28951      # Do we have a bin/java?
28952      if test ! -x "$BOOT_JDK/bin/java"; then
28953        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28954$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28955        BOOT_JDK_FOUND=no
28956      else
28957        # Do we have a bin/javac?
28958        if test ! -x "$BOOT_JDK/bin/javac"; then
28959          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28961          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28962$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28963          BOOT_JDK_FOUND=no
28964        else
28965          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28966          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28967
28968          # Extra M4 quote needed to protect [] in grep expression.
28969          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28970          if test "x$FOUND_CORRECT_VERSION" = x; then
28971            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28973            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28974$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28975            BOOT_JDK_FOUND=no
28976          else
28977            # We're done! :-)
28978            BOOT_JDK_FOUND=yes
28979
28980  # Only process if variable expands to non-empty
28981
28982  if test "x$BOOT_JDK" != x; then
28983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28984
28985  # Input might be given as Windows format, start by converting to
28986  # unix format.
28987  path="$BOOT_JDK"
28988  new_path=`$CYGPATH -u "$path"`
28989
28990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28993  # "foo.exe" is OK but "foo" is an error.
28994  #
28995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28996  # It is also a way to make sure we got the proper file name for the real test later on.
28997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28998  if test "x$test_shortpath" = x; then
28999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29001    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29002  fi
29003
29004  # Call helper function which possibly converts this using DOS-style short mode.
29005  # If so, the updated path is stored in $new_path.
29006
29007  input_path="$new_path"
29008  # Check if we need to convert this using DOS-style short mode. If the path
29009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29010  # take no chances and rewrite it.
29011  # Note: m4 eats our [], so we need to use [ and ] instead.
29012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29013  if test "x$has_forbidden_chars" != x; then
29014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29018      # Going to short mode and back again did indeed matter. Since short mode is
29019      # case insensitive, let's make it lowercase to improve readability.
29020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29021      # Now convert it back to Unix-style (cygpath)
29022      input_path=`$CYGPATH -u "$shortmode_path"`
29023      new_path="$input_path"
29024    fi
29025  fi
29026
29027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29028  if test "x$test_cygdrive_prefix" = x; then
29029    # As a simple fix, exclude /usr/bin since it's not a real path.
29030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29032      # a path prefixed by /cygdrive for fixpath to work.
29033      new_path="$CYGWIN_ROOT_PATH$input_path"
29034    fi
29035  fi
29036
29037
29038  if test "x$path" != "x$new_path"; then
29039    BOOT_JDK="$new_path"
29040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29041$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29042  fi
29043
29044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29045
29046  path="$BOOT_JDK"
29047  has_colon=`$ECHO $path | $GREP ^.:`
29048  new_path="$path"
29049  if test "x$has_colon" = x; then
29050    # Not in mixed or Windows style, start by that.
29051    new_path=`cmd //c echo $path`
29052  fi
29053
29054
29055  input_path="$new_path"
29056  # Check if we need to convert this using DOS-style short mode. If the path
29057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29058  # take no chances and rewrite it.
29059  # Note: m4 eats our [], so we need to use [ and ] instead.
29060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29061  if test "x$has_forbidden_chars" != x; then
29062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29064  fi
29065
29066
29067  windows_path="$new_path"
29068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29069    unix_path=`$CYGPATH -u "$windows_path"`
29070    new_path="$unix_path"
29071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29073    new_path="$unix_path"
29074  fi
29075
29076  if test "x$path" != "x$new_path"; then
29077    BOOT_JDK="$new_path"
29078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29080  fi
29081
29082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29084
29085    else
29086      # We're on a unix platform. Hooray! :)
29087      path="$BOOT_JDK"
29088      has_space=`$ECHO "$path" | $GREP " "`
29089      if test "x$has_space" != x; then
29090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29091$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29093      fi
29094
29095      # Use eval to expand a potential ~
29096      eval path="$path"
29097      if test ! -f "$path" && test ! -d "$path"; then
29098        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29099      fi
29100
29101      if test -d "$path"; then
29102        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29103      else
29104        dir="`$DIRNAME "$path"`"
29105        base="`$BASENAME "$path"`"
29106        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29107      fi
29108    fi
29109  fi
29110
29111            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29112$as_echo_n "checking for Boot JDK... " >&6; }
29113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29114$as_echo "$BOOT_JDK" >&6; }
29115            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29116$as_echo_n "checking Boot JDK version... " >&6; }
29117            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29119$as_echo "$BOOT_JDK_VERSION" >&6; }
29120          fi # end check jdk version
29121        fi # end check javac
29122      fi # end check java
29123    fi # end check boot jdk found
29124  fi
29125
29126    done
29127  fi
29128
29129
29130    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29131    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29132      # Do we have a bin/java?
29133      if test ! -x "$BOOT_JDK/bin/java"; then
29134        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29135$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29136        BOOT_JDK_FOUND=no
29137      else
29138        # Do we have a bin/javac?
29139        if test ! -x "$BOOT_JDK/bin/javac"; then
29140          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29142          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29143$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29144          BOOT_JDK_FOUND=no
29145        else
29146          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29147          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29148
29149          # Extra M4 quote needed to protect [] in grep expression.
29150          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29151          if test "x$FOUND_CORRECT_VERSION" = x; then
29152            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29154            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29155$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29156            BOOT_JDK_FOUND=no
29157          else
29158            # We're done! :-)
29159            BOOT_JDK_FOUND=yes
29160
29161  # Only process if variable expands to non-empty
29162
29163  if test "x$BOOT_JDK" != x; then
29164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29165
29166  # Input might be given as Windows format, start by converting to
29167  # unix format.
29168  path="$BOOT_JDK"
29169  new_path=`$CYGPATH -u "$path"`
29170
29171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29174  # "foo.exe" is OK but "foo" is an error.
29175  #
29176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29177  # It is also a way to make sure we got the proper file name for the real test later on.
29178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29179  if test "x$test_shortpath" = x; then
29180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29182    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29183  fi
29184
29185  # Call helper function which possibly converts this using DOS-style short mode.
29186  # If so, the updated path is stored in $new_path.
29187
29188  input_path="$new_path"
29189  # Check if we need to convert this using DOS-style short mode. If the path
29190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29191  # take no chances and rewrite it.
29192  # Note: m4 eats our [], so we need to use [ and ] instead.
29193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29194  if test "x$has_forbidden_chars" != x; then
29195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29199      # Going to short mode and back again did indeed matter. Since short mode is
29200      # case insensitive, let's make it lowercase to improve readability.
29201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29202      # Now convert it back to Unix-style (cygpath)
29203      input_path=`$CYGPATH -u "$shortmode_path"`
29204      new_path="$input_path"
29205    fi
29206  fi
29207
29208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29209  if test "x$test_cygdrive_prefix" = x; then
29210    # As a simple fix, exclude /usr/bin since it's not a real path.
29211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29213      # a path prefixed by /cygdrive for fixpath to work.
29214      new_path="$CYGWIN_ROOT_PATH$input_path"
29215    fi
29216  fi
29217
29218
29219  if test "x$path" != "x$new_path"; then
29220    BOOT_JDK="$new_path"
29221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29223  fi
29224
29225    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29226
29227  path="$BOOT_JDK"
29228  has_colon=`$ECHO $path | $GREP ^.:`
29229  new_path="$path"
29230  if test "x$has_colon" = x; then
29231    # Not in mixed or Windows style, start by that.
29232    new_path=`cmd //c echo $path`
29233  fi
29234
29235
29236  input_path="$new_path"
29237  # Check if we need to convert this using DOS-style short mode. If the path
29238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29239  # take no chances and rewrite it.
29240  # Note: m4 eats our [], so we need to use [ and ] instead.
29241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29242  if test "x$has_forbidden_chars" != x; then
29243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29245  fi
29246
29247
29248  windows_path="$new_path"
29249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29250    unix_path=`$CYGPATH -u "$windows_path"`
29251    new_path="$unix_path"
29252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29254    new_path="$unix_path"
29255  fi
29256
29257  if test "x$path" != "x$new_path"; then
29258    BOOT_JDK="$new_path"
29259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29261  fi
29262
29263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29265
29266    else
29267      # We're on a unix platform. Hooray! :)
29268      path="$BOOT_JDK"
29269      has_space=`$ECHO "$path" | $GREP " "`
29270      if test "x$has_space" != x; then
29271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29272$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29273        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29274      fi
29275
29276      # Use eval to expand a potential ~
29277      eval path="$path"
29278      if test ! -f "$path" && test ! -d "$path"; then
29279        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29280      fi
29281
29282      if test -d "$path"; then
29283        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29284      else
29285        dir="`$DIRNAME "$path"`"
29286        base="`$BASENAME "$path"`"
29287        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29288      fi
29289    fi
29290  fi
29291
29292            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29293$as_echo_n "checking for Boot JDK... " >&6; }
29294            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29295$as_echo "$BOOT_JDK" >&6; }
29296            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29297$as_echo_n "checking Boot JDK version... " >&6; }
29298            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29300$as_echo "$BOOT_JDK_VERSION" >&6; }
29301          fi # end check jdk version
29302        fi # end check javac
29303      fi # end check java
29304    fi # end check boot jdk found
29305  fi
29306
29307  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29308
29309  if test "x$BOOT_JDK_FOUND" = xno; then
29310    # Now execute the test
29311
29312  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29313  BOOT_JDK_SUFFIX="/Contents/Home"
29314  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29315  if test "x$ALL_JDKS_FOUND" != x; then
29316    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29317
29318  if test "x$BOOT_JDK_FOUND" = xno; then
29319    # Now execute the test
29320
29321        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29322        if test -d "$BOOT_JDK"; then
29323          BOOT_JDK_FOUND=maybe
29324          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29325$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29326        fi
29327
29328
29329    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29330    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29331      # Do we have a bin/java?
29332      if test ! -x "$BOOT_JDK/bin/java"; then
29333        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29334$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29335        BOOT_JDK_FOUND=no
29336      else
29337        # Do we have a bin/javac?
29338        if test ! -x "$BOOT_JDK/bin/javac"; then
29339          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29341          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29342$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29343          BOOT_JDK_FOUND=no
29344        else
29345          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29346          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29347
29348          # Extra M4 quote needed to protect [] in grep expression.
29349          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29350          if test "x$FOUND_CORRECT_VERSION" = x; then
29351            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29353            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29354$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29355            BOOT_JDK_FOUND=no
29356          else
29357            # We're done! :-)
29358            BOOT_JDK_FOUND=yes
29359
29360  # Only process if variable expands to non-empty
29361
29362  if test "x$BOOT_JDK" != x; then
29363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29364
29365  # Input might be given as Windows format, start by converting to
29366  # unix format.
29367  path="$BOOT_JDK"
29368  new_path=`$CYGPATH -u "$path"`
29369
29370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29373  # "foo.exe" is OK but "foo" is an error.
29374  #
29375  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29376  # It is also a way to make sure we got the proper file name for the real test later on.
29377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29378  if test "x$test_shortpath" = x; then
29379    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29380$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29381    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29382  fi
29383
29384  # Call helper function which possibly converts this using DOS-style short mode.
29385  # If so, the updated path is stored in $new_path.
29386
29387  input_path="$new_path"
29388  # Check if we need to convert this using DOS-style short mode. If the path
29389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29390  # take no chances and rewrite it.
29391  # Note: m4 eats our [], so we need to use [ and ] instead.
29392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29393  if test "x$has_forbidden_chars" != x; then
29394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29398      # Going to short mode and back again did indeed matter. Since short mode is
29399      # case insensitive, let's make it lowercase to improve readability.
29400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29401      # Now convert it back to Unix-style (cygpath)
29402      input_path=`$CYGPATH -u "$shortmode_path"`
29403      new_path="$input_path"
29404    fi
29405  fi
29406
29407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29408  if test "x$test_cygdrive_prefix" = x; then
29409    # As a simple fix, exclude /usr/bin since it's not a real path.
29410    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29412      # a path prefixed by /cygdrive for fixpath to work.
29413      new_path="$CYGWIN_ROOT_PATH$input_path"
29414    fi
29415  fi
29416
29417
29418  if test "x$path" != "x$new_path"; then
29419    BOOT_JDK="$new_path"
29420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29421$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29422  fi
29423
29424    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29425
29426  path="$BOOT_JDK"
29427  has_colon=`$ECHO $path | $GREP ^.:`
29428  new_path="$path"
29429  if test "x$has_colon" = x; then
29430    # Not in mixed or Windows style, start by that.
29431    new_path=`cmd //c echo $path`
29432  fi
29433
29434
29435  input_path="$new_path"
29436  # Check if we need to convert this using DOS-style short mode. If the path
29437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29438  # take no chances and rewrite it.
29439  # Note: m4 eats our [], so we need to use [ and ] instead.
29440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29441  if test "x$has_forbidden_chars" != x; then
29442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29444  fi
29445
29446
29447  windows_path="$new_path"
29448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29449    unix_path=`$CYGPATH -u "$windows_path"`
29450    new_path="$unix_path"
29451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29453    new_path="$unix_path"
29454  fi
29455
29456  if test "x$path" != "x$new_path"; then
29457    BOOT_JDK="$new_path"
29458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29459$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29460  fi
29461
29462  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29463  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29464
29465    else
29466      # We're on a unix platform. Hooray! :)
29467      path="$BOOT_JDK"
29468      has_space=`$ECHO "$path" | $GREP " "`
29469      if test "x$has_space" != x; then
29470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29471$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29472        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29473      fi
29474
29475      # Use eval to expand a potential ~
29476      eval path="$path"
29477      if test ! -f "$path" && test ! -d "$path"; then
29478        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29479      fi
29480
29481      if test -d "$path"; then
29482        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29483      else
29484        dir="`$DIRNAME "$path"`"
29485        base="`$BASENAME "$path"`"
29486        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29487      fi
29488    fi
29489  fi
29490
29491            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29492$as_echo_n "checking for Boot JDK... " >&6; }
29493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29494$as_echo "$BOOT_JDK" >&6; }
29495            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29496$as_echo_n "checking Boot JDK version... " >&6; }
29497            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29498            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29499$as_echo "$BOOT_JDK_VERSION" >&6; }
29500          fi # end check jdk version
29501        fi # end check javac
29502      fi # end check java
29503    fi # end check boot jdk found
29504  fi
29505
29506    done
29507  fi
29508
29509
29510    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29511    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29512      # Do we have a bin/java?
29513      if test ! -x "$BOOT_JDK/bin/java"; then
29514        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29516        BOOT_JDK_FOUND=no
29517      else
29518        # Do we have a bin/javac?
29519        if test ! -x "$BOOT_JDK/bin/javac"; then
29520          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29522          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29523$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29524          BOOT_JDK_FOUND=no
29525        else
29526          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29527          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29528
29529          # Extra M4 quote needed to protect [] in grep expression.
29530          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29531          if test "x$FOUND_CORRECT_VERSION" = x; then
29532            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29534            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29535$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29536            BOOT_JDK_FOUND=no
29537          else
29538            # We're done! :-)
29539            BOOT_JDK_FOUND=yes
29540
29541  # Only process if variable expands to non-empty
29542
29543  if test "x$BOOT_JDK" != x; then
29544    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29545
29546  # Input might be given as Windows format, start by converting to
29547  # unix format.
29548  path="$BOOT_JDK"
29549  new_path=`$CYGPATH -u "$path"`
29550
29551  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29552  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29553  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29554  # "foo.exe" is OK but "foo" is an error.
29555  #
29556  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29557  # It is also a way to make sure we got the proper file name for the real test later on.
29558  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29559  if test "x$test_shortpath" = x; then
29560    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29561$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29562    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29563  fi
29564
29565  # Call helper function which possibly converts this using DOS-style short mode.
29566  # If so, the updated path is stored in $new_path.
29567
29568  input_path="$new_path"
29569  # Check if we need to convert this using DOS-style short mode. If the path
29570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29571  # take no chances and rewrite it.
29572  # Note: m4 eats our [], so we need to use [ and ] instead.
29573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29574  if test "x$has_forbidden_chars" != x; then
29575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29576    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29577    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29578    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29579      # Going to short mode and back again did indeed matter. Since short mode is
29580      # case insensitive, let's make it lowercase to improve readability.
29581      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29582      # Now convert it back to Unix-style (cygpath)
29583      input_path=`$CYGPATH -u "$shortmode_path"`
29584      new_path="$input_path"
29585    fi
29586  fi
29587
29588  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29589  if test "x$test_cygdrive_prefix" = x; then
29590    # As a simple fix, exclude /usr/bin since it's not a real path.
29591    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29592      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29593      # a path prefixed by /cygdrive for fixpath to work.
29594      new_path="$CYGWIN_ROOT_PATH$input_path"
29595    fi
29596  fi
29597
29598
29599  if test "x$path" != "x$new_path"; then
29600    BOOT_JDK="$new_path"
29601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29603  fi
29604
29605    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29606
29607  path="$BOOT_JDK"
29608  has_colon=`$ECHO $path | $GREP ^.:`
29609  new_path="$path"
29610  if test "x$has_colon" = x; then
29611    # Not in mixed or Windows style, start by that.
29612    new_path=`cmd //c echo $path`
29613  fi
29614
29615
29616  input_path="$new_path"
29617  # Check if we need to convert this using DOS-style short mode. If the path
29618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29619  # take no chances and rewrite it.
29620  # Note: m4 eats our [], so we need to use [ and ] instead.
29621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29622  if test "x$has_forbidden_chars" != x; then
29623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29625  fi
29626
29627
29628  windows_path="$new_path"
29629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29630    unix_path=`$CYGPATH -u "$windows_path"`
29631    new_path="$unix_path"
29632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29634    new_path="$unix_path"
29635  fi
29636
29637  if test "x$path" != "x$new_path"; then
29638    BOOT_JDK="$new_path"
29639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29640$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29641  fi
29642
29643  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29644  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29645
29646    else
29647      # We're on a unix platform. Hooray! :)
29648      path="$BOOT_JDK"
29649      has_space=`$ECHO "$path" | $GREP " "`
29650      if test "x$has_space" != x; then
29651        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29653        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29654      fi
29655
29656      # Use eval to expand a potential ~
29657      eval path="$path"
29658      if test ! -f "$path" && test ! -d "$path"; then
29659        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29660      fi
29661
29662      if test -d "$path"; then
29663        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29664      else
29665        dir="`$DIRNAME "$path"`"
29666        base="`$BASENAME "$path"`"
29667        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29668      fi
29669    fi
29670  fi
29671
29672            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29673$as_echo_n "checking for Boot JDK... " >&6; }
29674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29675$as_echo "$BOOT_JDK" >&6; }
29676            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29677$as_echo_n "checking Boot JDK version... " >&6; }
29678            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29680$as_echo "$BOOT_JDK_VERSION" >&6; }
29681          fi # end check jdk version
29682        fi # end check javac
29683      fi # end check java
29684    fi # end check boot jdk found
29685  fi
29686
29687
29688  if test "x$BOOT_JDK_FOUND" = xno; then
29689    # Now execute the test
29690
29691  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29692  BOOT_JDK_SUFFIX="/Contents/Home"
29693  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29694  if test "x$ALL_JDKS_FOUND" != x; then
29695    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29696
29697  if test "x$BOOT_JDK_FOUND" = xno; then
29698    # Now execute the test
29699
29700        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29701        if test -d "$BOOT_JDK"; then
29702          BOOT_JDK_FOUND=maybe
29703          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29704$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29705        fi
29706
29707
29708    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29709    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29710      # Do we have a bin/java?
29711      if test ! -x "$BOOT_JDK/bin/java"; then
29712        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29714        BOOT_JDK_FOUND=no
29715      else
29716        # Do we have a bin/javac?
29717        if test ! -x "$BOOT_JDK/bin/javac"; then
29718          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29720          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29721$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29722          BOOT_JDK_FOUND=no
29723        else
29724          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29725          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29726
29727          # Extra M4 quote needed to protect [] in grep expression.
29728          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29729          if test "x$FOUND_CORRECT_VERSION" = x; then
29730            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29731$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29732            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29733$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29734            BOOT_JDK_FOUND=no
29735          else
29736            # We're done! :-)
29737            BOOT_JDK_FOUND=yes
29738
29739  # Only process if variable expands to non-empty
29740
29741  if test "x$BOOT_JDK" != x; then
29742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29743
29744  # Input might be given as Windows format, start by converting to
29745  # unix format.
29746  path="$BOOT_JDK"
29747  new_path=`$CYGPATH -u "$path"`
29748
29749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29752  # "foo.exe" is OK but "foo" is an error.
29753  #
29754  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29755  # It is also a way to make sure we got the proper file name for the real test later on.
29756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29757  if test "x$test_shortpath" = x; then
29758    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29759$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29760    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29761  fi
29762
29763  # Call helper function which possibly converts this using DOS-style short mode.
29764  # If so, the updated path is stored in $new_path.
29765
29766  input_path="$new_path"
29767  # Check if we need to convert this using DOS-style short mode. If the path
29768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29769  # take no chances and rewrite it.
29770  # Note: m4 eats our [], so we need to use [ and ] instead.
29771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29772  if test "x$has_forbidden_chars" != x; then
29773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29777      # Going to short mode and back again did indeed matter. Since short mode is
29778      # case insensitive, let's make it lowercase to improve readability.
29779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29780      # Now convert it back to Unix-style (cygpath)
29781      input_path=`$CYGPATH -u "$shortmode_path"`
29782      new_path="$input_path"
29783    fi
29784  fi
29785
29786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29787  if test "x$test_cygdrive_prefix" = x; then
29788    # As a simple fix, exclude /usr/bin since it's not a real path.
29789    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29791      # a path prefixed by /cygdrive for fixpath to work.
29792      new_path="$CYGWIN_ROOT_PATH$input_path"
29793    fi
29794  fi
29795
29796
29797  if test "x$path" != "x$new_path"; then
29798    BOOT_JDK="$new_path"
29799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29800$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29801  fi
29802
29803    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29804
29805  path="$BOOT_JDK"
29806  has_colon=`$ECHO $path | $GREP ^.:`
29807  new_path="$path"
29808  if test "x$has_colon" = x; then
29809    # Not in mixed or Windows style, start by that.
29810    new_path=`cmd //c echo $path`
29811  fi
29812
29813
29814  input_path="$new_path"
29815  # Check if we need to convert this using DOS-style short mode. If the path
29816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29817  # take no chances and rewrite it.
29818  # Note: m4 eats our [], so we need to use [ and ] instead.
29819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29820  if test "x$has_forbidden_chars" != x; then
29821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29823  fi
29824
29825
29826  windows_path="$new_path"
29827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29828    unix_path=`$CYGPATH -u "$windows_path"`
29829    new_path="$unix_path"
29830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29832    new_path="$unix_path"
29833  fi
29834
29835  if test "x$path" != "x$new_path"; then
29836    BOOT_JDK="$new_path"
29837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29838$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29839  fi
29840
29841  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29842  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29843
29844    else
29845      # We're on a unix platform. Hooray! :)
29846      path="$BOOT_JDK"
29847      has_space=`$ECHO "$path" | $GREP " "`
29848      if test "x$has_space" != x; then
29849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29850$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29851        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29852      fi
29853
29854      # Use eval to expand a potential ~
29855      eval path="$path"
29856      if test ! -f "$path" && test ! -d "$path"; then
29857        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29858      fi
29859
29860      if test -d "$path"; then
29861        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29862      else
29863        dir="`$DIRNAME "$path"`"
29864        base="`$BASENAME "$path"`"
29865        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29866      fi
29867    fi
29868  fi
29869
29870            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29871$as_echo_n "checking for Boot JDK... " >&6; }
29872            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29873$as_echo "$BOOT_JDK" >&6; }
29874            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29875$as_echo_n "checking Boot JDK version... " >&6; }
29876            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29878$as_echo "$BOOT_JDK_VERSION" >&6; }
29879          fi # end check jdk version
29880        fi # end check javac
29881      fi # end check java
29882    fi # end check boot jdk found
29883  fi
29884
29885    done
29886  fi
29887
29888
29889    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29890    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29891      # Do we have a bin/java?
29892      if test ! -x "$BOOT_JDK/bin/java"; then
29893        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29894$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29895        BOOT_JDK_FOUND=no
29896      else
29897        # Do we have a bin/javac?
29898        if test ! -x "$BOOT_JDK/bin/javac"; then
29899          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29901          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29902$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29903          BOOT_JDK_FOUND=no
29904        else
29905          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29906          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29907
29908          # Extra M4 quote needed to protect [] in grep expression.
29909          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29910          if test "x$FOUND_CORRECT_VERSION" = x; then
29911            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29913            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29914$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29915            BOOT_JDK_FOUND=no
29916          else
29917            # We're done! :-)
29918            BOOT_JDK_FOUND=yes
29919
29920  # Only process if variable expands to non-empty
29921
29922  if test "x$BOOT_JDK" != x; then
29923    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29924
29925  # Input might be given as Windows format, start by converting to
29926  # unix format.
29927  path="$BOOT_JDK"
29928  new_path=`$CYGPATH -u "$path"`
29929
29930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29933  # "foo.exe" is OK but "foo" is an error.
29934  #
29935  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29936  # It is also a way to make sure we got the proper file name for the real test later on.
29937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29938  if test "x$test_shortpath" = x; then
29939    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29940$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29941    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29942  fi
29943
29944  # Call helper function which possibly converts this using DOS-style short mode.
29945  # If so, the updated path is stored in $new_path.
29946
29947  input_path="$new_path"
29948  # Check if we need to convert this using DOS-style short mode. If the path
29949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29950  # take no chances and rewrite it.
29951  # Note: m4 eats our [], so we need to use [ and ] instead.
29952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29953  if test "x$has_forbidden_chars" != x; then
29954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29958      # Going to short mode and back again did indeed matter. Since short mode is
29959      # case insensitive, let's make it lowercase to improve readability.
29960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29961      # Now convert it back to Unix-style (cygpath)
29962      input_path=`$CYGPATH -u "$shortmode_path"`
29963      new_path="$input_path"
29964    fi
29965  fi
29966
29967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29968  if test "x$test_cygdrive_prefix" = x; then
29969    # As a simple fix, exclude /usr/bin since it's not a real path.
29970    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29972      # a path prefixed by /cygdrive for fixpath to work.
29973      new_path="$CYGWIN_ROOT_PATH$input_path"
29974    fi
29975  fi
29976
29977
29978  if test "x$path" != "x$new_path"; then
29979    BOOT_JDK="$new_path"
29980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29981$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29982  fi
29983
29984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29985
29986  path="$BOOT_JDK"
29987  has_colon=`$ECHO $path | $GREP ^.:`
29988  new_path="$path"
29989  if test "x$has_colon" = x; then
29990    # Not in mixed or Windows style, start by that.
29991    new_path=`cmd //c echo $path`
29992  fi
29993
29994
29995  input_path="$new_path"
29996  # Check if we need to convert this using DOS-style short mode. If the path
29997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29998  # take no chances and rewrite it.
29999  # Note: m4 eats our [], so we need to use [ and ] instead.
30000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30001  if test "x$has_forbidden_chars" != x; then
30002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30004  fi
30005
30006
30007  windows_path="$new_path"
30008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30009    unix_path=`$CYGPATH -u "$windows_path"`
30010    new_path="$unix_path"
30011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30013    new_path="$unix_path"
30014  fi
30015
30016  if test "x$path" != "x$new_path"; then
30017    BOOT_JDK="$new_path"
30018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30019$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30020  fi
30021
30022  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30023  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30024
30025    else
30026      # We're on a unix platform. Hooray! :)
30027      path="$BOOT_JDK"
30028      has_space=`$ECHO "$path" | $GREP " "`
30029      if test "x$has_space" != x; then
30030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30031$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30032        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30033      fi
30034
30035      # Use eval to expand a potential ~
30036      eval path="$path"
30037      if test ! -f "$path" && test ! -d "$path"; then
30038        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30039      fi
30040
30041      if test -d "$path"; then
30042        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30043      else
30044        dir="`$DIRNAME "$path"`"
30045        base="`$BASENAME "$path"`"
30046        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30047      fi
30048    fi
30049  fi
30050
30051            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30052$as_echo_n "checking for Boot JDK... " >&6; }
30053            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30054$as_echo "$BOOT_JDK" >&6; }
30055            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30056$as_echo_n "checking Boot JDK version... " >&6; }
30057            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30059$as_echo "$BOOT_JDK_VERSION" >&6; }
30060          fi # end check jdk version
30061        fi # end check javac
30062      fi # end check java
30063    fi # end check boot jdk found
30064  fi
30065
30066  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30067
30068  if test "x$BOOT_JDK_FOUND" = xno; then
30069    # Now execute the test
30070
30071  BOOT_JDK_PREFIX="/usr/lib/jvm"
30072  BOOT_JDK_SUFFIX=""
30073  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30074  if test "x$ALL_JDKS_FOUND" != x; then
30075    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30076
30077  if test "x$BOOT_JDK_FOUND" = xno; then
30078    # Now execute the test
30079
30080        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30081        if test -d "$BOOT_JDK"; then
30082          BOOT_JDK_FOUND=maybe
30083          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30084$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30085        fi
30086
30087
30088    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30089    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30090      # Do we have a bin/java?
30091      if test ! -x "$BOOT_JDK/bin/java"; then
30092        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30094        BOOT_JDK_FOUND=no
30095      else
30096        # Do we have a bin/javac?
30097        if test ! -x "$BOOT_JDK/bin/javac"; then
30098          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30100          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30101$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30102          BOOT_JDK_FOUND=no
30103        else
30104          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30105          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30106
30107          # Extra M4 quote needed to protect [] in grep expression.
30108          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30109          if test "x$FOUND_CORRECT_VERSION" = x; then
30110            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30112            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30113$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30114            BOOT_JDK_FOUND=no
30115          else
30116            # We're done! :-)
30117            BOOT_JDK_FOUND=yes
30118
30119  # Only process if variable expands to non-empty
30120
30121  if test "x$BOOT_JDK" != x; then
30122    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30123
30124  # Input might be given as Windows format, start by converting to
30125  # unix format.
30126  path="$BOOT_JDK"
30127  new_path=`$CYGPATH -u "$path"`
30128
30129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30132  # "foo.exe" is OK but "foo" is an error.
30133  #
30134  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30135  # It is also a way to make sure we got the proper file name for the real test later on.
30136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30137  if test "x$test_shortpath" = x; then
30138    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30139$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30140    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30141  fi
30142
30143  # Call helper function which possibly converts this using DOS-style short mode.
30144  # If so, the updated path is stored in $new_path.
30145
30146  input_path="$new_path"
30147  # Check if we need to convert this using DOS-style short mode. If the path
30148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30149  # take no chances and rewrite it.
30150  # Note: m4 eats our [], so we need to use [ and ] instead.
30151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30152  if test "x$has_forbidden_chars" != x; then
30153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30157      # Going to short mode and back again did indeed matter. Since short mode is
30158      # case insensitive, let's make it lowercase to improve readability.
30159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30160      # Now convert it back to Unix-style (cygpath)
30161      input_path=`$CYGPATH -u "$shortmode_path"`
30162      new_path="$input_path"
30163    fi
30164  fi
30165
30166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30167  if test "x$test_cygdrive_prefix" = x; then
30168    # As a simple fix, exclude /usr/bin since it's not a real path.
30169    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30171      # a path prefixed by /cygdrive for fixpath to work.
30172      new_path="$CYGWIN_ROOT_PATH$input_path"
30173    fi
30174  fi
30175
30176
30177  if test "x$path" != "x$new_path"; then
30178    BOOT_JDK="$new_path"
30179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30180$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30181  fi
30182
30183    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30184
30185  path="$BOOT_JDK"
30186  has_colon=`$ECHO $path | $GREP ^.:`
30187  new_path="$path"
30188  if test "x$has_colon" = x; then
30189    # Not in mixed or Windows style, start by that.
30190    new_path=`cmd //c echo $path`
30191  fi
30192
30193
30194  input_path="$new_path"
30195  # Check if we need to convert this using DOS-style short mode. If the path
30196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30197  # take no chances and rewrite it.
30198  # Note: m4 eats our [], so we need to use [ and ] instead.
30199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30200  if test "x$has_forbidden_chars" != x; then
30201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30203  fi
30204
30205
30206  windows_path="$new_path"
30207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30208    unix_path=`$CYGPATH -u "$windows_path"`
30209    new_path="$unix_path"
30210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30212    new_path="$unix_path"
30213  fi
30214
30215  if test "x$path" != "x$new_path"; then
30216    BOOT_JDK="$new_path"
30217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30218$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30219  fi
30220
30221  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30222  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30223
30224    else
30225      # We're on a unix platform. Hooray! :)
30226      path="$BOOT_JDK"
30227      has_space=`$ECHO "$path" | $GREP " "`
30228      if test "x$has_space" != x; then
30229        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30230$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30231        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30232      fi
30233
30234      # Use eval to expand a potential ~
30235      eval path="$path"
30236      if test ! -f "$path" && test ! -d "$path"; then
30237        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30238      fi
30239
30240      if test -d "$path"; then
30241        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30242      else
30243        dir="`$DIRNAME "$path"`"
30244        base="`$BASENAME "$path"`"
30245        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30246      fi
30247    fi
30248  fi
30249
30250            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30251$as_echo_n "checking for Boot JDK... " >&6; }
30252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30253$as_echo "$BOOT_JDK" >&6; }
30254            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30255$as_echo_n "checking Boot JDK version... " >&6; }
30256            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30258$as_echo "$BOOT_JDK_VERSION" >&6; }
30259          fi # end check jdk version
30260        fi # end check javac
30261      fi # end check java
30262    fi # end check boot jdk found
30263  fi
30264
30265    done
30266  fi
30267
30268
30269    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30270    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30271      # Do we have a bin/java?
30272      if test ! -x "$BOOT_JDK/bin/java"; then
30273        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30275        BOOT_JDK_FOUND=no
30276      else
30277        # Do we have a bin/javac?
30278        if test ! -x "$BOOT_JDK/bin/javac"; then
30279          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30281          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30282$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30283          BOOT_JDK_FOUND=no
30284        else
30285          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30286          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30287
30288          # Extra M4 quote needed to protect [] in grep expression.
30289          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30290          if test "x$FOUND_CORRECT_VERSION" = x; then
30291            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30293            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30294$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30295            BOOT_JDK_FOUND=no
30296          else
30297            # We're done! :-)
30298            BOOT_JDK_FOUND=yes
30299
30300  # Only process if variable expands to non-empty
30301
30302  if test "x$BOOT_JDK" != x; then
30303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30304
30305  # Input might be given as Windows format, start by converting to
30306  # unix format.
30307  path="$BOOT_JDK"
30308  new_path=`$CYGPATH -u "$path"`
30309
30310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30313  # "foo.exe" is OK but "foo" is an error.
30314  #
30315  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30316  # It is also a way to make sure we got the proper file name for the real test later on.
30317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30318  if test "x$test_shortpath" = x; then
30319    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30320$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30321    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30322  fi
30323
30324  # Call helper function which possibly converts this using DOS-style short mode.
30325  # If so, the updated path is stored in $new_path.
30326
30327  input_path="$new_path"
30328  # Check if we need to convert this using DOS-style short mode. If the path
30329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30330  # take no chances and rewrite it.
30331  # Note: m4 eats our [], so we need to use [ and ] instead.
30332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30333  if test "x$has_forbidden_chars" != x; then
30334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30338      # Going to short mode and back again did indeed matter. Since short mode is
30339      # case insensitive, let's make it lowercase to improve readability.
30340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30341      # Now convert it back to Unix-style (cygpath)
30342      input_path=`$CYGPATH -u "$shortmode_path"`
30343      new_path="$input_path"
30344    fi
30345  fi
30346
30347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30348  if test "x$test_cygdrive_prefix" = x; then
30349    # As a simple fix, exclude /usr/bin since it's not a real path.
30350    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30352      # a path prefixed by /cygdrive for fixpath to work.
30353      new_path="$CYGWIN_ROOT_PATH$input_path"
30354    fi
30355  fi
30356
30357
30358  if test "x$path" != "x$new_path"; then
30359    BOOT_JDK="$new_path"
30360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30361$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30362  fi
30363
30364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30365
30366  path="$BOOT_JDK"
30367  has_colon=`$ECHO $path | $GREP ^.:`
30368  new_path="$path"
30369  if test "x$has_colon" = x; then
30370    # Not in mixed or Windows style, start by that.
30371    new_path=`cmd //c echo $path`
30372  fi
30373
30374
30375  input_path="$new_path"
30376  # Check if we need to convert this using DOS-style short mode. If the path
30377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30378  # take no chances and rewrite it.
30379  # Note: m4 eats our [], so we need to use [ and ] instead.
30380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30381  if test "x$has_forbidden_chars" != x; then
30382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30384  fi
30385
30386
30387  windows_path="$new_path"
30388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30389    unix_path=`$CYGPATH -u "$windows_path"`
30390    new_path="$unix_path"
30391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30393    new_path="$unix_path"
30394  fi
30395
30396  if test "x$path" != "x$new_path"; then
30397    BOOT_JDK="$new_path"
30398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30400  fi
30401
30402  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30403  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30404
30405    else
30406      # We're on a unix platform. Hooray! :)
30407      path="$BOOT_JDK"
30408      has_space=`$ECHO "$path" | $GREP " "`
30409      if test "x$has_space" != x; then
30410        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30411$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30412        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30413      fi
30414
30415      # Use eval to expand a potential ~
30416      eval path="$path"
30417      if test ! -f "$path" && test ! -d "$path"; then
30418        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30419      fi
30420
30421      if test -d "$path"; then
30422        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30423      else
30424        dir="`$DIRNAME "$path"`"
30425        base="`$BASENAME "$path"`"
30426        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30427      fi
30428    fi
30429  fi
30430
30431            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30432$as_echo_n "checking for Boot JDK... " >&6; }
30433            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30434$as_echo "$BOOT_JDK" >&6; }
30435            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30436$as_echo_n "checking Boot JDK version... " >&6; }
30437            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30439$as_echo "$BOOT_JDK_VERSION" >&6; }
30440          fi # end check jdk version
30441        fi # end check javac
30442      fi # end check java
30443    fi # end check boot jdk found
30444  fi
30445
30446  fi
30447
30448
30449    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30450    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30451      # Do we have a bin/java?
30452      if test ! -x "$BOOT_JDK/bin/java"; then
30453        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30454$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30455        BOOT_JDK_FOUND=no
30456      else
30457        # Do we have a bin/javac?
30458        if test ! -x "$BOOT_JDK/bin/javac"; then
30459          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30461          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30462$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30463          BOOT_JDK_FOUND=no
30464        else
30465          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30466          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30467
30468          # Extra M4 quote needed to protect [] in grep expression.
30469          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30470          if test "x$FOUND_CORRECT_VERSION" = x; then
30471            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30473            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30474$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30475            BOOT_JDK_FOUND=no
30476          else
30477            # We're done! :-)
30478            BOOT_JDK_FOUND=yes
30479
30480  # Only process if variable expands to non-empty
30481
30482  if test "x$BOOT_JDK" != x; then
30483    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30484
30485  # Input might be given as Windows format, start by converting to
30486  # unix format.
30487  path="$BOOT_JDK"
30488  new_path=`$CYGPATH -u "$path"`
30489
30490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30493  # "foo.exe" is OK but "foo" is an error.
30494  #
30495  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30496  # It is also a way to make sure we got the proper file name for the real test later on.
30497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30498  if test "x$test_shortpath" = x; then
30499    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30500$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30501    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30502  fi
30503
30504  # Call helper function which possibly converts this using DOS-style short mode.
30505  # If so, the updated path is stored in $new_path.
30506
30507  input_path="$new_path"
30508  # Check if we need to convert this using DOS-style short mode. If the path
30509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30510  # take no chances and rewrite it.
30511  # Note: m4 eats our [], so we need to use [ and ] instead.
30512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30513  if test "x$has_forbidden_chars" != x; then
30514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30518      # Going to short mode and back again did indeed matter. Since short mode is
30519      # case insensitive, let's make it lowercase to improve readability.
30520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30521      # Now convert it back to Unix-style (cygpath)
30522      input_path=`$CYGPATH -u "$shortmode_path"`
30523      new_path="$input_path"
30524    fi
30525  fi
30526
30527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30528  if test "x$test_cygdrive_prefix" = x; then
30529    # As a simple fix, exclude /usr/bin since it's not a real path.
30530    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30532      # a path prefixed by /cygdrive for fixpath to work.
30533      new_path="$CYGWIN_ROOT_PATH$input_path"
30534    fi
30535  fi
30536
30537
30538  if test "x$path" != "x$new_path"; then
30539    BOOT_JDK="$new_path"
30540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30541$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30542  fi
30543
30544    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30545
30546  path="$BOOT_JDK"
30547  has_colon=`$ECHO $path | $GREP ^.:`
30548  new_path="$path"
30549  if test "x$has_colon" = x; then
30550    # Not in mixed or Windows style, start by that.
30551    new_path=`cmd //c echo $path`
30552  fi
30553
30554
30555  input_path="$new_path"
30556  # Check if we need to convert this using DOS-style short mode. If the path
30557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30558  # take no chances and rewrite it.
30559  # Note: m4 eats our [], so we need to use [ and ] instead.
30560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30561  if test "x$has_forbidden_chars" != x; then
30562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30564  fi
30565
30566
30567  windows_path="$new_path"
30568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30569    unix_path=`$CYGPATH -u "$windows_path"`
30570    new_path="$unix_path"
30571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30573    new_path="$unix_path"
30574  fi
30575
30576  if test "x$path" != "x$new_path"; then
30577    BOOT_JDK="$new_path"
30578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30579$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30580  fi
30581
30582  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30583  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30584
30585    else
30586      # We're on a unix platform. Hooray! :)
30587      path="$BOOT_JDK"
30588      has_space=`$ECHO "$path" | $GREP " "`
30589      if test "x$has_space" != x; then
30590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30591$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30592        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30593      fi
30594
30595      # Use eval to expand a potential ~
30596      eval path="$path"
30597      if test ! -f "$path" && test ! -d "$path"; then
30598        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30599      fi
30600
30601      if test -d "$path"; then
30602        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30603      else
30604        dir="`$DIRNAME "$path"`"
30605        base="`$BASENAME "$path"`"
30606        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30607      fi
30608    fi
30609  fi
30610
30611            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30612$as_echo_n "checking for Boot JDK... " >&6; }
30613            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30614$as_echo "$BOOT_JDK" >&6; }
30615            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30616$as_echo_n "checking Boot JDK version... " >&6; }
30617            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30618            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30619$as_echo "$BOOT_JDK_VERSION" >&6; }
30620          fi # end check jdk version
30621        fi # end check javac
30622      fi # end check java
30623    fi # end check boot jdk found
30624  fi
30625
30626
30627  # If we haven't found anything yet, we've truly lost. Give up.
30628  if test "x$BOOT_JDK_FOUND" = xno; then
30629
30630  # Print a helpful message on how to acquire the necessary build dependency.
30631  # openjdk is the help tag: freetype, cups, alsa etc
30632  MISSING_DEPENDENCY=openjdk
30633
30634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30635    cygwin_help $MISSING_DEPENDENCY
30636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30637    msys_help $MISSING_DEPENDENCY
30638  else
30639    PKGHANDLER_COMMAND=
30640
30641    case $PKGHANDLER in
30642      apt-get)
30643        apt_help     $MISSING_DEPENDENCY ;;
30644      yum)
30645        yum_help     $MISSING_DEPENDENCY ;;
30646      brew)
30647        brew_help    $MISSING_DEPENDENCY ;;
30648      port)
30649        port_help    $MISSING_DEPENDENCY ;;
30650      pkgutil)
30651        pkgutil_help $MISSING_DEPENDENCY ;;
30652      pkgadd)
30653        pkgadd_help  $MISSING_DEPENDENCY ;;
30654    esac
30655
30656    if test "x$PKGHANDLER_COMMAND" != x; then
30657      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30658    fi
30659  fi
30660
30661    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30662$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30663    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30664$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30665    as_fn_error $? "Cannot continue" "$LINENO" 5
30666  fi
30667
30668
30669
30670  # Setup tools from the Boot JDK.
30671
30672  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30673
30674  # Publish this variable in the help.
30675
30676
30677  if [ -z "${JAVA+x}" ]; then
30678    # The variable is not set by user, try to locate tool using the code snippet
30679
30680      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30681$as_echo_n "checking for java in Boot JDK... " >&6; }
30682      JAVA=$BOOT_JDK/bin/java
30683      if test ! -x $JAVA; then
30684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30685$as_echo "not found" >&6; }
30686        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30687$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30688        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30689      fi
30690      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30691$as_echo "ok" >&6; }
30692
30693
30694  else
30695    # The variable is set, but is it from the command line or the environment?
30696
30697    # Try to remove the string !JAVA! from our list.
30698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30700      # If it failed, the variable was not from the command line. Ignore it,
30701      # but warn the user (except for BASH, which is always set by the calling BASH).
30702      if test "xJAVA" != xBASH; then
30703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30704$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30705      fi
30706      # Try to locate tool using the code snippet
30707
30708      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30709$as_echo_n "checking for java in Boot JDK... " >&6; }
30710      JAVA=$BOOT_JDK/bin/java
30711      if test ! -x $JAVA; then
30712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30713$as_echo "not found" >&6; }
30714        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30715$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30716        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30717      fi
30718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30719$as_echo "ok" >&6; }
30720
30721
30722    else
30723      # If it succeeded, then it was overridden by the user. We will use it
30724      # for the tool.
30725
30726      # First remove it from the list of overridden variables, so we can test
30727      # for unknown variables in the end.
30728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30729
30730      # Check if we try to supply an empty value
30731      if test "x$JAVA" = x; then
30732        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30733$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30735$as_echo_n "checking for JAVA... " >&6; }
30736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30737$as_echo "disabled" >&6; }
30738      else
30739        # Check if the provided tool contains a complete path.
30740        tool_specified="$JAVA"
30741        tool_basename="${tool_specified##*/}"
30742        if test "x$tool_basename" = "x$tool_specified"; then
30743          # A command without a complete path is provided, search $PATH.
30744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30745$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30746          # Extract the first word of "$tool_basename", so it can be a program name with args.
30747set dummy $tool_basename; ac_word=$2
30748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30749$as_echo_n "checking for $ac_word... " >&6; }
30750if ${ac_cv_path_JAVA+:} false; then :
30751  $as_echo_n "(cached) " >&6
30752else
30753  case $JAVA in
30754  [\\/]* | ?:[\\/]*)
30755  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30756  ;;
30757  *)
30758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30759for as_dir in $PATH
30760do
30761  IFS=$as_save_IFS
30762  test -z "$as_dir" && as_dir=.
30763    for ac_exec_ext in '' $ac_executable_extensions; do
30764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30765    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30767    break 2
30768  fi
30769done
30770  done
30771IFS=$as_save_IFS
30772
30773  ;;
30774esac
30775fi
30776JAVA=$ac_cv_path_JAVA
30777if test -n "$JAVA"; then
30778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30779$as_echo "$JAVA" >&6; }
30780else
30781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30782$as_echo "no" >&6; }
30783fi
30784
30785
30786          if test "x$JAVA" = x; then
30787            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30788          fi
30789        else
30790          # Otherwise we believe it is a complete path. Use it as it is.
30791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30792$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30793          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30794$as_echo_n "checking for JAVA... " >&6; }
30795          if test ! -x "$tool_specified"; then
30796            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30797$as_echo "not found" >&6; }
30798            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30799          fi
30800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30801$as_echo "$tool_specified" >&6; }
30802        fi
30803      fi
30804    fi
30805
30806  fi
30807
30808
30809
30810  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30811
30812  # Publish this variable in the help.
30813
30814
30815  if [ -z "${JAVAC+x}" ]; then
30816    # The variable is not set by user, try to locate tool using the code snippet
30817
30818      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30819$as_echo_n "checking for javac in Boot JDK... " >&6; }
30820      JAVAC=$BOOT_JDK/bin/javac
30821      if test ! -x $JAVAC; then
30822        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30823$as_echo "not found" >&6; }
30824        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30825$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30826        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30827      fi
30828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30829$as_echo "ok" >&6; }
30830
30831
30832  else
30833    # The variable is set, but is it from the command line or the environment?
30834
30835    # Try to remove the string !JAVAC! from our list.
30836    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30837    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30838      # If it failed, the variable was not from the command line. Ignore it,
30839      # but warn the user (except for BASH, which is always set by the calling BASH).
30840      if test "xJAVAC" != xBASH; then
30841        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30842$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30843      fi
30844      # Try to locate tool using the code snippet
30845
30846      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30847$as_echo_n "checking for javac in Boot JDK... " >&6; }
30848      JAVAC=$BOOT_JDK/bin/javac
30849      if test ! -x $JAVAC; then
30850        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30851$as_echo "not found" >&6; }
30852        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30853$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30854        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30855      fi
30856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30857$as_echo "ok" >&6; }
30858
30859
30860    else
30861      # If it succeeded, then it was overridden by the user. We will use it
30862      # for the tool.
30863
30864      # First remove it from the list of overridden variables, so we can test
30865      # for unknown variables in the end.
30866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30867
30868      # Check if we try to supply an empty value
30869      if test "x$JAVAC" = x; then
30870        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30871$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30873$as_echo_n "checking for JAVAC... " >&6; }
30874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30875$as_echo "disabled" >&6; }
30876      else
30877        # Check if the provided tool contains a complete path.
30878        tool_specified="$JAVAC"
30879        tool_basename="${tool_specified##*/}"
30880        if test "x$tool_basename" = "x$tool_specified"; then
30881          # A command without a complete path is provided, search $PATH.
30882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30883$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30884          # Extract the first word of "$tool_basename", so it can be a program name with args.
30885set dummy $tool_basename; ac_word=$2
30886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30887$as_echo_n "checking for $ac_word... " >&6; }
30888if ${ac_cv_path_JAVAC+:} false; then :
30889  $as_echo_n "(cached) " >&6
30890else
30891  case $JAVAC in
30892  [\\/]* | ?:[\\/]*)
30893  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30894  ;;
30895  *)
30896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30897for as_dir in $PATH
30898do
30899  IFS=$as_save_IFS
30900  test -z "$as_dir" && as_dir=.
30901    for ac_exec_ext in '' $ac_executable_extensions; do
30902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30903    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30905    break 2
30906  fi
30907done
30908  done
30909IFS=$as_save_IFS
30910
30911  ;;
30912esac
30913fi
30914JAVAC=$ac_cv_path_JAVAC
30915if test -n "$JAVAC"; then
30916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30917$as_echo "$JAVAC" >&6; }
30918else
30919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30920$as_echo "no" >&6; }
30921fi
30922
30923
30924          if test "x$JAVAC" = x; then
30925            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30926          fi
30927        else
30928          # Otherwise we believe it is a complete path. Use it as it is.
30929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30930$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30931          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30932$as_echo_n "checking for JAVAC... " >&6; }
30933          if test ! -x "$tool_specified"; then
30934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30935$as_echo "not found" >&6; }
30936            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30937          fi
30938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30939$as_echo "$tool_specified" >&6; }
30940        fi
30941      fi
30942    fi
30943
30944  fi
30945
30946
30947
30948  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30949
30950  # Publish this variable in the help.
30951
30952
30953  if [ -z "${JAVAH+x}" ]; then
30954    # The variable is not set by user, try to locate tool using the code snippet
30955
30956      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30957$as_echo_n "checking for javah in Boot JDK... " >&6; }
30958      JAVAH=$BOOT_JDK/bin/javah
30959      if test ! -x $JAVAH; then
30960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30961$as_echo "not found" >&6; }
30962        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30963$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30964        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30965      fi
30966      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30967$as_echo "ok" >&6; }
30968
30969
30970  else
30971    # The variable is set, but is it from the command line or the environment?
30972
30973    # Try to remove the string !JAVAH! from our list.
30974    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30975    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30976      # If it failed, the variable was not from the command line. Ignore it,
30977      # but warn the user (except for BASH, which is always set by the calling BASH).
30978      if test "xJAVAH" != xBASH; then
30979        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30980$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30981      fi
30982      # Try to locate tool using the code snippet
30983
30984      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30985$as_echo_n "checking for javah in Boot JDK... " >&6; }
30986      JAVAH=$BOOT_JDK/bin/javah
30987      if test ! -x $JAVAH; then
30988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30989$as_echo "not found" >&6; }
30990        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30991$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30992        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30993      fi
30994      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30995$as_echo "ok" >&6; }
30996
30997
30998    else
30999      # If it succeeded, then it was overridden by the user. We will use it
31000      # for the tool.
31001
31002      # First remove it from the list of overridden variables, so we can test
31003      # for unknown variables in the end.
31004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31005
31006      # Check if we try to supply an empty value
31007      if test "x$JAVAH" = x; then
31008        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
31009$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
31010        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31011$as_echo_n "checking for JAVAH... " >&6; }
31012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31013$as_echo "disabled" >&6; }
31014      else
31015        # Check if the provided tool contains a complete path.
31016        tool_specified="$JAVAH"
31017        tool_basename="${tool_specified##*/}"
31018        if test "x$tool_basename" = "x$tool_specified"; then
31019          # A command without a complete path is provided, search $PATH.
31020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
31021$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
31022          # Extract the first word of "$tool_basename", so it can be a program name with args.
31023set dummy $tool_basename; ac_word=$2
31024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31025$as_echo_n "checking for $ac_word... " >&6; }
31026if ${ac_cv_path_JAVAH+:} false; then :
31027  $as_echo_n "(cached) " >&6
31028else
31029  case $JAVAH in
31030  [\\/]* | ?:[\\/]*)
31031  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
31032  ;;
31033  *)
31034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31035for as_dir in $PATH
31036do
31037  IFS=$as_save_IFS
31038  test -z "$as_dir" && as_dir=.
31039    for ac_exec_ext in '' $ac_executable_extensions; do
31040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31041    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
31042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31043    break 2
31044  fi
31045done
31046  done
31047IFS=$as_save_IFS
31048
31049  ;;
31050esac
31051fi
31052JAVAH=$ac_cv_path_JAVAH
31053if test -n "$JAVAH"; then
31054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
31055$as_echo "$JAVAH" >&6; }
31056else
31057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31058$as_echo "no" >&6; }
31059fi
31060
31061
31062          if test "x$JAVAH" = x; then
31063            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31064          fi
31065        else
31066          # Otherwise we believe it is a complete path. Use it as it is.
31067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
31068$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
31069          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31070$as_echo_n "checking for JAVAH... " >&6; }
31071          if test ! -x "$tool_specified"; then
31072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31073$as_echo "not found" >&6; }
31074            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
31075          fi
31076          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31077$as_echo "$tool_specified" >&6; }
31078        fi
31079      fi
31080    fi
31081
31082  fi
31083
31084
31085
31086  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31087
31088  # Publish this variable in the help.
31089
31090
31091  if [ -z "${JAR+x}" ]; then
31092    # The variable is not set by user, try to locate tool using the code snippet
31093
31094      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31095$as_echo_n "checking for jar in Boot JDK... " >&6; }
31096      JAR=$BOOT_JDK/bin/jar
31097      if test ! -x $JAR; then
31098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31099$as_echo "not found" >&6; }
31100        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31101$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31102        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31103      fi
31104      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31105$as_echo "ok" >&6; }
31106
31107
31108  else
31109    # The variable is set, but is it from the command line or the environment?
31110
31111    # Try to remove the string !JAR! from our list.
31112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31114      # If it failed, the variable was not from the command line. Ignore it,
31115      # but warn the user (except for BASH, which is always set by the calling BASH).
31116      if test "xJAR" != xBASH; then
31117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31118$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31119      fi
31120      # Try to locate tool using the code snippet
31121
31122      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31123$as_echo_n "checking for jar in Boot JDK... " >&6; }
31124      JAR=$BOOT_JDK/bin/jar
31125      if test ! -x $JAR; then
31126        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31127$as_echo "not found" >&6; }
31128        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31129$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31130        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31131      fi
31132      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31133$as_echo "ok" >&6; }
31134
31135
31136    else
31137      # If it succeeded, then it was overridden by the user. We will use it
31138      # for the tool.
31139
31140      # First remove it from the list of overridden variables, so we can test
31141      # for unknown variables in the end.
31142      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31143
31144      # Check if we try to supply an empty value
31145      if test "x$JAR" = x; then
31146        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31147$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31149$as_echo_n "checking for JAR... " >&6; }
31150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31151$as_echo "disabled" >&6; }
31152      else
31153        # Check if the provided tool contains a complete path.
31154        tool_specified="$JAR"
31155        tool_basename="${tool_specified##*/}"
31156        if test "x$tool_basename" = "x$tool_specified"; then
31157          # A command without a complete path is provided, search $PATH.
31158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31159$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31160          # Extract the first word of "$tool_basename", so it can be a program name with args.
31161set dummy $tool_basename; ac_word=$2
31162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31163$as_echo_n "checking for $ac_word... " >&6; }
31164if ${ac_cv_path_JAR+:} false; then :
31165  $as_echo_n "(cached) " >&6
31166else
31167  case $JAR in
31168  [\\/]* | ?:[\\/]*)
31169  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31170  ;;
31171  *)
31172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31173for as_dir in $PATH
31174do
31175  IFS=$as_save_IFS
31176  test -z "$as_dir" && as_dir=.
31177    for ac_exec_ext in '' $ac_executable_extensions; do
31178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31179    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31181    break 2
31182  fi
31183done
31184  done
31185IFS=$as_save_IFS
31186
31187  ;;
31188esac
31189fi
31190JAR=$ac_cv_path_JAR
31191if test -n "$JAR"; then
31192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31193$as_echo "$JAR" >&6; }
31194else
31195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31196$as_echo "no" >&6; }
31197fi
31198
31199
31200          if test "x$JAR" = x; then
31201            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31202          fi
31203        else
31204          # Otherwise we believe it is a complete path. Use it as it is.
31205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31206$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31207          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31208$as_echo_n "checking for JAR... " >&6; }
31209          if test ! -x "$tool_specified"; then
31210            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31211$as_echo "not found" >&6; }
31212            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31213          fi
31214          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31215$as_echo "$tool_specified" >&6; }
31216        fi
31217      fi
31218    fi
31219
31220  fi
31221
31222
31223
31224  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31225
31226  # Publish this variable in the help.
31227
31228
31229  if [ -z "${JARSIGNER+x}" ]; then
31230    # The variable is not set by user, try to locate tool using the code snippet
31231
31232      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31233$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31234      JARSIGNER=$BOOT_JDK/bin/jarsigner
31235      if test ! -x $JARSIGNER; then
31236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31237$as_echo "not found" >&6; }
31238        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31239$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31240        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31241      fi
31242      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31243$as_echo "ok" >&6; }
31244
31245
31246  else
31247    # The variable is set, but is it from the command line or the environment?
31248
31249    # Try to remove the string !JARSIGNER! from our list.
31250    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31251    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31252      # If it failed, the variable was not from the command line. Ignore it,
31253      # but warn the user (except for BASH, which is always set by the calling BASH).
31254      if test "xJARSIGNER" != xBASH; then
31255        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31256$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31257      fi
31258      # Try to locate tool using the code snippet
31259
31260      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31261$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31262      JARSIGNER=$BOOT_JDK/bin/jarsigner
31263      if test ! -x $JARSIGNER; then
31264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31265$as_echo "not found" >&6; }
31266        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31267$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31268        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31269      fi
31270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31271$as_echo "ok" >&6; }
31272
31273
31274    else
31275      # If it succeeded, then it was overridden by the user. We will use it
31276      # for the tool.
31277
31278      # First remove it from the list of overridden variables, so we can test
31279      # for unknown variables in the end.
31280      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31281
31282      # Check if we try to supply an empty value
31283      if test "x$JARSIGNER" = x; then
31284        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31285$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31287$as_echo_n "checking for JARSIGNER... " >&6; }
31288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31289$as_echo "disabled" >&6; }
31290      else
31291        # Check if the provided tool contains a complete path.
31292        tool_specified="$JARSIGNER"
31293        tool_basename="${tool_specified##*/}"
31294        if test "x$tool_basename" = "x$tool_specified"; then
31295          # A command without a complete path is provided, search $PATH.
31296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31297$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31298          # Extract the first word of "$tool_basename", so it can be a program name with args.
31299set dummy $tool_basename; ac_word=$2
31300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31301$as_echo_n "checking for $ac_word... " >&6; }
31302if ${ac_cv_path_JARSIGNER+:} false; then :
31303  $as_echo_n "(cached) " >&6
31304else
31305  case $JARSIGNER in
31306  [\\/]* | ?:[\\/]*)
31307  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31308  ;;
31309  *)
31310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31311for as_dir in $PATH
31312do
31313  IFS=$as_save_IFS
31314  test -z "$as_dir" && as_dir=.
31315    for ac_exec_ext in '' $ac_executable_extensions; do
31316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31317    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31319    break 2
31320  fi
31321done
31322  done
31323IFS=$as_save_IFS
31324
31325  ;;
31326esac
31327fi
31328JARSIGNER=$ac_cv_path_JARSIGNER
31329if test -n "$JARSIGNER"; then
31330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31331$as_echo "$JARSIGNER" >&6; }
31332else
31333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31334$as_echo "no" >&6; }
31335fi
31336
31337
31338          if test "x$JARSIGNER" = x; then
31339            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31340          fi
31341        else
31342          # Otherwise we believe it is a complete path. Use it as it is.
31343          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31344$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31345          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31346$as_echo_n "checking for JARSIGNER... " >&6; }
31347          if test ! -x "$tool_specified"; then
31348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31349$as_echo "not found" >&6; }
31350            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31351          fi
31352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31353$as_echo "$tool_specified" >&6; }
31354        fi
31355      fi
31356    fi
31357
31358  fi
31359
31360
31361
31362  # Finally, set some other options...
31363
31364  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31365  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31366
31367
31368  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31369$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31370  if "$JAVA" --list-modules > /dev/null 2>&1; then
31371    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31372$as_echo "yes" >&6; }
31373    BOOT_JDK_MODULAR="true"
31374  else
31375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31376$as_echo "no" >&6; }
31377    BOOT_JDK_MODULAR="false"
31378  fi
31379
31380
31381
31382
31383  # Check if the boot jdk is 32 or 64 bit
31384  if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
31385    BOOT_JDK_BITS="64"
31386  else
31387    BOOT_JDK_BITS="32"
31388  fi
31389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31390$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31392$as_echo "$BOOT_JDK_BITS" >&6; }
31393
31394
31395
31396# Check whether --with-build-jdk was given.
31397if test "${with_build_jdk+set}" = set; then :
31398  withval=$with_build_jdk;
31399fi
31400
31401
31402  CREATE_BUILDJDK=false
31403  EXTERNAL_BUILDJDK=false
31404  BUILD_JDK_FOUND="no"
31405  if test "x$with_build_jdk" != "x"; then
31406
31407  if test "x$BUILD_JDK_FOUND" = xno; then
31408    # Execute the test
31409
31410       if test "x$with_build_jdk" != x; then
31411         BUILD_JDK=$with_build_jdk
31412         BUILD_JDK_FOUND=maybe
31413         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31414$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31415       fi
31416
31417    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31418    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31419      # Do we have a bin/java?
31420      if test ! -x "$BUILD_JDK/bin/java"; then
31421        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31422$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31423        BUILD_JDK_FOUND=no
31424      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31425        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31426$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31427        BUILD_JDK_FOUND=no
31428      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31429        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31430$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31431        BUILD_JDK_FOUND=no
31432      elif test ! -x "$BUILD_JDK/bin/javac"; then
31433        # Do we have a bin/javac?
31434        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31435$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31436        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31437$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31438        BUILD_JDK_FOUND=no
31439      else
31440        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31441        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31442
31443        # Extra M4 quote needed to protect [] in grep expression.
31444        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31445        if test "x$FOUND_CORRECT_VERSION" = x; then
31446          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31447$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31448          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31449$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31450          BUILD_JDK_FOUND=no
31451        else
31452          # We're done!
31453          BUILD_JDK_FOUND=yes
31454
31455  # Only process if variable expands to non-empty
31456
31457  if test "x$BUILD_JDK" != x; then
31458    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31459
31460  # Input might be given as Windows format, start by converting to
31461  # unix format.
31462  path="$BUILD_JDK"
31463  new_path=`$CYGPATH -u "$path"`
31464
31465  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31466  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31467  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31468  # "foo.exe" is OK but "foo" is an error.
31469  #
31470  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31471  # It is also a way to make sure we got the proper file name for the real test later on.
31472  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31473  if test "x$test_shortpath" = x; then
31474    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31475$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31476    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31477  fi
31478
31479  # Call helper function which possibly converts this using DOS-style short mode.
31480  # If so, the updated path is stored in $new_path.
31481
31482  input_path="$new_path"
31483  # Check if we need to convert this using DOS-style short mode. If the path
31484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31485  # take no chances and rewrite it.
31486  # Note: m4 eats our [], so we need to use [ and ] instead.
31487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31488  if test "x$has_forbidden_chars" != x; then
31489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31493      # Going to short mode and back again did indeed matter. Since short mode is
31494      # case insensitive, let's make it lowercase to improve readability.
31495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31496      # Now convert it back to Unix-style (cygpath)
31497      input_path=`$CYGPATH -u "$shortmode_path"`
31498      new_path="$input_path"
31499    fi
31500  fi
31501
31502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31503  if test "x$test_cygdrive_prefix" = x; then
31504    # As a simple fix, exclude /usr/bin since it's not a real path.
31505    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31507      # a path prefixed by /cygdrive for fixpath to work.
31508      new_path="$CYGWIN_ROOT_PATH$input_path"
31509    fi
31510  fi
31511
31512
31513  if test "x$path" != "x$new_path"; then
31514    BUILD_JDK="$new_path"
31515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31516$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31517  fi
31518
31519    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31520
31521  path="$BUILD_JDK"
31522  has_colon=`$ECHO $path | $GREP ^.:`
31523  new_path="$path"
31524  if test "x$has_colon" = x; then
31525    # Not in mixed or Windows style, start by that.
31526    new_path=`cmd //c echo $path`
31527  fi
31528
31529
31530  input_path="$new_path"
31531  # Check if we need to convert this using DOS-style short mode. If the path
31532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31533  # take no chances and rewrite it.
31534  # Note: m4 eats our [], so we need to use [ and ] instead.
31535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31536  if test "x$has_forbidden_chars" != x; then
31537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31539  fi
31540
31541
31542  windows_path="$new_path"
31543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31544    unix_path=`$CYGPATH -u "$windows_path"`
31545    new_path="$unix_path"
31546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31548    new_path="$unix_path"
31549  fi
31550
31551  if test "x$path" != "x$new_path"; then
31552    BUILD_JDK="$new_path"
31553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31554$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31555  fi
31556
31557  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31558  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31559
31560    else
31561      # We're on a unix platform. Hooray! :)
31562      path="$BUILD_JDK"
31563      has_space=`$ECHO "$path" | $GREP " "`
31564      if test "x$has_space" != x; then
31565        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31566$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31567        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31568      fi
31569
31570      # Use eval to expand a potential ~
31571      eval path="$path"
31572      if test ! -f "$path" && test ! -d "$path"; then
31573        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31574      fi
31575
31576      if test -d "$path"; then
31577        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31578      else
31579        dir="`$DIRNAME "$path"`"
31580        base="`$BASENAME "$path"`"
31581        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31582      fi
31583    fi
31584  fi
31585
31586          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31587$as_echo_n "checking for Build JDK... " >&6; }
31588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31589$as_echo "$BUILD_JDK" >&6; }
31590          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31591$as_echo_n "checking Build JDK version... " >&6; }
31592          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31594$as_echo "$BUILD_JDK_VERSION" >&6; }
31595        fi # end check jdk version
31596      fi # end check java
31597    fi # end check build jdk found
31598  fi
31599
31600    EXTERNAL_BUILDJDK=true
31601  else
31602    if test "x$COMPILE_TYPE" = "xcross"; then
31603      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31604      BUILD_JDK_FOUND=yes
31605      CREATE_BUILDJDK=true
31606      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31607$as_echo_n "checking for Build JDK... " >&6; }
31608      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31609$as_echo "yes, will build it for the host platform" >&6; }
31610    else
31611      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31612      BUILD_JDK_FOUND=yes
31613      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31614$as_echo_n "checking for Build JDK... " >&6; }
31615      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31616$as_echo "yes, will use output dir" >&6; }
31617    fi
31618  fi
31619
31620  JMOD="$BUILD_JDK/bin/jmod"
31621  JLINK="$BUILD_JDK/bin/jlink"
31622
31623
31624
31625  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31626    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31627$as_echo_n "checking for Build JDK... " >&6; }
31628    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31629$as_echo "no" >&6; }
31630    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31631  fi
31632
31633
31634
31635
31636
31637
31638###############################################################################
31639#
31640# Configure the sources to use. We can add or override individual directories.
31641#
31642###############################################################################
31643
31644
31645  # Where are the sources.
31646  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31647  CORBA_TOPDIR="$SRC_ROOT/corba"
31648  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31649  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31650  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31651  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31652  JDK_TOPDIR="$SRC_ROOT/jdk"
31653
31654
31655
31656
31657
31658
31659
31660
31661
31662  # This feature is no longer supported.
31663
31664
31665
31666# Check whether --with-add-source-root was given.
31667if test "${with_add_source_root+set}" = set; then :
31668  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
31669$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31670fi
31671
31672
31673
31674
31675# Check whether --with-override-source-root was given.
31676if test "${with_override_source_root+set}" = set; then :
31677  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
31678$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31679fi
31680
31681
31682
31683
31684# Check whether --with-adds-and-overrides was given.
31685if test "${with_adds_and_overrides+set}" = set; then :
31686  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
31687$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31688fi
31689
31690
31691
31692
31693# Check whether --with-override-langtools was given.
31694if test "${with_override_langtools+set}" = set; then :
31695  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31696$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31697fi
31698
31699
31700
31701
31702# Check whether --with-override-corba was given.
31703if test "${with_override_corba+set}" = set; then :
31704  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31705$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31706fi
31707
31708
31709
31710
31711# Check whether --with-override-jaxp was given.
31712if test "${with_override_jaxp+set}" = set; then :
31713  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31714$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31715fi
31716
31717
31718
31719
31720# Check whether --with-override-jaxws was given.
31721if test "${with_override_jaxws+set}" = set; then :
31722  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31723$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31724fi
31725
31726
31727
31728
31729# Check whether --with-override-hotspot was given.
31730if test "${with_override_hotspot+set}" = set; then :
31731  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31732$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31733fi
31734
31735
31736
31737
31738# Check whether --with-override-nashorn was given.
31739if test "${with_override_nashorn+set}" = set; then :
31740  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31741$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31742fi
31743
31744
31745
31746
31747# Check whether --with-override-jdk was given.
31748if test "${with_override_jdk+set}" = set; then :
31749  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31750$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31751fi
31752
31753
31754
31755
31756  BUILD_OUTPUT="$OUTPUT_ROOT"
31757
31758  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31759
31760
31761
31762# Check whether --with-import_hotspot was given.
31763if test "${with_import_hotspot+set}" = set; then :
31764  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31765$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31766fi
31767
31768
31769
31770
31771
31772
31773# Check whether --with-import-modules was given.
31774if test "${with_import_modules+set}" = set; then :
31775  withval=$with_import_modules;
31776fi
31777
31778
31779  if test "x$with_import_modules" != x \
31780      && test "x$with_import_modules" != "xno"; then
31781    if test -d "$with_import_modules"; then
31782      IMPORT_MODULES_TOPDIR="$with_import_modules"
31783
31784  # Only process if variable expands to non-empty
31785
31786  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31787    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31788
31789  # Input might be given as Windows format, start by converting to
31790  # unix format.
31791  path="$IMPORT_MODULES_TOPDIR"
31792  new_path=`$CYGPATH -u "$path"`
31793
31794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31797  # "foo.exe" is OK but "foo" is an error.
31798  #
31799  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31800  # It is also a way to make sure we got the proper file name for the real test later on.
31801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31802  if test "x$test_shortpath" = x; then
31803    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31804$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31805    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31806  fi
31807
31808  # Call helper function which possibly converts this using DOS-style short mode.
31809  # If so, the updated path is stored in $new_path.
31810
31811  input_path="$new_path"
31812  # Check if we need to convert this using DOS-style short mode. If the path
31813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31814  # take no chances and rewrite it.
31815  # Note: m4 eats our [], so we need to use [ and ] instead.
31816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31817  if test "x$has_forbidden_chars" != x; then
31818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31822      # Going to short mode and back again did indeed matter. Since short mode is
31823      # case insensitive, let's make it lowercase to improve readability.
31824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31825      # Now convert it back to Unix-style (cygpath)
31826      input_path=`$CYGPATH -u "$shortmode_path"`
31827      new_path="$input_path"
31828    fi
31829  fi
31830
31831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31832  if test "x$test_cygdrive_prefix" = x; then
31833    # As a simple fix, exclude /usr/bin since it's not a real path.
31834    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31836      # a path prefixed by /cygdrive for fixpath to work.
31837      new_path="$CYGWIN_ROOT_PATH$input_path"
31838    fi
31839  fi
31840
31841
31842  if test "x$path" != "x$new_path"; then
31843    IMPORT_MODULES_TOPDIR="$new_path"
31844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31845$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31846  fi
31847
31848    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31849
31850  path="$IMPORT_MODULES_TOPDIR"
31851  has_colon=`$ECHO $path | $GREP ^.:`
31852  new_path="$path"
31853  if test "x$has_colon" = x; then
31854    # Not in mixed or Windows style, start by that.
31855    new_path=`cmd //c echo $path`
31856  fi
31857
31858
31859  input_path="$new_path"
31860  # Check if we need to convert this using DOS-style short mode. If the path
31861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31862  # take no chances and rewrite it.
31863  # Note: m4 eats our [], so we need to use [ and ] instead.
31864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31865  if test "x$has_forbidden_chars" != x; then
31866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31867    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31868  fi
31869
31870
31871  windows_path="$new_path"
31872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31873    unix_path=`$CYGPATH -u "$windows_path"`
31874    new_path="$unix_path"
31875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31877    new_path="$unix_path"
31878  fi
31879
31880  if test "x$path" != "x$new_path"; then
31881    IMPORT_MODULES_TOPDIR="$new_path"
31882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31883$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31884  fi
31885
31886  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31887  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31888
31889    else
31890      # We're on a unix platform. Hooray! :)
31891      path="$IMPORT_MODULES_TOPDIR"
31892      has_space=`$ECHO "$path" | $GREP " "`
31893      if test "x$has_space" != x; then
31894        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31895$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31896        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31897      fi
31898
31899      # Use eval to expand a potential ~
31900      eval path="$path"
31901      if test ! -f "$path" && test ! -d "$path"; then
31902        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31903      fi
31904
31905      if test -d "$path"; then
31906        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31907      else
31908        dir="`$DIRNAME "$path"`"
31909        base="`$BASENAME "$path"`"
31910        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31911      fi
31912    fi
31913  fi
31914
31915    elif test -e "$with_import_modules"; then
31916      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31917      $RM -rf "$IMPORT_MODULES_TOPDIR"
31918      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31919      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31920        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31921      fi
31922    else
31923      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31924    fi
31925  fi
31926
31927  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31928    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31929  fi
31930  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31931    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31932  fi
31933  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31934    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31935  fi
31936  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31937    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31938  fi
31939  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31940    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31941  fi
31942  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31943    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31944  fi
31945  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31946    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31947  fi
31948  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31949    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31950  fi
31951
31952
31953
31954
31955
31956
31957
31958
31959
31960
31961
31962###############################################################################
31963#
31964# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31965# native code.
31966#
31967###############################################################################
31968
31969# See if we are doing a complete static build or not
31970
31971  # Check whether --enable-static-build was given.
31972if test "${enable_static_build+set}" = set; then :
31973  enableval=$enable_static_build;
31974fi
31975
31976  STATIC_BUILD=false
31977  if test "x$enable_static_build" = "xyes"; then
31978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31979$as_echo_n "checking if static build is enabled... " >&6; }
31980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31981$as_echo "yes" >&6; }
31982    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31983      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31984    fi
31985    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31986    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31987    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31988    STATIC_BUILD=true
31989  elif test "x$enable_static_build" = "xno"; then
31990    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31991$as_echo_n "checking if static build is enabled... " >&6; }
31992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31993$as_echo "no" >&6; }
31994  elif test "x$enable_static_build" != "x"; then
31995    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31996  fi
31997
31998
31999
32000
32001# First determine the toolchain type (compiler family)
32002
32003
32004# Check whether --with-toolchain-type was given.
32005if test "${with_toolchain_type+set}" = set; then :
32006  withval=$with_toolchain_type;
32007fi
32008
32009
32010  # Use indirect variable referencing
32011  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
32012  VALID_TOOLCHAINS=${!toolchain_var_name}
32013
32014  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32015    if test -n "$XCODEBUILD"; then
32016      # On Mac OS X, default toolchain to clang after Xcode 5
32017      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
32018      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
32019      if test $? -ne 0; then
32020        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
32021      fi
32022      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
32023          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
32024          $CUT -f 1 -d .`
32025      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
32026$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
32027      if test $XCODE_MAJOR_VERSION -ge 5; then
32028          DEFAULT_TOOLCHAIN="clang"
32029      else
32030          DEFAULT_TOOLCHAIN="gcc"
32031      fi
32032    else
32033      # If Xcode is not installed, but the command line tools are
32034      # then we can't run xcodebuild. On these systems we should
32035      # default to clang
32036      DEFAULT_TOOLCHAIN="clang"
32037    fi
32038  else
32039    # First toolchain type in the list is the default
32040    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32041  fi
32042
32043  if test "x$with_toolchain_type" = xlist; then
32044    # List all toolchains
32045    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32046$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32047    for toolchain in $VALID_TOOLCHAINS; do
32048      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32049      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32050      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32051    done
32052
32053    exit 0
32054  elif test "x$with_toolchain_type" != x; then
32055    # User override; check that it is valid
32056    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32057      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32058$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32059      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32060$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32061      as_fn_error $? "Cannot continue." "$LINENO" 5
32062    fi
32063    TOOLCHAIN_TYPE=$with_toolchain_type
32064  else
32065    # No flag given, use default
32066    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32067  fi
32068
32069
32070  TOOLCHAIN_CC_BINARY_clang="clang"
32071  TOOLCHAIN_CC_BINARY_gcc="gcc"
32072  TOOLCHAIN_CC_BINARY_microsoft="cl"
32073  TOOLCHAIN_CC_BINARY_solstudio="cc"
32074  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32075
32076  TOOLCHAIN_CXX_BINARY_clang="clang++"
32077  TOOLCHAIN_CXX_BINARY_gcc="g++"
32078  TOOLCHAIN_CXX_BINARY_microsoft="cl"
32079  TOOLCHAIN_CXX_BINARY_solstudio="CC"
32080  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32081
32082  # Use indirect variable referencing
32083  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32084  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32085  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32086  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32087  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32088  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32089  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32090  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32091
32092
32093  # Define filename patterns
32094  if test "x$OPENJDK_TARGET_OS" = xwindows; then
32095    LIBRARY_PREFIX=
32096    SHARED_LIBRARY_SUFFIX='.dll'
32097    STATIC_LIBRARY_SUFFIX='.lib'
32098    SHARED_LIBRARY='$1.dll'
32099    STATIC_LIBRARY='$1.lib'
32100    OBJ_SUFFIX='.obj'
32101    EXE_SUFFIX='.exe'
32102  else
32103    LIBRARY_PREFIX=lib
32104    SHARED_LIBRARY_SUFFIX='.so'
32105    STATIC_LIBRARY_SUFFIX='.a'
32106    SHARED_LIBRARY='lib$1.so'
32107    STATIC_LIBRARY='lib$1.a'
32108    OBJ_SUFFIX='.o'
32109    EXE_SUFFIX=''
32110    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32111      # For full static builds, we're overloading the SHARED_LIBRARY
32112      # variables in order to limit the amount of changes required.
32113      # It would be better to remove SHARED and just use LIBRARY and
32114      # LIBRARY_SUFFIX for libraries that can be built either
32115      # shared or static and use STATIC_* for libraries that are
32116      # always built statically.
32117      if test "x$STATIC_BUILD" = xtrue; then
32118        SHARED_LIBRARY='lib$1.a'
32119        SHARED_LIBRARY_SUFFIX='.a'
32120      else
32121        SHARED_LIBRARY='lib$1.dylib'
32122        SHARED_LIBRARY_SUFFIX='.dylib'
32123      fi
32124    fi
32125  fi
32126
32127
32128
32129
32130
32131
32132
32133
32134
32135
32136  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32137    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32138$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32139  else
32140    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32141$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32142  fi
32143
32144
32145# User supplied flags should be used when configure detects compilers
32146
32147  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32148    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32149$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32150  fi
32151
32152  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32153    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32154$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32155  fi
32156
32157  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32158    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32159$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32160  fi
32161
32162
32163# Check whether --with-extra-cflags was given.
32164if test "${with_extra_cflags+set}" = set; then :
32165  withval=$with_extra_cflags;
32166fi
32167
32168
32169
32170# Check whether --with-extra-cxxflags was given.
32171if test "${with_extra_cxxflags+set}" = set; then :
32172  withval=$with_extra_cxxflags;
32173fi
32174
32175
32176
32177# Check whether --with-extra-ldflags was given.
32178if test "${with_extra_ldflags+set}" = set; then :
32179  withval=$with_extra_ldflags;
32180fi
32181
32182
32183  EXTRA_CFLAGS="$with_extra_cflags"
32184  EXTRA_CXXFLAGS="$with_extra_cxxflags"
32185  EXTRA_LDFLAGS="$with_extra_ldflags"
32186
32187
32188
32189
32190
32191  # The global CFLAGS and LDLAGS variables are used by configure tests and
32192  # should include the extra parameters
32193  CFLAGS="$EXTRA_CFLAGS"
32194  CXXFLAGS="$EXTRA_CXXFLAGS"
32195  LDFLAGS="$EXTRA_LDFLAGS"
32196  CPPFLAGS=""
32197
32198# The sysroot cflags are needed for configure to be able to run the compilers
32199
32200  if test "x$SYSROOT" != "x"; then
32201    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32202      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32203        # Solaris Studio does not have a concept of sysroot. Instead we must
32204        # make sure the default include and lib dirs are appended to each
32205        # compile and link command line. Must also add -I-xbuiltin to enable
32206        # inlining of system functions and intrinsics.
32207        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32208        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32209            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32210      fi
32211    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32212      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32213      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32214    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32215      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32216      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32217    fi
32218    # The global CFLAGS and LDFLAGS variables need these for configure to function
32219    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32220    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32221    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32222    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32223  fi
32224
32225  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32226    # We also need -iframework<path>/System/Library/Frameworks
32227    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32228    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32229    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32230    # set this here so it doesn't have to be peppered throughout the forest
32231    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32232    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32233  fi
32234
32235
32236
32237
32238
32239# Then detect the actual binaries needed
32240
32241  # FIXME: Is this needed?
32242  ac_ext=cpp
32243ac_cpp='$CXXCPP $CPPFLAGS'
32244ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32245ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32246ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32247
32248
32249  # Store the CFLAGS etc passed to the configure script.
32250  ORG_CFLAGS="$CFLAGS"
32251  ORG_CXXFLAGS="$CXXFLAGS"
32252
32253  # autoconf magic only relies on PATH, so update it if tools dir is specified
32254  OLD_PATH="$PATH"
32255
32256  # On Windows, we need to detect the visual studio installation first.
32257  # This will change the PATH, but we need to keep that new PATH even
32258  # after toolchain detection is done, since the compiler (on x86) uses
32259  # it for DLL resolution in runtime.
32260  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32261      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32262
32263  # Store path to cygwin link.exe to help excluding it when searching for
32264  # VS linker. This must be done before changing the PATH when looking for VS.
32265  # Extract the first word of "link", so it can be a program name with args.
32266set dummy link; ac_word=$2
32267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32268$as_echo_n "checking for $ac_word... " >&6; }
32269if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32270  $as_echo_n "(cached) " >&6
32271else
32272  case $CYGWIN_LINK in
32273  [\\/]* | ?:[\\/]*)
32274  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32275  ;;
32276  *)
32277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32278for as_dir in $PATH
32279do
32280  IFS=$as_save_IFS
32281  test -z "$as_dir" && as_dir=.
32282    for ac_exec_ext in '' $ac_executable_extensions; do
32283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32284    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32286    break 2
32287  fi
32288done
32289  done
32290IFS=$as_save_IFS
32291
32292  ;;
32293esac
32294fi
32295CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32296if test -n "$CYGWIN_LINK"; then
32297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32298$as_echo "$CYGWIN_LINK" >&6; }
32299else
32300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32301$as_echo "no" >&6; }
32302fi
32303
32304
32305  if test "x$CYGWIN_LINK" != x; then
32306    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32307$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32308    "$CYGWIN_LINK" --version > /dev/null
32309    if test $? -eq 0 ; then
32310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32311$as_echo "yes" >&6; }
32312    else
32313      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32314$as_echo "no" >&6; }
32315      # This might be the VS linker. Don't exclude it later on.
32316      CYGWIN_LINK=""
32317    fi
32318  fi
32319
32320  # First-hand choice is to locate and run the vsvars bat file.
32321
32322
32323# Check whether --with-toolchain-version was given.
32324if test "${with_toolchain_version+set}" = set; then :
32325  withval=$with_toolchain_version;
32326fi
32327
32328
32329  if test "x$with_toolchain_version" = xlist; then
32330    # List all toolchains
32331    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32332$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32333    for version in $VALID_VS_VERSIONS; do
32334      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32335      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32336    done
32337
32338    exit 0
32339  elif test "x$DEVKIT_VS_VERSION" != x; then
32340    VS_VERSION=$DEVKIT_VS_VERSION
32341    TOOLCHAIN_VERSION=$VS_VERSION
32342    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32343    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32344    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32345    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32346    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32347    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32348
32349    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32350    # can still be exported as INCLUDE for compiler invocations without
32351    # SYSROOT_CFLAGS
32352    OLDIFS="$IFS"
32353    IFS=";"
32354    for i in $DEVKIT_VS_INCLUDE; do
32355      ipath=$i
32356
32357  unix_path="$ipath"
32358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32359    windows_path=`$CYGPATH -m "$unix_path"`
32360    ipath="$windows_path"
32361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32362    windows_path=`cmd //c echo $unix_path`
32363    ipath="$windows_path"
32364  fi
32365
32366      VS_INCLUDE="$VS_INCLUDE;$ipath"
32367    done
32368    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32369    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32370    for i in $DEVKIT_VS_LIB; do
32371      libpath=$i
32372
32373  unix_path="$libpath"
32374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32375    windows_path=`$CYGPATH -m "$unix_path"`
32376    libpath="$windows_path"
32377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32378    windows_path=`cmd //c echo $unix_path`
32379    libpath="$windows_path"
32380  fi
32381
32382      VS_LIB="$VS_LIB;$libpath"
32383    done
32384    IFS="$OLDIFS"
32385
32386    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32387$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32388
32389  elif test "x$with_toolchain_version" != x; then
32390    # User override; check that it is valid
32391    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32392      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32393$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32394      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32395$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32396      as_fn_error $? "Cannot continue." "$LINENO" 5
32397    fi
32398    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32399  else
32400    # No flag given, use default
32401    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32402  fi
32403
32404  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32405
32406  VS_VERSION="$VS_VERSION"
32407  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32408  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32409  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32410  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32411
32412  # When using --with-tools-dir, assume it points to the correct and default
32413  # version of Visual Studio or that --with-toolchain-version was also set.
32414  if test "x$with_tools_dir" != x; then
32415
32416  if test "x$VS_ENV_CMD" = x; then
32417    VS_VERSION="${VS_VERSION}"
32418    VS_BASE="$with_tools_dir/../.."
32419    METHOD="--with-tools-dir"
32420
32421    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32422      VCVARSFILE="vc/bin/vcvars32.bat"
32423    else
32424      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32425    fi
32426
32427
32428  windows_path="$VS_BASE"
32429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32430    unix_path=`$CYGPATH -u "$windows_path"`
32431    VS_BASE="$unix_path"
32432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32434    VS_BASE="$unix_path"
32435  fi
32436
32437    if test -d "$VS_BASE"; then
32438      if test -f "$VS_BASE/$VCVARSFILE"; then
32439        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32440$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32441        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32442        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32443        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32444        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32445      else
32446        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32447$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32448        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32449$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32450      fi
32451    fi
32452  fi
32453
32454
32455  if test "x$VS_ENV_CMD" = x; then
32456    VS_VERSION="${VS_VERSION}"
32457    VS_BASE="$with_tools_dir/../../.."
32458    METHOD="--with-tools-dir"
32459
32460    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32461      VCVARSFILE="vc/bin/vcvars32.bat"
32462    else
32463      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32464    fi
32465
32466
32467  windows_path="$VS_BASE"
32468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32469    unix_path=`$CYGPATH -u "$windows_path"`
32470    VS_BASE="$unix_path"
32471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32473    VS_BASE="$unix_path"
32474  fi
32475
32476    if test -d "$VS_BASE"; then
32477      if test -f "$VS_BASE/$VCVARSFILE"; then
32478        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32479$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32480        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32481        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32482        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32483        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32484      else
32485        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32486$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32487        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32488$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32489      fi
32490    fi
32491  fi
32492
32493    if test "x$VS_ENV_CMD" = x; then
32494      # Having specified an argument which is incorrect will produce an instant failure;
32495      # we should not go on looking
32496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32497$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32498      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32499$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32500      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32501$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32502      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32503    fi
32504  fi
32505
32506  VS_ENV_CMD=""
32507  VS_ENV_ARGS=""
32508
32509  if test "x$VS_COMNTOOLS" != x; then
32510
32511  if test "x$VS_ENV_CMD" = x; then
32512    VS_VERSION="${VS_VERSION}"
32513    VS_BASE="$VS_COMNTOOLS/../.."
32514    METHOD="$VS_COMNTOOLS_VAR variable"
32515
32516    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32517      VCVARSFILE="vc/bin/vcvars32.bat"
32518    else
32519      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32520    fi
32521
32522
32523  windows_path="$VS_BASE"
32524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32525    unix_path=`$CYGPATH -u "$windows_path"`
32526    VS_BASE="$unix_path"
32527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32529    VS_BASE="$unix_path"
32530  fi
32531
32532    if test -d "$VS_BASE"; then
32533      if test -f "$VS_BASE/$VCVARSFILE"; then
32534        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32535$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32536        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32537        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32538        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32539        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32540      else
32541        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32542$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32543        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32544$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32545      fi
32546    fi
32547  fi
32548
32549  fi
32550  if test "x$PROGRAMFILES" != x; then
32551
32552  if test "x$VS_ENV_CMD" = x; then
32553    VS_VERSION="${VS_VERSION}"
32554    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32555    METHOD="well-known name"
32556
32557    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32558      VCVARSFILE="vc/bin/vcvars32.bat"
32559    else
32560      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32561    fi
32562
32563
32564  windows_path="$VS_BASE"
32565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32566    unix_path=`$CYGPATH -u "$windows_path"`
32567    VS_BASE="$unix_path"
32568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32570    VS_BASE="$unix_path"
32571  fi
32572
32573    if test -d "$VS_BASE"; then
32574      if test -f "$VS_BASE/$VCVARSFILE"; then
32575        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32576$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32577        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32578        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32579        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32580        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32581      else
32582        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32583$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32584        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32585$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32586      fi
32587    fi
32588  fi
32589
32590  fi
32591  # Work around the insanely named ProgramFiles(x86) env variable
32592  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32593  if test "x$PROGRAMFILES_X86" != x; then
32594
32595  if test "x$VS_ENV_CMD" = x; then
32596    VS_VERSION="${VS_VERSION}"
32597    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32598    METHOD="well-known name"
32599
32600    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32601      VCVARSFILE="vc/bin/vcvars32.bat"
32602    else
32603      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32604    fi
32605
32606
32607  windows_path="$VS_BASE"
32608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32609    unix_path=`$CYGPATH -u "$windows_path"`
32610    VS_BASE="$unix_path"
32611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32613    VS_BASE="$unix_path"
32614  fi
32615
32616    if test -d "$VS_BASE"; then
32617      if test -f "$VS_BASE/$VCVARSFILE"; then
32618        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32619$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32620        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32621        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32622        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32623        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32624      else
32625        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32626$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32627        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32628$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32629      fi
32630    fi
32631  fi
32632
32633  fi
32634
32635  if test "x$VS_ENV_CMD" = x; then
32636    VS_VERSION="${VS_VERSION}"
32637    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32638    METHOD="well-known name"
32639
32640    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32641      VCVARSFILE="vc/bin/vcvars32.bat"
32642    else
32643      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32644    fi
32645
32646
32647  windows_path="$VS_BASE"
32648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32649    unix_path=`$CYGPATH -u "$windows_path"`
32650    VS_BASE="$unix_path"
32651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32653    VS_BASE="$unix_path"
32654  fi
32655
32656    if test -d "$VS_BASE"; then
32657      if test -f "$VS_BASE/$VCVARSFILE"; then
32658        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32659$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32660        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32661        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32662        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32663        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32664      else
32665        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32666$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32667        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32668$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32669      fi
32670    fi
32671  fi
32672
32673
32674  if test "x$VS_ENV_CMD" = x; then
32675    VS_VERSION="${VS_VERSION}"
32676    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32677    METHOD="well-known name"
32678
32679    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32680      VCVARSFILE="vc/bin/vcvars32.bat"
32681    else
32682      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32683    fi
32684
32685
32686  windows_path="$VS_BASE"
32687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32688    unix_path=`$CYGPATH -u "$windows_path"`
32689    VS_BASE="$unix_path"
32690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32692    VS_BASE="$unix_path"
32693  fi
32694
32695    if test -d "$VS_BASE"; then
32696      if test -f "$VS_BASE/$VCVARSFILE"; then
32697        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32698$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32699        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32700        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32701        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32702        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32703      else
32704        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32705$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32706        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32707$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32708      fi
32709    fi
32710  fi
32711
32712
32713  if test "x$SDK_INSTALL_DIR" != x; then
32714    if test "x$ProgramW6432" != x; then
32715
32716  if test "x$VS_ENV_CMD" = x; then
32717    VS_VERSION="${VS_VERSION}"
32718    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32719    METHOD="well-known name"
32720
32721  windows_path="$WIN_SDK_BASE"
32722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32723    unix_path=`$CYGPATH -u "$windows_path"`
32724    WIN_SDK_BASE="$unix_path"
32725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32727    WIN_SDK_BASE="$unix_path"
32728  fi
32729
32730    if test -d "$WIN_SDK_BASE"; then
32731      # There have been cases of partial or broken SDK installations. A missing
32732      # lib dir is not going to work.
32733      if test ! -d "$WIN_SDK_BASE/lib"; then
32734        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32735$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32736        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32737$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32738      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32739        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32740$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32741        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32742        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32743          VS_ENV_ARGS="/x86"
32744        else
32745          VS_ENV_ARGS="/x64"
32746        fi
32747        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32748        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32749        # TODO: improve detection for other versions of SDK
32750        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32751      else
32752        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32753$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32754        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32755$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32756      fi
32757    fi
32758  fi
32759
32760    fi
32761    if test "x$PROGRAMW6432" != x; then
32762
32763  if test "x$VS_ENV_CMD" = x; then
32764    VS_VERSION="${VS_VERSION}"
32765    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32766    METHOD="well-known name"
32767
32768  windows_path="$WIN_SDK_BASE"
32769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32770    unix_path=`$CYGPATH -u "$windows_path"`
32771    WIN_SDK_BASE="$unix_path"
32772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32774    WIN_SDK_BASE="$unix_path"
32775  fi
32776
32777    if test -d "$WIN_SDK_BASE"; then
32778      # There have been cases of partial or broken SDK installations. A missing
32779      # lib dir is not going to work.
32780      if test ! -d "$WIN_SDK_BASE/lib"; then
32781        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32782$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32783        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32784$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32785      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32786        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32787$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32788        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32789        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32790          VS_ENV_ARGS="/x86"
32791        else
32792          VS_ENV_ARGS="/x64"
32793        fi
32794        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32795        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32796        # TODO: improve detection for other versions of SDK
32797        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32798      else
32799        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32800$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32801        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32802$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32803      fi
32804    fi
32805  fi
32806
32807    fi
32808    if test "x$PROGRAMFILES" != x; then
32809
32810  if test "x$VS_ENV_CMD" = x; then
32811    VS_VERSION="${VS_VERSION}"
32812    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32813    METHOD="well-known name"
32814
32815  windows_path="$WIN_SDK_BASE"
32816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32817    unix_path=`$CYGPATH -u "$windows_path"`
32818    WIN_SDK_BASE="$unix_path"
32819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32821    WIN_SDK_BASE="$unix_path"
32822  fi
32823
32824    if test -d "$WIN_SDK_BASE"; then
32825      # There have been cases of partial or broken SDK installations. A missing
32826      # lib dir is not going to work.
32827      if test ! -d "$WIN_SDK_BASE/lib"; then
32828        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32829$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32830        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32831$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32832      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32833        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32834$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32835        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32836        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32837          VS_ENV_ARGS="/x86"
32838        else
32839          VS_ENV_ARGS="/x64"
32840        fi
32841        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32842        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32843        # TODO: improve detection for other versions of SDK
32844        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32845      else
32846        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32847$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32848        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32849$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32850      fi
32851    fi
32852  fi
32853
32854    fi
32855
32856  if test "x$VS_ENV_CMD" = x; then
32857    VS_VERSION="${VS_VERSION}"
32858    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32859    METHOD="well-known name"
32860
32861  windows_path="$WIN_SDK_BASE"
32862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32863    unix_path=`$CYGPATH -u "$windows_path"`
32864    WIN_SDK_BASE="$unix_path"
32865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32867    WIN_SDK_BASE="$unix_path"
32868  fi
32869
32870    if test -d "$WIN_SDK_BASE"; then
32871      # There have been cases of partial or broken SDK installations. A missing
32872      # lib dir is not going to work.
32873      if test ! -d "$WIN_SDK_BASE/lib"; then
32874        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32875$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32876        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32877$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32878      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32879        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32880$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32881        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32882        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32883          VS_ENV_ARGS="/x86"
32884        else
32885          VS_ENV_ARGS="/x64"
32886        fi
32887        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32888        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32889        # TODO: improve detection for other versions of SDK
32890        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32891      else
32892        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32893$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32894        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32895$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32896      fi
32897    fi
32898  fi
32899
32900
32901  if test "x$VS_ENV_CMD" = x; then
32902    VS_VERSION="${VS_VERSION}"
32903    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32904    METHOD="well-known name"
32905
32906  windows_path="$WIN_SDK_BASE"
32907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32908    unix_path=`$CYGPATH -u "$windows_path"`
32909    WIN_SDK_BASE="$unix_path"
32910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32912    WIN_SDK_BASE="$unix_path"
32913  fi
32914
32915    if test -d "$WIN_SDK_BASE"; then
32916      # There have been cases of partial or broken SDK installations. A missing
32917      # lib dir is not going to work.
32918      if test ! -d "$WIN_SDK_BASE/lib"; then
32919        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32920$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32921        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32922$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32923      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32924        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32925$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32926        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32927        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32928          VS_ENV_ARGS="/x86"
32929        else
32930          VS_ENV_ARGS="/x64"
32931        fi
32932        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32933        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32934        # TODO: improve detection for other versions of SDK
32935        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32936      else
32937        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32938$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32939        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32940$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32941      fi
32942    fi
32943  fi
32944
32945  fi
32946
32947    if test "x$VS_ENV_CMD" != x; then
32948      TOOLCHAIN_VERSION=$VS_VERSION
32949      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32950      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32951      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32952      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32953      # The rest of the variables are already evaled while probing
32954      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32955$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32956      break
32957    fi
32958  done
32959
32960
32961  # If we have a devkit, skip all of the below.
32962  if test "x$DEVKIT_VS_VERSION" = x; then
32963    if test "x$VS_ENV_CMD" != x; then
32964      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32965
32966  # Only process if variable expands to non-empty
32967
32968  if test "x$VS_ENV_CMD" != x; then
32969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32970
32971  # First separate the path from the arguments. This will split at the first
32972  # space.
32973  complete="$VS_ENV_CMD"
32974  path="${complete%% *}"
32975  tmp="$complete EOL"
32976  arguments="${tmp#* }"
32977
32978  # Input might be given as Windows format, start by converting to
32979  # unix format.
32980  new_path=`$CYGPATH -u "$path"`
32981
32982  # Now try to locate executable using which
32983  new_path=`$WHICH "$new_path" 2> /dev/null`
32984  # bat and cmd files are not always considered executable in cygwin causing which
32985  # to not find them
32986  if test "x$new_path" = x \
32987      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32988      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32989    new_path=`$CYGPATH -u "$path"`
32990  fi
32991  if test "x$new_path" = x; then
32992    # Oops. Which didn't find the executable.
32993    # The splitting of arguments from the executable at a space might have been incorrect,
32994    # since paths with space are more likely in Windows. Give it another try with the whole
32995    # argument.
32996    path="$complete"
32997    arguments="EOL"
32998    new_path=`$CYGPATH -u "$path"`
32999    new_path=`$WHICH "$new_path" 2> /dev/null`
33000    # bat and cmd files are not always considered executable in cygwin causing which
33001    # to not find them
33002    if test "x$new_path" = x \
33003        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33004        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33005      new_path=`$CYGPATH -u "$path"`
33006    fi
33007    if test "x$new_path" = x; then
33008      # It's still not found. Now this is an unrecoverable error.
33009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33010$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33011      has_space=`$ECHO "$complete" | $GREP " "`
33012      if test "x$has_space" != x; then
33013        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33014$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33015      fi
33016      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33017    fi
33018  fi
33019
33020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33023  # "foo.exe" is OK but "foo" is an error.
33024  #
33025  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33026  # It is also a way to make sure we got the proper file name for the real test later on.
33027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33028  if test "x$test_shortpath" = x; then
33029    # Short path failed, file does not exist as specified.
33030    # Try adding .exe or .cmd
33031    if test -f "${new_path}.exe"; then
33032      input_to_shortpath="${new_path}.exe"
33033    elif test -f "${new_path}.cmd"; then
33034      input_to_shortpath="${new_path}.cmd"
33035    else
33036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
33037$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
33038      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33039$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33040      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33041    fi
33042  else
33043    input_to_shortpath="$new_path"
33044  fi
33045
33046  # Call helper function which possibly converts this using DOS-style short mode.
33047  # If so, the updated path is stored in $new_path.
33048  new_path="$input_to_shortpath"
33049
33050  input_path="$input_to_shortpath"
33051  # Check if we need to convert this using DOS-style short mode. If the path
33052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33053  # take no chances and rewrite it.
33054  # Note: m4 eats our [], so we need to use [ and ] instead.
33055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33056  if test "x$has_forbidden_chars" != x; then
33057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33061      # Going to short mode and back again did indeed matter. Since short mode is
33062      # case insensitive, let's make it lowercase to improve readability.
33063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33064      # Now convert it back to Unix-style (cygpath)
33065      input_path=`$CYGPATH -u "$shortmode_path"`
33066      new_path="$input_path"
33067    fi
33068  fi
33069
33070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33071  if test "x$test_cygdrive_prefix" = x; then
33072    # As a simple fix, exclude /usr/bin since it's not a real path.
33073    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33075      # a path prefixed by /cygdrive for fixpath to work.
33076      new_path="$CYGWIN_ROOT_PATH$input_path"
33077    fi
33078  fi
33079
33080  # remove trailing .exe if any
33081  new_path="${new_path/%.exe/}"
33082
33083    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33084
33085  # First separate the path from the arguments. This will split at the first
33086  # space.
33087  complete="$VS_ENV_CMD"
33088  path="${complete%% *}"
33089  tmp="$complete EOL"
33090  arguments="${tmp#* }"
33091
33092  # Input might be given as Windows format, start by converting to
33093  # unix format.
33094  new_path="$path"
33095
33096  windows_path="$new_path"
33097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33098    unix_path=`$CYGPATH -u "$windows_path"`
33099    new_path="$unix_path"
33100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33102    new_path="$unix_path"
33103  fi
33104
33105
33106  # Now try to locate executable using which
33107  new_path=`$WHICH "$new_path" 2> /dev/null`
33108
33109  if test "x$new_path" = x; then
33110    # Oops. Which didn't find the executable.
33111    # The splitting of arguments from the executable at a space might have been incorrect,
33112    # since paths with space are more likely in Windows. Give it another try with the whole
33113    # argument.
33114    path="$complete"
33115    arguments="EOL"
33116    new_path="$path"
33117
33118  windows_path="$new_path"
33119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33120    unix_path=`$CYGPATH -u "$windows_path"`
33121    new_path="$unix_path"
33122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33124    new_path="$unix_path"
33125  fi
33126
33127
33128    new_path=`$WHICH "$new_path" 2> /dev/null`
33129    # bat and cmd files are not always considered executable in MSYS causing which
33130    # to not find them
33131    if test "x$new_path" = x \
33132        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33133        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33134      new_path="$path"
33135
33136  windows_path="$new_path"
33137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33138    unix_path=`$CYGPATH -u "$windows_path"`
33139    new_path="$unix_path"
33140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33142    new_path="$unix_path"
33143  fi
33144
33145    fi
33146
33147    if test "x$new_path" = x; then
33148      # It's still not found. Now this is an unrecoverable error.
33149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33150$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33151      has_space=`$ECHO "$complete" | $GREP " "`
33152      if test "x$has_space" != x; then
33153        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33154$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33155      fi
33156      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33157    fi
33158  fi
33159
33160  # Now new_path has a complete unix path to the binary
33161  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33162    # Keep paths in /bin as-is, but remove trailing .exe if any
33163    new_path="${new_path/%.exe/}"
33164    # Do not save /bin paths to all_fixpath_prefixes!
33165  else
33166    # Not in mixed or Windows style, start by that.
33167    new_path=`cmd //c echo $new_path`
33168
33169  input_path="$new_path"
33170  # Check if we need to convert this using DOS-style short mode. If the path
33171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33172  # take no chances and rewrite it.
33173  # Note: m4 eats our [], so we need to use [ and ] instead.
33174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33175  if test "x$has_forbidden_chars" != x; then
33176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33178  fi
33179
33180    # Output is in $new_path
33181
33182  windows_path="$new_path"
33183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33184    unix_path=`$CYGPATH -u "$windows_path"`
33185    new_path="$unix_path"
33186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33188    new_path="$unix_path"
33189  fi
33190
33191    # remove trailing .exe if any
33192    new_path="${new_path/%.exe/}"
33193
33194    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33195    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33196  fi
33197
33198    else
33199      # We're on a unix platform. Hooray! :)
33200      # First separate the path from the arguments. This will split at the first
33201      # space.
33202      complete="$VS_ENV_CMD"
33203      path="${complete%% *}"
33204      tmp="$complete EOL"
33205      arguments="${tmp#* }"
33206
33207      # Cannot rely on the command "which" here since it doesn't always work.
33208      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33209      if test -z "$is_absolute_path"; then
33210        # Path to executable is not absolute. Find it.
33211        IFS_save="$IFS"
33212        IFS=:
33213        for p in $PATH; do
33214          if test -f "$p/$path" && test -x "$p/$path"; then
33215            new_path="$p/$path"
33216            break
33217          fi
33218        done
33219        IFS="$IFS_save"
33220      else
33221        # This is an absolute path, we can use it without further modifications.
33222        new_path="$path"
33223      fi
33224
33225      if test "x$new_path" = x; then
33226        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33227$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33228        has_space=`$ECHO "$complete" | $GREP " "`
33229        if test "x$has_space" != x; then
33230          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33231$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33232        fi
33233        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33234      fi
33235    fi
33236
33237    # Now join together the path and the arguments once again
33238    if test "x$arguments" != xEOL; then
33239      new_complete="$new_path ${arguments% *}"
33240    else
33241      new_complete="$new_path"
33242    fi
33243
33244    if test "x$complete" != "x$new_complete"; then
33245      VS_ENV_CMD="$new_complete"
33246      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33247$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33248    fi
33249  fi
33250
33251
33252      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33253      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33254$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33255
33256      # We need to create a couple of temporary files.
33257      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33258      $MKDIR -p $VS_ENV_TMP_DIR
33259
33260      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33261      # Instead create a shell script which will set the relevant variables when run.
33262      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33263
33264  unix_path="$WINPATH_VS_ENV_CMD"
33265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33266    windows_path=`$CYGPATH -m "$unix_path"`
33267    WINPATH_VS_ENV_CMD="$windows_path"
33268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33269    windows_path=`cmd //c echo $unix_path`
33270    WINPATH_VS_ENV_CMD="$windows_path"
33271  fi
33272
33273      WINPATH_BASH="$BASH"
33274
33275  unix_path="$WINPATH_BASH"
33276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33277    windows_path=`$CYGPATH -m "$unix_path"`
33278    WINPATH_BASH="$windows_path"
33279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33280    windows_path=`cmd //c echo $unix_path`
33281    WINPATH_BASH="$windows_path"
33282  fi
33283
33284
33285      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33286      # script (executable by bash) that will setup the important variables.
33287      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33288      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33289      # This will end up something like:
33290      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33291      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33292      # These will end up something like:
33293      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33294      # The trailing space for everyone except PATH is no typo, but is needed due
33295      # to trailing \ in the Windows paths. These will be stripped later.
33296      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33297          >> $EXTRACT_VC_ENV_BAT_FILE
33298      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33299          >> $EXTRACT_VC_ENV_BAT_FILE
33300      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33301          >> $EXTRACT_VC_ENV_BAT_FILE
33302      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33303          >> $EXTRACT_VC_ENV_BAT_FILE
33304      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33305          >> $EXTRACT_VC_ENV_BAT_FILE
33306      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33307          >> $EXTRACT_VC_ENV_BAT_FILE
33308
33309      # Now execute the newly created bat file.
33310      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33311      # Change directory so we don't need to mess with Windows paths in redirects.
33312      cd $VS_ENV_TMP_DIR
33313      cmd /c extract-vs-env.bat | $CAT
33314      cd $CURDIR
33315
33316      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33317        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33318$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33319        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33320$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33321        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33322$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33323        as_fn_error $? "Cannot continue" "$LINENO" 5
33324      fi
33325
33326      # Now set all paths and other env variables. This will allow the rest of
33327      # the configure script to find and run the compiler in the proper way.
33328      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33329$as_echo "$as_me: Setting extracted environment variables" >&6;}
33330      . $VS_ENV_TMP_DIR/set-vs-env.sh
33331      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33332      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33333    else
33334      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33335      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33336$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33337    fi
33338  fi
33339
33340  # At this point, we should have correct variables in the environment, or we can't continue.
33341  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33342$as_echo_n "checking for Visual Studio variables... " >&6; }
33343
33344  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33345      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33346    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33347      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33348$as_echo "present but broken" >&6; }
33349      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33350    else
33351      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33352$as_echo "ok" >&6; }
33353      # Remove any trailing "\" ";" and " " from the variables.
33354      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33355      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33356      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33357      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33358      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33359      # Remove any paths containing # (typically F#) as that messes up make. This
33360      # is needed if visual studio was installed with F# support.
33361      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33362
33363
33364
33365
33366
33367      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33368      OLDIFS="$IFS"
33369      IFS=";"
33370      for i in $VS_INCLUDE; do
33371        ipath=$i
33372        # Only process non-empty elements
33373        if test "x$ipath" != x; then
33374          IFS="$OLDIFS"
33375          # Check that directory exists before calling fixup_path
33376          testpath=$ipath
33377
33378  windows_path="$testpath"
33379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33380    unix_path=`$CYGPATH -u "$windows_path"`
33381    testpath="$unix_path"
33382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33384    testpath="$unix_path"
33385  fi
33386
33387          if test -d "$testpath"; then
33388
33389  # Only process if variable expands to non-empty
33390
33391  if test "x$ipath" != x; then
33392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33393
33394  # Input might be given as Windows format, start by converting to
33395  # unix format.
33396  path="$ipath"
33397  new_path=`$CYGPATH -u "$path"`
33398
33399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33402  # "foo.exe" is OK but "foo" is an error.
33403  #
33404  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33405  # It is also a way to make sure we got the proper file name for the real test later on.
33406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33407  if test "x$test_shortpath" = x; then
33408    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33409$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33410    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33411  fi
33412
33413  # Call helper function which possibly converts this using DOS-style short mode.
33414  # If so, the updated path is stored in $new_path.
33415
33416  input_path="$new_path"
33417  # Check if we need to convert this using DOS-style short mode. If the path
33418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33419  # take no chances and rewrite it.
33420  # Note: m4 eats our [], so we need to use [ and ] instead.
33421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33422  if test "x$has_forbidden_chars" != x; then
33423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33427      # Going to short mode and back again did indeed matter. Since short mode is
33428      # case insensitive, let's make it lowercase to improve readability.
33429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33430      # Now convert it back to Unix-style (cygpath)
33431      input_path=`$CYGPATH -u "$shortmode_path"`
33432      new_path="$input_path"
33433    fi
33434  fi
33435
33436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33437  if test "x$test_cygdrive_prefix" = x; then
33438    # As a simple fix, exclude /usr/bin since it's not a real path.
33439    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33441      # a path prefixed by /cygdrive for fixpath to work.
33442      new_path="$CYGWIN_ROOT_PATH$input_path"
33443    fi
33444  fi
33445
33446
33447  if test "x$path" != "x$new_path"; then
33448    ipath="$new_path"
33449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33450$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33451  fi
33452
33453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33454
33455  path="$ipath"
33456  has_colon=`$ECHO $path | $GREP ^.:`
33457  new_path="$path"
33458  if test "x$has_colon" = x; then
33459    # Not in mixed or Windows style, start by that.
33460    new_path=`cmd //c echo $path`
33461  fi
33462
33463
33464  input_path="$new_path"
33465  # Check if we need to convert this using DOS-style short mode. If the path
33466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33467  # take no chances and rewrite it.
33468  # Note: m4 eats our [], so we need to use [ and ] instead.
33469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33470  if test "x$has_forbidden_chars" != x; then
33471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33473  fi
33474
33475
33476  windows_path="$new_path"
33477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33478    unix_path=`$CYGPATH -u "$windows_path"`
33479    new_path="$unix_path"
33480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33482    new_path="$unix_path"
33483  fi
33484
33485  if test "x$path" != "x$new_path"; then
33486    ipath="$new_path"
33487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33488$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33489  fi
33490
33491  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33492  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33493
33494    else
33495      # We're on a unix platform. Hooray! :)
33496      path="$ipath"
33497      has_space=`$ECHO "$path" | $GREP " "`
33498      if test "x$has_space" != x; then
33499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33500$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33501        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33502      fi
33503
33504      # Use eval to expand a potential ~
33505      eval path="$path"
33506      if test ! -f "$path" && test ! -d "$path"; then
33507        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33508      fi
33509
33510      if test -d "$path"; then
33511        ipath="`cd "$path"; $THEPWDCMD -L`"
33512      else
33513        dir="`$DIRNAME "$path"`"
33514        base="`$BASENAME "$path"`"
33515        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33516      fi
33517    fi
33518  fi
33519
33520            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33521          fi
33522          IFS=";"
33523        fi
33524      done
33525      # Convert VS_LIB into SYSROOT_LDFLAGS
33526      for i in $VS_LIB; do
33527        libpath=$i
33528        # Only process non-empty elements
33529        if test "x$libpath" != x; then
33530          IFS="$OLDIFS"
33531          # Check that directory exists before calling fixup_path
33532          testpath=$libpath
33533
33534  windows_path="$testpath"
33535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33536    unix_path=`$CYGPATH -u "$windows_path"`
33537    testpath="$unix_path"
33538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33540    testpath="$unix_path"
33541  fi
33542
33543          if test -d "$testpath"; then
33544
33545  # Only process if variable expands to non-empty
33546
33547  if test "x$libpath" != x; then
33548    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33549
33550  # Input might be given as Windows format, start by converting to
33551  # unix format.
33552  path="$libpath"
33553  new_path=`$CYGPATH -u "$path"`
33554
33555  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33556  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33557  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33558  # "foo.exe" is OK but "foo" is an error.
33559  #
33560  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33561  # It is also a way to make sure we got the proper file name for the real test later on.
33562  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33563  if test "x$test_shortpath" = x; then
33564    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33565$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33566    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33567  fi
33568
33569  # Call helper function which possibly converts this using DOS-style short mode.
33570  # If so, the updated path is stored in $new_path.
33571
33572  input_path="$new_path"
33573  # Check if we need to convert this using DOS-style short mode. If the path
33574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33575  # take no chances and rewrite it.
33576  # Note: m4 eats our [], so we need to use [ and ] instead.
33577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33578  if test "x$has_forbidden_chars" != x; then
33579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33583      # Going to short mode and back again did indeed matter. Since short mode is
33584      # case insensitive, let's make it lowercase to improve readability.
33585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33586      # Now convert it back to Unix-style (cygpath)
33587      input_path=`$CYGPATH -u "$shortmode_path"`
33588      new_path="$input_path"
33589    fi
33590  fi
33591
33592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33593  if test "x$test_cygdrive_prefix" = x; then
33594    # As a simple fix, exclude /usr/bin since it's not a real path.
33595    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33597      # a path prefixed by /cygdrive for fixpath to work.
33598      new_path="$CYGWIN_ROOT_PATH$input_path"
33599    fi
33600  fi
33601
33602
33603  if test "x$path" != "x$new_path"; then
33604    libpath="$new_path"
33605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33606$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33607  fi
33608
33609    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33610
33611  path="$libpath"
33612  has_colon=`$ECHO $path | $GREP ^.:`
33613  new_path="$path"
33614  if test "x$has_colon" = x; then
33615    # Not in mixed or Windows style, start by that.
33616    new_path=`cmd //c echo $path`
33617  fi
33618
33619
33620  input_path="$new_path"
33621  # Check if we need to convert this using DOS-style short mode. If the path
33622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33623  # take no chances and rewrite it.
33624  # Note: m4 eats our [], so we need to use [ and ] instead.
33625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33626  if test "x$has_forbidden_chars" != x; then
33627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33628    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33629  fi
33630
33631
33632  windows_path="$new_path"
33633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33634    unix_path=`$CYGPATH -u "$windows_path"`
33635    new_path="$unix_path"
33636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33638    new_path="$unix_path"
33639  fi
33640
33641  if test "x$path" != "x$new_path"; then
33642    libpath="$new_path"
33643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33644$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33645  fi
33646
33647  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33648  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33649
33650    else
33651      # We're on a unix platform. Hooray! :)
33652      path="$libpath"
33653      has_space=`$ECHO "$path" | $GREP " "`
33654      if test "x$has_space" != x; then
33655        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33656$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33657        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33658      fi
33659
33660      # Use eval to expand a potential ~
33661      eval path="$path"
33662      if test ! -f "$path" && test ! -d "$path"; then
33663        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33664      fi
33665
33666      if test -d "$path"; then
33667        libpath="`cd "$path"; $THEPWDCMD -L`"
33668      else
33669        dir="`$DIRNAME "$path"`"
33670        base="`$BASENAME "$path"`"
33671        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33672      fi
33673    fi
33674  fi
33675
33676            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33677          fi
33678          IFS=";"
33679        fi
33680      done
33681      IFS="$OLDIFS"
33682    fi
33683  else
33684    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33685$as_echo "not found" >&6; }
33686
33687    if test "x$VS_ENV_CMD" = x; then
33688      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33689$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33690      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33691$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33692    else
33693      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33694$as_echo "$as_me: Running the extraction script failed." >&6;}
33695    fi
33696    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33697$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33698    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33699$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33700    as_fn_error $? "Cannot continue" "$LINENO" 5
33701  fi
33702
33703    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33704    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33705    PATH="$VS_PATH"
33706    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33707    export INCLUDE="$VS_INCLUDE"
33708    export LIB="$VS_LIB"
33709  else
33710    if test "x$XCODE_VERSION_OUTPUT" != x; then
33711      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33712      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33713      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33714    else
33715      # Currently we do not define this for other toolchains. This might change as the need arise.
33716      TOOLCHAIN_VERSION=
33717    fi
33718  fi
33719
33720
33721  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33722  # override all other locations.
33723  if test "x$TOOLCHAIN_PATH" != x; then
33724    PATH=$TOOLCHAIN_PATH:$PATH
33725  fi
33726
33727
33728  #
33729  # Setup the compilers (CC and CXX)
33730  #
33731
33732  COMPILER_NAME=C
33733  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33734
33735  if test "x$CC" != x; then
33736    # User has supplied compiler name already, always let that override.
33737    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33738$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33739    if test "x`basename $CC`" = "x$CC"; then
33740      # A command without a complete path is provided, search $PATH.
33741
33742      for ac_prog in $CC
33743do
33744  # Extract the first word of "$ac_prog", so it can be a program name with args.
33745set dummy $ac_prog; ac_word=$2
33746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33747$as_echo_n "checking for $ac_word... " >&6; }
33748if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33749  $as_echo_n "(cached) " >&6
33750else
33751  case $POTENTIAL_CC in
33752  [\\/]* | ?:[\\/]*)
33753  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33754  ;;
33755  *)
33756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33757for as_dir in $PATH
33758do
33759  IFS=$as_save_IFS
33760  test -z "$as_dir" && as_dir=.
33761    for ac_exec_ext in '' $ac_executable_extensions; do
33762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33763    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33765    break 2
33766  fi
33767done
33768  done
33769IFS=$as_save_IFS
33770
33771  ;;
33772esac
33773fi
33774POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33775if test -n "$POTENTIAL_CC"; then
33776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33777$as_echo "$POTENTIAL_CC" >&6; }
33778else
33779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33780$as_echo "no" >&6; }
33781fi
33782
33783
33784  test -n "$POTENTIAL_CC" && break
33785done
33786
33787      if test "x$POTENTIAL_CC" != x; then
33788        CC=$POTENTIAL_CC
33789      else
33790        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33791      fi
33792    else
33793      # Otherwise it might already be a complete path
33794      if test ! -x "$CC"; then
33795        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33796      fi
33797    fi
33798  else
33799    # No user supplied value. Locate compiler ourselves.
33800
33801    # If we are cross compiling, assume cross compilation tools follows the
33802    # cross compilation standard where they are prefixed with the autoconf
33803    # standard name for the target. For example the binary
33804    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33805    # If we are not cross compiling, then the default compiler name will be
33806    # used.
33807
33808    CC=
33809    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33810    # before checking the rest of the PATH.
33811    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33812    # step, this should not be necessary.
33813    if test -n "$TOOLCHAIN_PATH"; then
33814      PATH_save="$PATH"
33815      PATH="$TOOLCHAIN_PATH"
33816      if test -n "$ac_tool_prefix"; then
33817  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33818set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33820$as_echo_n "checking for $ac_word... " >&6; }
33821if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33822  $as_echo_n "(cached) " >&6
33823else
33824  case $TOOLCHAIN_PATH_CC in
33825  [\\/]* | ?:[\\/]*)
33826  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33827  ;;
33828  *)
33829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33830for as_dir in $PATH
33831do
33832  IFS=$as_save_IFS
33833  test -z "$as_dir" && as_dir=.
33834    for ac_exec_ext in '' $ac_executable_extensions; do
33835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33836    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33838    break 2
33839  fi
33840done
33841  done
33842IFS=$as_save_IFS
33843
33844  ;;
33845esac
33846fi
33847TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33848if test -n "$TOOLCHAIN_PATH_CC"; then
33849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33850$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33851else
33852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33853$as_echo "no" >&6; }
33854fi
33855
33856
33857fi
33858if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33859  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33860  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33861set dummy $SEARCH_LIST; ac_word=$2
33862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33863$as_echo_n "checking for $ac_word... " >&6; }
33864if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33865  $as_echo_n "(cached) " >&6
33866else
33867  case $ac_pt_TOOLCHAIN_PATH_CC in
33868  [\\/]* | ?:[\\/]*)
33869  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33870  ;;
33871  *)
33872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33873for as_dir in $PATH
33874do
33875  IFS=$as_save_IFS
33876  test -z "$as_dir" && as_dir=.
33877    for ac_exec_ext in '' $ac_executable_extensions; do
33878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33879    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33881    break 2
33882  fi
33883done
33884  done
33885IFS=$as_save_IFS
33886
33887  ;;
33888esac
33889fi
33890ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33891if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33893$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33894else
33895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33896$as_echo "no" >&6; }
33897fi
33898
33899  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33900    TOOLCHAIN_PATH_CC=""
33901  else
33902    case $cross_compiling:$ac_tool_warned in
33903yes:)
33904{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33905$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33906ac_tool_warned=yes ;;
33907esac
33908    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33909  fi
33910else
33911  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33912fi
33913
33914      CC=$TOOLCHAIN_PATH_CC
33915      PATH="$PATH_save"
33916    fi
33917
33918    # AC_PATH_TOOL can't be run multiple times with the same variable,
33919    # so create a new name for this run.
33920    if test "x$CC" = x; then
33921      if test -n "$ac_tool_prefix"; then
33922  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33923set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33925$as_echo_n "checking for $ac_word... " >&6; }
33926if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33927  $as_echo_n "(cached) " >&6
33928else
33929  case $POTENTIAL_CC in
33930  [\\/]* | ?:[\\/]*)
33931  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33932  ;;
33933  *)
33934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33935for as_dir in $PATH
33936do
33937  IFS=$as_save_IFS
33938  test -z "$as_dir" && as_dir=.
33939    for ac_exec_ext in '' $ac_executable_extensions; do
33940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33941    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33943    break 2
33944  fi
33945done
33946  done
33947IFS=$as_save_IFS
33948
33949  ;;
33950esac
33951fi
33952POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33953if test -n "$POTENTIAL_CC"; then
33954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33955$as_echo "$POTENTIAL_CC" >&6; }
33956else
33957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33958$as_echo "no" >&6; }
33959fi
33960
33961
33962fi
33963if test -z "$ac_cv_path_POTENTIAL_CC"; then
33964  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33965  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33966set dummy $SEARCH_LIST; ac_word=$2
33967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33968$as_echo_n "checking for $ac_word... " >&6; }
33969if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33970  $as_echo_n "(cached) " >&6
33971else
33972  case $ac_pt_POTENTIAL_CC in
33973  [\\/]* | ?:[\\/]*)
33974  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33975  ;;
33976  *)
33977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33978for as_dir in $PATH
33979do
33980  IFS=$as_save_IFS
33981  test -z "$as_dir" && as_dir=.
33982    for ac_exec_ext in '' $ac_executable_extensions; do
33983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33984    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33986    break 2
33987  fi
33988done
33989  done
33990IFS=$as_save_IFS
33991
33992  ;;
33993esac
33994fi
33995ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33996if test -n "$ac_pt_POTENTIAL_CC"; then
33997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33998$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33999else
34000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34001$as_echo "no" >&6; }
34002fi
34003
34004  if test "x$ac_pt_POTENTIAL_CC" = x; then
34005    POTENTIAL_CC=""
34006  else
34007    case $cross_compiling:$ac_tool_warned in
34008yes:)
34009{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34010$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34011ac_tool_warned=yes ;;
34012esac
34013    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
34014  fi
34015else
34016  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
34017fi
34018
34019      CC=$POTENTIAL_CC
34020    fi
34021
34022    if test "x$CC" = x; then
34023
34024  # Print a helpful message on how to acquire the necessary build dependency.
34025  # devkit is the help tag: freetype, cups, alsa etc
34026  MISSING_DEPENDENCY=devkit
34027
34028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34029    cygwin_help $MISSING_DEPENDENCY
34030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34031    msys_help $MISSING_DEPENDENCY
34032  else
34033    PKGHANDLER_COMMAND=
34034
34035    case $PKGHANDLER in
34036      apt-get)
34037        apt_help     $MISSING_DEPENDENCY ;;
34038      yum)
34039        yum_help     $MISSING_DEPENDENCY ;;
34040      brew)
34041        brew_help    $MISSING_DEPENDENCY ;;
34042      port)
34043        port_help    $MISSING_DEPENDENCY ;;
34044      pkgutil)
34045        pkgutil_help $MISSING_DEPENDENCY ;;
34046      pkgadd)
34047        pkgadd_help  $MISSING_DEPENDENCY ;;
34048    esac
34049
34050    if test "x$PKGHANDLER_COMMAND" != x; then
34051      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34052    fi
34053  fi
34054
34055      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34056    fi
34057  fi
34058
34059  # Now we have a compiler binary in CC. Make sure it's okay.
34060
34061  # Only process if variable expands to non-empty
34062
34063  if test "x$CC" != x; then
34064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34065
34066  # First separate the path from the arguments. This will split at the first
34067  # space.
34068  complete="$CC"
34069  path="${complete%% *}"
34070  tmp="$complete EOL"
34071  arguments="${tmp#* }"
34072
34073  # Input might be given as Windows format, start by converting to
34074  # unix format.
34075  new_path=`$CYGPATH -u "$path"`
34076
34077  # Now try to locate executable using which
34078  new_path=`$WHICH "$new_path" 2> /dev/null`
34079  # bat and cmd files are not always considered executable in cygwin causing which
34080  # to not find them
34081  if test "x$new_path" = x \
34082      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34083      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34084    new_path=`$CYGPATH -u "$path"`
34085  fi
34086  if test "x$new_path" = x; then
34087    # Oops. Which didn't find the executable.
34088    # The splitting of arguments from the executable at a space might have been incorrect,
34089    # since paths with space are more likely in Windows. Give it another try with the whole
34090    # argument.
34091    path="$complete"
34092    arguments="EOL"
34093    new_path=`$CYGPATH -u "$path"`
34094    new_path=`$WHICH "$new_path" 2> /dev/null`
34095    # bat and cmd files are not always considered executable in cygwin causing which
34096    # to not find them
34097    if test "x$new_path" = x \
34098        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34099        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34100      new_path=`$CYGPATH -u "$path"`
34101    fi
34102    if test "x$new_path" = x; then
34103      # It's still not found. Now this is an unrecoverable error.
34104      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34105$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34106      has_space=`$ECHO "$complete" | $GREP " "`
34107      if test "x$has_space" != x; then
34108        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34109$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34110      fi
34111      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34112    fi
34113  fi
34114
34115  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34116  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34117  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34118  # "foo.exe" is OK but "foo" is an error.
34119  #
34120  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34121  # It is also a way to make sure we got the proper file name for the real test later on.
34122  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34123  if test "x$test_shortpath" = x; then
34124    # Short path failed, file does not exist as specified.
34125    # Try adding .exe or .cmd
34126    if test -f "${new_path}.exe"; then
34127      input_to_shortpath="${new_path}.exe"
34128    elif test -f "${new_path}.cmd"; then
34129      input_to_shortpath="${new_path}.cmd"
34130    else
34131      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34132$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34133      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34134$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34135      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34136    fi
34137  else
34138    input_to_shortpath="$new_path"
34139  fi
34140
34141  # Call helper function which possibly converts this using DOS-style short mode.
34142  # If so, the updated path is stored in $new_path.
34143  new_path="$input_to_shortpath"
34144
34145  input_path="$input_to_shortpath"
34146  # Check if we need to convert this using DOS-style short mode. If the path
34147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34148  # take no chances and rewrite it.
34149  # Note: m4 eats our [], so we need to use [ and ] instead.
34150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34151  if test "x$has_forbidden_chars" != x; then
34152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34156      # Going to short mode and back again did indeed matter. Since short mode is
34157      # case insensitive, let's make it lowercase to improve readability.
34158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34159      # Now convert it back to Unix-style (cygpath)
34160      input_path=`$CYGPATH -u "$shortmode_path"`
34161      new_path="$input_path"
34162    fi
34163  fi
34164
34165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34166  if test "x$test_cygdrive_prefix" = x; then
34167    # As a simple fix, exclude /usr/bin since it's not a real path.
34168    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34170      # a path prefixed by /cygdrive for fixpath to work.
34171      new_path="$CYGWIN_ROOT_PATH$input_path"
34172    fi
34173  fi
34174
34175  # remove trailing .exe if any
34176  new_path="${new_path/%.exe/}"
34177
34178    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34179
34180  # First separate the path from the arguments. This will split at the first
34181  # space.
34182  complete="$CC"
34183  path="${complete%% *}"
34184  tmp="$complete EOL"
34185  arguments="${tmp#* }"
34186
34187  # Input might be given as Windows format, start by converting to
34188  # unix format.
34189  new_path="$path"
34190
34191  windows_path="$new_path"
34192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34193    unix_path=`$CYGPATH -u "$windows_path"`
34194    new_path="$unix_path"
34195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34197    new_path="$unix_path"
34198  fi
34199
34200
34201  # Now try to locate executable using which
34202  new_path=`$WHICH "$new_path" 2> /dev/null`
34203
34204  if test "x$new_path" = x; then
34205    # Oops. Which didn't find the executable.
34206    # The splitting of arguments from the executable at a space might have been incorrect,
34207    # since paths with space are more likely in Windows. Give it another try with the whole
34208    # argument.
34209    path="$complete"
34210    arguments="EOL"
34211    new_path="$path"
34212
34213  windows_path="$new_path"
34214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34215    unix_path=`$CYGPATH -u "$windows_path"`
34216    new_path="$unix_path"
34217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34219    new_path="$unix_path"
34220  fi
34221
34222
34223    new_path=`$WHICH "$new_path" 2> /dev/null`
34224    # bat and cmd files are not always considered executable in MSYS causing which
34225    # to not find them
34226    if test "x$new_path" = x \
34227        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34228        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34229      new_path="$path"
34230
34231  windows_path="$new_path"
34232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34233    unix_path=`$CYGPATH -u "$windows_path"`
34234    new_path="$unix_path"
34235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34237    new_path="$unix_path"
34238  fi
34239
34240    fi
34241
34242    if test "x$new_path" = x; then
34243      # It's still not found. Now this is an unrecoverable error.
34244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34245$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34246      has_space=`$ECHO "$complete" | $GREP " "`
34247      if test "x$has_space" != x; then
34248        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34249$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34250      fi
34251      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34252    fi
34253  fi
34254
34255  # Now new_path has a complete unix path to the binary
34256  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34257    # Keep paths in /bin as-is, but remove trailing .exe if any
34258    new_path="${new_path/%.exe/}"
34259    # Do not save /bin paths to all_fixpath_prefixes!
34260  else
34261    # Not in mixed or Windows style, start by that.
34262    new_path=`cmd //c echo $new_path`
34263
34264  input_path="$new_path"
34265  # Check if we need to convert this using DOS-style short mode. If the path
34266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34267  # take no chances and rewrite it.
34268  # Note: m4 eats our [], so we need to use [ and ] instead.
34269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34270  if test "x$has_forbidden_chars" != x; then
34271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34273  fi
34274
34275    # Output is in $new_path
34276
34277  windows_path="$new_path"
34278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34279    unix_path=`$CYGPATH -u "$windows_path"`
34280    new_path="$unix_path"
34281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34283    new_path="$unix_path"
34284  fi
34285
34286    # remove trailing .exe if any
34287    new_path="${new_path/%.exe/}"
34288
34289    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34290    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34291  fi
34292
34293    else
34294      # We're on a unix platform. Hooray! :)
34295      # First separate the path from the arguments. This will split at the first
34296      # space.
34297      complete="$CC"
34298      path="${complete%% *}"
34299      tmp="$complete EOL"
34300      arguments="${tmp#* }"
34301
34302      # Cannot rely on the command "which" here since it doesn't always work.
34303      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34304      if test -z "$is_absolute_path"; then
34305        # Path to executable is not absolute. Find it.
34306        IFS_save="$IFS"
34307        IFS=:
34308        for p in $PATH; do
34309          if test -f "$p/$path" && test -x "$p/$path"; then
34310            new_path="$p/$path"
34311            break
34312          fi
34313        done
34314        IFS="$IFS_save"
34315      else
34316        # This is an absolute path, we can use it without further modifications.
34317        new_path="$path"
34318      fi
34319
34320      if test "x$new_path" = x; then
34321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34322$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34323        has_space=`$ECHO "$complete" | $GREP " "`
34324        if test "x$has_space" != x; then
34325          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34326$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34327        fi
34328        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34329      fi
34330    fi
34331
34332    # Now join together the path and the arguments once again
34333    if test "x$arguments" != xEOL; then
34334      new_complete="$new_path ${arguments% *}"
34335    else
34336      new_complete="$new_path"
34337    fi
34338
34339    if test "x$complete" != "x$new_complete"; then
34340      CC="$new_complete"
34341      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34342$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34343    fi
34344  fi
34345
34346  TEST_COMPILER="$CC"
34347
34348  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34349$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34350  SYMLINK_ORIGINAL="$TEST_COMPILER"
34351
34352  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34353    # Follow a chain of symbolic links. Use readlink
34354    # where it exists, else fall back to horribly
34355    # complicated shell code.
34356    if test "x$READLINK_TESTED" != yes; then
34357      # On MacOSX there is a readlink tool with a different
34358      # purpose than the GNU readlink tool. Check the found readlink.
34359      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34360      if test "x$ISGNU" = x; then
34361        # A readlink that we do not know how to use.
34362        # Are there other non-GNU readlinks out there?
34363        READLINK_TESTED=yes
34364        READLINK=
34365      fi
34366    fi
34367
34368    if test "x$READLINK" != x; then
34369      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34370    else
34371      # Save the current directory for restoring afterwards
34372      STARTDIR=$PWD
34373      COUNTER=0
34374      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34375      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34376      cd $sym_link_dir
34377      # Use -P flag to resolve symlinks in directories.
34378      cd `$THEPWDCMD -P`
34379      sym_link_dir=`$THEPWDCMD -P`
34380      # Resolve file symlinks
34381      while test $COUNTER -lt 20; do
34382        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34383        if test "x$ISLINK" == x; then
34384          # This is not a symbolic link! We are done!
34385          break
34386        fi
34387        # Again resolve directory symlinks since the target of the just found
34388        # link could be in a different directory
34389        cd `$DIRNAME $ISLINK`
34390        sym_link_dir=`$THEPWDCMD -P`
34391        sym_link_file=`$BASENAME $ISLINK`
34392        let COUNTER=COUNTER+1
34393      done
34394      cd $STARTDIR
34395      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34396    fi
34397  fi
34398
34399  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34401$as_echo "no symlink" >&6; }
34402  else
34403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34404$as_echo "$SYMLINK_ORIGINAL" >&6; }
34405
34406    # We can't handle ccache by gcc wrappers, since we need to know if we're
34407    # using ccache. Instead ccache usage must be controlled by a configure option.
34408    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34409    if test "x$COMPILER_BASENAME" = "xccache"; then
34410      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34411$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34412      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34413    fi
34414  fi
34415
34416
34417  COMPILER=$CC
34418  COMPILER_NAME=$COMPILER_NAME
34419
34420  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34421    # cc -V output typically looks like
34422    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34423    # or
34424    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34425    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34426    # Check that this is likely to be the Solaris Studio cc.
34427    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34428    if test $? -ne 0; then
34429      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34430      { $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
34431$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34432      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34433$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34434      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34435$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34436      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34437    fi
34438    # Remove usage instructions (if present), and
34439    # collapse compiler output into a single line
34440    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34441        $SED -e 's/ *[Uu]sage:.*//'`
34442    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34443        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34444  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34445    # xlc -qversion output typically looks like
34446    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34447    #     Version: 11.01.0000.0015
34448    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34449    # Check that this is likely to be the IBM XL C compiler.
34450    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34451    if test $? -ne 0; then
34452      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34453      { $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
34454$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34455      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34456$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34457      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34458$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34459      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34460    fi
34461    # Collapse compiler output into a single line
34462    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34463    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34464        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34465  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34466    # There is no specific version flag, but all output starts with a version string.
34467    # First line typically looks something like:
34468    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34469    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34470    # Check that this is likely to be Microsoft CL.EXE.
34471    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34472    if test $? -ne 0; then
34473      { $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
34474$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34475      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34476$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34477      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34478    fi
34479    # Collapse compiler output into a single line
34480    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34481    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34482        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34483  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34484    # gcc --version output typically looks like
34485    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34486    #     Copyright (C) 2013 Free Software Foundation, Inc.
34487    #     This is free software; see the source for copying conditions.  There is NO
34488    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34489    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34490    # Check that this is likely to be GCC.
34491    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34492    if test $? -ne 0; then
34493      { $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
34494$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34495      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34496$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34497      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34498    fi
34499    # Remove Copyright and legalese from version string, and
34500    # collapse into a single line
34501    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34502        $SED -e 's/ *Copyright .*//'`
34503    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34504        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34505  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34506    # clang --version output typically looks like
34507    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34508    #    clang version 3.3 (tags/RELEASE_33/final)
34509    # or
34510    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34511    #    Target: x86_64-pc-linux-gnu
34512    #    Thread model: posix
34513    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34514    # Check that this is likely to be clang
34515    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34516    if test $? -ne 0; then
34517      { $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
34518$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34519      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34520$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34521      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34522    fi
34523    # Collapse compiler output into a single line
34524    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34525    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34526        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34527  else
34528      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34529  fi
34530  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34531  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34532  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34533  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34534
34535  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34536$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34537
34538
34539  # Now that we have resolved CC ourself, let autoconf have its go at it
34540  ac_ext=c
34541ac_cpp='$CPP $CPPFLAGS'
34542ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34543ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34544ac_compiler_gnu=$ac_cv_c_compiler_gnu
34545if test -n "$ac_tool_prefix"; then
34546  for ac_prog in $CC
34547  do
34548    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34549set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34551$as_echo_n "checking for $ac_word... " >&6; }
34552if ${ac_cv_prog_CC+:} false; then :
34553  $as_echo_n "(cached) " >&6
34554else
34555  if test -n "$CC"; then
34556  ac_cv_prog_CC="$CC" # Let the user override the test.
34557else
34558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34559for as_dir in $PATH
34560do
34561  IFS=$as_save_IFS
34562  test -z "$as_dir" && as_dir=.
34563    for ac_exec_ext in '' $ac_executable_extensions; do
34564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34565    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34567    break 2
34568  fi
34569done
34570  done
34571IFS=$as_save_IFS
34572
34573fi
34574fi
34575CC=$ac_cv_prog_CC
34576if test -n "$CC"; then
34577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34578$as_echo "$CC" >&6; }
34579else
34580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34581$as_echo "no" >&6; }
34582fi
34583
34584
34585    test -n "$CC" && break
34586  done
34587fi
34588if test -z "$CC"; then
34589  ac_ct_CC=$CC
34590  for ac_prog in $CC
34591do
34592  # Extract the first word of "$ac_prog", so it can be a program name with args.
34593set dummy $ac_prog; ac_word=$2
34594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34595$as_echo_n "checking for $ac_word... " >&6; }
34596if ${ac_cv_prog_ac_ct_CC+:} false; then :
34597  $as_echo_n "(cached) " >&6
34598else
34599  if test -n "$ac_ct_CC"; then
34600  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34601else
34602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34603for as_dir in $PATH
34604do
34605  IFS=$as_save_IFS
34606  test -z "$as_dir" && as_dir=.
34607    for ac_exec_ext in '' $ac_executable_extensions; do
34608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34609    ac_cv_prog_ac_ct_CC="$ac_prog"
34610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34611    break 2
34612  fi
34613done
34614  done
34615IFS=$as_save_IFS
34616
34617fi
34618fi
34619ac_ct_CC=$ac_cv_prog_ac_ct_CC
34620if test -n "$ac_ct_CC"; then
34621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34622$as_echo "$ac_ct_CC" >&6; }
34623else
34624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34625$as_echo "no" >&6; }
34626fi
34627
34628
34629  test -n "$ac_ct_CC" && break
34630done
34631
34632  if test "x$ac_ct_CC" = x; then
34633    CC=""
34634  else
34635    case $cross_compiling:$ac_tool_warned in
34636yes:)
34637{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34638$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34639ac_tool_warned=yes ;;
34640esac
34641    CC=$ac_ct_CC
34642  fi
34643fi
34644
34645
34646test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34647$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34648as_fn_error $? "no acceptable C compiler found in \$PATH
34649See \`config.log' for more details" "$LINENO" 5; }
34650
34651# Provide some information about the compiler.
34652$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34653set X $ac_compile
34654ac_compiler=$2
34655for ac_option in --version -v -V -qversion; do
34656  { { ac_try="$ac_compiler $ac_option >&5"
34657case "(($ac_try" in
34658  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34659  *) ac_try_echo=$ac_try;;
34660esac
34661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34662$as_echo "$ac_try_echo"; } >&5
34663  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34664  ac_status=$?
34665  if test -s conftest.err; then
34666    sed '10a\
34667... rest of stderr output deleted ...
34668         10q' conftest.err >conftest.er1
34669    cat conftest.er1 >&5
34670  fi
34671  rm -f conftest.er1 conftest.err
34672  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34673  test $ac_status = 0; }
34674done
34675
34676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34677/* end confdefs.h.  */
34678
34679int
34680main ()
34681{
34682
34683  ;
34684  return 0;
34685}
34686_ACEOF
34687ac_clean_files_save=$ac_clean_files
34688ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34689# Try to create an executable without -o first, disregard a.out.
34690# It will help us diagnose broken compilers, and finding out an intuition
34691# of exeext.
34692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34693$as_echo_n "checking whether the C compiler works... " >&6; }
34694ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34695
34696# The possible output files:
34697ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34698
34699ac_rmfiles=
34700for ac_file in $ac_files
34701do
34702  case $ac_file in
34703    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34704    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34705  esac
34706done
34707rm -f $ac_rmfiles
34708
34709if { { ac_try="$ac_link_default"
34710case "(($ac_try" in
34711  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34712  *) ac_try_echo=$ac_try;;
34713esac
34714eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34715$as_echo "$ac_try_echo"; } >&5
34716  (eval "$ac_link_default") 2>&5
34717  ac_status=$?
34718  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34719  test $ac_status = 0; }; then :
34720  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34721# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34722# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34723# so that the user can short-circuit this test for compilers unknown to
34724# Autoconf.
34725for ac_file in $ac_files ''
34726do
34727  test -f "$ac_file" || continue
34728  case $ac_file in
34729    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34730	;;
34731    [ab].out )
34732	# We found the default executable, but exeext='' is most
34733	# certainly right.
34734	break;;
34735    *.* )
34736	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34737	then :; else
34738	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34739	fi
34740	# We set ac_cv_exeext here because the later test for it is not
34741	# safe: cross compilers may not add the suffix if given an `-o'
34742	# argument, so we may need to know it at that point already.
34743	# Even if this section looks crufty: it has the advantage of
34744	# actually working.
34745	break;;
34746    * )
34747	break;;
34748  esac
34749done
34750test "$ac_cv_exeext" = no && ac_cv_exeext=
34751
34752else
34753  ac_file=''
34754fi
34755if test -z "$ac_file"; then :
34756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34757$as_echo "no" >&6; }
34758$as_echo "$as_me: failed program was:" >&5
34759sed 's/^/| /' conftest.$ac_ext >&5
34760
34761{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34762$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34763as_fn_error 77 "C compiler cannot create executables
34764See \`config.log' for more details" "$LINENO" 5; }
34765else
34766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34767$as_echo "yes" >&6; }
34768fi
34769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34770$as_echo_n "checking for C compiler default output file name... " >&6; }
34771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34772$as_echo "$ac_file" >&6; }
34773ac_exeext=$ac_cv_exeext
34774
34775rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34776ac_clean_files=$ac_clean_files_save
34777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34778$as_echo_n "checking for suffix of executables... " >&6; }
34779if { { ac_try="$ac_link"
34780case "(($ac_try" in
34781  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34782  *) ac_try_echo=$ac_try;;
34783esac
34784eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34785$as_echo "$ac_try_echo"; } >&5
34786  (eval "$ac_link") 2>&5
34787  ac_status=$?
34788  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34789  test $ac_status = 0; }; then :
34790  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34791# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34792# work properly (i.e., refer to `conftest.exe'), while it won't with
34793# `rm'.
34794for ac_file in conftest.exe conftest conftest.*; do
34795  test -f "$ac_file" || continue
34796  case $ac_file in
34797    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34798    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34799	  break;;
34800    * ) break;;
34801  esac
34802done
34803else
34804  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34806as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34807See \`config.log' for more details" "$LINENO" 5; }
34808fi
34809rm -f conftest conftest$ac_cv_exeext
34810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34811$as_echo "$ac_cv_exeext" >&6; }
34812
34813rm -f conftest.$ac_ext
34814EXEEXT=$ac_cv_exeext
34815ac_exeext=$EXEEXT
34816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34817/* end confdefs.h.  */
34818#include <stdio.h>
34819int
34820main ()
34821{
34822FILE *f = fopen ("conftest.out", "w");
34823 return ferror (f) || fclose (f) != 0;
34824
34825  ;
34826  return 0;
34827}
34828_ACEOF
34829ac_clean_files="$ac_clean_files conftest.out"
34830# Check that the compiler produces executables we can run.  If not, either
34831# the compiler is broken, or we cross compile.
34832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34833$as_echo_n "checking whether we are cross compiling... " >&6; }
34834if test "$cross_compiling" != yes; then
34835  { { ac_try="$ac_link"
34836case "(($ac_try" in
34837  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34838  *) ac_try_echo=$ac_try;;
34839esac
34840eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34841$as_echo "$ac_try_echo"; } >&5
34842  (eval "$ac_link") 2>&5
34843  ac_status=$?
34844  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34845  test $ac_status = 0; }
34846  if { ac_try='./conftest$ac_cv_exeext'
34847  { { case "(($ac_try" in
34848  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34849  *) ac_try_echo=$ac_try;;
34850esac
34851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34852$as_echo "$ac_try_echo"; } >&5
34853  (eval "$ac_try") 2>&5
34854  ac_status=$?
34855  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34856  test $ac_status = 0; }; }; then
34857    cross_compiling=no
34858  else
34859    if test "$cross_compiling" = maybe; then
34860	cross_compiling=yes
34861    else
34862	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34864as_fn_error $? "cannot run C compiled programs.
34865If you meant to cross compile, use \`--host'.
34866See \`config.log' for more details" "$LINENO" 5; }
34867    fi
34868  fi
34869fi
34870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34871$as_echo "$cross_compiling" >&6; }
34872
34873rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34874ac_clean_files=$ac_clean_files_save
34875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34876$as_echo_n "checking for suffix of object files... " >&6; }
34877if ${ac_cv_objext+:} false; then :
34878  $as_echo_n "(cached) " >&6
34879else
34880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34881/* end confdefs.h.  */
34882
34883int
34884main ()
34885{
34886
34887  ;
34888  return 0;
34889}
34890_ACEOF
34891rm -f conftest.o conftest.obj
34892if { { ac_try="$ac_compile"
34893case "(($ac_try" in
34894  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34895  *) ac_try_echo=$ac_try;;
34896esac
34897eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34898$as_echo "$ac_try_echo"; } >&5
34899  (eval "$ac_compile") 2>&5
34900  ac_status=$?
34901  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34902  test $ac_status = 0; }; then :
34903  for ac_file in conftest.o conftest.obj conftest.*; do
34904  test -f "$ac_file" || continue;
34905  case $ac_file in
34906    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34907    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34908       break;;
34909  esac
34910done
34911else
34912  $as_echo "$as_me: failed program was:" >&5
34913sed 's/^/| /' conftest.$ac_ext >&5
34914
34915{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34916$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34917as_fn_error $? "cannot compute suffix of object files: cannot compile
34918See \`config.log' for more details" "$LINENO" 5; }
34919fi
34920rm -f conftest.$ac_cv_objext conftest.$ac_ext
34921fi
34922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34923$as_echo "$ac_cv_objext" >&6; }
34924OBJEXT=$ac_cv_objext
34925ac_objext=$OBJEXT
34926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34927$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34928if ${ac_cv_c_compiler_gnu+:} false; then :
34929  $as_echo_n "(cached) " >&6
34930else
34931  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34932/* end confdefs.h.  */
34933
34934int
34935main ()
34936{
34937#ifndef __GNUC__
34938       choke me
34939#endif
34940
34941  ;
34942  return 0;
34943}
34944_ACEOF
34945if ac_fn_c_try_compile "$LINENO"; then :
34946  ac_compiler_gnu=yes
34947else
34948  ac_compiler_gnu=no
34949fi
34950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34951ac_cv_c_compiler_gnu=$ac_compiler_gnu
34952
34953fi
34954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34955$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34956if test $ac_compiler_gnu = yes; then
34957  GCC=yes
34958else
34959  GCC=
34960fi
34961ac_test_CFLAGS=${CFLAGS+set}
34962ac_save_CFLAGS=$CFLAGS
34963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34964$as_echo_n "checking whether $CC accepts -g... " >&6; }
34965if ${ac_cv_prog_cc_g+:} false; then :
34966  $as_echo_n "(cached) " >&6
34967else
34968  ac_save_c_werror_flag=$ac_c_werror_flag
34969   ac_c_werror_flag=yes
34970   ac_cv_prog_cc_g=no
34971   CFLAGS="-g"
34972   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34973/* end confdefs.h.  */
34974
34975int
34976main ()
34977{
34978
34979  ;
34980  return 0;
34981}
34982_ACEOF
34983if ac_fn_c_try_compile "$LINENO"; then :
34984  ac_cv_prog_cc_g=yes
34985else
34986  CFLAGS=""
34987      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34988/* end confdefs.h.  */
34989
34990int
34991main ()
34992{
34993
34994  ;
34995  return 0;
34996}
34997_ACEOF
34998if ac_fn_c_try_compile "$LINENO"; then :
34999
35000else
35001  ac_c_werror_flag=$ac_save_c_werror_flag
35002	 CFLAGS="-g"
35003	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35004/* end confdefs.h.  */
35005
35006int
35007main ()
35008{
35009
35010  ;
35011  return 0;
35012}
35013_ACEOF
35014if ac_fn_c_try_compile "$LINENO"; then :
35015  ac_cv_prog_cc_g=yes
35016fi
35017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35018fi
35019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35020fi
35021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35022   ac_c_werror_flag=$ac_save_c_werror_flag
35023fi
35024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
35025$as_echo "$ac_cv_prog_cc_g" >&6; }
35026if test "$ac_test_CFLAGS" = set; then
35027  CFLAGS=$ac_save_CFLAGS
35028elif test $ac_cv_prog_cc_g = yes; then
35029  if test "$GCC" = yes; then
35030    CFLAGS="-g -O2"
35031  else
35032    CFLAGS="-g"
35033  fi
35034else
35035  if test "$GCC" = yes; then
35036    CFLAGS="-O2"
35037  else
35038    CFLAGS=
35039  fi
35040fi
35041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35042$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35043if ${ac_cv_prog_cc_c89+:} false; then :
35044  $as_echo_n "(cached) " >&6
35045else
35046  ac_cv_prog_cc_c89=no
35047ac_save_CC=$CC
35048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35049/* end confdefs.h.  */
35050#include <stdarg.h>
35051#include <stdio.h>
35052struct stat;
35053/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35054struct buf { int x; };
35055FILE * (*rcsopen) (struct buf *, struct stat *, int);
35056static char *e (p, i)
35057     char **p;
35058     int i;
35059{
35060  return p[i];
35061}
35062static char *f (char * (*g) (char **, int), char **p, ...)
35063{
35064  char *s;
35065  va_list v;
35066  va_start (v,p);
35067  s = g (p, va_arg (v,int));
35068  va_end (v);
35069  return s;
35070}
35071
35072/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35073   function prototypes and stuff, but not '\xHH' hex character constants.
35074   These don't provoke an error unfortunately, instead are silently treated
35075   as 'x'.  The following induces an error, until -std is added to get
35076   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35077   array size at least.  It's necessary to write '\x00'==0 to get something
35078   that's true only with -std.  */
35079int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35080
35081/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35082   inside strings and character constants.  */
35083#define FOO(x) 'x'
35084int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35085
35086int test (int i, double x);
35087struct s1 {int (*f) (int a);};
35088struct s2 {int (*f) (double a);};
35089int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35090int argc;
35091char **argv;
35092int
35093main ()
35094{
35095return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35096  ;
35097  return 0;
35098}
35099_ACEOF
35100for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35101	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35102do
35103  CC="$ac_save_CC $ac_arg"
35104  if ac_fn_c_try_compile "$LINENO"; then :
35105  ac_cv_prog_cc_c89=$ac_arg
35106fi
35107rm -f core conftest.err conftest.$ac_objext
35108  test "x$ac_cv_prog_cc_c89" != "xno" && break
35109done
35110rm -f conftest.$ac_ext
35111CC=$ac_save_CC
35112
35113fi
35114# AC_CACHE_VAL
35115case "x$ac_cv_prog_cc_c89" in
35116  x)
35117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35118$as_echo "none needed" >&6; } ;;
35119  xno)
35120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35121$as_echo "unsupported" >&6; } ;;
35122  *)
35123    CC="$CC $ac_cv_prog_cc_c89"
35124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35125$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35126esac
35127if test "x$ac_cv_prog_cc_c89" != xno; then :
35128
35129fi
35130
35131ac_ext=cpp
35132ac_cpp='$CXXCPP $CPPFLAGS'
35133ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35134ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35135ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35136
35137
35138
35139  COMPILER_NAME=C++
35140  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35141
35142  if test "x$CXX" != x; then
35143    # User has supplied compiler name already, always let that override.
35144    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35145$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35146    if test "x`basename $CXX`" = "x$CXX"; then
35147      # A command without a complete path is provided, search $PATH.
35148
35149      for ac_prog in $CXX
35150do
35151  # Extract the first word of "$ac_prog", so it can be a program name with args.
35152set dummy $ac_prog; ac_word=$2
35153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35154$as_echo_n "checking for $ac_word... " >&6; }
35155if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35156  $as_echo_n "(cached) " >&6
35157else
35158  case $POTENTIAL_CXX in
35159  [\\/]* | ?:[\\/]*)
35160  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35161  ;;
35162  *)
35163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35164for as_dir in $PATH
35165do
35166  IFS=$as_save_IFS
35167  test -z "$as_dir" && as_dir=.
35168    for ac_exec_ext in '' $ac_executable_extensions; do
35169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35170    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35172    break 2
35173  fi
35174done
35175  done
35176IFS=$as_save_IFS
35177
35178  ;;
35179esac
35180fi
35181POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35182if test -n "$POTENTIAL_CXX"; then
35183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35184$as_echo "$POTENTIAL_CXX" >&6; }
35185else
35186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35187$as_echo "no" >&6; }
35188fi
35189
35190
35191  test -n "$POTENTIAL_CXX" && break
35192done
35193
35194      if test "x$POTENTIAL_CXX" != x; then
35195        CXX=$POTENTIAL_CXX
35196      else
35197        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35198      fi
35199    else
35200      # Otherwise it might already be a complete path
35201      if test ! -x "$CXX"; then
35202        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35203      fi
35204    fi
35205  else
35206    # No user supplied value. Locate compiler ourselves.
35207
35208    # If we are cross compiling, assume cross compilation tools follows the
35209    # cross compilation standard where they are prefixed with the autoconf
35210    # standard name for the target. For example the binary
35211    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35212    # If we are not cross compiling, then the default compiler name will be
35213    # used.
35214
35215    CXX=
35216    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35217    # before checking the rest of the PATH.
35218    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35219    # step, this should not be necessary.
35220    if test -n "$TOOLCHAIN_PATH"; then
35221      PATH_save="$PATH"
35222      PATH="$TOOLCHAIN_PATH"
35223      if test -n "$ac_tool_prefix"; then
35224  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35225set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35227$as_echo_n "checking for $ac_word... " >&6; }
35228if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35229  $as_echo_n "(cached) " >&6
35230else
35231  case $TOOLCHAIN_PATH_CXX in
35232  [\\/]* | ?:[\\/]*)
35233  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35234  ;;
35235  *)
35236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35237for as_dir in $PATH
35238do
35239  IFS=$as_save_IFS
35240  test -z "$as_dir" && as_dir=.
35241    for ac_exec_ext in '' $ac_executable_extensions; do
35242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35243    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35245    break 2
35246  fi
35247done
35248  done
35249IFS=$as_save_IFS
35250
35251  ;;
35252esac
35253fi
35254TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35255if test -n "$TOOLCHAIN_PATH_CXX"; then
35256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35257$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35258else
35259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35260$as_echo "no" >&6; }
35261fi
35262
35263
35264fi
35265if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35266  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35267  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35268set dummy $SEARCH_LIST; ac_word=$2
35269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35270$as_echo_n "checking for $ac_word... " >&6; }
35271if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35272  $as_echo_n "(cached) " >&6
35273else
35274  case $ac_pt_TOOLCHAIN_PATH_CXX in
35275  [\\/]* | ?:[\\/]*)
35276  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35277  ;;
35278  *)
35279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35280for as_dir in $PATH
35281do
35282  IFS=$as_save_IFS
35283  test -z "$as_dir" && as_dir=.
35284    for ac_exec_ext in '' $ac_executable_extensions; do
35285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35286    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35288    break 2
35289  fi
35290done
35291  done
35292IFS=$as_save_IFS
35293
35294  ;;
35295esac
35296fi
35297ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35298if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35300$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35301else
35302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35303$as_echo "no" >&6; }
35304fi
35305
35306  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35307    TOOLCHAIN_PATH_CXX=""
35308  else
35309    case $cross_compiling:$ac_tool_warned in
35310yes:)
35311{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35312$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35313ac_tool_warned=yes ;;
35314esac
35315    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35316  fi
35317else
35318  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35319fi
35320
35321      CXX=$TOOLCHAIN_PATH_CXX
35322      PATH="$PATH_save"
35323    fi
35324
35325    # AC_PATH_TOOL can't be run multiple times with the same variable,
35326    # so create a new name for this run.
35327    if test "x$CXX" = x; then
35328      if test -n "$ac_tool_prefix"; then
35329  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35330set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35332$as_echo_n "checking for $ac_word... " >&6; }
35333if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35334  $as_echo_n "(cached) " >&6
35335else
35336  case $POTENTIAL_CXX in
35337  [\\/]* | ?:[\\/]*)
35338  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35339  ;;
35340  *)
35341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35342for as_dir in $PATH
35343do
35344  IFS=$as_save_IFS
35345  test -z "$as_dir" && as_dir=.
35346    for ac_exec_ext in '' $ac_executable_extensions; do
35347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35348    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35350    break 2
35351  fi
35352done
35353  done
35354IFS=$as_save_IFS
35355
35356  ;;
35357esac
35358fi
35359POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35360if test -n "$POTENTIAL_CXX"; then
35361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35362$as_echo "$POTENTIAL_CXX" >&6; }
35363else
35364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35365$as_echo "no" >&6; }
35366fi
35367
35368
35369fi
35370if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35371  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35372  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35373set dummy $SEARCH_LIST; ac_word=$2
35374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35375$as_echo_n "checking for $ac_word... " >&6; }
35376if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35377  $as_echo_n "(cached) " >&6
35378else
35379  case $ac_pt_POTENTIAL_CXX in
35380  [\\/]* | ?:[\\/]*)
35381  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35382  ;;
35383  *)
35384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35385for as_dir in $PATH
35386do
35387  IFS=$as_save_IFS
35388  test -z "$as_dir" && as_dir=.
35389    for ac_exec_ext in '' $ac_executable_extensions; do
35390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35391    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35393    break 2
35394  fi
35395done
35396  done
35397IFS=$as_save_IFS
35398
35399  ;;
35400esac
35401fi
35402ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35403if test -n "$ac_pt_POTENTIAL_CXX"; then
35404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35405$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35406else
35407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35408$as_echo "no" >&6; }
35409fi
35410
35411  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35412    POTENTIAL_CXX=""
35413  else
35414    case $cross_compiling:$ac_tool_warned in
35415yes:)
35416{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35417$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35418ac_tool_warned=yes ;;
35419esac
35420    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35421  fi
35422else
35423  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35424fi
35425
35426      CXX=$POTENTIAL_CXX
35427    fi
35428
35429    if test "x$CXX" = x; then
35430
35431  # Print a helpful message on how to acquire the necessary build dependency.
35432  # devkit is the help tag: freetype, cups, alsa etc
35433  MISSING_DEPENDENCY=devkit
35434
35435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35436    cygwin_help $MISSING_DEPENDENCY
35437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35438    msys_help $MISSING_DEPENDENCY
35439  else
35440    PKGHANDLER_COMMAND=
35441
35442    case $PKGHANDLER in
35443      apt-get)
35444        apt_help     $MISSING_DEPENDENCY ;;
35445      yum)
35446        yum_help     $MISSING_DEPENDENCY ;;
35447      brew)
35448        brew_help    $MISSING_DEPENDENCY ;;
35449      port)
35450        port_help    $MISSING_DEPENDENCY ;;
35451      pkgutil)
35452        pkgutil_help $MISSING_DEPENDENCY ;;
35453      pkgadd)
35454        pkgadd_help  $MISSING_DEPENDENCY ;;
35455    esac
35456
35457    if test "x$PKGHANDLER_COMMAND" != x; then
35458      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35459    fi
35460  fi
35461
35462      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35463    fi
35464  fi
35465
35466  # Now we have a compiler binary in CXX. Make sure it's okay.
35467
35468  # Only process if variable expands to non-empty
35469
35470  if test "x$CXX" != x; then
35471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35472
35473  # First separate the path from the arguments. This will split at the first
35474  # space.
35475  complete="$CXX"
35476  path="${complete%% *}"
35477  tmp="$complete EOL"
35478  arguments="${tmp#* }"
35479
35480  # Input might be given as Windows format, start by converting to
35481  # unix format.
35482  new_path=`$CYGPATH -u "$path"`
35483
35484  # Now try to locate executable using which
35485  new_path=`$WHICH "$new_path" 2> /dev/null`
35486  # bat and cmd files are not always considered executable in cygwin causing which
35487  # to not find them
35488  if test "x$new_path" = x \
35489      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35490      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35491    new_path=`$CYGPATH -u "$path"`
35492  fi
35493  if test "x$new_path" = x; then
35494    # Oops. Which didn't find the executable.
35495    # The splitting of arguments from the executable at a space might have been incorrect,
35496    # since paths with space are more likely in Windows. Give it another try with the whole
35497    # argument.
35498    path="$complete"
35499    arguments="EOL"
35500    new_path=`$CYGPATH -u "$path"`
35501    new_path=`$WHICH "$new_path" 2> /dev/null`
35502    # bat and cmd files are not always considered executable in cygwin causing which
35503    # to not find them
35504    if test "x$new_path" = x \
35505        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35506        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35507      new_path=`$CYGPATH -u "$path"`
35508    fi
35509    if test "x$new_path" = x; then
35510      # It's still not found. Now this is an unrecoverable error.
35511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35512$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35513      has_space=`$ECHO "$complete" | $GREP " "`
35514      if test "x$has_space" != x; then
35515        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35516$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35517      fi
35518      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35519    fi
35520  fi
35521
35522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35525  # "foo.exe" is OK but "foo" is an error.
35526  #
35527  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35528  # It is also a way to make sure we got the proper file name for the real test later on.
35529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35530  if test "x$test_shortpath" = x; then
35531    # Short path failed, file does not exist as specified.
35532    # Try adding .exe or .cmd
35533    if test -f "${new_path}.exe"; then
35534      input_to_shortpath="${new_path}.exe"
35535    elif test -f "${new_path}.cmd"; then
35536      input_to_shortpath="${new_path}.cmd"
35537    else
35538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35539$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35540      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35541$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35542      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35543    fi
35544  else
35545    input_to_shortpath="$new_path"
35546  fi
35547
35548  # Call helper function which possibly converts this using DOS-style short mode.
35549  # If so, the updated path is stored in $new_path.
35550  new_path="$input_to_shortpath"
35551
35552  input_path="$input_to_shortpath"
35553  # Check if we need to convert this using DOS-style short mode. If the path
35554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35555  # take no chances and rewrite it.
35556  # Note: m4 eats our [], so we need to use [ and ] instead.
35557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35558  if test "x$has_forbidden_chars" != x; then
35559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35560    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35561    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35562    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35563      # Going to short mode and back again did indeed matter. Since short mode is
35564      # case insensitive, let's make it lowercase to improve readability.
35565      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35566      # Now convert it back to Unix-style (cygpath)
35567      input_path=`$CYGPATH -u "$shortmode_path"`
35568      new_path="$input_path"
35569    fi
35570  fi
35571
35572  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35573  if test "x$test_cygdrive_prefix" = x; then
35574    # As a simple fix, exclude /usr/bin since it's not a real path.
35575    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35576      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35577      # a path prefixed by /cygdrive for fixpath to work.
35578      new_path="$CYGWIN_ROOT_PATH$input_path"
35579    fi
35580  fi
35581
35582  # remove trailing .exe if any
35583  new_path="${new_path/%.exe/}"
35584
35585    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35586
35587  # First separate the path from the arguments. This will split at the first
35588  # space.
35589  complete="$CXX"
35590  path="${complete%% *}"
35591  tmp="$complete EOL"
35592  arguments="${tmp#* }"
35593
35594  # Input might be given as Windows format, start by converting to
35595  # unix format.
35596  new_path="$path"
35597
35598  windows_path="$new_path"
35599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35600    unix_path=`$CYGPATH -u "$windows_path"`
35601    new_path="$unix_path"
35602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35604    new_path="$unix_path"
35605  fi
35606
35607
35608  # Now try to locate executable using which
35609  new_path=`$WHICH "$new_path" 2> /dev/null`
35610
35611  if test "x$new_path" = x; then
35612    # Oops. Which didn't find the executable.
35613    # The splitting of arguments from the executable at a space might have been incorrect,
35614    # since paths with space are more likely in Windows. Give it another try with the whole
35615    # argument.
35616    path="$complete"
35617    arguments="EOL"
35618    new_path="$path"
35619
35620  windows_path="$new_path"
35621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35622    unix_path=`$CYGPATH -u "$windows_path"`
35623    new_path="$unix_path"
35624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35626    new_path="$unix_path"
35627  fi
35628
35629
35630    new_path=`$WHICH "$new_path" 2> /dev/null`
35631    # bat and cmd files are not always considered executable in MSYS causing which
35632    # to not find them
35633    if test "x$new_path" = x \
35634        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35635        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35636      new_path="$path"
35637
35638  windows_path="$new_path"
35639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35640    unix_path=`$CYGPATH -u "$windows_path"`
35641    new_path="$unix_path"
35642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35644    new_path="$unix_path"
35645  fi
35646
35647    fi
35648
35649    if test "x$new_path" = x; then
35650      # It's still not found. Now this is an unrecoverable error.
35651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35652$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35653      has_space=`$ECHO "$complete" | $GREP " "`
35654      if test "x$has_space" != x; then
35655        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35656$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35657      fi
35658      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35659    fi
35660  fi
35661
35662  # Now new_path has a complete unix path to the binary
35663  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35664    # Keep paths in /bin as-is, but remove trailing .exe if any
35665    new_path="${new_path/%.exe/}"
35666    # Do not save /bin paths to all_fixpath_prefixes!
35667  else
35668    # Not in mixed or Windows style, start by that.
35669    new_path=`cmd //c echo $new_path`
35670
35671  input_path="$new_path"
35672  # Check if we need to convert this using DOS-style short mode. If the path
35673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35674  # take no chances and rewrite it.
35675  # Note: m4 eats our [], so we need to use [ and ] instead.
35676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35677  if test "x$has_forbidden_chars" != x; then
35678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35680  fi
35681
35682    # Output is in $new_path
35683
35684  windows_path="$new_path"
35685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35686    unix_path=`$CYGPATH -u "$windows_path"`
35687    new_path="$unix_path"
35688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35690    new_path="$unix_path"
35691  fi
35692
35693    # remove trailing .exe if any
35694    new_path="${new_path/%.exe/}"
35695
35696    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35697    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35698  fi
35699
35700    else
35701      # We're on a unix platform. Hooray! :)
35702      # First separate the path from the arguments. This will split at the first
35703      # space.
35704      complete="$CXX"
35705      path="${complete%% *}"
35706      tmp="$complete EOL"
35707      arguments="${tmp#* }"
35708
35709      # Cannot rely on the command "which" here since it doesn't always work.
35710      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35711      if test -z "$is_absolute_path"; then
35712        # Path to executable is not absolute. Find it.
35713        IFS_save="$IFS"
35714        IFS=:
35715        for p in $PATH; do
35716          if test -f "$p/$path" && test -x "$p/$path"; then
35717            new_path="$p/$path"
35718            break
35719          fi
35720        done
35721        IFS="$IFS_save"
35722      else
35723        # This is an absolute path, we can use it without further modifications.
35724        new_path="$path"
35725      fi
35726
35727      if test "x$new_path" = x; then
35728        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35729$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35730        has_space=`$ECHO "$complete" | $GREP " "`
35731        if test "x$has_space" != x; then
35732          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35733$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35734        fi
35735        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35736      fi
35737    fi
35738
35739    # Now join together the path and the arguments once again
35740    if test "x$arguments" != xEOL; then
35741      new_complete="$new_path ${arguments% *}"
35742    else
35743      new_complete="$new_path"
35744    fi
35745
35746    if test "x$complete" != "x$new_complete"; then
35747      CXX="$new_complete"
35748      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35749$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35750    fi
35751  fi
35752
35753  TEST_COMPILER="$CXX"
35754
35755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35756$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35757  SYMLINK_ORIGINAL="$TEST_COMPILER"
35758
35759  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35760    # Follow a chain of symbolic links. Use readlink
35761    # where it exists, else fall back to horribly
35762    # complicated shell code.
35763    if test "x$READLINK_TESTED" != yes; then
35764      # On MacOSX there is a readlink tool with a different
35765      # purpose than the GNU readlink tool. Check the found readlink.
35766      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35767      if test "x$ISGNU" = x; then
35768        # A readlink that we do not know how to use.
35769        # Are there other non-GNU readlinks out there?
35770        READLINK_TESTED=yes
35771        READLINK=
35772      fi
35773    fi
35774
35775    if test "x$READLINK" != x; then
35776      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35777    else
35778      # Save the current directory for restoring afterwards
35779      STARTDIR=$PWD
35780      COUNTER=0
35781      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35782      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35783      cd $sym_link_dir
35784      # Use -P flag to resolve symlinks in directories.
35785      cd `$THEPWDCMD -P`
35786      sym_link_dir=`$THEPWDCMD -P`
35787      # Resolve file symlinks
35788      while test $COUNTER -lt 20; do
35789        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35790        if test "x$ISLINK" == x; then
35791          # This is not a symbolic link! We are done!
35792          break
35793        fi
35794        # Again resolve directory symlinks since the target of the just found
35795        # link could be in a different directory
35796        cd `$DIRNAME $ISLINK`
35797        sym_link_dir=`$THEPWDCMD -P`
35798        sym_link_file=`$BASENAME $ISLINK`
35799        let COUNTER=COUNTER+1
35800      done
35801      cd $STARTDIR
35802      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35803    fi
35804  fi
35805
35806  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35808$as_echo "no symlink" >&6; }
35809  else
35810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35811$as_echo "$SYMLINK_ORIGINAL" >&6; }
35812
35813    # We can't handle ccache by gcc wrappers, since we need to know if we're
35814    # using ccache. Instead ccache usage must be controlled by a configure option.
35815    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35816    if test "x$COMPILER_BASENAME" = "xccache"; then
35817      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35818$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35819      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35820    fi
35821  fi
35822
35823
35824  COMPILER=$CXX
35825  COMPILER_NAME=$COMPILER_NAME
35826
35827  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35828    # cc -V output typically looks like
35829    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35830    # or
35831    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35832    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35833    # Check that this is likely to be the Solaris Studio cc.
35834    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35835    if test $? -ne 0; then
35836      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35837      { $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
35838$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35839      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35840$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35841      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35842$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35843      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35844    fi
35845    # Remove usage instructions (if present), and
35846    # collapse compiler output into a single line
35847    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35848        $SED -e 's/ *[Uu]sage:.*//'`
35849    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35850        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35851  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35852    # xlc -qversion output typically looks like
35853    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35854    #     Version: 11.01.0000.0015
35855    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35856    # Check that this is likely to be the IBM XL C compiler.
35857    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35858    if test $? -ne 0; then
35859      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35860      { $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
35861$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35862      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35863$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35864      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35865$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35866      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35867    fi
35868    # Collapse compiler output into a single line
35869    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35870    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35871        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35872  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35873    # There is no specific version flag, but all output starts with a version string.
35874    # First line typically looks something like:
35875    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35876    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35877    # Check that this is likely to be Microsoft CL.EXE.
35878    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35879    if test $? -ne 0; then
35880      { $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
35881$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35882      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35883$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35884      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35885    fi
35886    # Collapse compiler output into a single line
35887    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35888    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35889        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35890  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35891    # gcc --version output typically looks like
35892    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35893    #     Copyright (C) 2013 Free Software Foundation, Inc.
35894    #     This is free software; see the source for copying conditions.  There is NO
35895    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35896    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35897    # Check that this is likely to be GCC.
35898    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35899    if test $? -ne 0; then
35900      { $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
35901$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35902      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35903$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35904      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35905    fi
35906    # Remove Copyright and legalese from version string, and
35907    # collapse into a single line
35908    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35909        $SED -e 's/ *Copyright .*//'`
35910    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35911        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35912  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35913    # clang --version output typically looks like
35914    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35915    #    clang version 3.3 (tags/RELEASE_33/final)
35916    # or
35917    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35918    #    Target: x86_64-pc-linux-gnu
35919    #    Thread model: posix
35920    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35921    # Check that this is likely to be clang
35922    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35923    if test $? -ne 0; then
35924      { $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
35925$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35926      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35927$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35928      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35929    fi
35930    # Collapse compiler output into a single line
35931    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35932    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35933        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35934  else
35935      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35936  fi
35937  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35938  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35939  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35940  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35941
35942  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35943$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35944
35945
35946  # Now that we have resolved CXX ourself, let autoconf have its go at it
35947  ac_ext=cpp
35948ac_cpp='$CXXCPP $CPPFLAGS'
35949ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35950ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35951ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35952if test -z "$CXX"; then
35953  if test -n "$CCC"; then
35954    CXX=$CCC
35955  else
35956    if test -n "$ac_tool_prefix"; then
35957  for ac_prog in $CXX
35958  do
35959    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35960set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35962$as_echo_n "checking for $ac_word... " >&6; }
35963if ${ac_cv_prog_CXX+:} false; then :
35964  $as_echo_n "(cached) " >&6
35965else
35966  if test -n "$CXX"; then
35967  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35968else
35969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35970for as_dir in $PATH
35971do
35972  IFS=$as_save_IFS
35973  test -z "$as_dir" && as_dir=.
35974    for ac_exec_ext in '' $ac_executable_extensions; do
35975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35976    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35978    break 2
35979  fi
35980done
35981  done
35982IFS=$as_save_IFS
35983
35984fi
35985fi
35986CXX=$ac_cv_prog_CXX
35987if test -n "$CXX"; then
35988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35989$as_echo "$CXX" >&6; }
35990else
35991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35992$as_echo "no" >&6; }
35993fi
35994
35995
35996    test -n "$CXX" && break
35997  done
35998fi
35999if test -z "$CXX"; then
36000  ac_ct_CXX=$CXX
36001  for ac_prog in $CXX
36002do
36003  # Extract the first word of "$ac_prog", so it can be a program name with args.
36004set dummy $ac_prog; ac_word=$2
36005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36006$as_echo_n "checking for $ac_word... " >&6; }
36007if ${ac_cv_prog_ac_ct_CXX+:} false; then :
36008  $as_echo_n "(cached) " >&6
36009else
36010  if test -n "$ac_ct_CXX"; then
36011  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
36012else
36013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36014for as_dir in $PATH
36015do
36016  IFS=$as_save_IFS
36017  test -z "$as_dir" && as_dir=.
36018    for ac_exec_ext in '' $ac_executable_extensions; do
36019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36020    ac_cv_prog_ac_ct_CXX="$ac_prog"
36021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36022    break 2
36023  fi
36024done
36025  done
36026IFS=$as_save_IFS
36027
36028fi
36029fi
36030ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
36031if test -n "$ac_ct_CXX"; then
36032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
36033$as_echo "$ac_ct_CXX" >&6; }
36034else
36035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36036$as_echo "no" >&6; }
36037fi
36038
36039
36040  test -n "$ac_ct_CXX" && break
36041done
36042
36043  if test "x$ac_ct_CXX" = x; then
36044    CXX="g++"
36045  else
36046    case $cross_compiling:$ac_tool_warned in
36047yes:)
36048{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36049$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36050ac_tool_warned=yes ;;
36051esac
36052    CXX=$ac_ct_CXX
36053  fi
36054fi
36055
36056  fi
36057fi
36058# Provide some information about the compiler.
36059$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36060set X $ac_compile
36061ac_compiler=$2
36062for ac_option in --version -v -V -qversion; do
36063  { { ac_try="$ac_compiler $ac_option >&5"
36064case "(($ac_try" in
36065  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36066  *) ac_try_echo=$ac_try;;
36067esac
36068eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36069$as_echo "$ac_try_echo"; } >&5
36070  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36071  ac_status=$?
36072  if test -s conftest.err; then
36073    sed '10a\
36074... rest of stderr output deleted ...
36075         10q' conftest.err >conftest.er1
36076    cat conftest.er1 >&5
36077  fi
36078  rm -f conftest.er1 conftest.err
36079  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36080  test $ac_status = 0; }
36081done
36082
36083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36084$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36085if ${ac_cv_cxx_compiler_gnu+:} false; then :
36086  $as_echo_n "(cached) " >&6
36087else
36088  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36089/* end confdefs.h.  */
36090
36091int
36092main ()
36093{
36094#ifndef __GNUC__
36095       choke me
36096#endif
36097
36098  ;
36099  return 0;
36100}
36101_ACEOF
36102if ac_fn_cxx_try_compile "$LINENO"; then :
36103  ac_compiler_gnu=yes
36104else
36105  ac_compiler_gnu=no
36106fi
36107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36108ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36109
36110fi
36111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36112$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36113if test $ac_compiler_gnu = yes; then
36114  GXX=yes
36115else
36116  GXX=
36117fi
36118ac_test_CXXFLAGS=${CXXFLAGS+set}
36119ac_save_CXXFLAGS=$CXXFLAGS
36120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36121$as_echo_n "checking whether $CXX accepts -g... " >&6; }
36122if ${ac_cv_prog_cxx_g+:} false; then :
36123  $as_echo_n "(cached) " >&6
36124else
36125  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36126   ac_cxx_werror_flag=yes
36127   ac_cv_prog_cxx_g=no
36128   CXXFLAGS="-g"
36129   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36130/* end confdefs.h.  */
36131
36132int
36133main ()
36134{
36135
36136  ;
36137  return 0;
36138}
36139_ACEOF
36140if ac_fn_cxx_try_compile "$LINENO"; then :
36141  ac_cv_prog_cxx_g=yes
36142else
36143  CXXFLAGS=""
36144      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36145/* end confdefs.h.  */
36146
36147int
36148main ()
36149{
36150
36151  ;
36152  return 0;
36153}
36154_ACEOF
36155if ac_fn_cxx_try_compile "$LINENO"; then :
36156
36157else
36158  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36159	 CXXFLAGS="-g"
36160	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36161/* end confdefs.h.  */
36162
36163int
36164main ()
36165{
36166
36167  ;
36168  return 0;
36169}
36170_ACEOF
36171if ac_fn_cxx_try_compile "$LINENO"; then :
36172  ac_cv_prog_cxx_g=yes
36173fi
36174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36175fi
36176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36177fi
36178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36179   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36180fi
36181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36182$as_echo "$ac_cv_prog_cxx_g" >&6; }
36183if test "$ac_test_CXXFLAGS" = set; then
36184  CXXFLAGS=$ac_save_CXXFLAGS
36185elif test $ac_cv_prog_cxx_g = yes; then
36186  if test "$GXX" = yes; then
36187    CXXFLAGS="-g -O2"
36188  else
36189    CXXFLAGS="-g"
36190  fi
36191else
36192  if test "$GXX" = yes; then
36193    CXXFLAGS="-O2"
36194  else
36195    CXXFLAGS=
36196  fi
36197fi
36198ac_ext=cpp
36199ac_cpp='$CXXCPP $CPPFLAGS'
36200ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36201ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36202ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36203
36204
36205  # This is the compiler version number on the form X.Y[.Z]
36206
36207
36208
36209
36210  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36211    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36212$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36213    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36214$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36215  fi
36216
36217  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36218  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36219    { $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
36220$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;}
36221  fi
36222
36223  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36224    { $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
36225$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36226  fi
36227
36228  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36229
36230
36231  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36232
36233
36234
36235
36236
36237
36238
36239
36240
36241
36242
36243
36244
36245
36246
36247
36248
36249
36250
36251
36252
36253
36254
36255
36256
36257
36258
36259
36260
36261
36262
36263
36264
36265
36266
36267
36268
36269
36270
36271
36272
36273
36274
36275
36276
36277
36278
36279
36280
36281    # Execute function body
36282
36283  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36284  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36285
36286  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36287    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36288  fi
36289
36290  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36291    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36292  fi
36293
36294  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36295  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36296
36297  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36298    :
36299
36300  else
36301    :
36302
36303          { $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
36304$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36305
36306
36307  fi
36308
36309
36310
36311
36312
36313
36314
36315
36316
36317
36318
36319
36320
36321
36322  fi
36323
36324  #
36325  # Setup the preprocessor (CPP and CXXCPP)
36326  #
36327  ac_ext=c
36328ac_cpp='$CPP $CPPFLAGS'
36329ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36330ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36331ac_compiler_gnu=$ac_cv_c_compiler_gnu
36332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36333$as_echo_n "checking how to run the C preprocessor... " >&6; }
36334# On Suns, sometimes $CPP names a directory.
36335if test -n "$CPP" && test -d "$CPP"; then
36336  CPP=
36337fi
36338if test -z "$CPP"; then
36339  if ${ac_cv_prog_CPP+:} false; then :
36340  $as_echo_n "(cached) " >&6
36341else
36342      # Double quotes because CPP needs to be expanded
36343    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36344    do
36345      ac_preproc_ok=false
36346for ac_c_preproc_warn_flag in '' yes
36347do
36348  # Use a header file that comes with gcc, so configuring glibc
36349  # with a fresh cross-compiler works.
36350  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36351  # <limits.h> exists even on freestanding compilers.
36352  # On the NeXT, cc -E runs the code through the compiler's parser,
36353  # not just through cpp. "Syntax error" is here to catch this case.
36354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36355/* end confdefs.h.  */
36356#ifdef __STDC__
36357# include <limits.h>
36358#else
36359# include <assert.h>
36360#endif
36361		     Syntax error
36362_ACEOF
36363if ac_fn_c_try_cpp "$LINENO"; then :
36364
36365else
36366  # Broken: fails on valid input.
36367continue
36368fi
36369rm -f conftest.err conftest.i conftest.$ac_ext
36370
36371  # OK, works on sane cases.  Now check whether nonexistent headers
36372  # can be detected and how.
36373  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36374/* end confdefs.h.  */
36375#include <ac_nonexistent.h>
36376_ACEOF
36377if ac_fn_c_try_cpp "$LINENO"; then :
36378  # Broken: success on invalid input.
36379continue
36380else
36381  # Passes both tests.
36382ac_preproc_ok=:
36383break
36384fi
36385rm -f conftest.err conftest.i conftest.$ac_ext
36386
36387done
36388# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36389rm -f conftest.i conftest.err conftest.$ac_ext
36390if $ac_preproc_ok; then :
36391  break
36392fi
36393
36394    done
36395    ac_cv_prog_CPP=$CPP
36396
36397fi
36398  CPP=$ac_cv_prog_CPP
36399else
36400  ac_cv_prog_CPP=$CPP
36401fi
36402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36403$as_echo "$CPP" >&6; }
36404ac_preproc_ok=false
36405for ac_c_preproc_warn_flag in '' yes
36406do
36407  # Use a header file that comes with gcc, so configuring glibc
36408  # with a fresh cross-compiler works.
36409  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36410  # <limits.h> exists even on freestanding compilers.
36411  # On the NeXT, cc -E runs the code through the compiler's parser,
36412  # not just through cpp. "Syntax error" is here to catch this case.
36413  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36414/* end confdefs.h.  */
36415#ifdef __STDC__
36416# include <limits.h>
36417#else
36418# include <assert.h>
36419#endif
36420		     Syntax error
36421_ACEOF
36422if ac_fn_c_try_cpp "$LINENO"; then :
36423
36424else
36425  # Broken: fails on valid input.
36426continue
36427fi
36428rm -f conftest.err conftest.i conftest.$ac_ext
36429
36430  # OK, works on sane cases.  Now check whether nonexistent headers
36431  # can be detected and how.
36432  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36433/* end confdefs.h.  */
36434#include <ac_nonexistent.h>
36435_ACEOF
36436if ac_fn_c_try_cpp "$LINENO"; then :
36437  # Broken: success on invalid input.
36438continue
36439else
36440  # Passes both tests.
36441ac_preproc_ok=:
36442break
36443fi
36444rm -f conftest.err conftest.i conftest.$ac_ext
36445
36446done
36447# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36448rm -f conftest.i conftest.err conftest.$ac_ext
36449if $ac_preproc_ok; then :
36450
36451else
36452  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36453$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36454as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36455See \`config.log' for more details" "$LINENO" 5; }
36456fi
36457
36458ac_ext=cpp
36459ac_cpp='$CXXCPP $CPPFLAGS'
36460ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36461ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36462ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36463
36464
36465  # Only process if variable expands to non-empty
36466
36467  if test "x$CPP" != x; then
36468    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36469
36470  # First separate the path from the arguments. This will split at the first
36471  # space.
36472  complete="$CPP"
36473  path="${complete%% *}"
36474  tmp="$complete EOL"
36475  arguments="${tmp#* }"
36476
36477  # Input might be given as Windows format, start by converting to
36478  # unix format.
36479  new_path=`$CYGPATH -u "$path"`
36480
36481  # Now try to locate executable using which
36482  new_path=`$WHICH "$new_path" 2> /dev/null`
36483  # bat and cmd files are not always considered executable in cygwin causing which
36484  # to not find them
36485  if test "x$new_path" = x \
36486      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36487      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36488    new_path=`$CYGPATH -u "$path"`
36489  fi
36490  if test "x$new_path" = x; then
36491    # Oops. Which didn't find the executable.
36492    # The splitting of arguments from the executable at a space might have been incorrect,
36493    # since paths with space are more likely in Windows. Give it another try with the whole
36494    # argument.
36495    path="$complete"
36496    arguments="EOL"
36497    new_path=`$CYGPATH -u "$path"`
36498    new_path=`$WHICH "$new_path" 2> /dev/null`
36499    # bat and cmd files are not always considered executable in cygwin causing which
36500    # to not find them
36501    if test "x$new_path" = x \
36502        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36503        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36504      new_path=`$CYGPATH -u "$path"`
36505    fi
36506    if test "x$new_path" = x; then
36507      # It's still not found. Now this is an unrecoverable error.
36508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36509$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36510      has_space=`$ECHO "$complete" | $GREP " "`
36511      if test "x$has_space" != x; then
36512        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36513$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36514      fi
36515      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36516    fi
36517  fi
36518
36519  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36520  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36521  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36522  # "foo.exe" is OK but "foo" is an error.
36523  #
36524  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36525  # It is also a way to make sure we got the proper file name for the real test later on.
36526  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36527  if test "x$test_shortpath" = x; then
36528    # Short path failed, file does not exist as specified.
36529    # Try adding .exe or .cmd
36530    if test -f "${new_path}.exe"; then
36531      input_to_shortpath="${new_path}.exe"
36532    elif test -f "${new_path}.cmd"; then
36533      input_to_shortpath="${new_path}.cmd"
36534    else
36535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36536$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36537      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36538$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36539      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36540    fi
36541  else
36542    input_to_shortpath="$new_path"
36543  fi
36544
36545  # Call helper function which possibly converts this using DOS-style short mode.
36546  # If so, the updated path is stored in $new_path.
36547  new_path="$input_to_shortpath"
36548
36549  input_path="$input_to_shortpath"
36550  # Check if we need to convert this using DOS-style short mode. If the path
36551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36552  # take no chances and rewrite it.
36553  # Note: m4 eats our [], so we need to use [ and ] instead.
36554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36555  if test "x$has_forbidden_chars" != x; then
36556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36557    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36558    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36559    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36560      # Going to short mode and back again did indeed matter. Since short mode is
36561      # case insensitive, let's make it lowercase to improve readability.
36562      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36563      # Now convert it back to Unix-style (cygpath)
36564      input_path=`$CYGPATH -u "$shortmode_path"`
36565      new_path="$input_path"
36566    fi
36567  fi
36568
36569  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36570  if test "x$test_cygdrive_prefix" = x; then
36571    # As a simple fix, exclude /usr/bin since it's not a real path.
36572    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36573      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36574      # a path prefixed by /cygdrive for fixpath to work.
36575      new_path="$CYGWIN_ROOT_PATH$input_path"
36576    fi
36577  fi
36578
36579  # remove trailing .exe if any
36580  new_path="${new_path/%.exe/}"
36581
36582    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36583
36584  # First separate the path from the arguments. This will split at the first
36585  # space.
36586  complete="$CPP"
36587  path="${complete%% *}"
36588  tmp="$complete EOL"
36589  arguments="${tmp#* }"
36590
36591  # Input might be given as Windows format, start by converting to
36592  # unix format.
36593  new_path="$path"
36594
36595  windows_path="$new_path"
36596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36597    unix_path=`$CYGPATH -u "$windows_path"`
36598    new_path="$unix_path"
36599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36601    new_path="$unix_path"
36602  fi
36603
36604
36605  # Now try to locate executable using which
36606  new_path=`$WHICH "$new_path" 2> /dev/null`
36607
36608  if test "x$new_path" = x; then
36609    # Oops. Which didn't find the executable.
36610    # The splitting of arguments from the executable at a space might have been incorrect,
36611    # since paths with space are more likely in Windows. Give it another try with the whole
36612    # argument.
36613    path="$complete"
36614    arguments="EOL"
36615    new_path="$path"
36616
36617  windows_path="$new_path"
36618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36619    unix_path=`$CYGPATH -u "$windows_path"`
36620    new_path="$unix_path"
36621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36623    new_path="$unix_path"
36624  fi
36625
36626
36627    new_path=`$WHICH "$new_path" 2> /dev/null`
36628    # bat and cmd files are not always considered executable in MSYS causing which
36629    # to not find them
36630    if test "x$new_path" = x \
36631        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36632        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36633      new_path="$path"
36634
36635  windows_path="$new_path"
36636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36637    unix_path=`$CYGPATH -u "$windows_path"`
36638    new_path="$unix_path"
36639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36641    new_path="$unix_path"
36642  fi
36643
36644    fi
36645
36646    if test "x$new_path" = x; then
36647      # It's still not found. Now this is an unrecoverable error.
36648      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36649$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36650      has_space=`$ECHO "$complete" | $GREP " "`
36651      if test "x$has_space" != x; then
36652        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36653$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36654      fi
36655      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36656    fi
36657  fi
36658
36659  # Now new_path has a complete unix path to the binary
36660  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36661    # Keep paths in /bin as-is, but remove trailing .exe if any
36662    new_path="${new_path/%.exe/}"
36663    # Do not save /bin paths to all_fixpath_prefixes!
36664  else
36665    # Not in mixed or Windows style, start by that.
36666    new_path=`cmd //c echo $new_path`
36667
36668  input_path="$new_path"
36669  # Check if we need to convert this using DOS-style short mode. If the path
36670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36671  # take no chances and rewrite it.
36672  # Note: m4 eats our [], so we need to use [ and ] instead.
36673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36674  if test "x$has_forbidden_chars" != x; then
36675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36677  fi
36678
36679    # Output is in $new_path
36680
36681  windows_path="$new_path"
36682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36683    unix_path=`$CYGPATH -u "$windows_path"`
36684    new_path="$unix_path"
36685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36687    new_path="$unix_path"
36688  fi
36689
36690    # remove trailing .exe if any
36691    new_path="${new_path/%.exe/}"
36692
36693    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36694    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36695  fi
36696
36697    else
36698      # We're on a unix platform. Hooray! :)
36699      # First separate the path from the arguments. This will split at the first
36700      # space.
36701      complete="$CPP"
36702      path="${complete%% *}"
36703      tmp="$complete EOL"
36704      arguments="${tmp#* }"
36705
36706      # Cannot rely on the command "which" here since it doesn't always work.
36707      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36708      if test -z "$is_absolute_path"; then
36709        # Path to executable is not absolute. Find it.
36710        IFS_save="$IFS"
36711        IFS=:
36712        for p in $PATH; do
36713          if test -f "$p/$path" && test -x "$p/$path"; then
36714            new_path="$p/$path"
36715            break
36716          fi
36717        done
36718        IFS="$IFS_save"
36719      else
36720        # This is an absolute path, we can use it without further modifications.
36721        new_path="$path"
36722      fi
36723
36724      if test "x$new_path" = x; then
36725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36726$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36727        has_space=`$ECHO "$complete" | $GREP " "`
36728        if test "x$has_space" != x; then
36729          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36730$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36731        fi
36732        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36733      fi
36734    fi
36735
36736    # Now join together the path and the arguments once again
36737    if test "x$arguments" != xEOL; then
36738      new_complete="$new_path ${arguments% *}"
36739    else
36740      new_complete="$new_path"
36741    fi
36742
36743    if test "x$complete" != "x$new_complete"; then
36744      CPP="$new_complete"
36745      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36746$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36747    fi
36748  fi
36749
36750  ac_ext=cpp
36751ac_cpp='$CXXCPP $CPPFLAGS'
36752ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36753ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36754ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36756$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36757if test -z "$CXXCPP"; then
36758  if ${ac_cv_prog_CXXCPP+:} false; then :
36759  $as_echo_n "(cached) " >&6
36760else
36761      # Double quotes because CXXCPP needs to be expanded
36762    for CXXCPP in "$CXX -E" "/lib/cpp"
36763    do
36764      ac_preproc_ok=false
36765for ac_cxx_preproc_warn_flag in '' yes
36766do
36767  # Use a header file that comes with gcc, so configuring glibc
36768  # with a fresh cross-compiler works.
36769  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36770  # <limits.h> exists even on freestanding compilers.
36771  # On the NeXT, cc -E runs the code through the compiler's parser,
36772  # not just through cpp. "Syntax error" is here to catch this case.
36773  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36774/* end confdefs.h.  */
36775#ifdef __STDC__
36776# include <limits.h>
36777#else
36778# include <assert.h>
36779#endif
36780		     Syntax error
36781_ACEOF
36782if ac_fn_cxx_try_cpp "$LINENO"; then :
36783
36784else
36785  # Broken: fails on valid input.
36786continue
36787fi
36788rm -f conftest.err conftest.i conftest.$ac_ext
36789
36790  # OK, works on sane cases.  Now check whether nonexistent headers
36791  # can be detected and how.
36792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36793/* end confdefs.h.  */
36794#include <ac_nonexistent.h>
36795_ACEOF
36796if ac_fn_cxx_try_cpp "$LINENO"; then :
36797  # Broken: success on invalid input.
36798continue
36799else
36800  # Passes both tests.
36801ac_preproc_ok=:
36802break
36803fi
36804rm -f conftest.err conftest.i conftest.$ac_ext
36805
36806done
36807# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36808rm -f conftest.i conftest.err conftest.$ac_ext
36809if $ac_preproc_ok; then :
36810  break
36811fi
36812
36813    done
36814    ac_cv_prog_CXXCPP=$CXXCPP
36815
36816fi
36817  CXXCPP=$ac_cv_prog_CXXCPP
36818else
36819  ac_cv_prog_CXXCPP=$CXXCPP
36820fi
36821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36822$as_echo "$CXXCPP" >&6; }
36823ac_preproc_ok=false
36824for ac_cxx_preproc_warn_flag in '' yes
36825do
36826  # Use a header file that comes with gcc, so configuring glibc
36827  # with a fresh cross-compiler works.
36828  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36829  # <limits.h> exists even on freestanding compilers.
36830  # On the NeXT, cc -E runs the code through the compiler's parser,
36831  # not just through cpp. "Syntax error" is here to catch this case.
36832  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36833/* end confdefs.h.  */
36834#ifdef __STDC__
36835# include <limits.h>
36836#else
36837# include <assert.h>
36838#endif
36839		     Syntax error
36840_ACEOF
36841if ac_fn_cxx_try_cpp "$LINENO"; then :
36842
36843else
36844  # Broken: fails on valid input.
36845continue
36846fi
36847rm -f conftest.err conftest.i conftest.$ac_ext
36848
36849  # OK, works on sane cases.  Now check whether nonexistent headers
36850  # can be detected and how.
36851  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36852/* end confdefs.h.  */
36853#include <ac_nonexistent.h>
36854_ACEOF
36855if ac_fn_cxx_try_cpp "$LINENO"; then :
36856  # Broken: success on invalid input.
36857continue
36858else
36859  # Passes both tests.
36860ac_preproc_ok=:
36861break
36862fi
36863rm -f conftest.err conftest.i conftest.$ac_ext
36864
36865done
36866# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36867rm -f conftest.i conftest.err conftest.$ac_ext
36868if $ac_preproc_ok; then :
36869
36870else
36871  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36872$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36873as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36874See \`config.log' for more details" "$LINENO" 5; }
36875fi
36876
36877ac_ext=cpp
36878ac_cpp='$CXXCPP $CPPFLAGS'
36879ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36880ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36881ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36882
36883
36884  # Only process if variable expands to non-empty
36885
36886  if test "x$CXXCPP" != x; then
36887    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36888
36889  # First separate the path from the arguments. This will split at the first
36890  # space.
36891  complete="$CXXCPP"
36892  path="${complete%% *}"
36893  tmp="$complete EOL"
36894  arguments="${tmp#* }"
36895
36896  # Input might be given as Windows format, start by converting to
36897  # unix format.
36898  new_path=`$CYGPATH -u "$path"`
36899
36900  # Now try to locate executable using which
36901  new_path=`$WHICH "$new_path" 2> /dev/null`
36902  # bat and cmd files are not always considered executable in cygwin causing which
36903  # to not find them
36904  if test "x$new_path" = x \
36905      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36906      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36907    new_path=`$CYGPATH -u "$path"`
36908  fi
36909  if test "x$new_path" = x; then
36910    # Oops. Which didn't find the executable.
36911    # The splitting of arguments from the executable at a space might have been incorrect,
36912    # since paths with space are more likely in Windows. Give it another try with the whole
36913    # argument.
36914    path="$complete"
36915    arguments="EOL"
36916    new_path=`$CYGPATH -u "$path"`
36917    new_path=`$WHICH "$new_path" 2> /dev/null`
36918    # bat and cmd files are not always considered executable in cygwin causing which
36919    # to not find them
36920    if test "x$new_path" = x \
36921        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36922        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36923      new_path=`$CYGPATH -u "$path"`
36924    fi
36925    if test "x$new_path" = x; then
36926      # It's still not found. Now this is an unrecoverable error.
36927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36928$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36929      has_space=`$ECHO "$complete" | $GREP " "`
36930      if test "x$has_space" != x; then
36931        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36932$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36933      fi
36934      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36935    fi
36936  fi
36937
36938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36941  # "foo.exe" is OK but "foo" is an error.
36942  #
36943  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36944  # It is also a way to make sure we got the proper file name for the real test later on.
36945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36946  if test "x$test_shortpath" = x; then
36947    # Short path failed, file does not exist as specified.
36948    # Try adding .exe or .cmd
36949    if test -f "${new_path}.exe"; then
36950      input_to_shortpath="${new_path}.exe"
36951    elif test -f "${new_path}.cmd"; then
36952      input_to_shortpath="${new_path}.cmd"
36953    else
36954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36955$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36956      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36957$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36958      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36959    fi
36960  else
36961    input_to_shortpath="$new_path"
36962  fi
36963
36964  # Call helper function which possibly converts this using DOS-style short mode.
36965  # If so, the updated path is stored in $new_path.
36966  new_path="$input_to_shortpath"
36967
36968  input_path="$input_to_shortpath"
36969  # Check if we need to convert this using DOS-style short mode. If the path
36970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36971  # take no chances and rewrite it.
36972  # Note: m4 eats our [], so we need to use [ and ] instead.
36973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36974  if test "x$has_forbidden_chars" != x; then
36975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36979      # Going to short mode and back again did indeed matter. Since short mode is
36980      # case insensitive, let's make it lowercase to improve readability.
36981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36982      # Now convert it back to Unix-style (cygpath)
36983      input_path=`$CYGPATH -u "$shortmode_path"`
36984      new_path="$input_path"
36985    fi
36986  fi
36987
36988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36989  if test "x$test_cygdrive_prefix" = x; then
36990    # As a simple fix, exclude /usr/bin since it's not a real path.
36991    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36993      # a path prefixed by /cygdrive for fixpath to work.
36994      new_path="$CYGWIN_ROOT_PATH$input_path"
36995    fi
36996  fi
36997
36998  # remove trailing .exe if any
36999  new_path="${new_path/%.exe/}"
37000
37001    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37002
37003  # First separate the path from the arguments. This will split at the first
37004  # space.
37005  complete="$CXXCPP"
37006  path="${complete%% *}"
37007  tmp="$complete EOL"
37008  arguments="${tmp#* }"
37009
37010  # Input might be given as Windows format, start by converting to
37011  # unix format.
37012  new_path="$path"
37013
37014  windows_path="$new_path"
37015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37016    unix_path=`$CYGPATH -u "$windows_path"`
37017    new_path="$unix_path"
37018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37020    new_path="$unix_path"
37021  fi
37022
37023
37024  # Now try to locate executable using which
37025  new_path=`$WHICH "$new_path" 2> /dev/null`
37026
37027  if test "x$new_path" = x; then
37028    # Oops. Which didn't find the executable.
37029    # The splitting of arguments from the executable at a space might have been incorrect,
37030    # since paths with space are more likely in Windows. Give it another try with the whole
37031    # argument.
37032    path="$complete"
37033    arguments="EOL"
37034    new_path="$path"
37035
37036  windows_path="$new_path"
37037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37038    unix_path=`$CYGPATH -u "$windows_path"`
37039    new_path="$unix_path"
37040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37042    new_path="$unix_path"
37043  fi
37044
37045
37046    new_path=`$WHICH "$new_path" 2> /dev/null`
37047    # bat and cmd files are not always considered executable in MSYS causing which
37048    # to not find them
37049    if test "x$new_path" = x \
37050        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37051        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37052      new_path="$path"
37053
37054  windows_path="$new_path"
37055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37056    unix_path=`$CYGPATH -u "$windows_path"`
37057    new_path="$unix_path"
37058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37060    new_path="$unix_path"
37061  fi
37062
37063    fi
37064
37065    if test "x$new_path" = x; then
37066      # It's still not found. Now this is an unrecoverable error.
37067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37068$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37069      has_space=`$ECHO "$complete" | $GREP " "`
37070      if test "x$has_space" != x; then
37071        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37073      fi
37074      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37075    fi
37076  fi
37077
37078  # Now new_path has a complete unix path to the binary
37079  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37080    # Keep paths in /bin as-is, but remove trailing .exe if any
37081    new_path="${new_path/%.exe/}"
37082    # Do not save /bin paths to all_fixpath_prefixes!
37083  else
37084    # Not in mixed or Windows style, start by that.
37085    new_path=`cmd //c echo $new_path`
37086
37087  input_path="$new_path"
37088  # Check if we need to convert this using DOS-style short mode. If the path
37089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37090  # take no chances and rewrite it.
37091  # Note: m4 eats our [], so we need to use [ and ] instead.
37092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37093  if test "x$has_forbidden_chars" != x; then
37094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37096  fi
37097
37098    # Output is in $new_path
37099
37100  windows_path="$new_path"
37101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37102    unix_path=`$CYGPATH -u "$windows_path"`
37103    new_path="$unix_path"
37104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37106    new_path="$unix_path"
37107  fi
37108
37109    # remove trailing .exe if any
37110    new_path="${new_path/%.exe/}"
37111
37112    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37113    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37114  fi
37115
37116    else
37117      # We're on a unix platform. Hooray! :)
37118      # First separate the path from the arguments. This will split at the first
37119      # space.
37120      complete="$CXXCPP"
37121      path="${complete%% *}"
37122      tmp="$complete EOL"
37123      arguments="${tmp#* }"
37124
37125      # Cannot rely on the command "which" here since it doesn't always work.
37126      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37127      if test -z "$is_absolute_path"; then
37128        # Path to executable is not absolute. Find it.
37129        IFS_save="$IFS"
37130        IFS=:
37131        for p in $PATH; do
37132          if test -f "$p/$path" && test -x "$p/$path"; then
37133            new_path="$p/$path"
37134            break
37135          fi
37136        done
37137        IFS="$IFS_save"
37138      else
37139        # This is an absolute path, we can use it without further modifications.
37140        new_path="$path"
37141      fi
37142
37143      if test "x$new_path" = x; then
37144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37145$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37146        has_space=`$ECHO "$complete" | $GREP " "`
37147        if test "x$has_space" != x; then
37148          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37149$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37150        fi
37151        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37152      fi
37153    fi
37154
37155    # Now join together the path and the arguments once again
37156    if test "x$arguments" != xEOL; then
37157      new_complete="$new_path ${arguments% *}"
37158    else
37159      new_complete="$new_path"
37160    fi
37161
37162    if test "x$complete" != "x$new_complete"; then
37163      CXXCPP="$new_complete"
37164      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37165$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37166    fi
37167  fi
37168
37169
37170  #
37171  # Setup the linker (LD)
37172  #
37173  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37174    # In the Microsoft toolchain we have a separate LD command "link".
37175    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37176    # a cygwin program for something completely different.
37177    # Extract the first word of "link", so it can be a program name with args.
37178set dummy link; ac_word=$2
37179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37180$as_echo_n "checking for $ac_word... " >&6; }
37181if ${ac_cv_prog_LD+:} false; then :
37182  $as_echo_n "(cached) " >&6
37183else
37184  if test -n "$LD"; then
37185  ac_cv_prog_LD="$LD" # Let the user override the test.
37186else
37187  ac_prog_rejected=no
37188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37189for as_dir in $PATH
37190do
37191  IFS=$as_save_IFS
37192  test -z "$as_dir" && as_dir=.
37193    for ac_exec_ext in '' $ac_executable_extensions; do
37194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37195    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37196       ac_prog_rejected=yes
37197       continue
37198     fi
37199    ac_cv_prog_LD="link"
37200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37201    break 2
37202  fi
37203done
37204  done
37205IFS=$as_save_IFS
37206
37207if test $ac_prog_rejected = yes; then
37208  # We found a bogon in the path, so make sure we never use it.
37209  set dummy $ac_cv_prog_LD
37210  shift
37211  if test $# != 0; then
37212    # We chose a different compiler from the bogus one.
37213    # However, it has the same basename, so the bogon will be chosen
37214    # first if we set LD to just the basename; use the full file name.
37215    shift
37216    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37217  fi
37218fi
37219fi
37220fi
37221LD=$ac_cv_prog_LD
37222if test -n "$LD"; then
37223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37224$as_echo "$LD" >&6; }
37225else
37226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37227$as_echo "no" >&6; }
37228fi
37229
37230
37231
37232  # Only process if variable expands to non-empty
37233
37234  if test "x$LD" != x; then
37235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37236
37237  # First separate the path from the arguments. This will split at the first
37238  # space.
37239  complete="$LD"
37240  path="${complete%% *}"
37241  tmp="$complete EOL"
37242  arguments="${tmp#* }"
37243
37244  # Input might be given as Windows format, start by converting to
37245  # unix format.
37246  new_path=`$CYGPATH -u "$path"`
37247
37248  # Now try to locate executable using which
37249  new_path=`$WHICH "$new_path" 2> /dev/null`
37250  # bat and cmd files are not always considered executable in cygwin causing which
37251  # to not find them
37252  if test "x$new_path" = x \
37253      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37254      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37255    new_path=`$CYGPATH -u "$path"`
37256  fi
37257  if test "x$new_path" = x; then
37258    # Oops. Which didn't find the executable.
37259    # The splitting of arguments from the executable at a space might have been incorrect,
37260    # since paths with space are more likely in Windows. Give it another try with the whole
37261    # argument.
37262    path="$complete"
37263    arguments="EOL"
37264    new_path=`$CYGPATH -u "$path"`
37265    new_path=`$WHICH "$new_path" 2> /dev/null`
37266    # bat and cmd files are not always considered executable in cygwin causing which
37267    # to not find them
37268    if test "x$new_path" = x \
37269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37271      new_path=`$CYGPATH -u "$path"`
37272    fi
37273    if test "x$new_path" = x; then
37274      # It's still not found. Now this is an unrecoverable error.
37275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37276$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37277      has_space=`$ECHO "$complete" | $GREP " "`
37278      if test "x$has_space" != x; then
37279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37281      fi
37282      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37283    fi
37284  fi
37285
37286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37289  # "foo.exe" is OK but "foo" is an error.
37290  #
37291  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37292  # It is also a way to make sure we got the proper file name for the real test later on.
37293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37294  if test "x$test_shortpath" = x; then
37295    # Short path failed, file does not exist as specified.
37296    # Try adding .exe or .cmd
37297    if test -f "${new_path}.exe"; then
37298      input_to_shortpath="${new_path}.exe"
37299    elif test -f "${new_path}.cmd"; then
37300      input_to_shortpath="${new_path}.cmd"
37301    else
37302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37303$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37306      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37307    fi
37308  else
37309    input_to_shortpath="$new_path"
37310  fi
37311
37312  # Call helper function which possibly converts this using DOS-style short mode.
37313  # If so, the updated path is stored in $new_path.
37314  new_path="$input_to_shortpath"
37315
37316  input_path="$input_to_shortpath"
37317  # Check if we need to convert this using DOS-style short mode. If the path
37318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37319  # take no chances and rewrite it.
37320  # Note: m4 eats our [], so we need to use [ and ] instead.
37321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37322  if test "x$has_forbidden_chars" != x; then
37323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37327      # Going to short mode and back again did indeed matter. Since short mode is
37328      # case insensitive, let's make it lowercase to improve readability.
37329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37330      # Now convert it back to Unix-style (cygpath)
37331      input_path=`$CYGPATH -u "$shortmode_path"`
37332      new_path="$input_path"
37333    fi
37334  fi
37335
37336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37337  if test "x$test_cygdrive_prefix" = x; then
37338    # As a simple fix, exclude /usr/bin since it's not a real path.
37339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37341      # a path prefixed by /cygdrive for fixpath to work.
37342      new_path="$CYGWIN_ROOT_PATH$input_path"
37343    fi
37344  fi
37345
37346  # remove trailing .exe if any
37347  new_path="${new_path/%.exe/}"
37348
37349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37350
37351  # First separate the path from the arguments. This will split at the first
37352  # space.
37353  complete="$LD"
37354  path="${complete%% *}"
37355  tmp="$complete EOL"
37356  arguments="${tmp#* }"
37357
37358  # Input might be given as Windows format, start by converting to
37359  # unix format.
37360  new_path="$path"
37361
37362  windows_path="$new_path"
37363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37364    unix_path=`$CYGPATH -u "$windows_path"`
37365    new_path="$unix_path"
37366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37368    new_path="$unix_path"
37369  fi
37370
37371
37372  # Now try to locate executable using which
37373  new_path=`$WHICH "$new_path" 2> /dev/null`
37374
37375  if test "x$new_path" = x; then
37376    # Oops. Which didn't find the executable.
37377    # The splitting of arguments from the executable at a space might have been incorrect,
37378    # since paths with space are more likely in Windows. Give it another try with the whole
37379    # argument.
37380    path="$complete"
37381    arguments="EOL"
37382    new_path="$path"
37383
37384  windows_path="$new_path"
37385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37386    unix_path=`$CYGPATH -u "$windows_path"`
37387    new_path="$unix_path"
37388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37390    new_path="$unix_path"
37391  fi
37392
37393
37394    new_path=`$WHICH "$new_path" 2> /dev/null`
37395    # bat and cmd files are not always considered executable in MSYS causing which
37396    # to not find them
37397    if test "x$new_path" = x \
37398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37400      new_path="$path"
37401
37402  windows_path="$new_path"
37403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37404    unix_path=`$CYGPATH -u "$windows_path"`
37405    new_path="$unix_path"
37406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37408    new_path="$unix_path"
37409  fi
37410
37411    fi
37412
37413    if test "x$new_path" = x; then
37414      # It's still not found. Now this is an unrecoverable error.
37415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37416$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37417      has_space=`$ECHO "$complete" | $GREP " "`
37418      if test "x$has_space" != x; then
37419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37421      fi
37422      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37423    fi
37424  fi
37425
37426  # Now new_path has a complete unix path to the binary
37427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37428    # Keep paths in /bin as-is, but remove trailing .exe if any
37429    new_path="${new_path/%.exe/}"
37430    # Do not save /bin paths to all_fixpath_prefixes!
37431  else
37432    # Not in mixed or Windows style, start by that.
37433    new_path=`cmd //c echo $new_path`
37434
37435  input_path="$new_path"
37436  # Check if we need to convert this using DOS-style short mode. If the path
37437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37438  # take no chances and rewrite it.
37439  # Note: m4 eats our [], so we need to use [ and ] instead.
37440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37441  if test "x$has_forbidden_chars" != x; then
37442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37444  fi
37445
37446    # Output is in $new_path
37447
37448  windows_path="$new_path"
37449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37450    unix_path=`$CYGPATH -u "$windows_path"`
37451    new_path="$unix_path"
37452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37454    new_path="$unix_path"
37455  fi
37456
37457    # remove trailing .exe if any
37458    new_path="${new_path/%.exe/}"
37459
37460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37462  fi
37463
37464    else
37465      # We're on a unix platform. Hooray! :)
37466      # First separate the path from the arguments. This will split at the first
37467      # space.
37468      complete="$LD"
37469      path="${complete%% *}"
37470      tmp="$complete EOL"
37471      arguments="${tmp#* }"
37472
37473      # Cannot rely on the command "which" here since it doesn't always work.
37474      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37475      if test -z "$is_absolute_path"; then
37476        # Path to executable is not absolute. Find it.
37477        IFS_save="$IFS"
37478        IFS=:
37479        for p in $PATH; do
37480          if test -f "$p/$path" && test -x "$p/$path"; then
37481            new_path="$p/$path"
37482            break
37483          fi
37484        done
37485        IFS="$IFS_save"
37486      else
37487        # This is an absolute path, we can use it without further modifications.
37488        new_path="$path"
37489      fi
37490
37491      if test "x$new_path" = x; then
37492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37493$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37494        has_space=`$ECHO "$complete" | $GREP " "`
37495        if test "x$has_space" != x; then
37496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37498        fi
37499        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37500      fi
37501    fi
37502
37503    # Now join together the path and the arguments once again
37504    if test "x$arguments" != xEOL; then
37505      new_complete="$new_path ${arguments% *}"
37506    else
37507      new_complete="$new_path"
37508    fi
37509
37510    if test "x$complete" != "x$new_complete"; then
37511      LD="$new_complete"
37512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37513$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37514    fi
37515  fi
37516
37517    # Verify that we indeed succeeded with this trick.
37518    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37519$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37520    "$LD" --version > /dev/null
37521    if test $? -eq 0 ; then
37522      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37523$as_echo "no" >&6; }
37524      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37525    else
37526      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37527$as_echo "yes" >&6; }
37528    fi
37529    LDCXX="$LD"
37530  else
37531    # All other toolchains use the compiler to link.
37532    LD="$CC"
37533    LDCXX="$CXX"
37534  fi
37535
37536  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37537
37538
37539  #
37540  # Setup the assembler (AS)
37541  #
37542  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37543
37544
37545  # Publish this variable in the help.
37546
37547
37548  if [ -z "${AS+x}" ]; then
37549    # The variable is not set by user, try to locate tool using the code snippet
37550    for ac_prog in as
37551do
37552  # Extract the first word of "$ac_prog", so it can be a program name with args.
37553set dummy $ac_prog; ac_word=$2
37554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37555$as_echo_n "checking for $ac_word... " >&6; }
37556if ${ac_cv_path_AS+:} false; then :
37557  $as_echo_n "(cached) " >&6
37558else
37559  case $AS in
37560  [\\/]* | ?:[\\/]*)
37561  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37562  ;;
37563  *)
37564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37565for as_dir in $PATH
37566do
37567  IFS=$as_save_IFS
37568  test -z "$as_dir" && as_dir=.
37569    for ac_exec_ext in '' $ac_executable_extensions; do
37570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37571    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37573    break 2
37574  fi
37575done
37576  done
37577IFS=$as_save_IFS
37578
37579  ;;
37580esac
37581fi
37582AS=$ac_cv_path_AS
37583if test -n "$AS"; then
37584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37585$as_echo "$AS" >&6; }
37586else
37587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37588$as_echo "no" >&6; }
37589fi
37590
37591
37592  test -n "$AS" && break
37593done
37594
37595  else
37596    # The variable is set, but is it from the command line or the environment?
37597
37598    # Try to remove the string !AS! from our list.
37599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37601      # If it failed, the variable was not from the command line. Ignore it,
37602      # but warn the user (except for BASH, which is always set by the calling BASH).
37603      if test "xAS" != xBASH; then
37604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37605$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37606      fi
37607      # Try to locate tool using the code snippet
37608      for ac_prog in as
37609do
37610  # Extract the first word of "$ac_prog", so it can be a program name with args.
37611set dummy $ac_prog; ac_word=$2
37612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37613$as_echo_n "checking for $ac_word... " >&6; }
37614if ${ac_cv_path_AS+:} false; then :
37615  $as_echo_n "(cached) " >&6
37616else
37617  case $AS in
37618  [\\/]* | ?:[\\/]*)
37619  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37620  ;;
37621  *)
37622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37623for as_dir in $PATH
37624do
37625  IFS=$as_save_IFS
37626  test -z "$as_dir" && as_dir=.
37627    for ac_exec_ext in '' $ac_executable_extensions; do
37628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37629    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37631    break 2
37632  fi
37633done
37634  done
37635IFS=$as_save_IFS
37636
37637  ;;
37638esac
37639fi
37640AS=$ac_cv_path_AS
37641if test -n "$AS"; then
37642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37643$as_echo "$AS" >&6; }
37644else
37645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37646$as_echo "no" >&6; }
37647fi
37648
37649
37650  test -n "$AS" && break
37651done
37652
37653    else
37654      # If it succeeded, then it was overridden by the user. We will use it
37655      # for the tool.
37656
37657      # First remove it from the list of overridden variables, so we can test
37658      # for unknown variables in the end.
37659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37660
37661      # Check if we try to supply an empty value
37662      if test "x$AS" = x; then
37663        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37664$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37666$as_echo_n "checking for AS... " >&6; }
37667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37668$as_echo "disabled" >&6; }
37669      else
37670        # Check if the provided tool contains a complete path.
37671        tool_specified="$AS"
37672        tool_basename="${tool_specified##*/}"
37673        if test "x$tool_basename" = "x$tool_specified"; then
37674          # A command without a complete path is provided, search $PATH.
37675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37676$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37677          # Extract the first word of "$tool_basename", so it can be a program name with args.
37678set dummy $tool_basename; ac_word=$2
37679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37680$as_echo_n "checking for $ac_word... " >&6; }
37681if ${ac_cv_path_AS+:} false; then :
37682  $as_echo_n "(cached) " >&6
37683else
37684  case $AS in
37685  [\\/]* | ?:[\\/]*)
37686  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37687  ;;
37688  *)
37689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37690for as_dir in $PATH
37691do
37692  IFS=$as_save_IFS
37693  test -z "$as_dir" && as_dir=.
37694    for ac_exec_ext in '' $ac_executable_extensions; do
37695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37696    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37698    break 2
37699  fi
37700done
37701  done
37702IFS=$as_save_IFS
37703
37704  ;;
37705esac
37706fi
37707AS=$ac_cv_path_AS
37708if test -n "$AS"; then
37709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37710$as_echo "$AS" >&6; }
37711else
37712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37713$as_echo "no" >&6; }
37714fi
37715
37716
37717          if test "x$AS" = x; then
37718            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37719          fi
37720        else
37721          # Otherwise we believe it is a complete path. Use it as it is.
37722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37723$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37724          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37725$as_echo_n "checking for AS... " >&6; }
37726          if test ! -x "$tool_specified"; then
37727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37728$as_echo "not found" >&6; }
37729            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37730          fi
37731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37732$as_echo "$tool_specified" >&6; }
37733        fi
37734      fi
37735    fi
37736
37737  fi
37738
37739
37740
37741  # Only process if variable expands to non-empty
37742
37743  if test "x$AS" != x; then
37744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37745
37746  # First separate the path from the arguments. This will split at the first
37747  # space.
37748  complete="$AS"
37749  path="${complete%% *}"
37750  tmp="$complete EOL"
37751  arguments="${tmp#* }"
37752
37753  # Input might be given as Windows format, start by converting to
37754  # unix format.
37755  new_path=`$CYGPATH -u "$path"`
37756
37757  # Now try to locate executable using which
37758  new_path=`$WHICH "$new_path" 2> /dev/null`
37759  # bat and cmd files are not always considered executable in cygwin causing which
37760  # to not find them
37761  if test "x$new_path" = x \
37762      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37763      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37764    new_path=`$CYGPATH -u "$path"`
37765  fi
37766  if test "x$new_path" = x; then
37767    # Oops. Which didn't find the executable.
37768    # The splitting of arguments from the executable at a space might have been incorrect,
37769    # since paths with space are more likely in Windows. Give it another try with the whole
37770    # argument.
37771    path="$complete"
37772    arguments="EOL"
37773    new_path=`$CYGPATH -u "$path"`
37774    new_path=`$WHICH "$new_path" 2> /dev/null`
37775    # bat and cmd files are not always considered executable in cygwin causing which
37776    # to not find them
37777    if test "x$new_path" = x \
37778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37780      new_path=`$CYGPATH -u "$path"`
37781    fi
37782    if test "x$new_path" = x; then
37783      # It's still not found. Now this is an unrecoverable error.
37784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37785$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37786      has_space=`$ECHO "$complete" | $GREP " "`
37787      if test "x$has_space" != x; then
37788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37790      fi
37791      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37792    fi
37793  fi
37794
37795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37798  # "foo.exe" is OK but "foo" is an error.
37799  #
37800  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37801  # It is also a way to make sure we got the proper file name for the real test later on.
37802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37803  if test "x$test_shortpath" = x; then
37804    # Short path failed, file does not exist as specified.
37805    # Try adding .exe or .cmd
37806    if test -f "${new_path}.exe"; then
37807      input_to_shortpath="${new_path}.exe"
37808    elif test -f "${new_path}.cmd"; then
37809      input_to_shortpath="${new_path}.cmd"
37810    else
37811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37812$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37815      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37816    fi
37817  else
37818    input_to_shortpath="$new_path"
37819  fi
37820
37821  # Call helper function which possibly converts this using DOS-style short mode.
37822  # If so, the updated path is stored in $new_path.
37823  new_path="$input_to_shortpath"
37824
37825  input_path="$input_to_shortpath"
37826  # Check if we need to convert this using DOS-style short mode. If the path
37827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37828  # take no chances and rewrite it.
37829  # Note: m4 eats our [], so we need to use [ and ] instead.
37830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37831  if test "x$has_forbidden_chars" != x; then
37832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37836      # Going to short mode and back again did indeed matter. Since short mode is
37837      # case insensitive, let's make it lowercase to improve readability.
37838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37839      # Now convert it back to Unix-style (cygpath)
37840      input_path=`$CYGPATH -u "$shortmode_path"`
37841      new_path="$input_path"
37842    fi
37843  fi
37844
37845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37846  if test "x$test_cygdrive_prefix" = x; then
37847    # As a simple fix, exclude /usr/bin since it's not a real path.
37848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37850      # a path prefixed by /cygdrive for fixpath to work.
37851      new_path="$CYGWIN_ROOT_PATH$input_path"
37852    fi
37853  fi
37854
37855  # remove trailing .exe if any
37856  new_path="${new_path/%.exe/}"
37857
37858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37859
37860  # First separate the path from the arguments. This will split at the first
37861  # space.
37862  complete="$AS"
37863  path="${complete%% *}"
37864  tmp="$complete EOL"
37865  arguments="${tmp#* }"
37866
37867  # Input might be given as Windows format, start by converting to
37868  # unix format.
37869  new_path="$path"
37870
37871  windows_path="$new_path"
37872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37873    unix_path=`$CYGPATH -u "$windows_path"`
37874    new_path="$unix_path"
37875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37877    new_path="$unix_path"
37878  fi
37879
37880
37881  # Now try to locate executable using which
37882  new_path=`$WHICH "$new_path" 2> /dev/null`
37883
37884  if test "x$new_path" = x; then
37885    # Oops. Which didn't find the executable.
37886    # The splitting of arguments from the executable at a space might have been incorrect,
37887    # since paths with space are more likely in Windows. Give it another try with the whole
37888    # argument.
37889    path="$complete"
37890    arguments="EOL"
37891    new_path="$path"
37892
37893  windows_path="$new_path"
37894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37895    unix_path=`$CYGPATH -u "$windows_path"`
37896    new_path="$unix_path"
37897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37899    new_path="$unix_path"
37900  fi
37901
37902
37903    new_path=`$WHICH "$new_path" 2> /dev/null`
37904    # bat and cmd files are not always considered executable in MSYS causing which
37905    # to not find them
37906    if test "x$new_path" = x \
37907        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37908        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37909      new_path="$path"
37910
37911  windows_path="$new_path"
37912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37913    unix_path=`$CYGPATH -u "$windows_path"`
37914    new_path="$unix_path"
37915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37917    new_path="$unix_path"
37918  fi
37919
37920    fi
37921
37922    if test "x$new_path" = x; then
37923      # It's still not found. Now this is an unrecoverable error.
37924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37925$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37926      has_space=`$ECHO "$complete" | $GREP " "`
37927      if test "x$has_space" != x; then
37928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37930      fi
37931      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37932    fi
37933  fi
37934
37935  # Now new_path has a complete unix path to the binary
37936  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37937    # Keep paths in /bin as-is, but remove trailing .exe if any
37938    new_path="${new_path/%.exe/}"
37939    # Do not save /bin paths to all_fixpath_prefixes!
37940  else
37941    # Not in mixed or Windows style, start by that.
37942    new_path=`cmd //c echo $new_path`
37943
37944  input_path="$new_path"
37945  # Check if we need to convert this using DOS-style short mode. If the path
37946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37947  # take no chances and rewrite it.
37948  # Note: m4 eats our [], so we need to use [ and ] instead.
37949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37950  if test "x$has_forbidden_chars" != x; then
37951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37953  fi
37954
37955    # Output is in $new_path
37956
37957  windows_path="$new_path"
37958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37959    unix_path=`$CYGPATH -u "$windows_path"`
37960    new_path="$unix_path"
37961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37963    new_path="$unix_path"
37964  fi
37965
37966    # remove trailing .exe if any
37967    new_path="${new_path/%.exe/}"
37968
37969    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37970    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37971  fi
37972
37973    else
37974      # We're on a unix platform. Hooray! :)
37975      # First separate the path from the arguments. This will split at the first
37976      # space.
37977      complete="$AS"
37978      path="${complete%% *}"
37979      tmp="$complete EOL"
37980      arguments="${tmp#* }"
37981
37982      # Cannot rely on the command "which" here since it doesn't always work.
37983      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37984      if test -z "$is_absolute_path"; then
37985        # Path to executable is not absolute. Find it.
37986        IFS_save="$IFS"
37987        IFS=:
37988        for p in $PATH; do
37989          if test -f "$p/$path" && test -x "$p/$path"; then
37990            new_path="$p/$path"
37991            break
37992          fi
37993        done
37994        IFS="$IFS_save"
37995      else
37996        # This is an absolute path, we can use it without further modifications.
37997        new_path="$path"
37998      fi
37999
38000      if test "x$new_path" = x; then
38001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
38002$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38003        has_space=`$ECHO "$complete" | $GREP " "`
38004        if test "x$has_space" != x; then
38005          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38006$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38007        fi
38008        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38009      fi
38010    fi
38011
38012    # Now join together the path and the arguments once again
38013    if test "x$arguments" != xEOL; then
38014      new_complete="$new_path ${arguments% *}"
38015    else
38016      new_complete="$new_path"
38017    fi
38018
38019    if test "x$complete" != "x$new_complete"; then
38020      AS="$new_complete"
38021      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
38022$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
38023    fi
38024  fi
38025
38026    if test "x$AS" = x; then
38027      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
38028    fi
38029  else
38030    # FIXME: is this correct for microsoft?
38031    AS="$CC -c"
38032  fi
38033
38034
38035  #
38036  # Setup the archiver (AR)
38037  #
38038  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38039    # The corresponding ar tool is lib.exe (used to create static libraries)
38040    # Extract the first word of "lib", so it can be a program name with args.
38041set dummy lib; ac_word=$2
38042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38043$as_echo_n "checking for $ac_word... " >&6; }
38044if ${ac_cv_prog_AR+:} false; then :
38045  $as_echo_n "(cached) " >&6
38046else
38047  if test -n "$AR"; then
38048  ac_cv_prog_AR="$AR" # Let the user override the test.
38049else
38050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38051for as_dir in $PATH
38052do
38053  IFS=$as_save_IFS
38054  test -z "$as_dir" && as_dir=.
38055    for ac_exec_ext in '' $ac_executable_extensions; do
38056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38057    ac_cv_prog_AR="lib"
38058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38059    break 2
38060  fi
38061done
38062  done
38063IFS=$as_save_IFS
38064
38065fi
38066fi
38067AR=$ac_cv_prog_AR
38068if test -n "$AR"; then
38069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38070$as_echo "$AR" >&6; }
38071else
38072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38073$as_echo "no" >&6; }
38074fi
38075
38076
38077  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38078
38079
38080  # Publish this variable in the help.
38081
38082
38083  if [ -z "${AR+x}" ]; then
38084    # The variable is not set by user, try to locate tool using the code snippet
38085    if test -n "$ac_tool_prefix"; then
38086  for ac_prog in ar gcc-ar
38087  do
38088    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38089set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38091$as_echo_n "checking for $ac_word... " >&6; }
38092if ${ac_cv_prog_AR+:} false; then :
38093  $as_echo_n "(cached) " >&6
38094else
38095  if test -n "$AR"; then
38096  ac_cv_prog_AR="$AR" # Let the user override the test.
38097else
38098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38099for as_dir in $PATH
38100do
38101  IFS=$as_save_IFS
38102  test -z "$as_dir" && as_dir=.
38103    for ac_exec_ext in '' $ac_executable_extensions; do
38104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38105    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38107    break 2
38108  fi
38109done
38110  done
38111IFS=$as_save_IFS
38112
38113fi
38114fi
38115AR=$ac_cv_prog_AR
38116if test -n "$AR"; then
38117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38118$as_echo "$AR" >&6; }
38119else
38120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38121$as_echo "no" >&6; }
38122fi
38123
38124
38125    test -n "$AR" && break
38126  done
38127fi
38128if test -z "$AR"; then
38129  ac_ct_AR=$AR
38130  for ac_prog in ar gcc-ar
38131do
38132  # Extract the first word of "$ac_prog", so it can be a program name with args.
38133set dummy $ac_prog; ac_word=$2
38134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38135$as_echo_n "checking for $ac_word... " >&6; }
38136if ${ac_cv_prog_ac_ct_AR+:} false; then :
38137  $as_echo_n "(cached) " >&6
38138else
38139  if test -n "$ac_ct_AR"; then
38140  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38141else
38142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38143for as_dir in $PATH
38144do
38145  IFS=$as_save_IFS
38146  test -z "$as_dir" && as_dir=.
38147    for ac_exec_ext in '' $ac_executable_extensions; do
38148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38149    ac_cv_prog_ac_ct_AR="$ac_prog"
38150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38151    break 2
38152  fi
38153done
38154  done
38155IFS=$as_save_IFS
38156
38157fi
38158fi
38159ac_ct_AR=$ac_cv_prog_ac_ct_AR
38160if test -n "$ac_ct_AR"; then
38161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38162$as_echo "$ac_ct_AR" >&6; }
38163else
38164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38165$as_echo "no" >&6; }
38166fi
38167
38168
38169  test -n "$ac_ct_AR" && break
38170done
38171
38172  if test "x$ac_ct_AR" = x; then
38173    AR=""
38174  else
38175    case $cross_compiling:$ac_tool_warned in
38176yes:)
38177{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38178$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38179ac_tool_warned=yes ;;
38180esac
38181    AR=$ac_ct_AR
38182  fi
38183fi
38184
38185  else
38186    # The variable is set, but is it from the command line or the environment?
38187
38188    # Try to remove the string !AR! from our list.
38189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38191      # If it failed, the variable was not from the command line. Ignore it,
38192      # but warn the user (except for BASH, which is always set by the calling BASH).
38193      if test "xAR" != xBASH; then
38194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38195$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38196      fi
38197      # Try to locate tool using the code snippet
38198      if test -n "$ac_tool_prefix"; then
38199  for ac_prog in ar gcc-ar
38200  do
38201    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38202set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38204$as_echo_n "checking for $ac_word... " >&6; }
38205if ${ac_cv_prog_AR+:} false; then :
38206  $as_echo_n "(cached) " >&6
38207else
38208  if test -n "$AR"; then
38209  ac_cv_prog_AR="$AR" # Let the user override the test.
38210else
38211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38212for as_dir in $PATH
38213do
38214  IFS=$as_save_IFS
38215  test -z "$as_dir" && as_dir=.
38216    for ac_exec_ext in '' $ac_executable_extensions; do
38217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38218    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38220    break 2
38221  fi
38222done
38223  done
38224IFS=$as_save_IFS
38225
38226fi
38227fi
38228AR=$ac_cv_prog_AR
38229if test -n "$AR"; then
38230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38231$as_echo "$AR" >&6; }
38232else
38233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38234$as_echo "no" >&6; }
38235fi
38236
38237
38238    test -n "$AR" && break
38239  done
38240fi
38241if test -z "$AR"; then
38242  ac_ct_AR=$AR
38243  for ac_prog in ar gcc-ar
38244do
38245  # Extract the first word of "$ac_prog", so it can be a program name with args.
38246set dummy $ac_prog; ac_word=$2
38247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38248$as_echo_n "checking for $ac_word... " >&6; }
38249if ${ac_cv_prog_ac_ct_AR+:} false; then :
38250  $as_echo_n "(cached) " >&6
38251else
38252  if test -n "$ac_ct_AR"; then
38253  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38254else
38255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38256for as_dir in $PATH
38257do
38258  IFS=$as_save_IFS
38259  test -z "$as_dir" && as_dir=.
38260    for ac_exec_ext in '' $ac_executable_extensions; do
38261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38262    ac_cv_prog_ac_ct_AR="$ac_prog"
38263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38264    break 2
38265  fi
38266done
38267  done
38268IFS=$as_save_IFS
38269
38270fi
38271fi
38272ac_ct_AR=$ac_cv_prog_ac_ct_AR
38273if test -n "$ac_ct_AR"; then
38274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38275$as_echo "$ac_ct_AR" >&6; }
38276else
38277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38278$as_echo "no" >&6; }
38279fi
38280
38281
38282  test -n "$ac_ct_AR" && break
38283done
38284
38285  if test "x$ac_ct_AR" = x; then
38286    AR=""
38287  else
38288    case $cross_compiling:$ac_tool_warned in
38289yes:)
38290{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38291$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38292ac_tool_warned=yes ;;
38293esac
38294    AR=$ac_ct_AR
38295  fi
38296fi
38297
38298    else
38299      # If it succeeded, then it was overridden by the user. We will use it
38300      # for the tool.
38301
38302      # First remove it from the list of overridden variables, so we can test
38303      # for unknown variables in the end.
38304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38305
38306      # Check if we try to supply an empty value
38307      if test "x$AR" = x; then
38308        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38309$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38310        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38311$as_echo_n "checking for AR... " >&6; }
38312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38313$as_echo "disabled" >&6; }
38314      else
38315        # Check if the provided tool contains a complete path.
38316        tool_specified="$AR"
38317        tool_basename="${tool_specified##*/}"
38318        if test "x$tool_basename" = "x$tool_specified"; then
38319          # A command without a complete path is provided, search $PATH.
38320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38321$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38322          # Extract the first word of "$tool_basename", so it can be a program name with args.
38323set dummy $tool_basename; ac_word=$2
38324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38325$as_echo_n "checking for $ac_word... " >&6; }
38326if ${ac_cv_path_AR+:} false; then :
38327  $as_echo_n "(cached) " >&6
38328else
38329  case $AR in
38330  [\\/]* | ?:[\\/]*)
38331  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38332  ;;
38333  *)
38334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38335for as_dir in $PATH
38336do
38337  IFS=$as_save_IFS
38338  test -z "$as_dir" && as_dir=.
38339    for ac_exec_ext in '' $ac_executable_extensions; do
38340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38341    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38343    break 2
38344  fi
38345done
38346  done
38347IFS=$as_save_IFS
38348
38349  ;;
38350esac
38351fi
38352AR=$ac_cv_path_AR
38353if test -n "$AR"; then
38354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38355$as_echo "$AR" >&6; }
38356else
38357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38358$as_echo "no" >&6; }
38359fi
38360
38361
38362          if test "x$AR" = x; then
38363            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38364          fi
38365        else
38366          # Otherwise we believe it is a complete path. Use it as it is.
38367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38368$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38369          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38370$as_echo_n "checking for AR... " >&6; }
38371          if test ! -x "$tool_specified"; then
38372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38373$as_echo "not found" >&6; }
38374            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38375          fi
38376          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38377$as_echo "$tool_specified" >&6; }
38378        fi
38379      fi
38380    fi
38381
38382  fi
38383
38384
38385  else
38386
38387
38388  # Publish this variable in the help.
38389
38390
38391  if [ -z "${AR+x}" ]; then
38392    # The variable is not set by user, try to locate tool using the code snippet
38393    if test -n "$ac_tool_prefix"; then
38394  for ac_prog in ar
38395  do
38396    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38397set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38399$as_echo_n "checking for $ac_word... " >&6; }
38400if ${ac_cv_prog_AR+:} false; then :
38401  $as_echo_n "(cached) " >&6
38402else
38403  if test -n "$AR"; then
38404  ac_cv_prog_AR="$AR" # Let the user override the test.
38405else
38406as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38407for as_dir in $PATH
38408do
38409  IFS=$as_save_IFS
38410  test -z "$as_dir" && as_dir=.
38411    for ac_exec_ext in '' $ac_executable_extensions; do
38412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38413    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38415    break 2
38416  fi
38417done
38418  done
38419IFS=$as_save_IFS
38420
38421fi
38422fi
38423AR=$ac_cv_prog_AR
38424if test -n "$AR"; then
38425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38426$as_echo "$AR" >&6; }
38427else
38428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38429$as_echo "no" >&6; }
38430fi
38431
38432
38433    test -n "$AR" && break
38434  done
38435fi
38436if test -z "$AR"; then
38437  ac_ct_AR=$AR
38438  for ac_prog in ar
38439do
38440  # Extract the first word of "$ac_prog", so it can be a program name with args.
38441set dummy $ac_prog; ac_word=$2
38442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38443$as_echo_n "checking for $ac_word... " >&6; }
38444if ${ac_cv_prog_ac_ct_AR+:} false; then :
38445  $as_echo_n "(cached) " >&6
38446else
38447  if test -n "$ac_ct_AR"; then
38448  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38449else
38450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38451for as_dir in $PATH
38452do
38453  IFS=$as_save_IFS
38454  test -z "$as_dir" && as_dir=.
38455    for ac_exec_ext in '' $ac_executable_extensions; do
38456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38457    ac_cv_prog_ac_ct_AR="$ac_prog"
38458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38459    break 2
38460  fi
38461done
38462  done
38463IFS=$as_save_IFS
38464
38465fi
38466fi
38467ac_ct_AR=$ac_cv_prog_ac_ct_AR
38468if test -n "$ac_ct_AR"; then
38469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38470$as_echo "$ac_ct_AR" >&6; }
38471else
38472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38473$as_echo "no" >&6; }
38474fi
38475
38476
38477  test -n "$ac_ct_AR" && break
38478done
38479
38480  if test "x$ac_ct_AR" = x; then
38481    AR=""
38482  else
38483    case $cross_compiling:$ac_tool_warned in
38484yes:)
38485{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38486$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38487ac_tool_warned=yes ;;
38488esac
38489    AR=$ac_ct_AR
38490  fi
38491fi
38492
38493  else
38494    # The variable is set, but is it from the command line or the environment?
38495
38496    # Try to remove the string !AR! from our list.
38497    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38498    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38499      # If it failed, the variable was not from the command line. Ignore it,
38500      # but warn the user (except for BASH, which is always set by the calling BASH).
38501      if test "xAR" != xBASH; then
38502        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38503$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38504      fi
38505      # Try to locate tool using the code snippet
38506      if test -n "$ac_tool_prefix"; then
38507  for ac_prog in ar
38508  do
38509    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38510set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38512$as_echo_n "checking for $ac_word... " >&6; }
38513if ${ac_cv_prog_AR+:} false; then :
38514  $as_echo_n "(cached) " >&6
38515else
38516  if test -n "$AR"; then
38517  ac_cv_prog_AR="$AR" # Let the user override the test.
38518else
38519as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38520for as_dir in $PATH
38521do
38522  IFS=$as_save_IFS
38523  test -z "$as_dir" && as_dir=.
38524    for ac_exec_ext in '' $ac_executable_extensions; do
38525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38526    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38528    break 2
38529  fi
38530done
38531  done
38532IFS=$as_save_IFS
38533
38534fi
38535fi
38536AR=$ac_cv_prog_AR
38537if test -n "$AR"; then
38538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38539$as_echo "$AR" >&6; }
38540else
38541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38542$as_echo "no" >&6; }
38543fi
38544
38545
38546    test -n "$AR" && break
38547  done
38548fi
38549if test -z "$AR"; then
38550  ac_ct_AR=$AR
38551  for ac_prog in ar
38552do
38553  # Extract the first word of "$ac_prog", so it can be a program name with args.
38554set dummy $ac_prog; ac_word=$2
38555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38556$as_echo_n "checking for $ac_word... " >&6; }
38557if ${ac_cv_prog_ac_ct_AR+:} false; then :
38558  $as_echo_n "(cached) " >&6
38559else
38560  if test -n "$ac_ct_AR"; then
38561  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38562else
38563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38564for as_dir in $PATH
38565do
38566  IFS=$as_save_IFS
38567  test -z "$as_dir" && as_dir=.
38568    for ac_exec_ext in '' $ac_executable_extensions; do
38569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38570    ac_cv_prog_ac_ct_AR="$ac_prog"
38571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38572    break 2
38573  fi
38574done
38575  done
38576IFS=$as_save_IFS
38577
38578fi
38579fi
38580ac_ct_AR=$ac_cv_prog_ac_ct_AR
38581if test -n "$ac_ct_AR"; then
38582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38583$as_echo "$ac_ct_AR" >&6; }
38584else
38585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38586$as_echo "no" >&6; }
38587fi
38588
38589
38590  test -n "$ac_ct_AR" && break
38591done
38592
38593  if test "x$ac_ct_AR" = x; then
38594    AR=""
38595  else
38596    case $cross_compiling:$ac_tool_warned in
38597yes:)
38598{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38599$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38600ac_tool_warned=yes ;;
38601esac
38602    AR=$ac_ct_AR
38603  fi
38604fi
38605
38606    else
38607      # If it succeeded, then it was overridden by the user. We will use it
38608      # for the tool.
38609
38610      # First remove it from the list of overridden variables, so we can test
38611      # for unknown variables in the end.
38612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38613
38614      # Check if we try to supply an empty value
38615      if test "x$AR" = x; then
38616        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38617$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38619$as_echo_n "checking for AR... " >&6; }
38620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38621$as_echo "disabled" >&6; }
38622      else
38623        # Check if the provided tool contains a complete path.
38624        tool_specified="$AR"
38625        tool_basename="${tool_specified##*/}"
38626        if test "x$tool_basename" = "x$tool_specified"; then
38627          # A command without a complete path is provided, search $PATH.
38628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38629$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38630          # Extract the first word of "$tool_basename", so it can be a program name with args.
38631set dummy $tool_basename; ac_word=$2
38632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38633$as_echo_n "checking for $ac_word... " >&6; }
38634if ${ac_cv_path_AR+:} false; then :
38635  $as_echo_n "(cached) " >&6
38636else
38637  case $AR in
38638  [\\/]* | ?:[\\/]*)
38639  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38640  ;;
38641  *)
38642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38643for as_dir in $PATH
38644do
38645  IFS=$as_save_IFS
38646  test -z "$as_dir" && as_dir=.
38647    for ac_exec_ext in '' $ac_executable_extensions; do
38648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38649    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38651    break 2
38652  fi
38653done
38654  done
38655IFS=$as_save_IFS
38656
38657  ;;
38658esac
38659fi
38660AR=$ac_cv_path_AR
38661if test -n "$AR"; then
38662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38663$as_echo "$AR" >&6; }
38664else
38665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38666$as_echo "no" >&6; }
38667fi
38668
38669
38670          if test "x$AR" = x; then
38671            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38672          fi
38673        else
38674          # Otherwise we believe it is a complete path. Use it as it is.
38675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38676$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38677          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38678$as_echo_n "checking for AR... " >&6; }
38679          if test ! -x "$tool_specified"; then
38680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38681$as_echo "not found" >&6; }
38682            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38683          fi
38684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38685$as_echo "$tool_specified" >&6; }
38686        fi
38687      fi
38688    fi
38689
38690  fi
38691
38692
38693  fi
38694
38695  # Only process if variable expands to non-empty
38696
38697  if test "x$AR" != x; then
38698    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38699
38700  # First separate the path from the arguments. This will split at the first
38701  # space.
38702  complete="$AR"
38703  path="${complete%% *}"
38704  tmp="$complete EOL"
38705  arguments="${tmp#* }"
38706
38707  # Input might be given as Windows format, start by converting to
38708  # unix format.
38709  new_path=`$CYGPATH -u "$path"`
38710
38711  # Now try to locate executable using which
38712  new_path=`$WHICH "$new_path" 2> /dev/null`
38713  # bat and cmd files are not always considered executable in cygwin causing which
38714  # to not find them
38715  if test "x$new_path" = x \
38716      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38717      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38718    new_path=`$CYGPATH -u "$path"`
38719  fi
38720  if test "x$new_path" = x; then
38721    # Oops. Which didn't find the executable.
38722    # The splitting of arguments from the executable at a space might have been incorrect,
38723    # since paths with space are more likely in Windows. Give it another try with the whole
38724    # argument.
38725    path="$complete"
38726    arguments="EOL"
38727    new_path=`$CYGPATH -u "$path"`
38728    new_path=`$WHICH "$new_path" 2> /dev/null`
38729    # bat and cmd files are not always considered executable in cygwin causing which
38730    # to not find them
38731    if test "x$new_path" = x \
38732        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38733        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38734      new_path=`$CYGPATH -u "$path"`
38735    fi
38736    if test "x$new_path" = x; then
38737      # It's still not found. Now this is an unrecoverable error.
38738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38739$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38740      has_space=`$ECHO "$complete" | $GREP " "`
38741      if test "x$has_space" != x; then
38742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38744      fi
38745      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38746    fi
38747  fi
38748
38749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38752  # "foo.exe" is OK but "foo" is an error.
38753  #
38754  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38755  # It is also a way to make sure we got the proper file name for the real test later on.
38756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38757  if test "x$test_shortpath" = x; then
38758    # Short path failed, file does not exist as specified.
38759    # Try adding .exe or .cmd
38760    if test -f "${new_path}.exe"; then
38761      input_to_shortpath="${new_path}.exe"
38762    elif test -f "${new_path}.cmd"; then
38763      input_to_shortpath="${new_path}.cmd"
38764    else
38765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38766$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38767      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38768$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38769      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38770    fi
38771  else
38772    input_to_shortpath="$new_path"
38773  fi
38774
38775  # Call helper function which possibly converts this using DOS-style short mode.
38776  # If so, the updated path is stored in $new_path.
38777  new_path="$input_to_shortpath"
38778
38779  input_path="$input_to_shortpath"
38780  # Check if we need to convert this using DOS-style short mode. If the path
38781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38782  # take no chances and rewrite it.
38783  # Note: m4 eats our [], so we need to use [ and ] instead.
38784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38785  if test "x$has_forbidden_chars" != x; then
38786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38790      # Going to short mode and back again did indeed matter. Since short mode is
38791      # case insensitive, let's make it lowercase to improve readability.
38792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38793      # Now convert it back to Unix-style (cygpath)
38794      input_path=`$CYGPATH -u "$shortmode_path"`
38795      new_path="$input_path"
38796    fi
38797  fi
38798
38799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38800  if test "x$test_cygdrive_prefix" = x; then
38801    # As a simple fix, exclude /usr/bin since it's not a real path.
38802    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38804      # a path prefixed by /cygdrive for fixpath to work.
38805      new_path="$CYGWIN_ROOT_PATH$input_path"
38806    fi
38807  fi
38808
38809  # remove trailing .exe if any
38810  new_path="${new_path/%.exe/}"
38811
38812    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38813
38814  # First separate the path from the arguments. This will split at the first
38815  # space.
38816  complete="$AR"
38817  path="${complete%% *}"
38818  tmp="$complete EOL"
38819  arguments="${tmp#* }"
38820
38821  # Input might be given as Windows format, start by converting to
38822  # unix format.
38823  new_path="$path"
38824
38825  windows_path="$new_path"
38826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38827    unix_path=`$CYGPATH -u "$windows_path"`
38828    new_path="$unix_path"
38829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38831    new_path="$unix_path"
38832  fi
38833
38834
38835  # Now try to locate executable using which
38836  new_path=`$WHICH "$new_path" 2> /dev/null`
38837
38838  if test "x$new_path" = x; then
38839    # Oops. Which didn't find the executable.
38840    # The splitting of arguments from the executable at a space might have been incorrect,
38841    # since paths with space are more likely in Windows. Give it another try with the whole
38842    # argument.
38843    path="$complete"
38844    arguments="EOL"
38845    new_path="$path"
38846
38847  windows_path="$new_path"
38848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38849    unix_path=`$CYGPATH -u "$windows_path"`
38850    new_path="$unix_path"
38851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38853    new_path="$unix_path"
38854  fi
38855
38856
38857    new_path=`$WHICH "$new_path" 2> /dev/null`
38858    # bat and cmd files are not always considered executable in MSYS causing which
38859    # to not find them
38860    if test "x$new_path" = x \
38861        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38862        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38863      new_path="$path"
38864
38865  windows_path="$new_path"
38866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38867    unix_path=`$CYGPATH -u "$windows_path"`
38868    new_path="$unix_path"
38869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38871    new_path="$unix_path"
38872  fi
38873
38874    fi
38875
38876    if test "x$new_path" = x; then
38877      # It's still not found. Now this is an unrecoverable error.
38878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38879$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38880      has_space=`$ECHO "$complete" | $GREP " "`
38881      if test "x$has_space" != x; then
38882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38884      fi
38885      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38886    fi
38887  fi
38888
38889  # Now new_path has a complete unix path to the binary
38890  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38891    # Keep paths in /bin as-is, but remove trailing .exe if any
38892    new_path="${new_path/%.exe/}"
38893    # Do not save /bin paths to all_fixpath_prefixes!
38894  else
38895    # Not in mixed or Windows style, start by that.
38896    new_path=`cmd //c echo $new_path`
38897
38898  input_path="$new_path"
38899  # Check if we need to convert this using DOS-style short mode. If the path
38900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38901  # take no chances and rewrite it.
38902  # Note: m4 eats our [], so we need to use [ and ] instead.
38903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38904  if test "x$has_forbidden_chars" != x; then
38905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38907  fi
38908
38909    # Output is in $new_path
38910
38911  windows_path="$new_path"
38912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38913    unix_path=`$CYGPATH -u "$windows_path"`
38914    new_path="$unix_path"
38915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38917    new_path="$unix_path"
38918  fi
38919
38920    # remove trailing .exe if any
38921    new_path="${new_path/%.exe/}"
38922
38923    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38924    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38925  fi
38926
38927    else
38928      # We're on a unix platform. Hooray! :)
38929      # First separate the path from the arguments. This will split at the first
38930      # space.
38931      complete="$AR"
38932      path="${complete%% *}"
38933      tmp="$complete EOL"
38934      arguments="${tmp#* }"
38935
38936      # Cannot rely on the command "which" here since it doesn't always work.
38937      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38938      if test -z "$is_absolute_path"; then
38939        # Path to executable is not absolute. Find it.
38940        IFS_save="$IFS"
38941        IFS=:
38942        for p in $PATH; do
38943          if test -f "$p/$path" && test -x "$p/$path"; then
38944            new_path="$p/$path"
38945            break
38946          fi
38947        done
38948        IFS="$IFS_save"
38949      else
38950        # This is an absolute path, we can use it without further modifications.
38951        new_path="$path"
38952      fi
38953
38954      if test "x$new_path" = x; then
38955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38956$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38957        has_space=`$ECHO "$complete" | $GREP " "`
38958        if test "x$has_space" != x; then
38959          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38960$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38961        fi
38962        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38963      fi
38964    fi
38965
38966    # Now join together the path and the arguments once again
38967    if test "x$arguments" != xEOL; then
38968      new_complete="$new_path ${arguments% *}"
38969    else
38970      new_complete="$new_path"
38971    fi
38972
38973    if test "x$complete" != "x$new_complete"; then
38974      AR="$new_complete"
38975      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38976$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38977    fi
38978  fi
38979
38980
38981
38982  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38983
38984
38985  # Publish this variable in the help.
38986
38987
38988  if [ -z "${LIPO+x}" ]; then
38989    # The variable is not set by user, try to locate tool using the code snippet
38990    for ac_prog in lipo
38991do
38992  # Extract the first word of "$ac_prog", so it can be a program name with args.
38993set dummy $ac_prog; ac_word=$2
38994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38995$as_echo_n "checking for $ac_word... " >&6; }
38996if ${ac_cv_path_LIPO+:} false; then :
38997  $as_echo_n "(cached) " >&6
38998else
38999  case $LIPO in
39000  [\\/]* | ?:[\\/]*)
39001  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39002  ;;
39003  *)
39004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39005for as_dir in $PATH
39006do
39007  IFS=$as_save_IFS
39008  test -z "$as_dir" && as_dir=.
39009    for ac_exec_ext in '' $ac_executable_extensions; do
39010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39011    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39013    break 2
39014  fi
39015done
39016  done
39017IFS=$as_save_IFS
39018
39019  ;;
39020esac
39021fi
39022LIPO=$ac_cv_path_LIPO
39023if test -n "$LIPO"; then
39024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39025$as_echo "$LIPO" >&6; }
39026else
39027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39028$as_echo "no" >&6; }
39029fi
39030
39031
39032  test -n "$LIPO" && break
39033done
39034
39035  else
39036    # The variable is set, but is it from the command line or the environment?
39037
39038    # Try to remove the string !LIPO! from our list.
39039    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39040    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39041      # If it failed, the variable was not from the command line. Ignore it,
39042      # but warn the user (except for BASH, which is always set by the calling BASH).
39043      if test "xLIPO" != xBASH; then
39044        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39045$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39046      fi
39047      # Try to locate tool using the code snippet
39048      for ac_prog in lipo
39049do
39050  # Extract the first word of "$ac_prog", so it can be a program name with args.
39051set dummy $ac_prog; ac_word=$2
39052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39053$as_echo_n "checking for $ac_word... " >&6; }
39054if ${ac_cv_path_LIPO+:} false; then :
39055  $as_echo_n "(cached) " >&6
39056else
39057  case $LIPO in
39058  [\\/]* | ?:[\\/]*)
39059  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39060  ;;
39061  *)
39062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39063for as_dir in $PATH
39064do
39065  IFS=$as_save_IFS
39066  test -z "$as_dir" && as_dir=.
39067    for ac_exec_ext in '' $ac_executable_extensions; do
39068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39069    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39071    break 2
39072  fi
39073done
39074  done
39075IFS=$as_save_IFS
39076
39077  ;;
39078esac
39079fi
39080LIPO=$ac_cv_path_LIPO
39081if test -n "$LIPO"; then
39082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39083$as_echo "$LIPO" >&6; }
39084else
39085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39086$as_echo "no" >&6; }
39087fi
39088
39089
39090  test -n "$LIPO" && break
39091done
39092
39093    else
39094      # If it succeeded, then it was overridden by the user. We will use it
39095      # for the tool.
39096
39097      # First remove it from the list of overridden variables, so we can test
39098      # for unknown variables in the end.
39099      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39100
39101      # Check if we try to supply an empty value
39102      if test "x$LIPO" = x; then
39103        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39104$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39105        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39106$as_echo_n "checking for LIPO... " >&6; }
39107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39108$as_echo "disabled" >&6; }
39109      else
39110        # Check if the provided tool contains a complete path.
39111        tool_specified="$LIPO"
39112        tool_basename="${tool_specified##*/}"
39113        if test "x$tool_basename" = "x$tool_specified"; then
39114          # A command without a complete path is provided, search $PATH.
39115          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39116$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39117          # Extract the first word of "$tool_basename", so it can be a program name with args.
39118set dummy $tool_basename; ac_word=$2
39119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39120$as_echo_n "checking for $ac_word... " >&6; }
39121if ${ac_cv_path_LIPO+:} false; then :
39122  $as_echo_n "(cached) " >&6
39123else
39124  case $LIPO in
39125  [\\/]* | ?:[\\/]*)
39126  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39127  ;;
39128  *)
39129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39130for as_dir in $PATH
39131do
39132  IFS=$as_save_IFS
39133  test -z "$as_dir" && as_dir=.
39134    for ac_exec_ext in '' $ac_executable_extensions; do
39135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39136    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39138    break 2
39139  fi
39140done
39141  done
39142IFS=$as_save_IFS
39143
39144  ;;
39145esac
39146fi
39147LIPO=$ac_cv_path_LIPO
39148if test -n "$LIPO"; then
39149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39150$as_echo "$LIPO" >&6; }
39151else
39152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39153$as_echo "no" >&6; }
39154fi
39155
39156
39157          if test "x$LIPO" = x; then
39158            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39159          fi
39160        else
39161          # Otherwise we believe it is a complete path. Use it as it is.
39162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39163$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39164          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39165$as_echo_n "checking for LIPO... " >&6; }
39166          if test ! -x "$tool_specified"; then
39167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39168$as_echo "not found" >&6; }
39169            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39170          fi
39171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39172$as_echo "$tool_specified" >&6; }
39173        fi
39174      fi
39175    fi
39176
39177  fi
39178
39179
39180
39181  # Only process if variable expands to non-empty
39182
39183  if test "x$LIPO" != x; then
39184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39185
39186  # First separate the path from the arguments. This will split at the first
39187  # space.
39188  complete="$LIPO"
39189  path="${complete%% *}"
39190  tmp="$complete EOL"
39191  arguments="${tmp#* }"
39192
39193  # Input might be given as Windows format, start by converting to
39194  # unix format.
39195  new_path=`$CYGPATH -u "$path"`
39196
39197  # Now try to locate executable using which
39198  new_path=`$WHICH "$new_path" 2> /dev/null`
39199  # bat and cmd files are not always considered executable in cygwin causing which
39200  # to not find them
39201  if test "x$new_path" = x \
39202      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39203      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39204    new_path=`$CYGPATH -u "$path"`
39205  fi
39206  if test "x$new_path" = x; then
39207    # Oops. Which didn't find the executable.
39208    # The splitting of arguments from the executable at a space might have been incorrect,
39209    # since paths with space are more likely in Windows. Give it another try with the whole
39210    # argument.
39211    path="$complete"
39212    arguments="EOL"
39213    new_path=`$CYGPATH -u "$path"`
39214    new_path=`$WHICH "$new_path" 2> /dev/null`
39215    # bat and cmd files are not always considered executable in cygwin causing which
39216    # to not find them
39217    if test "x$new_path" = x \
39218        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39219        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39220      new_path=`$CYGPATH -u "$path"`
39221    fi
39222    if test "x$new_path" = x; then
39223      # It's still not found. Now this is an unrecoverable error.
39224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39225$as_echo "$as_me: The path of LIPO, 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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39229$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39230      fi
39231      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39232    fi
39233  fi
39234
39235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39238  # "foo.exe" is OK but "foo" is an error.
39239  #
39240  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39241  # It is also a way to make sure we got the proper file name for the real test later on.
39242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39243  if test "x$test_shortpath" = x; then
39244    # Short path failed, file does not exist as specified.
39245    # Try adding .exe or .cmd
39246    if test -f "${new_path}.exe"; then
39247      input_to_shortpath="${new_path}.exe"
39248    elif test -f "${new_path}.cmd"; then
39249      input_to_shortpath="${new_path}.cmd"
39250    else
39251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39252$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39253      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39254$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39255      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39256    fi
39257  else
39258    input_to_shortpath="$new_path"
39259  fi
39260
39261  # Call helper function which possibly converts this using DOS-style short mode.
39262  # If so, the updated path is stored in $new_path.
39263  new_path="$input_to_shortpath"
39264
39265  input_path="$input_to_shortpath"
39266  # Check if we need to convert this using DOS-style short mode. If the path
39267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39268  # take no chances and rewrite it.
39269  # Note: m4 eats our [], so we need to use [ and ] instead.
39270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39271  if test "x$has_forbidden_chars" != x; then
39272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39276      # Going to short mode and back again did indeed matter. Since short mode is
39277      # case insensitive, let's make it lowercase to improve readability.
39278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39279      # Now convert it back to Unix-style (cygpath)
39280      input_path=`$CYGPATH -u "$shortmode_path"`
39281      new_path="$input_path"
39282    fi
39283  fi
39284
39285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39286  if test "x$test_cygdrive_prefix" = x; then
39287    # As a simple fix, exclude /usr/bin since it's not a real path.
39288    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39290      # a path prefixed by /cygdrive for fixpath to work.
39291      new_path="$CYGWIN_ROOT_PATH$input_path"
39292    fi
39293  fi
39294
39295  # remove trailing .exe if any
39296  new_path="${new_path/%.exe/}"
39297
39298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39299
39300  # First separate the path from the arguments. This will split at the first
39301  # space.
39302  complete="$LIPO"
39303  path="${complete%% *}"
39304  tmp="$complete EOL"
39305  arguments="${tmp#* }"
39306
39307  # Input might be given as Windows format, start by converting to
39308  # unix format.
39309  new_path="$path"
39310
39311  windows_path="$new_path"
39312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39313    unix_path=`$CYGPATH -u "$windows_path"`
39314    new_path="$unix_path"
39315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39317    new_path="$unix_path"
39318  fi
39319
39320
39321  # Now try to locate executable using which
39322  new_path=`$WHICH "$new_path" 2> /dev/null`
39323
39324  if test "x$new_path" = x; then
39325    # Oops. Which didn't find the executable.
39326    # The splitting of arguments from the executable at a space might have been incorrect,
39327    # since paths with space are more likely in Windows. Give it another try with the whole
39328    # argument.
39329    path="$complete"
39330    arguments="EOL"
39331    new_path="$path"
39332
39333  windows_path="$new_path"
39334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39335    unix_path=`$CYGPATH -u "$windows_path"`
39336    new_path="$unix_path"
39337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39339    new_path="$unix_path"
39340  fi
39341
39342
39343    new_path=`$WHICH "$new_path" 2> /dev/null`
39344    # bat and cmd files are not always considered executable in MSYS causing which
39345    # to not find them
39346    if test "x$new_path" = x \
39347        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39348        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39349      new_path="$path"
39350
39351  windows_path="$new_path"
39352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39353    unix_path=`$CYGPATH -u "$windows_path"`
39354    new_path="$unix_path"
39355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39357    new_path="$unix_path"
39358  fi
39359
39360    fi
39361
39362    if test "x$new_path" = x; then
39363      # It's still not found. Now this is an unrecoverable error.
39364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39365$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39366      has_space=`$ECHO "$complete" | $GREP " "`
39367      if test "x$has_space" != x; then
39368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39370      fi
39371      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39372    fi
39373  fi
39374
39375  # Now new_path has a complete unix path to the binary
39376  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39377    # Keep paths in /bin as-is, but remove trailing .exe if any
39378    new_path="${new_path/%.exe/}"
39379    # Do not save /bin paths to all_fixpath_prefixes!
39380  else
39381    # Not in mixed or Windows style, start by that.
39382    new_path=`cmd //c echo $new_path`
39383
39384  input_path="$new_path"
39385  # Check if we need to convert this using DOS-style short mode. If the path
39386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39387  # take no chances and rewrite it.
39388  # Note: m4 eats our [], so we need to use [ and ] instead.
39389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39390  if test "x$has_forbidden_chars" != x; then
39391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39393  fi
39394
39395    # Output is in $new_path
39396
39397  windows_path="$new_path"
39398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39399    unix_path=`$CYGPATH -u "$windows_path"`
39400    new_path="$unix_path"
39401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39403    new_path="$unix_path"
39404  fi
39405
39406    # remove trailing .exe if any
39407    new_path="${new_path/%.exe/}"
39408
39409    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39410    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39411  fi
39412
39413    else
39414      # We're on a unix platform. Hooray! :)
39415      # First separate the path from the arguments. This will split at the first
39416      # space.
39417      complete="$LIPO"
39418      path="${complete%% *}"
39419      tmp="$complete EOL"
39420      arguments="${tmp#* }"
39421
39422      # Cannot rely on the command "which" here since it doesn't always work.
39423      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39424      if test -z "$is_absolute_path"; then
39425        # Path to executable is not absolute. Find it.
39426        IFS_save="$IFS"
39427        IFS=:
39428        for p in $PATH; do
39429          if test -f "$p/$path" && test -x "$p/$path"; then
39430            new_path="$p/$path"
39431            break
39432          fi
39433        done
39434        IFS="$IFS_save"
39435      else
39436        # This is an absolute path, we can use it without further modifications.
39437        new_path="$path"
39438      fi
39439
39440      if test "x$new_path" = x; then
39441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39442$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39443        has_space=`$ECHO "$complete" | $GREP " "`
39444        if test "x$has_space" != x; then
39445          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39446$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39447        fi
39448        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39449      fi
39450    fi
39451
39452    # Now join together the path and the arguments once again
39453    if test "x$arguments" != xEOL; then
39454      new_complete="$new_path ${arguments% *}"
39455    else
39456      new_complete="$new_path"
39457    fi
39458
39459    if test "x$complete" != "x$new_complete"; then
39460      LIPO="$new_complete"
39461      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39462$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39463    fi
39464  fi
39465
39466  fi
39467
39468  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39469    # Extract the first word of "mt", so it can be a program name with args.
39470set dummy mt; ac_word=$2
39471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39472$as_echo_n "checking for $ac_word... " >&6; }
39473if ${ac_cv_prog_MT+:} false; then :
39474  $as_echo_n "(cached) " >&6
39475else
39476  if test -n "$MT"; then
39477  ac_cv_prog_MT="$MT" # Let the user override the test.
39478else
39479  ac_prog_rejected=no
39480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39481for as_dir in $PATH
39482do
39483  IFS=$as_save_IFS
39484  test -z "$as_dir" && as_dir=.
39485    for ac_exec_ext in '' $ac_executable_extensions; do
39486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39487    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39488       ac_prog_rejected=yes
39489       continue
39490     fi
39491    ac_cv_prog_MT="mt"
39492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39493    break 2
39494  fi
39495done
39496  done
39497IFS=$as_save_IFS
39498
39499if test $ac_prog_rejected = yes; then
39500  # We found a bogon in the path, so make sure we never use it.
39501  set dummy $ac_cv_prog_MT
39502  shift
39503  if test $# != 0; then
39504    # We chose a different compiler from the bogus one.
39505    # However, it has the same basename, so the bogon will be chosen
39506    # first if we set MT to just the basename; use the full file name.
39507    shift
39508    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39509  fi
39510fi
39511fi
39512fi
39513MT=$ac_cv_prog_MT
39514if test -n "$MT"; then
39515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39516$as_echo "$MT" >&6; }
39517else
39518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39519$as_echo "no" >&6; }
39520fi
39521
39522
39523
39524  # Only process if variable expands to non-empty
39525
39526  if test "x$MT" != x; then
39527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39528
39529  # First separate the path from the arguments. This will split at the first
39530  # space.
39531  complete="$MT"
39532  path="${complete%% *}"
39533  tmp="$complete EOL"
39534  arguments="${tmp#* }"
39535
39536  # Input might be given as Windows format, start by converting to
39537  # unix format.
39538  new_path=`$CYGPATH -u "$path"`
39539
39540  # Now try to locate executable using which
39541  new_path=`$WHICH "$new_path" 2> /dev/null`
39542  # bat and cmd files are not always considered executable in cygwin causing which
39543  # to not find them
39544  if test "x$new_path" = x \
39545      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39546      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39547    new_path=`$CYGPATH -u "$path"`
39548  fi
39549  if test "x$new_path" = x; then
39550    # Oops. Which didn't find the executable.
39551    # The splitting of arguments from the executable at a space might have been incorrect,
39552    # since paths with space are more likely in Windows. Give it another try with the whole
39553    # argument.
39554    path="$complete"
39555    arguments="EOL"
39556    new_path=`$CYGPATH -u "$path"`
39557    new_path=`$WHICH "$new_path" 2> /dev/null`
39558    # bat and cmd files are not always considered executable in cygwin causing which
39559    # to not find them
39560    if test "x$new_path" = x \
39561        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39562        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39563      new_path=`$CYGPATH -u "$path"`
39564    fi
39565    if test "x$new_path" = x; then
39566      # It's still not found. Now this is an unrecoverable error.
39567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39568$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39569      has_space=`$ECHO "$complete" | $GREP " "`
39570      if test "x$has_space" != x; then
39571        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39572$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39573      fi
39574      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39575    fi
39576  fi
39577
39578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39581  # "foo.exe" is OK but "foo" is an error.
39582  #
39583  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39584  # It is also a way to make sure we got the proper file name for the real test later on.
39585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39586  if test "x$test_shortpath" = x; then
39587    # Short path failed, file does not exist as specified.
39588    # Try adding .exe or .cmd
39589    if test -f "${new_path}.exe"; then
39590      input_to_shortpath="${new_path}.exe"
39591    elif test -f "${new_path}.cmd"; then
39592      input_to_shortpath="${new_path}.cmd"
39593    else
39594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39595$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39596      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39597$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39598      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39599    fi
39600  else
39601    input_to_shortpath="$new_path"
39602  fi
39603
39604  # Call helper function which possibly converts this using DOS-style short mode.
39605  # If so, the updated path is stored in $new_path.
39606  new_path="$input_to_shortpath"
39607
39608  input_path="$input_to_shortpath"
39609  # Check if we need to convert this using DOS-style short mode. If the path
39610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39611  # take no chances and rewrite it.
39612  # Note: m4 eats our [], so we need to use [ and ] instead.
39613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39614  if test "x$has_forbidden_chars" != x; then
39615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39616    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39617    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39618    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39619      # Going to short mode and back again did indeed matter. Since short mode is
39620      # case insensitive, let's make it lowercase to improve readability.
39621      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39622      # Now convert it back to Unix-style (cygpath)
39623      input_path=`$CYGPATH -u "$shortmode_path"`
39624      new_path="$input_path"
39625    fi
39626  fi
39627
39628  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39629  if test "x$test_cygdrive_prefix" = x; then
39630    # As a simple fix, exclude /usr/bin since it's not a real path.
39631    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39632      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39633      # a path prefixed by /cygdrive for fixpath to work.
39634      new_path="$CYGWIN_ROOT_PATH$input_path"
39635    fi
39636  fi
39637
39638  # remove trailing .exe if any
39639  new_path="${new_path/%.exe/}"
39640
39641    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39642
39643  # First separate the path from the arguments. This will split at the first
39644  # space.
39645  complete="$MT"
39646  path="${complete%% *}"
39647  tmp="$complete EOL"
39648  arguments="${tmp#* }"
39649
39650  # Input might be given as Windows format, start by converting to
39651  # unix format.
39652  new_path="$path"
39653
39654  windows_path="$new_path"
39655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39656    unix_path=`$CYGPATH -u "$windows_path"`
39657    new_path="$unix_path"
39658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39660    new_path="$unix_path"
39661  fi
39662
39663
39664  # Now try to locate executable using which
39665  new_path=`$WHICH "$new_path" 2> /dev/null`
39666
39667  if test "x$new_path" = x; then
39668    # Oops. Which didn't find the executable.
39669    # The splitting of arguments from the executable at a space might have been incorrect,
39670    # since paths with space are more likely in Windows. Give it another try with the whole
39671    # argument.
39672    path="$complete"
39673    arguments="EOL"
39674    new_path="$path"
39675
39676  windows_path="$new_path"
39677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39678    unix_path=`$CYGPATH -u "$windows_path"`
39679    new_path="$unix_path"
39680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39682    new_path="$unix_path"
39683  fi
39684
39685
39686    new_path=`$WHICH "$new_path" 2> /dev/null`
39687    # bat and cmd files are not always considered executable in MSYS causing which
39688    # to not find them
39689    if test "x$new_path" = x \
39690        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39691        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39692      new_path="$path"
39693
39694  windows_path="$new_path"
39695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39696    unix_path=`$CYGPATH -u "$windows_path"`
39697    new_path="$unix_path"
39698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39700    new_path="$unix_path"
39701  fi
39702
39703    fi
39704
39705    if test "x$new_path" = x; then
39706      # It's still not found. Now this is an unrecoverable error.
39707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39708$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39709      has_space=`$ECHO "$complete" | $GREP " "`
39710      if test "x$has_space" != x; then
39711        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39712$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39713      fi
39714      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39715    fi
39716  fi
39717
39718  # Now new_path has a complete unix path to the binary
39719  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39720    # Keep paths in /bin as-is, but remove trailing .exe if any
39721    new_path="${new_path/%.exe/}"
39722    # Do not save /bin paths to all_fixpath_prefixes!
39723  else
39724    # Not in mixed or Windows style, start by that.
39725    new_path=`cmd //c echo $new_path`
39726
39727  input_path="$new_path"
39728  # Check if we need to convert this using DOS-style short mode. If the path
39729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39730  # take no chances and rewrite it.
39731  # Note: m4 eats our [], so we need to use [ and ] instead.
39732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39733  if test "x$has_forbidden_chars" != x; then
39734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39736  fi
39737
39738    # Output is in $new_path
39739
39740  windows_path="$new_path"
39741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39742    unix_path=`$CYGPATH -u "$windows_path"`
39743    new_path="$unix_path"
39744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39746    new_path="$unix_path"
39747  fi
39748
39749    # remove trailing .exe if any
39750    new_path="${new_path/%.exe/}"
39751
39752    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39753    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39754  fi
39755
39756    else
39757      # We're on a unix platform. Hooray! :)
39758      # First separate the path from the arguments. This will split at the first
39759      # space.
39760      complete="$MT"
39761      path="${complete%% *}"
39762      tmp="$complete EOL"
39763      arguments="${tmp#* }"
39764
39765      # Cannot rely on the command "which" here since it doesn't always work.
39766      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39767      if test -z "$is_absolute_path"; then
39768        # Path to executable is not absolute. Find it.
39769        IFS_save="$IFS"
39770        IFS=:
39771        for p in $PATH; do
39772          if test -f "$p/$path" && test -x "$p/$path"; then
39773            new_path="$p/$path"
39774            break
39775          fi
39776        done
39777        IFS="$IFS_save"
39778      else
39779        # This is an absolute path, we can use it without further modifications.
39780        new_path="$path"
39781      fi
39782
39783      if test "x$new_path" = x; then
39784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39785$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39786        has_space=`$ECHO "$complete" | $GREP " "`
39787        if test "x$has_space" != x; then
39788          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39789$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39790        fi
39791        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39792      fi
39793    fi
39794
39795    # Now join together the path and the arguments once again
39796    if test "x$arguments" != xEOL; then
39797      new_complete="$new_path ${arguments% *}"
39798    else
39799      new_complete="$new_path"
39800    fi
39801
39802    if test "x$complete" != "x$new_complete"; then
39803      MT="$new_complete"
39804      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39805$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39806    fi
39807  fi
39808
39809    # Setup the resource compiler (RC)
39810    # Extract the first word of "rc", so it can be a program name with args.
39811set dummy rc; ac_word=$2
39812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39813$as_echo_n "checking for $ac_word... " >&6; }
39814if ${ac_cv_prog_RC+:} false; then :
39815  $as_echo_n "(cached) " >&6
39816else
39817  if test -n "$RC"; then
39818  ac_cv_prog_RC="$RC" # Let the user override the test.
39819else
39820  ac_prog_rejected=no
39821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39822for as_dir in $PATH
39823do
39824  IFS=$as_save_IFS
39825  test -z "$as_dir" && as_dir=.
39826    for ac_exec_ext in '' $ac_executable_extensions; do
39827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39828    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39829       ac_prog_rejected=yes
39830       continue
39831     fi
39832    ac_cv_prog_RC="rc"
39833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39834    break 2
39835  fi
39836done
39837  done
39838IFS=$as_save_IFS
39839
39840if test $ac_prog_rejected = yes; then
39841  # We found a bogon in the path, so make sure we never use it.
39842  set dummy $ac_cv_prog_RC
39843  shift
39844  if test $# != 0; then
39845    # We chose a different compiler from the bogus one.
39846    # However, it has the same basename, so the bogon will be chosen
39847    # first if we set RC to just the basename; use the full file name.
39848    shift
39849    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39850  fi
39851fi
39852fi
39853fi
39854RC=$ac_cv_prog_RC
39855if test -n "$RC"; then
39856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39857$as_echo "$RC" >&6; }
39858else
39859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39860$as_echo "no" >&6; }
39861fi
39862
39863
39864
39865  # Only process if variable expands to non-empty
39866
39867  if test "x$RC" != x; then
39868    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39869
39870  # First separate the path from the arguments. This will split at the first
39871  # space.
39872  complete="$RC"
39873  path="${complete%% *}"
39874  tmp="$complete EOL"
39875  arguments="${tmp#* }"
39876
39877  # Input might be given as Windows format, start by converting to
39878  # unix format.
39879  new_path=`$CYGPATH -u "$path"`
39880
39881  # Now try to locate executable using which
39882  new_path=`$WHICH "$new_path" 2> /dev/null`
39883  # bat and cmd files are not always considered executable in cygwin causing which
39884  # to not find them
39885  if test "x$new_path" = x \
39886      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39887      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39888    new_path=`$CYGPATH -u "$path"`
39889  fi
39890  if test "x$new_path" = x; then
39891    # Oops. Which didn't find the executable.
39892    # The splitting of arguments from the executable at a space might have been incorrect,
39893    # since paths with space are more likely in Windows. Give it another try with the whole
39894    # argument.
39895    path="$complete"
39896    arguments="EOL"
39897    new_path=`$CYGPATH -u "$path"`
39898    new_path=`$WHICH "$new_path" 2> /dev/null`
39899    # bat and cmd files are not always considered executable in cygwin causing which
39900    # to not find them
39901    if test "x$new_path" = x \
39902        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39903        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39904      new_path=`$CYGPATH -u "$path"`
39905    fi
39906    if test "x$new_path" = x; then
39907      # It's still not found. Now this is an unrecoverable error.
39908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39909$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39910      has_space=`$ECHO "$complete" | $GREP " "`
39911      if test "x$has_space" != x; then
39912        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39913$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39914      fi
39915      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39916    fi
39917  fi
39918
39919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39922  # "foo.exe" is OK but "foo" is an error.
39923  #
39924  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39925  # It is also a way to make sure we got the proper file name for the real test later on.
39926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39927  if test "x$test_shortpath" = x; then
39928    # Short path failed, file does not exist as specified.
39929    # Try adding .exe or .cmd
39930    if test -f "${new_path}.exe"; then
39931      input_to_shortpath="${new_path}.exe"
39932    elif test -f "${new_path}.cmd"; then
39933      input_to_shortpath="${new_path}.cmd"
39934    else
39935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39936$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39937      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39938$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39939      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39940    fi
39941  else
39942    input_to_shortpath="$new_path"
39943  fi
39944
39945  # Call helper function which possibly converts this using DOS-style short mode.
39946  # If so, the updated path is stored in $new_path.
39947  new_path="$input_to_shortpath"
39948
39949  input_path="$input_to_shortpath"
39950  # Check if we need to convert this using DOS-style short mode. If the path
39951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39952  # take no chances and rewrite it.
39953  # Note: m4 eats our [], so we need to use [ and ] instead.
39954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39955  if test "x$has_forbidden_chars" != x; then
39956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39960      # Going to short mode and back again did indeed matter. Since short mode is
39961      # case insensitive, let's make it lowercase to improve readability.
39962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39963      # Now convert it back to Unix-style (cygpath)
39964      input_path=`$CYGPATH -u "$shortmode_path"`
39965      new_path="$input_path"
39966    fi
39967  fi
39968
39969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39970  if test "x$test_cygdrive_prefix" = x; then
39971    # As a simple fix, exclude /usr/bin since it's not a real path.
39972    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39974      # a path prefixed by /cygdrive for fixpath to work.
39975      new_path="$CYGWIN_ROOT_PATH$input_path"
39976    fi
39977  fi
39978
39979  # remove trailing .exe if any
39980  new_path="${new_path/%.exe/}"
39981
39982    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39983
39984  # First separate the path from the arguments. This will split at the first
39985  # space.
39986  complete="$RC"
39987  path="${complete%% *}"
39988  tmp="$complete EOL"
39989  arguments="${tmp#* }"
39990
39991  # Input might be given as Windows format, start by converting to
39992  # unix format.
39993  new_path="$path"
39994
39995  windows_path="$new_path"
39996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39997    unix_path=`$CYGPATH -u "$windows_path"`
39998    new_path="$unix_path"
39999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40001    new_path="$unix_path"
40002  fi
40003
40004
40005  # Now try to locate executable using which
40006  new_path=`$WHICH "$new_path" 2> /dev/null`
40007
40008  if test "x$new_path" = x; then
40009    # Oops. Which didn't find the executable.
40010    # The splitting of arguments from the executable at a space might have been incorrect,
40011    # since paths with space are more likely in Windows. Give it another try with the whole
40012    # argument.
40013    path="$complete"
40014    arguments="EOL"
40015    new_path="$path"
40016
40017  windows_path="$new_path"
40018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40019    unix_path=`$CYGPATH -u "$windows_path"`
40020    new_path="$unix_path"
40021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40023    new_path="$unix_path"
40024  fi
40025
40026
40027    new_path=`$WHICH "$new_path" 2> /dev/null`
40028    # bat and cmd files are not always considered executable in MSYS causing which
40029    # to not find them
40030    if test "x$new_path" = x \
40031        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40032        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40033      new_path="$path"
40034
40035  windows_path="$new_path"
40036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40037    unix_path=`$CYGPATH -u "$windows_path"`
40038    new_path="$unix_path"
40039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40041    new_path="$unix_path"
40042  fi
40043
40044    fi
40045
40046    if test "x$new_path" = x; then
40047      # It's still not found. Now this is an unrecoverable error.
40048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40049$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40050      has_space=`$ECHO "$complete" | $GREP " "`
40051      if test "x$has_space" != x; then
40052        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40053$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40054      fi
40055      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40056    fi
40057  fi
40058
40059  # Now new_path has a complete unix path to the binary
40060  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40061    # Keep paths in /bin as-is, but remove trailing .exe if any
40062    new_path="${new_path/%.exe/}"
40063    # Do not save /bin paths to all_fixpath_prefixes!
40064  else
40065    # Not in mixed or Windows style, start by that.
40066    new_path=`cmd //c echo $new_path`
40067
40068  input_path="$new_path"
40069  # Check if we need to convert this using DOS-style short mode. If the path
40070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40071  # take no chances and rewrite it.
40072  # Note: m4 eats our [], so we need to use [ and ] instead.
40073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40074  if test "x$has_forbidden_chars" != x; then
40075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40076    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40077  fi
40078
40079    # Output is in $new_path
40080
40081  windows_path="$new_path"
40082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40083    unix_path=`$CYGPATH -u "$windows_path"`
40084    new_path="$unix_path"
40085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40087    new_path="$unix_path"
40088  fi
40089
40090    # remove trailing .exe if any
40091    new_path="${new_path/%.exe/}"
40092
40093    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40094    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40095  fi
40096
40097    else
40098      # We're on a unix platform. Hooray! :)
40099      # First separate the path from the arguments. This will split at the first
40100      # space.
40101      complete="$RC"
40102      path="${complete%% *}"
40103      tmp="$complete EOL"
40104      arguments="${tmp#* }"
40105
40106      # Cannot rely on the command "which" here since it doesn't always work.
40107      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40108      if test -z "$is_absolute_path"; then
40109        # Path to executable is not absolute. Find it.
40110        IFS_save="$IFS"
40111        IFS=:
40112        for p in $PATH; do
40113          if test -f "$p/$path" && test -x "$p/$path"; then
40114            new_path="$p/$path"
40115            break
40116          fi
40117        done
40118        IFS="$IFS_save"
40119      else
40120        # This is an absolute path, we can use it without further modifications.
40121        new_path="$path"
40122      fi
40123
40124      if test "x$new_path" = x; then
40125        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40126$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40127        has_space=`$ECHO "$complete" | $GREP " "`
40128        if test "x$has_space" != x; then
40129          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40130$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40131        fi
40132        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40133      fi
40134    fi
40135
40136    # Now join together the path and the arguments once again
40137    if test "x$arguments" != xEOL; then
40138      new_complete="$new_path ${arguments% *}"
40139    else
40140      new_complete="$new_path"
40141    fi
40142
40143    if test "x$complete" != "x$new_complete"; then
40144      RC="$new_complete"
40145      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
40146$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
40147    fi
40148  fi
40149
40150    # Extract the first word of "dumpbin", so it can be a program name with args.
40151set dummy dumpbin; ac_word=$2
40152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40153$as_echo_n "checking for $ac_word... " >&6; }
40154if ${ac_cv_prog_DUMPBIN+:} false; then :
40155  $as_echo_n "(cached) " >&6
40156else
40157  if test -n "$DUMPBIN"; then
40158  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
40159else
40160as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40161for as_dir in $PATH
40162do
40163  IFS=$as_save_IFS
40164  test -z "$as_dir" && as_dir=.
40165    for ac_exec_ext in '' $ac_executable_extensions; do
40166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40167    ac_cv_prog_DUMPBIN="dumpbin"
40168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40169    break 2
40170  fi
40171done
40172  done
40173IFS=$as_save_IFS
40174
40175fi
40176fi
40177DUMPBIN=$ac_cv_prog_DUMPBIN
40178if test -n "$DUMPBIN"; then
40179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40180$as_echo "$DUMPBIN" >&6; }
40181else
40182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40183$as_echo "no" >&6; }
40184fi
40185
40186
40187
40188  # Only process if variable expands to non-empty
40189
40190  if test "x$DUMPBIN" != x; then
40191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40192
40193  # First separate the path from the arguments. This will split at the first
40194  # space.
40195  complete="$DUMPBIN"
40196  path="${complete%% *}"
40197  tmp="$complete EOL"
40198  arguments="${tmp#* }"
40199
40200  # Input might be given as Windows format, start by converting to
40201  # unix format.
40202  new_path=`$CYGPATH -u "$path"`
40203
40204  # Now try to locate executable using which
40205  new_path=`$WHICH "$new_path" 2> /dev/null`
40206  # bat and cmd files are not always considered executable in cygwin causing which
40207  # to not find them
40208  if test "x$new_path" = x \
40209      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40210      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40211    new_path=`$CYGPATH -u "$path"`
40212  fi
40213  if test "x$new_path" = x; then
40214    # Oops. Which didn't find the executable.
40215    # The splitting of arguments from the executable at a space might have been incorrect,
40216    # since paths with space are more likely in Windows. Give it another try with the whole
40217    # argument.
40218    path="$complete"
40219    arguments="EOL"
40220    new_path=`$CYGPATH -u "$path"`
40221    new_path=`$WHICH "$new_path" 2> /dev/null`
40222    # bat and cmd files are not always considered executable in cygwin causing which
40223    # to not find them
40224    if test "x$new_path" = x \
40225        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40226        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40227      new_path=`$CYGPATH -u "$path"`
40228    fi
40229    if test "x$new_path" = x; then
40230      # It's still not found. Now this is an unrecoverable error.
40231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40232$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40233      has_space=`$ECHO "$complete" | $GREP " "`
40234      if test "x$has_space" != x; then
40235        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40236$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40237      fi
40238      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40239    fi
40240  fi
40241
40242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40245  # "foo.exe" is OK but "foo" is an error.
40246  #
40247  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40248  # It is also a way to make sure we got the proper file name for the real test later on.
40249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40250  if test "x$test_shortpath" = x; then
40251    # Short path failed, file does not exist as specified.
40252    # Try adding .exe or .cmd
40253    if test -f "${new_path}.exe"; then
40254      input_to_shortpath="${new_path}.exe"
40255    elif test -f "${new_path}.cmd"; then
40256      input_to_shortpath="${new_path}.cmd"
40257    else
40258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40259$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40260      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40261$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40262      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40263    fi
40264  else
40265    input_to_shortpath="$new_path"
40266  fi
40267
40268  # Call helper function which possibly converts this using DOS-style short mode.
40269  # If so, the updated path is stored in $new_path.
40270  new_path="$input_to_shortpath"
40271
40272  input_path="$input_to_shortpath"
40273  # Check if we need to convert this using DOS-style short mode. If the path
40274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40275  # take no chances and rewrite it.
40276  # Note: m4 eats our [], so we need to use [ and ] instead.
40277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40278  if test "x$has_forbidden_chars" != x; then
40279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40283      # Going to short mode and back again did indeed matter. Since short mode is
40284      # case insensitive, let's make it lowercase to improve readability.
40285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40286      # Now convert it back to Unix-style (cygpath)
40287      input_path=`$CYGPATH -u "$shortmode_path"`
40288      new_path="$input_path"
40289    fi
40290  fi
40291
40292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40293  if test "x$test_cygdrive_prefix" = x; then
40294    # As a simple fix, exclude /usr/bin since it's not a real path.
40295    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40297      # a path prefixed by /cygdrive for fixpath to work.
40298      new_path="$CYGWIN_ROOT_PATH$input_path"
40299    fi
40300  fi
40301
40302  # remove trailing .exe if any
40303  new_path="${new_path/%.exe/}"
40304
40305    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40306
40307  # First separate the path from the arguments. This will split at the first
40308  # space.
40309  complete="$DUMPBIN"
40310  path="${complete%% *}"
40311  tmp="$complete EOL"
40312  arguments="${tmp#* }"
40313
40314  # Input might be given as Windows format, start by converting to
40315  # unix format.
40316  new_path="$path"
40317
40318  windows_path="$new_path"
40319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40320    unix_path=`$CYGPATH -u "$windows_path"`
40321    new_path="$unix_path"
40322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40324    new_path="$unix_path"
40325  fi
40326
40327
40328  # Now try to locate executable using which
40329  new_path=`$WHICH "$new_path" 2> /dev/null`
40330
40331  if test "x$new_path" = x; then
40332    # Oops. Which didn't find the executable.
40333    # The splitting of arguments from the executable at a space might have been incorrect,
40334    # since paths with space are more likely in Windows. Give it another try with the whole
40335    # argument.
40336    path="$complete"
40337    arguments="EOL"
40338    new_path="$path"
40339
40340  windows_path="$new_path"
40341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40342    unix_path=`$CYGPATH -u "$windows_path"`
40343    new_path="$unix_path"
40344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40346    new_path="$unix_path"
40347  fi
40348
40349
40350    new_path=`$WHICH "$new_path" 2> /dev/null`
40351    # bat and cmd files are not always considered executable in MSYS causing which
40352    # to not find them
40353    if test "x$new_path" = x \
40354        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40355        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40356      new_path="$path"
40357
40358  windows_path="$new_path"
40359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40360    unix_path=`$CYGPATH -u "$windows_path"`
40361    new_path="$unix_path"
40362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40364    new_path="$unix_path"
40365  fi
40366
40367    fi
40368
40369    if test "x$new_path" = x; then
40370      # It's still not found. Now this is an unrecoverable error.
40371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40372$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40373      has_space=`$ECHO "$complete" | $GREP " "`
40374      if test "x$has_space" != x; then
40375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40377      fi
40378      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40379    fi
40380  fi
40381
40382  # Now new_path has a complete unix path to the binary
40383  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40384    # Keep paths in /bin as-is, but remove trailing .exe if any
40385    new_path="${new_path/%.exe/}"
40386    # Do not save /bin paths to all_fixpath_prefixes!
40387  else
40388    # Not in mixed or Windows style, start by that.
40389    new_path=`cmd //c echo $new_path`
40390
40391  input_path="$new_path"
40392  # Check if we need to convert this using DOS-style short mode. If the path
40393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40394  # take no chances and rewrite it.
40395  # Note: m4 eats our [], so we need to use [ and ] instead.
40396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40397  if test "x$has_forbidden_chars" != x; then
40398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40400  fi
40401
40402    # Output is in $new_path
40403
40404  windows_path="$new_path"
40405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40406    unix_path=`$CYGPATH -u "$windows_path"`
40407    new_path="$unix_path"
40408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40410    new_path="$unix_path"
40411  fi
40412
40413    # remove trailing .exe if any
40414    new_path="${new_path/%.exe/}"
40415
40416    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40417    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40418  fi
40419
40420    else
40421      # We're on a unix platform. Hooray! :)
40422      # First separate the path from the arguments. This will split at the first
40423      # space.
40424      complete="$DUMPBIN"
40425      path="${complete%% *}"
40426      tmp="$complete EOL"
40427      arguments="${tmp#* }"
40428
40429      # Cannot rely on the command "which" here since it doesn't always work.
40430      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40431      if test -z "$is_absolute_path"; then
40432        # Path to executable is not absolute. Find it.
40433        IFS_save="$IFS"
40434        IFS=:
40435        for p in $PATH; do
40436          if test -f "$p/$path" && test -x "$p/$path"; then
40437            new_path="$p/$path"
40438            break
40439          fi
40440        done
40441        IFS="$IFS_save"
40442      else
40443        # This is an absolute path, we can use it without further modifications.
40444        new_path="$path"
40445      fi
40446
40447      if test "x$new_path" = x; then
40448        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40449$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40450        has_space=`$ECHO "$complete" | $GREP " "`
40451        if test "x$has_space" != x; then
40452          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40453$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40454        fi
40455        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40456      fi
40457    fi
40458
40459    # Now join together the path and the arguments once again
40460    if test "x$arguments" != xEOL; then
40461      new_complete="$new_path ${arguments% *}"
40462    else
40463      new_complete="$new_path"
40464    fi
40465
40466    if test "x$complete" != "x$new_complete"; then
40467      DUMPBIN="$new_complete"
40468      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40469$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40470    fi
40471  fi
40472
40473    # We need to check for 'msbuild.exe' because at the place where we expect to
40474    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40475    # won't find the 'msbuild.exe' executable in that case (and the
40476    # 'ac_executable_extensions' is unusable due to performance reasons).
40477    # Notice that we intentionally don't fix up the path to MSBUILD because we
40478    # will call it in a DOS shell during freetype detection on Windows (see
40479    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40480    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40481set dummy msbuild.exe; ac_word=$2
40482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40483$as_echo_n "checking for $ac_word... " >&6; }
40484if ${ac_cv_prog_MSBUILD+:} false; then :
40485  $as_echo_n "(cached) " >&6
40486else
40487  if test -n "$MSBUILD"; then
40488  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40489else
40490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40491for as_dir in $PATH
40492do
40493  IFS=$as_save_IFS
40494  test -z "$as_dir" && as_dir=.
40495    for ac_exec_ext in '' $ac_executable_extensions; do
40496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40497    ac_cv_prog_MSBUILD="msbuild.exe"
40498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40499    break 2
40500  fi
40501done
40502  done
40503IFS=$as_save_IFS
40504
40505fi
40506fi
40507MSBUILD=$ac_cv_prog_MSBUILD
40508if test -n "$MSBUILD"; then
40509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40510$as_echo "$MSBUILD" >&6; }
40511else
40512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40513$as_echo "no" >&6; }
40514fi
40515
40516
40517  fi
40518
40519  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40520
40521
40522  # Publish this variable in the help.
40523
40524
40525  if [ -z "${STRIP+x}" ]; then
40526    # The variable is not set by user, try to locate tool using the code snippet
40527    for ac_prog in strip
40528do
40529  # Extract the first word of "$ac_prog", so it can be a program name with args.
40530set dummy $ac_prog; ac_word=$2
40531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40532$as_echo_n "checking for $ac_word... " >&6; }
40533if ${ac_cv_path_STRIP+:} false; then :
40534  $as_echo_n "(cached) " >&6
40535else
40536  case $STRIP in
40537  [\\/]* | ?:[\\/]*)
40538  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40539  ;;
40540  *)
40541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40542for as_dir in $PATH
40543do
40544  IFS=$as_save_IFS
40545  test -z "$as_dir" && as_dir=.
40546    for ac_exec_ext in '' $ac_executable_extensions; do
40547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40548    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40550    break 2
40551  fi
40552done
40553  done
40554IFS=$as_save_IFS
40555
40556  ;;
40557esac
40558fi
40559STRIP=$ac_cv_path_STRIP
40560if test -n "$STRIP"; then
40561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40562$as_echo "$STRIP" >&6; }
40563else
40564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40565$as_echo "no" >&6; }
40566fi
40567
40568
40569  test -n "$STRIP" && break
40570done
40571
40572  else
40573    # The variable is set, but is it from the command line or the environment?
40574
40575    # Try to remove the string !STRIP! from our list.
40576    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40577    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40578      # If it failed, the variable was not from the command line. Ignore it,
40579      # but warn the user (except for BASH, which is always set by the calling BASH).
40580      if test "xSTRIP" != xBASH; then
40581        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40582$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40583      fi
40584      # Try to locate tool using the code snippet
40585      for ac_prog in strip
40586do
40587  # Extract the first word of "$ac_prog", so it can be a program name with args.
40588set dummy $ac_prog; ac_word=$2
40589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40590$as_echo_n "checking for $ac_word... " >&6; }
40591if ${ac_cv_path_STRIP+:} false; then :
40592  $as_echo_n "(cached) " >&6
40593else
40594  case $STRIP in
40595  [\\/]* | ?:[\\/]*)
40596  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40597  ;;
40598  *)
40599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40600for as_dir in $PATH
40601do
40602  IFS=$as_save_IFS
40603  test -z "$as_dir" && as_dir=.
40604    for ac_exec_ext in '' $ac_executable_extensions; do
40605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40606    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40608    break 2
40609  fi
40610done
40611  done
40612IFS=$as_save_IFS
40613
40614  ;;
40615esac
40616fi
40617STRIP=$ac_cv_path_STRIP
40618if test -n "$STRIP"; then
40619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40620$as_echo "$STRIP" >&6; }
40621else
40622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40623$as_echo "no" >&6; }
40624fi
40625
40626
40627  test -n "$STRIP" && break
40628done
40629
40630    else
40631      # If it succeeded, then it was overridden by the user. We will use it
40632      # for the tool.
40633
40634      # First remove it from the list of overridden variables, so we can test
40635      # for unknown variables in the end.
40636      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40637
40638      # Check if we try to supply an empty value
40639      if test "x$STRIP" = x; then
40640        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40641$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40642        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40643$as_echo_n "checking for STRIP... " >&6; }
40644        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40645$as_echo "disabled" >&6; }
40646      else
40647        # Check if the provided tool contains a complete path.
40648        tool_specified="$STRIP"
40649        tool_basename="${tool_specified##*/}"
40650        if test "x$tool_basename" = "x$tool_specified"; then
40651          # A command without a complete path is provided, search $PATH.
40652          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40653$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40654          # Extract the first word of "$tool_basename", so it can be a program name with args.
40655set dummy $tool_basename; ac_word=$2
40656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40657$as_echo_n "checking for $ac_word... " >&6; }
40658if ${ac_cv_path_STRIP+:} false; then :
40659  $as_echo_n "(cached) " >&6
40660else
40661  case $STRIP in
40662  [\\/]* | ?:[\\/]*)
40663  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40664  ;;
40665  *)
40666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40667for as_dir in $PATH
40668do
40669  IFS=$as_save_IFS
40670  test -z "$as_dir" && as_dir=.
40671    for ac_exec_ext in '' $ac_executable_extensions; do
40672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40673    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40675    break 2
40676  fi
40677done
40678  done
40679IFS=$as_save_IFS
40680
40681  ;;
40682esac
40683fi
40684STRIP=$ac_cv_path_STRIP
40685if test -n "$STRIP"; then
40686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40687$as_echo "$STRIP" >&6; }
40688else
40689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40690$as_echo "no" >&6; }
40691fi
40692
40693
40694          if test "x$STRIP" = x; then
40695            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40696          fi
40697        else
40698          # Otherwise we believe it is a complete path. Use it as it is.
40699          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40700$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40701          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40702$as_echo_n "checking for STRIP... " >&6; }
40703          if test ! -x "$tool_specified"; then
40704            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40705$as_echo "not found" >&6; }
40706            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40707          fi
40708          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40709$as_echo "$tool_specified" >&6; }
40710        fi
40711      fi
40712    fi
40713
40714  fi
40715
40716
40717
40718  # Only process if variable expands to non-empty
40719
40720  if test "x$STRIP" != x; then
40721    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40722
40723  # First separate the path from the arguments. This will split at the first
40724  # space.
40725  complete="$STRIP"
40726  path="${complete%% *}"
40727  tmp="$complete EOL"
40728  arguments="${tmp#* }"
40729
40730  # Input might be given as Windows format, start by converting to
40731  # unix format.
40732  new_path=`$CYGPATH -u "$path"`
40733
40734  # Now try to locate executable using which
40735  new_path=`$WHICH "$new_path" 2> /dev/null`
40736  # bat and cmd files are not always considered executable in cygwin causing which
40737  # to not find them
40738  if test "x$new_path" = x \
40739      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40740      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40741    new_path=`$CYGPATH -u "$path"`
40742  fi
40743  if test "x$new_path" = x; then
40744    # Oops. Which didn't find the executable.
40745    # The splitting of arguments from the executable at a space might have been incorrect,
40746    # since paths with space are more likely in Windows. Give it another try with the whole
40747    # argument.
40748    path="$complete"
40749    arguments="EOL"
40750    new_path=`$CYGPATH -u "$path"`
40751    new_path=`$WHICH "$new_path" 2> /dev/null`
40752    # bat and cmd files are not always considered executable in cygwin causing which
40753    # to not find them
40754    if test "x$new_path" = x \
40755        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40756        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40757      new_path=`$CYGPATH -u "$path"`
40758    fi
40759    if test "x$new_path" = x; then
40760      # It's still not found. Now this is an unrecoverable error.
40761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40762$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40763      has_space=`$ECHO "$complete" | $GREP " "`
40764      if test "x$has_space" != x; then
40765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40767      fi
40768      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40769    fi
40770  fi
40771
40772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40775  # "foo.exe" is OK but "foo" is an error.
40776  #
40777  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40778  # It is also a way to make sure we got the proper file name for the real test later on.
40779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40780  if test "x$test_shortpath" = x; then
40781    # Short path failed, file does not exist as specified.
40782    # Try adding .exe or .cmd
40783    if test -f "${new_path}.exe"; then
40784      input_to_shortpath="${new_path}.exe"
40785    elif test -f "${new_path}.cmd"; then
40786      input_to_shortpath="${new_path}.cmd"
40787    else
40788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40789$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40790      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40791$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40792      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40793    fi
40794  else
40795    input_to_shortpath="$new_path"
40796  fi
40797
40798  # Call helper function which possibly converts this using DOS-style short mode.
40799  # If so, the updated path is stored in $new_path.
40800  new_path="$input_to_shortpath"
40801
40802  input_path="$input_to_shortpath"
40803  # Check if we need to convert this using DOS-style short mode. If the path
40804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40805  # take no chances and rewrite it.
40806  # Note: m4 eats our [], so we need to use [ and ] instead.
40807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40808  if test "x$has_forbidden_chars" != x; then
40809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40813      # Going to short mode and back again did indeed matter. Since short mode is
40814      # case insensitive, let's make it lowercase to improve readability.
40815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40816      # Now convert it back to Unix-style (cygpath)
40817      input_path=`$CYGPATH -u "$shortmode_path"`
40818      new_path="$input_path"
40819    fi
40820  fi
40821
40822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40823  if test "x$test_cygdrive_prefix" = x; then
40824    # As a simple fix, exclude /usr/bin since it's not a real path.
40825    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40827      # a path prefixed by /cygdrive for fixpath to work.
40828      new_path="$CYGWIN_ROOT_PATH$input_path"
40829    fi
40830  fi
40831
40832  # remove trailing .exe if any
40833  new_path="${new_path/%.exe/}"
40834
40835    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40836
40837  # First separate the path from the arguments. This will split at the first
40838  # space.
40839  complete="$STRIP"
40840  path="${complete%% *}"
40841  tmp="$complete EOL"
40842  arguments="${tmp#* }"
40843
40844  # Input might be given as Windows format, start by converting to
40845  # unix format.
40846  new_path="$path"
40847
40848  windows_path="$new_path"
40849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40850    unix_path=`$CYGPATH -u "$windows_path"`
40851    new_path="$unix_path"
40852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40854    new_path="$unix_path"
40855  fi
40856
40857
40858  # Now try to locate executable using which
40859  new_path=`$WHICH "$new_path" 2> /dev/null`
40860
40861  if test "x$new_path" = x; then
40862    # Oops. Which didn't find the executable.
40863    # The splitting of arguments from the executable at a space might have been incorrect,
40864    # since paths with space are more likely in Windows. Give it another try with the whole
40865    # argument.
40866    path="$complete"
40867    arguments="EOL"
40868    new_path="$path"
40869
40870  windows_path="$new_path"
40871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40872    unix_path=`$CYGPATH -u "$windows_path"`
40873    new_path="$unix_path"
40874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40876    new_path="$unix_path"
40877  fi
40878
40879
40880    new_path=`$WHICH "$new_path" 2> /dev/null`
40881    # bat and cmd files are not always considered executable in MSYS causing which
40882    # to not find them
40883    if test "x$new_path" = x \
40884        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40885        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40886      new_path="$path"
40887
40888  windows_path="$new_path"
40889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40890    unix_path=`$CYGPATH -u "$windows_path"`
40891    new_path="$unix_path"
40892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40894    new_path="$unix_path"
40895  fi
40896
40897    fi
40898
40899    if test "x$new_path" = x; then
40900      # It's still not found. Now this is an unrecoverable error.
40901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40902$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40903      has_space=`$ECHO "$complete" | $GREP " "`
40904      if test "x$has_space" != x; then
40905        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40906$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40907      fi
40908      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40909    fi
40910  fi
40911
40912  # Now new_path has a complete unix path to the binary
40913  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40914    # Keep paths in /bin as-is, but remove trailing .exe if any
40915    new_path="${new_path/%.exe/}"
40916    # Do not save /bin paths to all_fixpath_prefixes!
40917  else
40918    # Not in mixed or Windows style, start by that.
40919    new_path=`cmd //c echo $new_path`
40920
40921  input_path="$new_path"
40922  # Check if we need to convert this using DOS-style short mode. If the path
40923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40924  # take no chances and rewrite it.
40925  # Note: m4 eats our [], so we need to use [ and ] instead.
40926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40927  if test "x$has_forbidden_chars" != x; then
40928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40930  fi
40931
40932    # Output is in $new_path
40933
40934  windows_path="$new_path"
40935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40936    unix_path=`$CYGPATH -u "$windows_path"`
40937    new_path="$unix_path"
40938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40940    new_path="$unix_path"
40941  fi
40942
40943    # remove trailing .exe if any
40944    new_path="${new_path/%.exe/}"
40945
40946    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40947    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40948  fi
40949
40950    else
40951      # We're on a unix platform. Hooray! :)
40952      # First separate the path from the arguments. This will split at the first
40953      # space.
40954      complete="$STRIP"
40955      path="${complete%% *}"
40956      tmp="$complete EOL"
40957      arguments="${tmp#* }"
40958
40959      # Cannot rely on the command "which" here since it doesn't always work.
40960      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40961      if test -z "$is_absolute_path"; then
40962        # Path to executable is not absolute. Find it.
40963        IFS_save="$IFS"
40964        IFS=:
40965        for p in $PATH; do
40966          if test -f "$p/$path" && test -x "$p/$path"; then
40967            new_path="$p/$path"
40968            break
40969          fi
40970        done
40971        IFS="$IFS_save"
40972      else
40973        # This is an absolute path, we can use it without further modifications.
40974        new_path="$path"
40975      fi
40976
40977      if test "x$new_path" = x; then
40978        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40979$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40980        has_space=`$ECHO "$complete" | $GREP " "`
40981        if test "x$has_space" != x; then
40982          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40983$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40984        fi
40985        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40986      fi
40987    fi
40988
40989    # Now join together the path and the arguments once again
40990    if test "x$arguments" != xEOL; then
40991      new_complete="$new_path ${arguments% *}"
40992    else
40993      new_complete="$new_path"
40994    fi
40995
40996    if test "x$complete" != "x$new_complete"; then
40997      STRIP="$new_complete"
40998      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40999$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41000    fi
41001  fi
41002
41003
41004
41005  # Publish this variable in the help.
41006
41007
41008  if [ -z "${NM+x}" ]; then
41009    # The variable is not set by user, try to locate tool using the code snippet
41010    for ac_prog in nm
41011do
41012  # Extract the first word of "$ac_prog", so it can be a program name with args.
41013set dummy $ac_prog; ac_word=$2
41014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41015$as_echo_n "checking for $ac_word... " >&6; }
41016if ${ac_cv_path_NM+:} false; then :
41017  $as_echo_n "(cached) " >&6
41018else
41019  case $NM in
41020  [\\/]* | ?:[\\/]*)
41021  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41022  ;;
41023  *)
41024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41025for as_dir in $PATH
41026do
41027  IFS=$as_save_IFS
41028  test -z "$as_dir" && as_dir=.
41029    for ac_exec_ext in '' $ac_executable_extensions; do
41030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41031    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41033    break 2
41034  fi
41035done
41036  done
41037IFS=$as_save_IFS
41038
41039  ;;
41040esac
41041fi
41042NM=$ac_cv_path_NM
41043if test -n "$NM"; then
41044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41045$as_echo "$NM" >&6; }
41046else
41047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41048$as_echo "no" >&6; }
41049fi
41050
41051
41052  test -n "$NM" && break
41053done
41054
41055  else
41056    # The variable is set, but is it from the command line or the environment?
41057
41058    # Try to remove the string !NM! from our list.
41059    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41060    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41061      # If it failed, the variable was not from the command line. Ignore it,
41062      # but warn the user (except for BASH, which is always set by the calling BASH).
41063      if test "xNM" != xBASH; then
41064        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41065$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41066      fi
41067      # Try to locate tool using the code snippet
41068      for ac_prog in nm
41069do
41070  # Extract the first word of "$ac_prog", so it can be a program name with args.
41071set dummy $ac_prog; ac_word=$2
41072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41073$as_echo_n "checking for $ac_word... " >&6; }
41074if ${ac_cv_path_NM+:} false; then :
41075  $as_echo_n "(cached) " >&6
41076else
41077  case $NM in
41078  [\\/]* | ?:[\\/]*)
41079  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41080  ;;
41081  *)
41082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41083for as_dir in $PATH
41084do
41085  IFS=$as_save_IFS
41086  test -z "$as_dir" && as_dir=.
41087    for ac_exec_ext in '' $ac_executable_extensions; do
41088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41089    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41091    break 2
41092  fi
41093done
41094  done
41095IFS=$as_save_IFS
41096
41097  ;;
41098esac
41099fi
41100NM=$ac_cv_path_NM
41101if test -n "$NM"; then
41102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41103$as_echo "$NM" >&6; }
41104else
41105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41106$as_echo "no" >&6; }
41107fi
41108
41109
41110  test -n "$NM" && break
41111done
41112
41113    else
41114      # If it succeeded, then it was overridden by the user. We will use it
41115      # for the tool.
41116
41117      # First remove it from the list of overridden variables, so we can test
41118      # for unknown variables in the end.
41119      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41120
41121      # Check if we try to supply an empty value
41122      if test "x$NM" = x; then
41123        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41124$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41125        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41126$as_echo_n "checking for NM... " >&6; }
41127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41128$as_echo "disabled" >&6; }
41129      else
41130        # Check if the provided tool contains a complete path.
41131        tool_specified="$NM"
41132        tool_basename="${tool_specified##*/}"
41133        if test "x$tool_basename" = "x$tool_specified"; then
41134          # A command without a complete path is provided, search $PATH.
41135          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41136$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41137          # Extract the first word of "$tool_basename", so it can be a program name with args.
41138set dummy $tool_basename; ac_word=$2
41139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41140$as_echo_n "checking for $ac_word... " >&6; }
41141if ${ac_cv_path_NM+:} false; then :
41142  $as_echo_n "(cached) " >&6
41143else
41144  case $NM in
41145  [\\/]* | ?:[\\/]*)
41146  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41147  ;;
41148  *)
41149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41150for as_dir in $PATH
41151do
41152  IFS=$as_save_IFS
41153  test -z "$as_dir" && as_dir=.
41154    for ac_exec_ext in '' $ac_executable_extensions; do
41155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41156    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41158    break 2
41159  fi
41160done
41161  done
41162IFS=$as_save_IFS
41163
41164  ;;
41165esac
41166fi
41167NM=$ac_cv_path_NM
41168if test -n "$NM"; then
41169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41170$as_echo "$NM" >&6; }
41171else
41172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41173$as_echo "no" >&6; }
41174fi
41175
41176
41177          if test "x$NM" = x; then
41178            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41179          fi
41180        else
41181          # Otherwise we believe it is a complete path. Use it as it is.
41182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41183$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41184          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41185$as_echo_n "checking for NM... " >&6; }
41186          if test ! -x "$tool_specified"; then
41187            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41188$as_echo "not found" >&6; }
41189            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41190          fi
41191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41192$as_echo "$tool_specified" >&6; }
41193        fi
41194      fi
41195    fi
41196
41197  fi
41198
41199
41200
41201  # Only process if variable expands to non-empty
41202
41203  if test "x$NM" != x; then
41204    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41205
41206  # First separate the path from the arguments. This will split at the first
41207  # space.
41208  complete="$NM"
41209  path="${complete%% *}"
41210  tmp="$complete EOL"
41211  arguments="${tmp#* }"
41212
41213  # Input might be given as Windows format, start by converting to
41214  # unix format.
41215  new_path=`$CYGPATH -u "$path"`
41216
41217  # Now try to locate executable using which
41218  new_path=`$WHICH "$new_path" 2> /dev/null`
41219  # bat and cmd files are not always considered executable in cygwin causing which
41220  # to not find them
41221  if test "x$new_path" = x \
41222      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41223      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41224    new_path=`$CYGPATH -u "$path"`
41225  fi
41226  if test "x$new_path" = x; then
41227    # Oops. Which didn't find the executable.
41228    # The splitting of arguments from the executable at a space might have been incorrect,
41229    # since paths with space are more likely in Windows. Give it another try with the whole
41230    # argument.
41231    path="$complete"
41232    arguments="EOL"
41233    new_path=`$CYGPATH -u "$path"`
41234    new_path=`$WHICH "$new_path" 2> /dev/null`
41235    # bat and cmd files are not always considered executable in cygwin causing which
41236    # to not find them
41237    if test "x$new_path" = x \
41238        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41239        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41240      new_path=`$CYGPATH -u "$path"`
41241    fi
41242    if test "x$new_path" = x; then
41243      # It's still not found. Now this is an unrecoverable error.
41244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41245$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41246      has_space=`$ECHO "$complete" | $GREP " "`
41247      if test "x$has_space" != x; then
41248        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41249$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41250      fi
41251      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41252    fi
41253  fi
41254
41255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41258  # "foo.exe" is OK but "foo" is an error.
41259  #
41260  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41261  # It is also a way to make sure we got the proper file name for the real test later on.
41262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41263  if test "x$test_shortpath" = x; then
41264    # Short path failed, file does not exist as specified.
41265    # Try adding .exe or .cmd
41266    if test -f "${new_path}.exe"; then
41267      input_to_shortpath="${new_path}.exe"
41268    elif test -f "${new_path}.cmd"; then
41269      input_to_shortpath="${new_path}.cmd"
41270    else
41271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41272$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41273      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41274$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41275      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41276    fi
41277  else
41278    input_to_shortpath="$new_path"
41279  fi
41280
41281  # Call helper function which possibly converts this using DOS-style short mode.
41282  # If so, the updated path is stored in $new_path.
41283  new_path="$input_to_shortpath"
41284
41285  input_path="$input_to_shortpath"
41286  # Check if we need to convert this using DOS-style short mode. If the path
41287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41288  # take no chances and rewrite it.
41289  # Note: m4 eats our [], so we need to use [ and ] instead.
41290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41291  if test "x$has_forbidden_chars" != x; then
41292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41296      # Going to short mode and back again did indeed matter. Since short mode is
41297      # case insensitive, let's make it lowercase to improve readability.
41298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41299      # Now convert it back to Unix-style (cygpath)
41300      input_path=`$CYGPATH -u "$shortmode_path"`
41301      new_path="$input_path"
41302    fi
41303  fi
41304
41305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41306  if test "x$test_cygdrive_prefix" = x; then
41307    # As a simple fix, exclude /usr/bin since it's not a real path.
41308    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41310      # a path prefixed by /cygdrive for fixpath to work.
41311      new_path="$CYGWIN_ROOT_PATH$input_path"
41312    fi
41313  fi
41314
41315  # remove trailing .exe if any
41316  new_path="${new_path/%.exe/}"
41317
41318    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41319
41320  # First separate the path from the arguments. This will split at the first
41321  # space.
41322  complete="$NM"
41323  path="${complete%% *}"
41324  tmp="$complete EOL"
41325  arguments="${tmp#* }"
41326
41327  # Input might be given as Windows format, start by converting to
41328  # unix format.
41329  new_path="$path"
41330
41331  windows_path="$new_path"
41332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41333    unix_path=`$CYGPATH -u "$windows_path"`
41334    new_path="$unix_path"
41335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41337    new_path="$unix_path"
41338  fi
41339
41340
41341  # Now try to locate executable using which
41342  new_path=`$WHICH "$new_path" 2> /dev/null`
41343
41344  if test "x$new_path" = x; then
41345    # Oops. Which didn't find the executable.
41346    # The splitting of arguments from the executable at a space might have been incorrect,
41347    # since paths with space are more likely in Windows. Give it another try with the whole
41348    # argument.
41349    path="$complete"
41350    arguments="EOL"
41351    new_path="$path"
41352
41353  windows_path="$new_path"
41354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41355    unix_path=`$CYGPATH -u "$windows_path"`
41356    new_path="$unix_path"
41357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41359    new_path="$unix_path"
41360  fi
41361
41362
41363    new_path=`$WHICH "$new_path" 2> /dev/null`
41364    # bat and cmd files are not always considered executable in MSYS causing which
41365    # to not find them
41366    if test "x$new_path" = x \
41367        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41368        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41369      new_path="$path"
41370
41371  windows_path="$new_path"
41372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41373    unix_path=`$CYGPATH -u "$windows_path"`
41374    new_path="$unix_path"
41375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41377    new_path="$unix_path"
41378  fi
41379
41380    fi
41381
41382    if test "x$new_path" = x; then
41383      # It's still not found. Now this is an unrecoverable error.
41384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41385$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41386      has_space=`$ECHO "$complete" | $GREP " "`
41387      if test "x$has_space" != x; then
41388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41390      fi
41391      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41392    fi
41393  fi
41394
41395  # Now new_path has a complete unix path to the binary
41396  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41397    # Keep paths in /bin as-is, but remove trailing .exe if any
41398    new_path="${new_path/%.exe/}"
41399    # Do not save /bin paths to all_fixpath_prefixes!
41400  else
41401    # Not in mixed or Windows style, start by that.
41402    new_path=`cmd //c echo $new_path`
41403
41404  input_path="$new_path"
41405  # Check if we need to convert this using DOS-style short mode. If the path
41406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41407  # take no chances and rewrite it.
41408  # Note: m4 eats our [], so we need to use [ and ] instead.
41409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41410  if test "x$has_forbidden_chars" != x; then
41411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41413  fi
41414
41415    # Output is in $new_path
41416
41417  windows_path="$new_path"
41418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41419    unix_path=`$CYGPATH -u "$windows_path"`
41420    new_path="$unix_path"
41421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41423    new_path="$unix_path"
41424  fi
41425
41426    # remove trailing .exe if any
41427    new_path="${new_path/%.exe/}"
41428
41429    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41430    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41431  fi
41432
41433    else
41434      # We're on a unix platform. Hooray! :)
41435      # First separate the path from the arguments. This will split at the first
41436      # space.
41437      complete="$NM"
41438      path="${complete%% *}"
41439      tmp="$complete EOL"
41440      arguments="${tmp#* }"
41441
41442      # Cannot rely on the command "which" here since it doesn't always work.
41443      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41444      if test -z "$is_absolute_path"; then
41445        # Path to executable is not absolute. Find it.
41446        IFS_save="$IFS"
41447        IFS=:
41448        for p in $PATH; do
41449          if test -f "$p/$path" && test -x "$p/$path"; then
41450            new_path="$p/$path"
41451            break
41452          fi
41453        done
41454        IFS="$IFS_save"
41455      else
41456        # This is an absolute path, we can use it without further modifications.
41457        new_path="$path"
41458      fi
41459
41460      if test "x$new_path" = x; then
41461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41462$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41463        has_space=`$ECHO "$complete" | $GREP " "`
41464        if test "x$has_space" != x; then
41465          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41466$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41467        fi
41468        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41469      fi
41470    fi
41471
41472    # Now join together the path and the arguments once again
41473    if test "x$arguments" != xEOL; then
41474      new_complete="$new_path ${arguments% *}"
41475    else
41476      new_complete="$new_path"
41477    fi
41478
41479    if test "x$complete" != "x$new_complete"; then
41480      NM="$new_complete"
41481      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41482$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41483    fi
41484  fi
41485
41486
41487
41488  # Publish this variable in the help.
41489
41490
41491  if [ -z "${GNM+x}" ]; then
41492    # The variable is not set by user, try to locate tool using the code snippet
41493    for ac_prog in gnm
41494do
41495  # Extract the first word of "$ac_prog", so it can be a program name with args.
41496set dummy $ac_prog; ac_word=$2
41497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41498$as_echo_n "checking for $ac_word... " >&6; }
41499if ${ac_cv_path_GNM+:} false; then :
41500  $as_echo_n "(cached) " >&6
41501else
41502  case $GNM in
41503  [\\/]* | ?:[\\/]*)
41504  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41505  ;;
41506  *)
41507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41508for as_dir in $PATH
41509do
41510  IFS=$as_save_IFS
41511  test -z "$as_dir" && as_dir=.
41512    for ac_exec_ext in '' $ac_executable_extensions; do
41513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41514    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41516    break 2
41517  fi
41518done
41519  done
41520IFS=$as_save_IFS
41521
41522  ;;
41523esac
41524fi
41525GNM=$ac_cv_path_GNM
41526if test -n "$GNM"; then
41527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41528$as_echo "$GNM" >&6; }
41529else
41530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41531$as_echo "no" >&6; }
41532fi
41533
41534
41535  test -n "$GNM" && break
41536done
41537
41538  else
41539    # The variable is set, but is it from the command line or the environment?
41540
41541    # Try to remove the string !GNM! from our list.
41542    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41543    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41544      # If it failed, the variable was not from the command line. Ignore it,
41545      # but warn the user (except for BASH, which is always set by the calling BASH).
41546      if test "xGNM" != xBASH; then
41547        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41548$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41549      fi
41550      # Try to locate tool using the code snippet
41551      for ac_prog in gnm
41552do
41553  # Extract the first word of "$ac_prog", so it can be a program name with args.
41554set dummy $ac_prog; ac_word=$2
41555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41556$as_echo_n "checking for $ac_word... " >&6; }
41557if ${ac_cv_path_GNM+:} false; then :
41558  $as_echo_n "(cached) " >&6
41559else
41560  case $GNM in
41561  [\\/]* | ?:[\\/]*)
41562  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41563  ;;
41564  *)
41565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41566for as_dir in $PATH
41567do
41568  IFS=$as_save_IFS
41569  test -z "$as_dir" && as_dir=.
41570    for ac_exec_ext in '' $ac_executable_extensions; do
41571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41572    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41574    break 2
41575  fi
41576done
41577  done
41578IFS=$as_save_IFS
41579
41580  ;;
41581esac
41582fi
41583GNM=$ac_cv_path_GNM
41584if test -n "$GNM"; then
41585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41586$as_echo "$GNM" >&6; }
41587else
41588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41589$as_echo "no" >&6; }
41590fi
41591
41592
41593  test -n "$GNM" && break
41594done
41595
41596    else
41597      # If it succeeded, then it was overridden by the user. We will use it
41598      # for the tool.
41599
41600      # First remove it from the list of overridden variables, so we can test
41601      # for unknown variables in the end.
41602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41603
41604      # Check if we try to supply an empty value
41605      if test "x$GNM" = x; then
41606        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41607$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41609$as_echo_n "checking for GNM... " >&6; }
41610        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41611$as_echo "disabled" >&6; }
41612      else
41613        # Check if the provided tool contains a complete path.
41614        tool_specified="$GNM"
41615        tool_basename="${tool_specified##*/}"
41616        if test "x$tool_basename" = "x$tool_specified"; then
41617          # A command without a complete path is provided, search $PATH.
41618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41619$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41620          # Extract the first word of "$tool_basename", so it can be a program name with args.
41621set dummy $tool_basename; ac_word=$2
41622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41623$as_echo_n "checking for $ac_word... " >&6; }
41624if ${ac_cv_path_GNM+:} false; then :
41625  $as_echo_n "(cached) " >&6
41626else
41627  case $GNM in
41628  [\\/]* | ?:[\\/]*)
41629  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41630  ;;
41631  *)
41632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41633for as_dir in $PATH
41634do
41635  IFS=$as_save_IFS
41636  test -z "$as_dir" && as_dir=.
41637    for ac_exec_ext in '' $ac_executable_extensions; do
41638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41639    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41641    break 2
41642  fi
41643done
41644  done
41645IFS=$as_save_IFS
41646
41647  ;;
41648esac
41649fi
41650GNM=$ac_cv_path_GNM
41651if test -n "$GNM"; then
41652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41653$as_echo "$GNM" >&6; }
41654else
41655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41656$as_echo "no" >&6; }
41657fi
41658
41659
41660          if test "x$GNM" = x; then
41661            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41662          fi
41663        else
41664          # Otherwise we believe it is a complete path. Use it as it is.
41665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41666$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41667          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41668$as_echo_n "checking for GNM... " >&6; }
41669          if test ! -x "$tool_specified"; then
41670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41671$as_echo "not found" >&6; }
41672            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41673          fi
41674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41675$as_echo "$tool_specified" >&6; }
41676        fi
41677      fi
41678    fi
41679
41680  fi
41681
41682
41683
41684  # Only process if variable expands to non-empty
41685
41686  if test "x$GNM" != x; then
41687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41688
41689  # First separate the path from the arguments. This will split at the first
41690  # space.
41691  complete="$GNM"
41692  path="${complete%% *}"
41693  tmp="$complete EOL"
41694  arguments="${tmp#* }"
41695
41696  # Input might be given as Windows format, start by converting to
41697  # unix format.
41698  new_path=`$CYGPATH -u "$path"`
41699
41700  # Now try to locate executable using which
41701  new_path=`$WHICH "$new_path" 2> /dev/null`
41702  # bat and cmd files are not always considered executable in cygwin causing which
41703  # to not find them
41704  if test "x$new_path" = x \
41705      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41706      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41707    new_path=`$CYGPATH -u "$path"`
41708  fi
41709  if test "x$new_path" = x; then
41710    # Oops. Which didn't find the executable.
41711    # The splitting of arguments from the executable at a space might have been incorrect,
41712    # since paths with space are more likely in Windows. Give it another try with the whole
41713    # argument.
41714    path="$complete"
41715    arguments="EOL"
41716    new_path=`$CYGPATH -u "$path"`
41717    new_path=`$WHICH "$new_path" 2> /dev/null`
41718    # bat and cmd files are not always considered executable in cygwin causing which
41719    # to not find them
41720    if test "x$new_path" = x \
41721        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41722        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41723      new_path=`$CYGPATH -u "$path"`
41724    fi
41725    if test "x$new_path" = x; then
41726      # It's still not found. Now this is an unrecoverable error.
41727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41728$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41729      has_space=`$ECHO "$complete" | $GREP " "`
41730      if test "x$has_space" != x; then
41731        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41732$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41733      fi
41734      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41735    fi
41736  fi
41737
41738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41741  # "foo.exe" is OK but "foo" is an error.
41742  #
41743  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41744  # It is also a way to make sure we got the proper file name for the real test later on.
41745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41746  if test "x$test_shortpath" = x; then
41747    # Short path failed, file does not exist as specified.
41748    # Try adding .exe or .cmd
41749    if test -f "${new_path}.exe"; then
41750      input_to_shortpath="${new_path}.exe"
41751    elif test -f "${new_path}.cmd"; then
41752      input_to_shortpath="${new_path}.cmd"
41753    else
41754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41755$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41756      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41757$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41758      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41759    fi
41760  else
41761    input_to_shortpath="$new_path"
41762  fi
41763
41764  # Call helper function which possibly converts this using DOS-style short mode.
41765  # If so, the updated path is stored in $new_path.
41766  new_path="$input_to_shortpath"
41767
41768  input_path="$input_to_shortpath"
41769  # Check if we need to convert this using DOS-style short mode. If the path
41770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41771  # take no chances and rewrite it.
41772  # Note: m4 eats our [], so we need to use [ and ] instead.
41773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41774  if test "x$has_forbidden_chars" != x; then
41775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41776    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41777    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41778    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41779      # Going to short mode and back again did indeed matter. Since short mode is
41780      # case insensitive, let's make it lowercase to improve readability.
41781      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41782      # Now convert it back to Unix-style (cygpath)
41783      input_path=`$CYGPATH -u "$shortmode_path"`
41784      new_path="$input_path"
41785    fi
41786  fi
41787
41788  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41789  if test "x$test_cygdrive_prefix" = x; then
41790    # As a simple fix, exclude /usr/bin since it's not a real path.
41791    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41792      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41793      # a path prefixed by /cygdrive for fixpath to work.
41794      new_path="$CYGWIN_ROOT_PATH$input_path"
41795    fi
41796  fi
41797
41798  # remove trailing .exe if any
41799  new_path="${new_path/%.exe/}"
41800
41801    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41802
41803  # First separate the path from the arguments. This will split at the first
41804  # space.
41805  complete="$GNM"
41806  path="${complete%% *}"
41807  tmp="$complete EOL"
41808  arguments="${tmp#* }"
41809
41810  # Input might be given as Windows format, start by converting to
41811  # unix format.
41812  new_path="$path"
41813
41814  windows_path="$new_path"
41815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41816    unix_path=`$CYGPATH -u "$windows_path"`
41817    new_path="$unix_path"
41818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41820    new_path="$unix_path"
41821  fi
41822
41823
41824  # Now try to locate executable using which
41825  new_path=`$WHICH "$new_path" 2> /dev/null`
41826
41827  if test "x$new_path" = x; then
41828    # Oops. Which didn't find the executable.
41829    # The splitting of arguments from the executable at a space might have been incorrect,
41830    # since paths with space are more likely in Windows. Give it another try with the whole
41831    # argument.
41832    path="$complete"
41833    arguments="EOL"
41834    new_path="$path"
41835
41836  windows_path="$new_path"
41837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41838    unix_path=`$CYGPATH -u "$windows_path"`
41839    new_path="$unix_path"
41840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41842    new_path="$unix_path"
41843  fi
41844
41845
41846    new_path=`$WHICH "$new_path" 2> /dev/null`
41847    # bat and cmd files are not always considered executable in MSYS causing which
41848    # to not find them
41849    if test "x$new_path" = x \
41850        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41851        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41852      new_path="$path"
41853
41854  windows_path="$new_path"
41855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41856    unix_path=`$CYGPATH -u "$windows_path"`
41857    new_path="$unix_path"
41858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41860    new_path="$unix_path"
41861  fi
41862
41863    fi
41864
41865    if test "x$new_path" = x; then
41866      # It's still not found. Now this is an unrecoverable error.
41867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41868$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41869      has_space=`$ECHO "$complete" | $GREP " "`
41870      if test "x$has_space" != x; then
41871        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41872$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41873      fi
41874      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41875    fi
41876  fi
41877
41878  # Now new_path has a complete unix path to the binary
41879  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41880    # Keep paths in /bin as-is, but remove trailing .exe if any
41881    new_path="${new_path/%.exe/}"
41882    # Do not save /bin paths to all_fixpath_prefixes!
41883  else
41884    # Not in mixed or Windows style, start by that.
41885    new_path=`cmd //c echo $new_path`
41886
41887  input_path="$new_path"
41888  # Check if we need to convert this using DOS-style short mode. If the path
41889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41890  # take no chances and rewrite it.
41891  # Note: m4 eats our [], so we need to use [ and ] instead.
41892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41893  if test "x$has_forbidden_chars" != x; then
41894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41896  fi
41897
41898    # Output is in $new_path
41899
41900  windows_path="$new_path"
41901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41902    unix_path=`$CYGPATH -u "$windows_path"`
41903    new_path="$unix_path"
41904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41906    new_path="$unix_path"
41907  fi
41908
41909    # remove trailing .exe if any
41910    new_path="${new_path/%.exe/}"
41911
41912    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41913    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41914  fi
41915
41916    else
41917      # We're on a unix platform. Hooray! :)
41918      # First separate the path from the arguments. This will split at the first
41919      # space.
41920      complete="$GNM"
41921      path="${complete%% *}"
41922      tmp="$complete EOL"
41923      arguments="${tmp#* }"
41924
41925      # Cannot rely on the command "which" here since it doesn't always work.
41926      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41927      if test -z "$is_absolute_path"; then
41928        # Path to executable is not absolute. Find it.
41929        IFS_save="$IFS"
41930        IFS=:
41931        for p in $PATH; do
41932          if test -f "$p/$path" && test -x "$p/$path"; then
41933            new_path="$p/$path"
41934            break
41935          fi
41936        done
41937        IFS="$IFS_save"
41938      else
41939        # This is an absolute path, we can use it without further modifications.
41940        new_path="$path"
41941      fi
41942
41943      if test "x$new_path" = x; then
41944        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41945$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41946        has_space=`$ECHO "$complete" | $GREP " "`
41947        if test "x$has_space" != x; then
41948          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41949$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41950        fi
41951        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41952      fi
41953    fi
41954
41955    # Now join together the path and the arguments once again
41956    if test "x$arguments" != xEOL; then
41957      new_complete="$new_path ${arguments% *}"
41958    else
41959      new_complete="$new_path"
41960    fi
41961
41962    if test "x$complete" != "x$new_complete"; then
41963      GNM="$new_complete"
41964      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41965$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41966    fi
41967  fi
41968
41969  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41970    # FIXME: we should unify this with the solaris case above.
41971
41972
41973  # Publish this variable in the help.
41974
41975
41976  if [ -z "${STRIP+x}" ]; then
41977    # The variable is not set by user, try to locate tool using the code snippet
41978    if test -n "$ac_tool_prefix"; then
41979  for ac_prog in strip
41980  do
41981    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41982set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41984$as_echo_n "checking for $ac_word... " >&6; }
41985if ${ac_cv_prog_STRIP+:} false; then :
41986  $as_echo_n "(cached) " >&6
41987else
41988  if test -n "$STRIP"; then
41989  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41990else
41991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41992for as_dir in $PATH
41993do
41994  IFS=$as_save_IFS
41995  test -z "$as_dir" && as_dir=.
41996    for ac_exec_ext in '' $ac_executable_extensions; do
41997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41998    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42000    break 2
42001  fi
42002done
42003  done
42004IFS=$as_save_IFS
42005
42006fi
42007fi
42008STRIP=$ac_cv_prog_STRIP
42009if test -n "$STRIP"; then
42010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42011$as_echo "$STRIP" >&6; }
42012else
42013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42014$as_echo "no" >&6; }
42015fi
42016
42017
42018    test -n "$STRIP" && break
42019  done
42020fi
42021if test -z "$STRIP"; then
42022  ac_ct_STRIP=$STRIP
42023  for ac_prog in strip
42024do
42025  # Extract the first word of "$ac_prog", so it can be a program name with args.
42026set dummy $ac_prog; ac_word=$2
42027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42028$as_echo_n "checking for $ac_word... " >&6; }
42029if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42030  $as_echo_n "(cached) " >&6
42031else
42032  if test -n "$ac_ct_STRIP"; then
42033  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42034else
42035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42036for as_dir in $PATH
42037do
42038  IFS=$as_save_IFS
42039  test -z "$as_dir" && as_dir=.
42040    for ac_exec_ext in '' $ac_executable_extensions; do
42041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42042    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42044    break 2
42045  fi
42046done
42047  done
42048IFS=$as_save_IFS
42049
42050fi
42051fi
42052ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42053if test -n "$ac_ct_STRIP"; then
42054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42055$as_echo "$ac_ct_STRIP" >&6; }
42056else
42057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42058$as_echo "no" >&6; }
42059fi
42060
42061
42062  test -n "$ac_ct_STRIP" && break
42063done
42064
42065  if test "x$ac_ct_STRIP" = x; then
42066    STRIP=""
42067  else
42068    case $cross_compiling:$ac_tool_warned in
42069yes:)
42070{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42071$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42072ac_tool_warned=yes ;;
42073esac
42074    STRIP=$ac_ct_STRIP
42075  fi
42076fi
42077
42078  else
42079    # The variable is set, but is it from the command line or the environment?
42080
42081    # Try to remove the string !STRIP! from our list.
42082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
42083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42084      # If it failed, the variable was not from the command line. Ignore it,
42085      # but warn the user (except for BASH, which is always set by the calling BASH).
42086      if test "xSTRIP" != xBASH; then
42087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42088$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42089      fi
42090      # Try to locate tool using the code snippet
42091      if test -n "$ac_tool_prefix"; then
42092  for ac_prog in strip
42093  do
42094    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42095set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42097$as_echo_n "checking for $ac_word... " >&6; }
42098if ${ac_cv_prog_STRIP+:} false; then :
42099  $as_echo_n "(cached) " >&6
42100else
42101  if test -n "$STRIP"; then
42102  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42103else
42104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42105for as_dir in $PATH
42106do
42107  IFS=$as_save_IFS
42108  test -z "$as_dir" && as_dir=.
42109    for ac_exec_ext in '' $ac_executable_extensions; do
42110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42111    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42113    break 2
42114  fi
42115done
42116  done
42117IFS=$as_save_IFS
42118
42119fi
42120fi
42121STRIP=$ac_cv_prog_STRIP
42122if test -n "$STRIP"; then
42123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42124$as_echo "$STRIP" >&6; }
42125else
42126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42127$as_echo "no" >&6; }
42128fi
42129
42130
42131    test -n "$STRIP" && break
42132  done
42133fi
42134if test -z "$STRIP"; then
42135  ac_ct_STRIP=$STRIP
42136  for ac_prog in strip
42137do
42138  # Extract the first word of "$ac_prog", so it can be a program name with args.
42139set dummy $ac_prog; ac_word=$2
42140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42141$as_echo_n "checking for $ac_word... " >&6; }
42142if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42143  $as_echo_n "(cached) " >&6
42144else
42145  if test -n "$ac_ct_STRIP"; then
42146  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42147else
42148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42149for as_dir in $PATH
42150do
42151  IFS=$as_save_IFS
42152  test -z "$as_dir" && as_dir=.
42153    for ac_exec_ext in '' $ac_executable_extensions; do
42154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42155    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42157    break 2
42158  fi
42159done
42160  done
42161IFS=$as_save_IFS
42162
42163fi
42164fi
42165ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42166if test -n "$ac_ct_STRIP"; then
42167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42168$as_echo "$ac_ct_STRIP" >&6; }
42169else
42170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42171$as_echo "no" >&6; }
42172fi
42173
42174
42175  test -n "$ac_ct_STRIP" && break
42176done
42177
42178  if test "x$ac_ct_STRIP" = x; then
42179    STRIP=""
42180  else
42181    case $cross_compiling:$ac_tool_warned in
42182yes:)
42183{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42184$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42185ac_tool_warned=yes ;;
42186esac
42187    STRIP=$ac_ct_STRIP
42188  fi
42189fi
42190
42191    else
42192      # If it succeeded, then it was overridden by the user. We will use it
42193      # for the tool.
42194
42195      # First remove it from the list of overridden variables, so we can test
42196      # for unknown variables in the end.
42197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42198
42199      # Check if we try to supply an empty value
42200      if test "x$STRIP" = x; then
42201        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42202$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42203        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42204$as_echo_n "checking for STRIP... " >&6; }
42205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42206$as_echo "disabled" >&6; }
42207      else
42208        # Check if the provided tool contains a complete path.
42209        tool_specified="$STRIP"
42210        tool_basename="${tool_specified##*/}"
42211        if test "x$tool_basename" = "x$tool_specified"; then
42212          # A command without a complete path is provided, search $PATH.
42213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42214$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42215          # Extract the first word of "$tool_basename", so it can be a program name with args.
42216set dummy $tool_basename; ac_word=$2
42217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42218$as_echo_n "checking for $ac_word... " >&6; }
42219if ${ac_cv_path_STRIP+:} false; then :
42220  $as_echo_n "(cached) " >&6
42221else
42222  case $STRIP in
42223  [\\/]* | ?:[\\/]*)
42224  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42225  ;;
42226  *)
42227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42228for as_dir in $PATH
42229do
42230  IFS=$as_save_IFS
42231  test -z "$as_dir" && as_dir=.
42232    for ac_exec_ext in '' $ac_executable_extensions; do
42233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42234    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42236    break 2
42237  fi
42238done
42239  done
42240IFS=$as_save_IFS
42241
42242  ;;
42243esac
42244fi
42245STRIP=$ac_cv_path_STRIP
42246if test -n "$STRIP"; then
42247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42248$as_echo "$STRIP" >&6; }
42249else
42250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42251$as_echo "no" >&6; }
42252fi
42253
42254
42255          if test "x$STRIP" = x; then
42256            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42257          fi
42258        else
42259          # Otherwise we believe it is a complete path. Use it as it is.
42260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42261$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42262          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42263$as_echo_n "checking for STRIP... " >&6; }
42264          if test ! -x "$tool_specified"; then
42265            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42266$as_echo "not found" >&6; }
42267            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42268          fi
42269          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42270$as_echo "$tool_specified" >&6; }
42271        fi
42272      fi
42273    fi
42274
42275  fi
42276
42277
42278
42279  # Only process if variable expands to non-empty
42280
42281  if test "x$STRIP" != x; then
42282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42283
42284  # First separate the path from the arguments. This will split at the first
42285  # space.
42286  complete="$STRIP"
42287  path="${complete%% *}"
42288  tmp="$complete EOL"
42289  arguments="${tmp#* }"
42290
42291  # Input might be given as Windows format, start by converting to
42292  # unix format.
42293  new_path=`$CYGPATH -u "$path"`
42294
42295  # Now try to locate executable using which
42296  new_path=`$WHICH "$new_path" 2> /dev/null`
42297  # bat and cmd files are not always considered executable in cygwin causing which
42298  # to not find them
42299  if test "x$new_path" = x \
42300      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42301      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42302    new_path=`$CYGPATH -u "$path"`
42303  fi
42304  if test "x$new_path" = x; then
42305    # Oops. Which didn't find the executable.
42306    # The splitting of arguments from the executable at a space might have been incorrect,
42307    # since paths with space are more likely in Windows. Give it another try with the whole
42308    # argument.
42309    path="$complete"
42310    arguments="EOL"
42311    new_path=`$CYGPATH -u "$path"`
42312    new_path=`$WHICH "$new_path" 2> /dev/null`
42313    # bat and cmd files are not always considered executable in cygwin causing which
42314    # to not find them
42315    if test "x$new_path" = x \
42316        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42317        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42318      new_path=`$CYGPATH -u "$path"`
42319    fi
42320    if test "x$new_path" = x; then
42321      # It's still not found. Now this is an unrecoverable error.
42322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42323$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42324      has_space=`$ECHO "$complete" | $GREP " "`
42325      if test "x$has_space" != x; then
42326        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42327$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42328      fi
42329      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42330    fi
42331  fi
42332
42333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42336  # "foo.exe" is OK but "foo" is an error.
42337  #
42338  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42339  # It is also a way to make sure we got the proper file name for the real test later on.
42340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42341  if test "x$test_shortpath" = x; then
42342    # Short path failed, file does not exist as specified.
42343    # Try adding .exe or .cmd
42344    if test -f "${new_path}.exe"; then
42345      input_to_shortpath="${new_path}.exe"
42346    elif test -f "${new_path}.cmd"; then
42347      input_to_shortpath="${new_path}.cmd"
42348    else
42349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42350$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42351      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42352$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42353      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42354    fi
42355  else
42356    input_to_shortpath="$new_path"
42357  fi
42358
42359  # Call helper function which possibly converts this using DOS-style short mode.
42360  # If so, the updated path is stored in $new_path.
42361  new_path="$input_to_shortpath"
42362
42363  input_path="$input_to_shortpath"
42364  # Check if we need to convert this using DOS-style short mode. If the path
42365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42366  # take no chances and rewrite it.
42367  # Note: m4 eats our [], so we need to use [ and ] instead.
42368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42369  if test "x$has_forbidden_chars" != x; then
42370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42374      # Going to short mode and back again did indeed matter. Since short mode is
42375      # case insensitive, let's make it lowercase to improve readability.
42376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42377      # Now convert it back to Unix-style (cygpath)
42378      input_path=`$CYGPATH -u "$shortmode_path"`
42379      new_path="$input_path"
42380    fi
42381  fi
42382
42383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42384  if test "x$test_cygdrive_prefix" = x; then
42385    # As a simple fix, exclude /usr/bin since it's not a real path.
42386    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42388      # a path prefixed by /cygdrive for fixpath to work.
42389      new_path="$CYGWIN_ROOT_PATH$input_path"
42390    fi
42391  fi
42392
42393  # remove trailing .exe if any
42394  new_path="${new_path/%.exe/}"
42395
42396    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42397
42398  # First separate the path from the arguments. This will split at the first
42399  # space.
42400  complete="$STRIP"
42401  path="${complete%% *}"
42402  tmp="$complete EOL"
42403  arguments="${tmp#* }"
42404
42405  # Input might be given as Windows format, start by converting to
42406  # unix format.
42407  new_path="$path"
42408
42409  windows_path="$new_path"
42410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42411    unix_path=`$CYGPATH -u "$windows_path"`
42412    new_path="$unix_path"
42413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42415    new_path="$unix_path"
42416  fi
42417
42418
42419  # Now try to locate executable using which
42420  new_path=`$WHICH "$new_path" 2> /dev/null`
42421
42422  if test "x$new_path" = x; then
42423    # Oops. Which didn't find the executable.
42424    # The splitting of arguments from the executable at a space might have been incorrect,
42425    # since paths with space are more likely in Windows. Give it another try with the whole
42426    # argument.
42427    path="$complete"
42428    arguments="EOL"
42429    new_path="$path"
42430
42431  windows_path="$new_path"
42432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42433    unix_path=`$CYGPATH -u "$windows_path"`
42434    new_path="$unix_path"
42435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42437    new_path="$unix_path"
42438  fi
42439
42440
42441    new_path=`$WHICH "$new_path" 2> /dev/null`
42442    # bat and cmd files are not always considered executable in MSYS causing which
42443    # to not find them
42444    if test "x$new_path" = x \
42445        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42446        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42447      new_path="$path"
42448
42449  windows_path="$new_path"
42450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42451    unix_path=`$CYGPATH -u "$windows_path"`
42452    new_path="$unix_path"
42453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42455    new_path="$unix_path"
42456  fi
42457
42458    fi
42459
42460    if test "x$new_path" = x; then
42461      # It's still not found. Now this is an unrecoverable error.
42462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42463$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42464      has_space=`$ECHO "$complete" | $GREP " "`
42465      if test "x$has_space" != x; then
42466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42468      fi
42469      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42470    fi
42471  fi
42472
42473  # Now new_path has a complete unix path to the binary
42474  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42475    # Keep paths in /bin as-is, but remove trailing .exe if any
42476    new_path="${new_path/%.exe/}"
42477    # Do not save /bin paths to all_fixpath_prefixes!
42478  else
42479    # Not in mixed or Windows style, start by that.
42480    new_path=`cmd //c echo $new_path`
42481
42482  input_path="$new_path"
42483  # Check if we need to convert this using DOS-style short mode. If the path
42484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42485  # take no chances and rewrite it.
42486  # Note: m4 eats our [], so we need to use [ and ] instead.
42487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42488  if test "x$has_forbidden_chars" != x; then
42489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42491  fi
42492
42493    # Output is in $new_path
42494
42495  windows_path="$new_path"
42496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42497    unix_path=`$CYGPATH -u "$windows_path"`
42498    new_path="$unix_path"
42499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42501    new_path="$unix_path"
42502  fi
42503
42504    # remove trailing .exe if any
42505    new_path="${new_path/%.exe/}"
42506
42507    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42508    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42509  fi
42510
42511    else
42512      # We're on a unix platform. Hooray! :)
42513      # First separate the path from the arguments. This will split at the first
42514      # space.
42515      complete="$STRIP"
42516      path="${complete%% *}"
42517      tmp="$complete EOL"
42518      arguments="${tmp#* }"
42519
42520      # Cannot rely on the command "which" here since it doesn't always work.
42521      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42522      if test -z "$is_absolute_path"; then
42523        # Path to executable is not absolute. Find it.
42524        IFS_save="$IFS"
42525        IFS=:
42526        for p in $PATH; do
42527          if test -f "$p/$path" && test -x "$p/$path"; then
42528            new_path="$p/$path"
42529            break
42530          fi
42531        done
42532        IFS="$IFS_save"
42533      else
42534        # This is an absolute path, we can use it without further modifications.
42535        new_path="$path"
42536      fi
42537
42538      if test "x$new_path" = x; then
42539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42540$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42541        has_space=`$ECHO "$complete" | $GREP " "`
42542        if test "x$has_space" != x; then
42543          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42544$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42545        fi
42546        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42547      fi
42548    fi
42549
42550    # Now join together the path and the arguments once again
42551    if test "x$arguments" != xEOL; then
42552      new_complete="$new_path ${arguments% *}"
42553    else
42554      new_complete="$new_path"
42555    fi
42556
42557    if test "x$complete" != "x$new_complete"; then
42558      STRIP="$new_complete"
42559      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42560$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42561    fi
42562  fi
42563
42564    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42565
42566
42567  # Publish this variable in the help.
42568
42569
42570  if [ -z "${NM+x}" ]; then
42571    # The variable is not set by user, try to locate tool using the code snippet
42572    if test -n "$ac_tool_prefix"; then
42573  for ac_prog in nm gcc-nm
42574  do
42575    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42576set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42578$as_echo_n "checking for $ac_word... " >&6; }
42579if ${ac_cv_prog_NM+:} false; then :
42580  $as_echo_n "(cached) " >&6
42581else
42582  if test -n "$NM"; then
42583  ac_cv_prog_NM="$NM" # Let the user override the test.
42584else
42585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42586for as_dir in $PATH
42587do
42588  IFS=$as_save_IFS
42589  test -z "$as_dir" && as_dir=.
42590    for ac_exec_ext in '' $ac_executable_extensions; do
42591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42592    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42594    break 2
42595  fi
42596done
42597  done
42598IFS=$as_save_IFS
42599
42600fi
42601fi
42602NM=$ac_cv_prog_NM
42603if test -n "$NM"; then
42604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42605$as_echo "$NM" >&6; }
42606else
42607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42608$as_echo "no" >&6; }
42609fi
42610
42611
42612    test -n "$NM" && break
42613  done
42614fi
42615if test -z "$NM"; then
42616  ac_ct_NM=$NM
42617  for ac_prog in nm gcc-nm
42618do
42619  # Extract the first word of "$ac_prog", so it can be a program name with args.
42620set dummy $ac_prog; ac_word=$2
42621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42622$as_echo_n "checking for $ac_word... " >&6; }
42623if ${ac_cv_prog_ac_ct_NM+:} false; then :
42624  $as_echo_n "(cached) " >&6
42625else
42626  if test -n "$ac_ct_NM"; then
42627  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42628else
42629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42630for as_dir in $PATH
42631do
42632  IFS=$as_save_IFS
42633  test -z "$as_dir" && as_dir=.
42634    for ac_exec_ext in '' $ac_executable_extensions; do
42635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42636    ac_cv_prog_ac_ct_NM="$ac_prog"
42637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42638    break 2
42639  fi
42640done
42641  done
42642IFS=$as_save_IFS
42643
42644fi
42645fi
42646ac_ct_NM=$ac_cv_prog_ac_ct_NM
42647if test -n "$ac_ct_NM"; then
42648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42649$as_echo "$ac_ct_NM" >&6; }
42650else
42651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42652$as_echo "no" >&6; }
42653fi
42654
42655
42656  test -n "$ac_ct_NM" && break
42657done
42658
42659  if test "x$ac_ct_NM" = x; then
42660    NM=""
42661  else
42662    case $cross_compiling:$ac_tool_warned in
42663yes:)
42664{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42665$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42666ac_tool_warned=yes ;;
42667esac
42668    NM=$ac_ct_NM
42669  fi
42670fi
42671
42672  else
42673    # The variable is set, but is it from the command line or the environment?
42674
42675    # Try to remove the string !NM! from our list.
42676    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42677    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42678      # If it failed, the variable was not from the command line. Ignore it,
42679      # but warn the user (except for BASH, which is always set by the calling BASH).
42680      if test "xNM" != xBASH; then
42681        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42682$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42683      fi
42684      # Try to locate tool using the code snippet
42685      if test -n "$ac_tool_prefix"; then
42686  for ac_prog in nm gcc-nm
42687  do
42688    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42689set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42691$as_echo_n "checking for $ac_word... " >&6; }
42692if ${ac_cv_prog_NM+:} false; then :
42693  $as_echo_n "(cached) " >&6
42694else
42695  if test -n "$NM"; then
42696  ac_cv_prog_NM="$NM" # Let the user override the test.
42697else
42698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42699for as_dir in $PATH
42700do
42701  IFS=$as_save_IFS
42702  test -z "$as_dir" && as_dir=.
42703    for ac_exec_ext in '' $ac_executable_extensions; do
42704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42705    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42707    break 2
42708  fi
42709done
42710  done
42711IFS=$as_save_IFS
42712
42713fi
42714fi
42715NM=$ac_cv_prog_NM
42716if test -n "$NM"; then
42717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42718$as_echo "$NM" >&6; }
42719else
42720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42721$as_echo "no" >&6; }
42722fi
42723
42724
42725    test -n "$NM" && break
42726  done
42727fi
42728if test -z "$NM"; then
42729  ac_ct_NM=$NM
42730  for ac_prog in nm gcc-nm
42731do
42732  # Extract the first word of "$ac_prog", so it can be a program name with args.
42733set dummy $ac_prog; ac_word=$2
42734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42735$as_echo_n "checking for $ac_word... " >&6; }
42736if ${ac_cv_prog_ac_ct_NM+:} false; then :
42737  $as_echo_n "(cached) " >&6
42738else
42739  if test -n "$ac_ct_NM"; then
42740  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42741else
42742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42743for as_dir in $PATH
42744do
42745  IFS=$as_save_IFS
42746  test -z "$as_dir" && as_dir=.
42747    for ac_exec_ext in '' $ac_executable_extensions; do
42748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42749    ac_cv_prog_ac_ct_NM="$ac_prog"
42750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42751    break 2
42752  fi
42753done
42754  done
42755IFS=$as_save_IFS
42756
42757fi
42758fi
42759ac_ct_NM=$ac_cv_prog_ac_ct_NM
42760if test -n "$ac_ct_NM"; then
42761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42762$as_echo "$ac_ct_NM" >&6; }
42763else
42764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42765$as_echo "no" >&6; }
42766fi
42767
42768
42769  test -n "$ac_ct_NM" && break
42770done
42771
42772  if test "x$ac_ct_NM" = x; then
42773    NM=""
42774  else
42775    case $cross_compiling:$ac_tool_warned in
42776yes:)
42777{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42778$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42779ac_tool_warned=yes ;;
42780esac
42781    NM=$ac_ct_NM
42782  fi
42783fi
42784
42785    else
42786      # If it succeeded, then it was overridden by the user. We will use it
42787      # for the tool.
42788
42789      # First remove it from the list of overridden variables, so we can test
42790      # for unknown variables in the end.
42791      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42792
42793      # Check if we try to supply an empty value
42794      if test "x$NM" = x; then
42795        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42796$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42798$as_echo_n "checking for NM... " >&6; }
42799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42800$as_echo "disabled" >&6; }
42801      else
42802        # Check if the provided tool contains a complete path.
42803        tool_specified="$NM"
42804        tool_basename="${tool_specified##*/}"
42805        if test "x$tool_basename" = "x$tool_specified"; then
42806          # A command without a complete path is provided, search $PATH.
42807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42808$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42809          # Extract the first word of "$tool_basename", so it can be a program name with args.
42810set dummy $tool_basename; ac_word=$2
42811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42812$as_echo_n "checking for $ac_word... " >&6; }
42813if ${ac_cv_path_NM+:} false; then :
42814  $as_echo_n "(cached) " >&6
42815else
42816  case $NM in
42817  [\\/]* | ?:[\\/]*)
42818  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42819  ;;
42820  *)
42821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42822for as_dir in $PATH
42823do
42824  IFS=$as_save_IFS
42825  test -z "$as_dir" && as_dir=.
42826    for ac_exec_ext in '' $ac_executable_extensions; do
42827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42828    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42830    break 2
42831  fi
42832done
42833  done
42834IFS=$as_save_IFS
42835
42836  ;;
42837esac
42838fi
42839NM=$ac_cv_path_NM
42840if test -n "$NM"; then
42841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42842$as_echo "$NM" >&6; }
42843else
42844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42845$as_echo "no" >&6; }
42846fi
42847
42848
42849          if test "x$NM" = x; then
42850            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42851          fi
42852        else
42853          # Otherwise we believe it is a complete path. Use it as it is.
42854          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42855$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42856          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42857$as_echo_n "checking for NM... " >&6; }
42858          if test ! -x "$tool_specified"; then
42859            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42860$as_echo "not found" >&6; }
42861            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42862          fi
42863          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42864$as_echo "$tool_specified" >&6; }
42865        fi
42866      fi
42867    fi
42868
42869  fi
42870
42871
42872    else
42873
42874
42875  # Publish this variable in the help.
42876
42877
42878  if [ -z "${NM+x}" ]; then
42879    # The variable is not set by user, try to locate tool using the code snippet
42880    if test -n "$ac_tool_prefix"; then
42881  for ac_prog in nm
42882  do
42883    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42884set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42886$as_echo_n "checking for $ac_word... " >&6; }
42887if ${ac_cv_prog_NM+:} false; then :
42888  $as_echo_n "(cached) " >&6
42889else
42890  if test -n "$NM"; then
42891  ac_cv_prog_NM="$NM" # Let the user override the test.
42892else
42893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42894for as_dir in $PATH
42895do
42896  IFS=$as_save_IFS
42897  test -z "$as_dir" && as_dir=.
42898    for ac_exec_ext in '' $ac_executable_extensions; do
42899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42900    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42902    break 2
42903  fi
42904done
42905  done
42906IFS=$as_save_IFS
42907
42908fi
42909fi
42910NM=$ac_cv_prog_NM
42911if test -n "$NM"; then
42912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42913$as_echo "$NM" >&6; }
42914else
42915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42916$as_echo "no" >&6; }
42917fi
42918
42919
42920    test -n "$NM" && break
42921  done
42922fi
42923if test -z "$NM"; then
42924  ac_ct_NM=$NM
42925  for ac_prog in nm
42926do
42927  # Extract the first word of "$ac_prog", so it can be a program name with args.
42928set dummy $ac_prog; ac_word=$2
42929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42930$as_echo_n "checking for $ac_word... " >&6; }
42931if ${ac_cv_prog_ac_ct_NM+:} false; then :
42932  $as_echo_n "(cached) " >&6
42933else
42934  if test -n "$ac_ct_NM"; then
42935  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42936else
42937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42938for as_dir in $PATH
42939do
42940  IFS=$as_save_IFS
42941  test -z "$as_dir" && as_dir=.
42942    for ac_exec_ext in '' $ac_executable_extensions; do
42943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42944    ac_cv_prog_ac_ct_NM="$ac_prog"
42945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42946    break 2
42947  fi
42948done
42949  done
42950IFS=$as_save_IFS
42951
42952fi
42953fi
42954ac_ct_NM=$ac_cv_prog_ac_ct_NM
42955if test -n "$ac_ct_NM"; then
42956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42957$as_echo "$ac_ct_NM" >&6; }
42958else
42959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42960$as_echo "no" >&6; }
42961fi
42962
42963
42964  test -n "$ac_ct_NM" && break
42965done
42966
42967  if test "x$ac_ct_NM" = x; then
42968    NM=""
42969  else
42970    case $cross_compiling:$ac_tool_warned in
42971yes:)
42972{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42973$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42974ac_tool_warned=yes ;;
42975esac
42976    NM=$ac_ct_NM
42977  fi
42978fi
42979
42980  else
42981    # The variable is set, but is it from the command line or the environment?
42982
42983    # Try to remove the string !NM! from our list.
42984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42986      # If it failed, the variable was not from the command line. Ignore it,
42987      # but warn the user (except for BASH, which is always set by the calling BASH).
42988      if test "xNM" != xBASH; then
42989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42990$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42991      fi
42992      # Try to locate tool using the code snippet
42993      if test -n "$ac_tool_prefix"; then
42994  for ac_prog in nm
42995  do
42996    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42997set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42999$as_echo_n "checking for $ac_word... " >&6; }
43000if ${ac_cv_prog_NM+:} false; then :
43001  $as_echo_n "(cached) " >&6
43002else
43003  if test -n "$NM"; then
43004  ac_cv_prog_NM="$NM" # Let the user override the test.
43005else
43006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43007for as_dir in $PATH
43008do
43009  IFS=$as_save_IFS
43010  test -z "$as_dir" && as_dir=.
43011    for ac_exec_ext in '' $ac_executable_extensions; do
43012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43013    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43015    break 2
43016  fi
43017done
43018  done
43019IFS=$as_save_IFS
43020
43021fi
43022fi
43023NM=$ac_cv_prog_NM
43024if test -n "$NM"; then
43025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43026$as_echo "$NM" >&6; }
43027else
43028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43029$as_echo "no" >&6; }
43030fi
43031
43032
43033    test -n "$NM" && break
43034  done
43035fi
43036if test -z "$NM"; then
43037  ac_ct_NM=$NM
43038  for ac_prog in nm
43039do
43040  # Extract the first word of "$ac_prog", so it can be a program name with args.
43041set dummy $ac_prog; ac_word=$2
43042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43043$as_echo_n "checking for $ac_word... " >&6; }
43044if ${ac_cv_prog_ac_ct_NM+:} false; then :
43045  $as_echo_n "(cached) " >&6
43046else
43047  if test -n "$ac_ct_NM"; then
43048  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43049else
43050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43051for as_dir in $PATH
43052do
43053  IFS=$as_save_IFS
43054  test -z "$as_dir" && as_dir=.
43055    for ac_exec_ext in '' $ac_executable_extensions; do
43056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43057    ac_cv_prog_ac_ct_NM="$ac_prog"
43058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43059    break 2
43060  fi
43061done
43062  done
43063IFS=$as_save_IFS
43064
43065fi
43066fi
43067ac_ct_NM=$ac_cv_prog_ac_ct_NM
43068if test -n "$ac_ct_NM"; then
43069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43070$as_echo "$ac_ct_NM" >&6; }
43071else
43072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43073$as_echo "no" >&6; }
43074fi
43075
43076
43077  test -n "$ac_ct_NM" && break
43078done
43079
43080  if test "x$ac_ct_NM" = x; then
43081    NM=""
43082  else
43083    case $cross_compiling:$ac_tool_warned in
43084yes:)
43085{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43086$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43087ac_tool_warned=yes ;;
43088esac
43089    NM=$ac_ct_NM
43090  fi
43091fi
43092
43093    else
43094      # If it succeeded, then it was overridden by the user. We will use it
43095      # for the tool.
43096
43097      # First remove it from the list of overridden variables, so we can test
43098      # for unknown variables in the end.
43099      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43100
43101      # Check if we try to supply an empty value
43102      if test "x$NM" = x; then
43103        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43104$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43105        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43106$as_echo_n "checking for NM... " >&6; }
43107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43108$as_echo "disabled" >&6; }
43109      else
43110        # Check if the provided tool contains a complete path.
43111        tool_specified="$NM"
43112        tool_basename="${tool_specified##*/}"
43113        if test "x$tool_basename" = "x$tool_specified"; then
43114          # A command without a complete path is provided, search $PATH.
43115          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43116$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43117          # Extract the first word of "$tool_basename", so it can be a program name with args.
43118set dummy $tool_basename; ac_word=$2
43119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43120$as_echo_n "checking for $ac_word... " >&6; }
43121if ${ac_cv_path_NM+:} false; then :
43122  $as_echo_n "(cached) " >&6
43123else
43124  case $NM in
43125  [\\/]* | ?:[\\/]*)
43126  ac_cv_path_NM="$NM" # Let the user override the test with a path.
43127  ;;
43128  *)
43129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43130for as_dir in $PATH
43131do
43132  IFS=$as_save_IFS
43133  test -z "$as_dir" && as_dir=.
43134    for ac_exec_ext in '' $ac_executable_extensions; do
43135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43136    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43138    break 2
43139  fi
43140done
43141  done
43142IFS=$as_save_IFS
43143
43144  ;;
43145esac
43146fi
43147NM=$ac_cv_path_NM
43148if test -n "$NM"; then
43149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43150$as_echo "$NM" >&6; }
43151else
43152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43153$as_echo "no" >&6; }
43154fi
43155
43156
43157          if test "x$NM" = x; then
43158            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43159          fi
43160        else
43161          # Otherwise we believe it is a complete path. Use it as it is.
43162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43163$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43164          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43165$as_echo_n "checking for NM... " >&6; }
43166          if test ! -x "$tool_specified"; then
43167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43168$as_echo "not found" >&6; }
43169            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43170          fi
43171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43172$as_echo "$tool_specified" >&6; }
43173        fi
43174      fi
43175    fi
43176
43177  fi
43178
43179
43180    fi
43181
43182  # Only process if variable expands to non-empty
43183
43184  if test "x$NM" != x; then
43185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43186
43187  # First separate the path from the arguments. This will split at the first
43188  # space.
43189  complete="$NM"
43190  path="${complete%% *}"
43191  tmp="$complete EOL"
43192  arguments="${tmp#* }"
43193
43194  # Input might be given as Windows format, start by converting to
43195  # unix format.
43196  new_path=`$CYGPATH -u "$path"`
43197
43198  # Now try to locate executable using which
43199  new_path=`$WHICH "$new_path" 2> /dev/null`
43200  # bat and cmd files are not always considered executable in cygwin causing which
43201  # to not find them
43202  if test "x$new_path" = x \
43203      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43204      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43205    new_path=`$CYGPATH -u "$path"`
43206  fi
43207  if test "x$new_path" = x; then
43208    # Oops. Which didn't find the executable.
43209    # The splitting of arguments from the executable at a space might have been incorrect,
43210    # since paths with space are more likely in Windows. Give it another try with the whole
43211    # argument.
43212    path="$complete"
43213    arguments="EOL"
43214    new_path=`$CYGPATH -u "$path"`
43215    new_path=`$WHICH "$new_path" 2> /dev/null`
43216    # bat and cmd files are not always considered executable in cygwin causing which
43217    # to not find them
43218    if test "x$new_path" = x \
43219        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43220        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43221      new_path=`$CYGPATH -u "$path"`
43222    fi
43223    if test "x$new_path" = x; then
43224      # It's still not found. Now this is an unrecoverable error.
43225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43226$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43227      has_space=`$ECHO "$complete" | $GREP " "`
43228      if test "x$has_space" != x; then
43229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43231      fi
43232      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43233    fi
43234  fi
43235
43236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43239  # "foo.exe" is OK but "foo" is an error.
43240  #
43241  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43242  # It is also a way to make sure we got the proper file name for the real test later on.
43243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43244  if test "x$test_shortpath" = x; then
43245    # Short path failed, file does not exist as specified.
43246    # Try adding .exe or .cmd
43247    if test -f "${new_path}.exe"; then
43248      input_to_shortpath="${new_path}.exe"
43249    elif test -f "${new_path}.cmd"; then
43250      input_to_shortpath="${new_path}.cmd"
43251    else
43252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43253$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43254      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43255$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43256      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43257    fi
43258  else
43259    input_to_shortpath="$new_path"
43260  fi
43261
43262  # Call helper function which possibly converts this using DOS-style short mode.
43263  # If so, the updated path is stored in $new_path.
43264  new_path="$input_to_shortpath"
43265
43266  input_path="$input_to_shortpath"
43267  # Check if we need to convert this using DOS-style short mode. If the path
43268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43269  # take no chances and rewrite it.
43270  # Note: m4 eats our [], so we need to use [ and ] instead.
43271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43272  if test "x$has_forbidden_chars" != x; then
43273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43277      # Going to short mode and back again did indeed matter. Since short mode is
43278      # case insensitive, let's make it lowercase to improve readability.
43279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43280      # Now convert it back to Unix-style (cygpath)
43281      input_path=`$CYGPATH -u "$shortmode_path"`
43282      new_path="$input_path"
43283    fi
43284  fi
43285
43286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43287  if test "x$test_cygdrive_prefix" = x; then
43288    # As a simple fix, exclude /usr/bin since it's not a real path.
43289    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43291      # a path prefixed by /cygdrive for fixpath to work.
43292      new_path="$CYGWIN_ROOT_PATH$input_path"
43293    fi
43294  fi
43295
43296  # remove trailing .exe if any
43297  new_path="${new_path/%.exe/}"
43298
43299    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43300
43301  # First separate the path from the arguments. This will split at the first
43302  # space.
43303  complete="$NM"
43304  path="${complete%% *}"
43305  tmp="$complete EOL"
43306  arguments="${tmp#* }"
43307
43308  # Input might be given as Windows format, start by converting to
43309  # unix format.
43310  new_path="$path"
43311
43312  windows_path="$new_path"
43313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43314    unix_path=`$CYGPATH -u "$windows_path"`
43315    new_path="$unix_path"
43316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43318    new_path="$unix_path"
43319  fi
43320
43321
43322  # Now try to locate executable using which
43323  new_path=`$WHICH "$new_path" 2> /dev/null`
43324
43325  if test "x$new_path" = x; then
43326    # Oops. Which didn't find the executable.
43327    # The splitting of arguments from the executable at a space might have been incorrect,
43328    # since paths with space are more likely in Windows. Give it another try with the whole
43329    # argument.
43330    path="$complete"
43331    arguments="EOL"
43332    new_path="$path"
43333
43334  windows_path="$new_path"
43335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43336    unix_path=`$CYGPATH -u "$windows_path"`
43337    new_path="$unix_path"
43338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43340    new_path="$unix_path"
43341  fi
43342
43343
43344    new_path=`$WHICH "$new_path" 2> /dev/null`
43345    # bat and cmd files are not always considered executable in MSYS causing which
43346    # to not find them
43347    if test "x$new_path" = x \
43348        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43349        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43350      new_path="$path"
43351
43352  windows_path="$new_path"
43353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43354    unix_path=`$CYGPATH -u "$windows_path"`
43355    new_path="$unix_path"
43356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43358    new_path="$unix_path"
43359  fi
43360
43361    fi
43362
43363    if test "x$new_path" = x; then
43364      # It's still not found. Now this is an unrecoverable error.
43365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43366$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43367      has_space=`$ECHO "$complete" | $GREP " "`
43368      if test "x$has_space" != x; then
43369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43371      fi
43372      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43373    fi
43374  fi
43375
43376  # Now new_path has a complete unix path to the binary
43377  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43378    # Keep paths in /bin as-is, but remove trailing .exe if any
43379    new_path="${new_path/%.exe/}"
43380    # Do not save /bin paths to all_fixpath_prefixes!
43381  else
43382    # Not in mixed or Windows style, start by that.
43383    new_path=`cmd //c echo $new_path`
43384
43385  input_path="$new_path"
43386  # Check if we need to convert this using DOS-style short mode. If the path
43387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43388  # take no chances and rewrite it.
43389  # Note: m4 eats our [], so we need to use [ and ] instead.
43390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43391  if test "x$has_forbidden_chars" != x; then
43392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43394  fi
43395
43396    # Output is in $new_path
43397
43398  windows_path="$new_path"
43399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43400    unix_path=`$CYGPATH -u "$windows_path"`
43401    new_path="$unix_path"
43402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43404    new_path="$unix_path"
43405  fi
43406
43407    # remove trailing .exe if any
43408    new_path="${new_path/%.exe/}"
43409
43410    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43411    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43412  fi
43413
43414    else
43415      # We're on a unix platform. Hooray! :)
43416      # First separate the path from the arguments. This will split at the first
43417      # space.
43418      complete="$NM"
43419      path="${complete%% *}"
43420      tmp="$complete EOL"
43421      arguments="${tmp#* }"
43422
43423      # Cannot rely on the command "which" here since it doesn't always work.
43424      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43425      if test -z "$is_absolute_path"; then
43426        # Path to executable is not absolute. Find it.
43427        IFS_save="$IFS"
43428        IFS=:
43429        for p in $PATH; do
43430          if test -f "$p/$path" && test -x "$p/$path"; then
43431            new_path="$p/$path"
43432            break
43433          fi
43434        done
43435        IFS="$IFS_save"
43436      else
43437        # This is an absolute path, we can use it without further modifications.
43438        new_path="$path"
43439      fi
43440
43441      if test "x$new_path" = x; then
43442        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43443$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43444        has_space=`$ECHO "$complete" | $GREP " "`
43445        if test "x$has_space" != x; then
43446          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43447$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43448        fi
43449        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43450      fi
43451    fi
43452
43453    # Now join together the path and the arguments once again
43454    if test "x$arguments" != xEOL; then
43455      new_complete="$new_path ${arguments% *}"
43456    else
43457      new_complete="$new_path"
43458    fi
43459
43460    if test "x$complete" != "x$new_complete"; then
43461      NM="$new_complete"
43462      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43463$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43464    fi
43465  fi
43466
43467    GNM="$NM"
43468
43469  fi
43470
43471  # objcopy is used for moving debug symbols to separate files when
43472  # full debug symbols are enabled.
43473  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43474
43475
43476  # Publish this variable in the help.
43477
43478
43479  if [ -z "${OBJCOPY+x}" ]; then
43480    # The variable is not set by user, try to locate tool using the code snippet
43481    if test -n "$ac_tool_prefix"; then
43482  for ac_prog in gobjcopy objcopy
43483  do
43484    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43485set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43487$as_echo_n "checking for $ac_word... " >&6; }
43488if ${ac_cv_prog_OBJCOPY+:} false; then :
43489  $as_echo_n "(cached) " >&6
43490else
43491  if test -n "$OBJCOPY"; then
43492  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43493else
43494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43495for as_dir in $PATH
43496do
43497  IFS=$as_save_IFS
43498  test -z "$as_dir" && as_dir=.
43499    for ac_exec_ext in '' $ac_executable_extensions; do
43500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43501    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43503    break 2
43504  fi
43505done
43506  done
43507IFS=$as_save_IFS
43508
43509fi
43510fi
43511OBJCOPY=$ac_cv_prog_OBJCOPY
43512if test -n "$OBJCOPY"; then
43513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43514$as_echo "$OBJCOPY" >&6; }
43515else
43516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43517$as_echo "no" >&6; }
43518fi
43519
43520
43521    test -n "$OBJCOPY" && break
43522  done
43523fi
43524if test -z "$OBJCOPY"; then
43525  ac_ct_OBJCOPY=$OBJCOPY
43526  for ac_prog in gobjcopy objcopy
43527do
43528  # Extract the first word of "$ac_prog", so it can be a program name with args.
43529set dummy $ac_prog; ac_word=$2
43530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43531$as_echo_n "checking for $ac_word... " >&6; }
43532if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43533  $as_echo_n "(cached) " >&6
43534else
43535  if test -n "$ac_ct_OBJCOPY"; then
43536  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43537else
43538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43539for as_dir in $PATH
43540do
43541  IFS=$as_save_IFS
43542  test -z "$as_dir" && as_dir=.
43543    for ac_exec_ext in '' $ac_executable_extensions; do
43544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43545    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43547    break 2
43548  fi
43549done
43550  done
43551IFS=$as_save_IFS
43552
43553fi
43554fi
43555ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43556if test -n "$ac_ct_OBJCOPY"; then
43557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43558$as_echo "$ac_ct_OBJCOPY" >&6; }
43559else
43560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43561$as_echo "no" >&6; }
43562fi
43563
43564
43565  test -n "$ac_ct_OBJCOPY" && break
43566done
43567
43568  if test "x$ac_ct_OBJCOPY" = x; then
43569    OBJCOPY=""
43570  else
43571    case $cross_compiling:$ac_tool_warned in
43572yes:)
43573{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43574$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43575ac_tool_warned=yes ;;
43576esac
43577    OBJCOPY=$ac_ct_OBJCOPY
43578  fi
43579fi
43580
43581  else
43582    # The variable is set, but is it from the command line or the environment?
43583
43584    # Try to remove the string !OBJCOPY! from our list.
43585    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43586    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43587      # If it failed, the variable was not from the command line. Ignore it,
43588      # but warn the user (except for BASH, which is always set by the calling BASH).
43589      if test "xOBJCOPY" != xBASH; then
43590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43591$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43592      fi
43593      # Try to locate tool using the code snippet
43594      if test -n "$ac_tool_prefix"; then
43595  for ac_prog in gobjcopy objcopy
43596  do
43597    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43598set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43600$as_echo_n "checking for $ac_word... " >&6; }
43601if ${ac_cv_prog_OBJCOPY+:} false; then :
43602  $as_echo_n "(cached) " >&6
43603else
43604  if test -n "$OBJCOPY"; then
43605  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43606else
43607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43608for as_dir in $PATH
43609do
43610  IFS=$as_save_IFS
43611  test -z "$as_dir" && as_dir=.
43612    for ac_exec_ext in '' $ac_executable_extensions; do
43613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43614    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43616    break 2
43617  fi
43618done
43619  done
43620IFS=$as_save_IFS
43621
43622fi
43623fi
43624OBJCOPY=$ac_cv_prog_OBJCOPY
43625if test -n "$OBJCOPY"; then
43626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43627$as_echo "$OBJCOPY" >&6; }
43628else
43629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43630$as_echo "no" >&6; }
43631fi
43632
43633
43634    test -n "$OBJCOPY" && break
43635  done
43636fi
43637if test -z "$OBJCOPY"; then
43638  ac_ct_OBJCOPY=$OBJCOPY
43639  for ac_prog in gobjcopy objcopy
43640do
43641  # Extract the first word of "$ac_prog", so it can be a program name with args.
43642set dummy $ac_prog; ac_word=$2
43643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43644$as_echo_n "checking for $ac_word... " >&6; }
43645if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43646  $as_echo_n "(cached) " >&6
43647else
43648  if test -n "$ac_ct_OBJCOPY"; then
43649  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43650else
43651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43652for as_dir in $PATH
43653do
43654  IFS=$as_save_IFS
43655  test -z "$as_dir" && as_dir=.
43656    for ac_exec_ext in '' $ac_executable_extensions; do
43657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43658    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43660    break 2
43661  fi
43662done
43663  done
43664IFS=$as_save_IFS
43665
43666fi
43667fi
43668ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43669if test -n "$ac_ct_OBJCOPY"; then
43670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43671$as_echo "$ac_ct_OBJCOPY" >&6; }
43672else
43673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43674$as_echo "no" >&6; }
43675fi
43676
43677
43678  test -n "$ac_ct_OBJCOPY" && break
43679done
43680
43681  if test "x$ac_ct_OBJCOPY" = x; then
43682    OBJCOPY=""
43683  else
43684    case $cross_compiling:$ac_tool_warned in
43685yes:)
43686{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43687$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43688ac_tool_warned=yes ;;
43689esac
43690    OBJCOPY=$ac_ct_OBJCOPY
43691  fi
43692fi
43693
43694    else
43695      # If it succeeded, then it was overridden by the user. We will use it
43696      # for the tool.
43697
43698      # First remove it from the list of overridden variables, so we can test
43699      # for unknown variables in the end.
43700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43701
43702      # Check if we try to supply an empty value
43703      if test "x$OBJCOPY" = x; then
43704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43705$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43707$as_echo_n "checking for OBJCOPY... " >&6; }
43708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43709$as_echo "disabled" >&6; }
43710      else
43711        # Check if the provided tool contains a complete path.
43712        tool_specified="$OBJCOPY"
43713        tool_basename="${tool_specified##*/}"
43714        if test "x$tool_basename" = "x$tool_specified"; then
43715          # A command without a complete path is provided, search $PATH.
43716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43717$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43718          # Extract the first word of "$tool_basename", so it can be a program name with args.
43719set dummy $tool_basename; ac_word=$2
43720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43721$as_echo_n "checking for $ac_word... " >&6; }
43722if ${ac_cv_path_OBJCOPY+:} false; then :
43723  $as_echo_n "(cached) " >&6
43724else
43725  case $OBJCOPY in
43726  [\\/]* | ?:[\\/]*)
43727  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43728  ;;
43729  *)
43730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43731for as_dir in $PATH
43732do
43733  IFS=$as_save_IFS
43734  test -z "$as_dir" && as_dir=.
43735    for ac_exec_ext in '' $ac_executable_extensions; do
43736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43737    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43739    break 2
43740  fi
43741done
43742  done
43743IFS=$as_save_IFS
43744
43745  ;;
43746esac
43747fi
43748OBJCOPY=$ac_cv_path_OBJCOPY
43749if test -n "$OBJCOPY"; then
43750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43751$as_echo "$OBJCOPY" >&6; }
43752else
43753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43754$as_echo "no" >&6; }
43755fi
43756
43757
43758          if test "x$OBJCOPY" = x; then
43759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43760          fi
43761        else
43762          # Otherwise we believe it is a complete path. Use it as it is.
43763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43764$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43766$as_echo_n "checking for OBJCOPY... " >&6; }
43767          if test ! -x "$tool_specified"; then
43768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43769$as_echo "not found" >&6; }
43770            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43771          fi
43772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43773$as_echo "$tool_specified" >&6; }
43774        fi
43775      fi
43776    fi
43777
43778  fi
43779
43780
43781    # Only call fixup if objcopy was found.
43782    if test -n "$OBJCOPY"; then
43783
43784  # Only process if variable expands to non-empty
43785
43786  if test "x$OBJCOPY" != x; then
43787    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43788
43789  # First separate the path from the arguments. This will split at the first
43790  # space.
43791  complete="$OBJCOPY"
43792  path="${complete%% *}"
43793  tmp="$complete EOL"
43794  arguments="${tmp#* }"
43795
43796  # Input might be given as Windows format, start by converting to
43797  # unix format.
43798  new_path=`$CYGPATH -u "$path"`
43799
43800  # Now try to locate executable using which
43801  new_path=`$WHICH "$new_path" 2> /dev/null`
43802  # bat and cmd files are not always considered executable in cygwin causing which
43803  # to not find them
43804  if test "x$new_path" = x \
43805      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43806      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43807    new_path=`$CYGPATH -u "$path"`
43808  fi
43809  if test "x$new_path" = x; then
43810    # Oops. Which didn't find the executable.
43811    # The splitting of arguments from the executable at a space might have been incorrect,
43812    # since paths with space are more likely in Windows. Give it another try with the whole
43813    # argument.
43814    path="$complete"
43815    arguments="EOL"
43816    new_path=`$CYGPATH -u "$path"`
43817    new_path=`$WHICH "$new_path" 2> /dev/null`
43818    # bat and cmd files are not always considered executable in cygwin causing which
43819    # to not find them
43820    if test "x$new_path" = x \
43821        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43822        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43823      new_path=`$CYGPATH -u "$path"`
43824    fi
43825    if test "x$new_path" = x; then
43826      # It's still not found. Now this is an unrecoverable error.
43827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43828$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43829      has_space=`$ECHO "$complete" | $GREP " "`
43830      if test "x$has_space" != x; then
43831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43833      fi
43834      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43835    fi
43836  fi
43837
43838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43841  # "foo.exe" is OK but "foo" is an error.
43842  #
43843  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43844  # It is also a way to make sure we got the proper file name for the real test later on.
43845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43846  if test "x$test_shortpath" = x; then
43847    # Short path failed, file does not exist as specified.
43848    # Try adding .exe or .cmd
43849    if test -f "${new_path}.exe"; then
43850      input_to_shortpath="${new_path}.exe"
43851    elif test -f "${new_path}.cmd"; then
43852      input_to_shortpath="${new_path}.cmd"
43853    else
43854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43855$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43856      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43857$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43858      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43859    fi
43860  else
43861    input_to_shortpath="$new_path"
43862  fi
43863
43864  # Call helper function which possibly converts this using DOS-style short mode.
43865  # If so, the updated path is stored in $new_path.
43866  new_path="$input_to_shortpath"
43867
43868  input_path="$input_to_shortpath"
43869  # Check if we need to convert this using DOS-style short mode. If the path
43870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43871  # take no chances and rewrite it.
43872  # Note: m4 eats our [], so we need to use [ and ] instead.
43873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43874  if test "x$has_forbidden_chars" != x; then
43875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43879      # Going to short mode and back again did indeed matter. Since short mode is
43880      # case insensitive, let's make it lowercase to improve readability.
43881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43882      # Now convert it back to Unix-style (cygpath)
43883      input_path=`$CYGPATH -u "$shortmode_path"`
43884      new_path="$input_path"
43885    fi
43886  fi
43887
43888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43889  if test "x$test_cygdrive_prefix" = x; then
43890    # As a simple fix, exclude /usr/bin since it's not a real path.
43891    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43893      # a path prefixed by /cygdrive for fixpath to work.
43894      new_path="$CYGWIN_ROOT_PATH$input_path"
43895    fi
43896  fi
43897
43898  # remove trailing .exe if any
43899  new_path="${new_path/%.exe/}"
43900
43901    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43902
43903  # First separate the path from the arguments. This will split at the first
43904  # space.
43905  complete="$OBJCOPY"
43906  path="${complete%% *}"
43907  tmp="$complete EOL"
43908  arguments="${tmp#* }"
43909
43910  # Input might be given as Windows format, start by converting to
43911  # unix format.
43912  new_path="$path"
43913
43914  windows_path="$new_path"
43915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43916    unix_path=`$CYGPATH -u "$windows_path"`
43917    new_path="$unix_path"
43918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43920    new_path="$unix_path"
43921  fi
43922
43923
43924  # Now try to locate executable using which
43925  new_path=`$WHICH "$new_path" 2> /dev/null`
43926
43927  if test "x$new_path" = x; then
43928    # Oops. Which didn't find the executable.
43929    # The splitting of arguments from the executable at a space might have been incorrect,
43930    # since paths with space are more likely in Windows. Give it another try with the whole
43931    # argument.
43932    path="$complete"
43933    arguments="EOL"
43934    new_path="$path"
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
43946    new_path=`$WHICH "$new_path" 2> /dev/null`
43947    # bat and cmd files are not always considered executable in MSYS causing which
43948    # to not find them
43949    if test "x$new_path" = x \
43950        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43951        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43952      new_path="$path"
43953
43954  windows_path="$new_path"
43955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43956    unix_path=`$CYGPATH -u "$windows_path"`
43957    new_path="$unix_path"
43958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43960    new_path="$unix_path"
43961  fi
43962
43963    fi
43964
43965    if test "x$new_path" = x; then
43966      # It's still not found. Now this is an unrecoverable error.
43967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43968$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43969      has_space=`$ECHO "$complete" | $GREP " "`
43970      if test "x$has_space" != x; then
43971        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43972$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43973      fi
43974      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43975    fi
43976  fi
43977
43978  # Now new_path has a complete unix path to the binary
43979  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43980    # Keep paths in /bin as-is, but remove trailing .exe if any
43981    new_path="${new_path/%.exe/}"
43982    # Do not save /bin paths to all_fixpath_prefixes!
43983  else
43984    # Not in mixed or Windows style, start by that.
43985    new_path=`cmd //c echo $new_path`
43986
43987  input_path="$new_path"
43988  # Check if we need to convert this using DOS-style short mode. If the path
43989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43990  # take no chances and rewrite it.
43991  # Note: m4 eats our [], so we need to use [ and ] instead.
43992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43993  if test "x$has_forbidden_chars" != x; then
43994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43996  fi
43997
43998    # Output is in $new_path
43999
44000  windows_path="$new_path"
44001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44002    unix_path=`$CYGPATH -u "$windows_path"`
44003    new_path="$unix_path"
44004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44006    new_path="$unix_path"
44007  fi
44008
44009    # remove trailing .exe if any
44010    new_path="${new_path/%.exe/}"
44011
44012    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44013    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44014  fi
44015
44016    else
44017      # We're on a unix platform. Hooray! :)
44018      # First separate the path from the arguments. This will split at the first
44019      # space.
44020      complete="$OBJCOPY"
44021      path="${complete%% *}"
44022      tmp="$complete EOL"
44023      arguments="${tmp#* }"
44024
44025      # Cannot rely on the command "which" here since it doesn't always work.
44026      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44027      if test -z "$is_absolute_path"; then
44028        # Path to executable is not absolute. Find it.
44029        IFS_save="$IFS"
44030        IFS=:
44031        for p in $PATH; do
44032          if test -f "$p/$path" && test -x "$p/$path"; then
44033            new_path="$p/$path"
44034            break
44035          fi
44036        done
44037        IFS="$IFS_save"
44038      else
44039        # This is an absolute path, we can use it without further modifications.
44040        new_path="$path"
44041      fi
44042
44043      if test "x$new_path" = x; then
44044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44045$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44046        has_space=`$ECHO "$complete" | $GREP " "`
44047        if test "x$has_space" != x; then
44048          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44049$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44050        fi
44051        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44052      fi
44053    fi
44054
44055    # Now join together the path and the arguments once again
44056    if test "x$arguments" != xEOL; then
44057      new_complete="$new_path ${arguments% *}"
44058    else
44059      new_complete="$new_path"
44060    fi
44061
44062    if test "x$complete" != "x$new_complete"; then
44063      OBJCOPY="$new_complete"
44064      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44065$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44066    fi
44067  fi
44068
44069      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44070        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44071        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44072        # - version number is last blank separate word on first line
44073        # - version number formats that have been seen:
44074        #   - <major>.<minor>
44075        #   - <major>.<minor>.<micro>
44076        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44077        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44078         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44079              -e 's/.* //' \
44080              -e '/^[01]\./b bad' \
44081              -e '/^2\./{' \
44082              -e '  s/^2\.//' \
44083              -e '  /^[0-9]$/b bad' \
44084              -e '  /^[0-9]\./b bad' \
44085              -e '  /^1[0-9]$/b bad' \
44086              -e '  /^1[0-9]\./b bad' \
44087              -e '  /^20\./b bad' \
44088              -e '  /^21\.0$/b bad' \
44089              -e '  /^21\.0\./b bad' \
44090              -e '}' \
44091              -e ':good' \
44092              -e 's/.*/VALID_VERSION/p' \
44093              -e 'q' \
44094              -e ':bad' \
44095              -e 's/.*/BAD_VERSION/p' \
44096              -e 'q'`
44097        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44098          OBJCOPY=
44099          { $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
44100$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44101          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44102$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44103          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44104$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44105          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44106$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44107          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44108$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44109        fi
44110      fi
44111    fi
44112  fi
44113
44114
44115
44116  # Publish this variable in the help.
44117
44118
44119  if [ -z "${OBJDUMP+x}" ]; then
44120    # The variable is not set by user, try to locate tool using the code snippet
44121    if test -n "$ac_tool_prefix"; then
44122  for ac_prog in gobjdump objdump
44123  do
44124    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44125set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44127$as_echo_n "checking for $ac_word... " >&6; }
44128if ${ac_cv_prog_OBJDUMP+:} false; then :
44129  $as_echo_n "(cached) " >&6
44130else
44131  if test -n "$OBJDUMP"; then
44132  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44133else
44134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44135for as_dir in $PATH
44136do
44137  IFS=$as_save_IFS
44138  test -z "$as_dir" && as_dir=.
44139    for ac_exec_ext in '' $ac_executable_extensions; do
44140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44141    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44143    break 2
44144  fi
44145done
44146  done
44147IFS=$as_save_IFS
44148
44149fi
44150fi
44151OBJDUMP=$ac_cv_prog_OBJDUMP
44152if test -n "$OBJDUMP"; then
44153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44154$as_echo "$OBJDUMP" >&6; }
44155else
44156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44157$as_echo "no" >&6; }
44158fi
44159
44160
44161    test -n "$OBJDUMP" && break
44162  done
44163fi
44164if test -z "$OBJDUMP"; then
44165  ac_ct_OBJDUMP=$OBJDUMP
44166  for ac_prog in gobjdump objdump
44167do
44168  # Extract the first word of "$ac_prog", so it can be a program name with args.
44169set dummy $ac_prog; ac_word=$2
44170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44171$as_echo_n "checking for $ac_word... " >&6; }
44172if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44173  $as_echo_n "(cached) " >&6
44174else
44175  if test -n "$ac_ct_OBJDUMP"; then
44176  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44177else
44178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44179for as_dir in $PATH
44180do
44181  IFS=$as_save_IFS
44182  test -z "$as_dir" && as_dir=.
44183    for ac_exec_ext in '' $ac_executable_extensions; do
44184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44185    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44187    break 2
44188  fi
44189done
44190  done
44191IFS=$as_save_IFS
44192
44193fi
44194fi
44195ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44196if test -n "$ac_ct_OBJDUMP"; then
44197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44198$as_echo "$ac_ct_OBJDUMP" >&6; }
44199else
44200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44201$as_echo "no" >&6; }
44202fi
44203
44204
44205  test -n "$ac_ct_OBJDUMP" && break
44206done
44207
44208  if test "x$ac_ct_OBJDUMP" = x; then
44209    OBJDUMP=""
44210  else
44211    case $cross_compiling:$ac_tool_warned in
44212yes:)
44213{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44214$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44215ac_tool_warned=yes ;;
44216esac
44217    OBJDUMP=$ac_ct_OBJDUMP
44218  fi
44219fi
44220
44221  else
44222    # The variable is set, but is it from the command line or the environment?
44223
44224    # Try to remove the string !OBJDUMP! from our list.
44225    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44226    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44227      # If it failed, the variable was not from the command line. Ignore it,
44228      # but warn the user (except for BASH, which is always set by the calling BASH).
44229      if test "xOBJDUMP" != xBASH; then
44230        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44231$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44232      fi
44233      # Try to locate tool using the code snippet
44234      if test -n "$ac_tool_prefix"; then
44235  for ac_prog in gobjdump objdump
44236  do
44237    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44238set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44240$as_echo_n "checking for $ac_word... " >&6; }
44241if ${ac_cv_prog_OBJDUMP+:} false; then :
44242  $as_echo_n "(cached) " >&6
44243else
44244  if test -n "$OBJDUMP"; then
44245  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44246else
44247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44248for as_dir in $PATH
44249do
44250  IFS=$as_save_IFS
44251  test -z "$as_dir" && as_dir=.
44252    for ac_exec_ext in '' $ac_executable_extensions; do
44253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44254    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44256    break 2
44257  fi
44258done
44259  done
44260IFS=$as_save_IFS
44261
44262fi
44263fi
44264OBJDUMP=$ac_cv_prog_OBJDUMP
44265if test -n "$OBJDUMP"; then
44266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44267$as_echo "$OBJDUMP" >&6; }
44268else
44269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44270$as_echo "no" >&6; }
44271fi
44272
44273
44274    test -n "$OBJDUMP" && break
44275  done
44276fi
44277if test -z "$OBJDUMP"; then
44278  ac_ct_OBJDUMP=$OBJDUMP
44279  for ac_prog in gobjdump objdump
44280do
44281  # Extract the first word of "$ac_prog", so it can be a program name with args.
44282set dummy $ac_prog; ac_word=$2
44283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44284$as_echo_n "checking for $ac_word... " >&6; }
44285if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44286  $as_echo_n "(cached) " >&6
44287else
44288  if test -n "$ac_ct_OBJDUMP"; then
44289  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44290else
44291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44292for as_dir in $PATH
44293do
44294  IFS=$as_save_IFS
44295  test -z "$as_dir" && as_dir=.
44296    for ac_exec_ext in '' $ac_executable_extensions; do
44297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44298    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44300    break 2
44301  fi
44302done
44303  done
44304IFS=$as_save_IFS
44305
44306fi
44307fi
44308ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44309if test -n "$ac_ct_OBJDUMP"; then
44310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44311$as_echo "$ac_ct_OBJDUMP" >&6; }
44312else
44313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44314$as_echo "no" >&6; }
44315fi
44316
44317
44318  test -n "$ac_ct_OBJDUMP" && break
44319done
44320
44321  if test "x$ac_ct_OBJDUMP" = x; then
44322    OBJDUMP=""
44323  else
44324    case $cross_compiling:$ac_tool_warned in
44325yes:)
44326{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44327$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44328ac_tool_warned=yes ;;
44329esac
44330    OBJDUMP=$ac_ct_OBJDUMP
44331  fi
44332fi
44333
44334    else
44335      # If it succeeded, then it was overridden by the user. We will use it
44336      # for the tool.
44337
44338      # First remove it from the list of overridden variables, so we can test
44339      # for unknown variables in the end.
44340      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44341
44342      # Check if we try to supply an empty value
44343      if test "x$OBJDUMP" = x; then
44344        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44345$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44346        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44347$as_echo_n "checking for OBJDUMP... " >&6; }
44348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44349$as_echo "disabled" >&6; }
44350      else
44351        # Check if the provided tool contains a complete path.
44352        tool_specified="$OBJDUMP"
44353        tool_basename="${tool_specified##*/}"
44354        if test "x$tool_basename" = "x$tool_specified"; then
44355          # A command without a complete path is provided, search $PATH.
44356          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44357$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44358          # Extract the first word of "$tool_basename", so it can be a program name with args.
44359set dummy $tool_basename; ac_word=$2
44360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44361$as_echo_n "checking for $ac_word... " >&6; }
44362if ${ac_cv_path_OBJDUMP+:} false; then :
44363  $as_echo_n "(cached) " >&6
44364else
44365  case $OBJDUMP in
44366  [\\/]* | ?:[\\/]*)
44367  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44368  ;;
44369  *)
44370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44371for as_dir in $PATH
44372do
44373  IFS=$as_save_IFS
44374  test -z "$as_dir" && as_dir=.
44375    for ac_exec_ext in '' $ac_executable_extensions; do
44376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44377    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44379    break 2
44380  fi
44381done
44382  done
44383IFS=$as_save_IFS
44384
44385  ;;
44386esac
44387fi
44388OBJDUMP=$ac_cv_path_OBJDUMP
44389if test -n "$OBJDUMP"; then
44390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44391$as_echo "$OBJDUMP" >&6; }
44392else
44393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44394$as_echo "no" >&6; }
44395fi
44396
44397
44398          if test "x$OBJDUMP" = x; then
44399            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44400          fi
44401        else
44402          # Otherwise we believe it is a complete path. Use it as it is.
44403          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44404$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44405          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44406$as_echo_n "checking for OBJDUMP... " >&6; }
44407          if test ! -x "$tool_specified"; then
44408            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44409$as_echo "not found" >&6; }
44410            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44411          fi
44412          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44413$as_echo "$tool_specified" >&6; }
44414        fi
44415      fi
44416    fi
44417
44418  fi
44419
44420
44421  if test "x$OBJDUMP" != x; then
44422    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44423    # bails if argument is missing.
44424
44425  # Only process if variable expands to non-empty
44426
44427  if test "x$OBJDUMP" != x; then
44428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44429
44430  # First separate the path from the arguments. This will split at the first
44431  # space.
44432  complete="$OBJDUMP"
44433  path="${complete%% *}"
44434  tmp="$complete EOL"
44435  arguments="${tmp#* }"
44436
44437  # Input might be given as Windows format, start by converting to
44438  # unix format.
44439  new_path=`$CYGPATH -u "$path"`
44440
44441  # Now try to locate executable using which
44442  new_path=`$WHICH "$new_path" 2> /dev/null`
44443  # bat and cmd files are not always considered executable in cygwin causing which
44444  # to not find them
44445  if test "x$new_path" = x \
44446      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44447      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44448    new_path=`$CYGPATH -u "$path"`
44449  fi
44450  if test "x$new_path" = x; then
44451    # Oops. Which didn't find the executable.
44452    # The splitting of arguments from the executable at a space might have been incorrect,
44453    # since paths with space are more likely in Windows. Give it another try with the whole
44454    # argument.
44455    path="$complete"
44456    arguments="EOL"
44457    new_path=`$CYGPATH -u "$path"`
44458    new_path=`$WHICH "$new_path" 2> /dev/null`
44459    # bat and cmd files are not always considered executable in cygwin causing which
44460    # to not find them
44461    if test "x$new_path" = x \
44462        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44463        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44464      new_path=`$CYGPATH -u "$path"`
44465    fi
44466    if test "x$new_path" = x; then
44467      # It's still not found. Now this is an unrecoverable error.
44468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44469$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44470      has_space=`$ECHO "$complete" | $GREP " "`
44471      if test "x$has_space" != x; then
44472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44474      fi
44475      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44476    fi
44477  fi
44478
44479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44482  # "foo.exe" is OK but "foo" is an error.
44483  #
44484  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44485  # It is also a way to make sure we got the proper file name for the real test later on.
44486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44487  if test "x$test_shortpath" = x; then
44488    # Short path failed, file does not exist as specified.
44489    # Try adding .exe or .cmd
44490    if test -f "${new_path}.exe"; then
44491      input_to_shortpath="${new_path}.exe"
44492    elif test -f "${new_path}.cmd"; then
44493      input_to_shortpath="${new_path}.cmd"
44494    else
44495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44496$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44497      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44498$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44499      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44500    fi
44501  else
44502    input_to_shortpath="$new_path"
44503  fi
44504
44505  # Call helper function which possibly converts this using DOS-style short mode.
44506  # If so, the updated path is stored in $new_path.
44507  new_path="$input_to_shortpath"
44508
44509  input_path="$input_to_shortpath"
44510  # Check if we need to convert this using DOS-style short mode. If the path
44511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44512  # take no chances and rewrite it.
44513  # Note: m4 eats our [], so we need to use [ and ] instead.
44514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44515  if test "x$has_forbidden_chars" != x; then
44516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44520      # Going to short mode and back again did indeed matter. Since short mode is
44521      # case insensitive, let's make it lowercase to improve readability.
44522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44523      # Now convert it back to Unix-style (cygpath)
44524      input_path=`$CYGPATH -u "$shortmode_path"`
44525      new_path="$input_path"
44526    fi
44527  fi
44528
44529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44530  if test "x$test_cygdrive_prefix" = x; then
44531    # As a simple fix, exclude /usr/bin since it's not a real path.
44532    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44534      # a path prefixed by /cygdrive for fixpath to work.
44535      new_path="$CYGWIN_ROOT_PATH$input_path"
44536    fi
44537  fi
44538
44539  # remove trailing .exe if any
44540  new_path="${new_path/%.exe/}"
44541
44542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44543
44544  # First separate the path from the arguments. This will split at the first
44545  # space.
44546  complete="$OBJDUMP"
44547  path="${complete%% *}"
44548  tmp="$complete EOL"
44549  arguments="${tmp#* }"
44550
44551  # Input might be given as Windows format, start by converting to
44552  # unix format.
44553  new_path="$path"
44554
44555  windows_path="$new_path"
44556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44557    unix_path=`$CYGPATH -u "$windows_path"`
44558    new_path="$unix_path"
44559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44561    new_path="$unix_path"
44562  fi
44563
44564
44565  # Now try to locate executable using which
44566  new_path=`$WHICH "$new_path" 2> /dev/null`
44567
44568  if test "x$new_path" = x; then
44569    # Oops. Which didn't find the executable.
44570    # The splitting of arguments from the executable at a space might have been incorrect,
44571    # since paths with space are more likely in Windows. Give it another try with the whole
44572    # argument.
44573    path="$complete"
44574    arguments="EOL"
44575    new_path="$path"
44576
44577  windows_path="$new_path"
44578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44579    unix_path=`$CYGPATH -u "$windows_path"`
44580    new_path="$unix_path"
44581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44583    new_path="$unix_path"
44584  fi
44585
44586
44587    new_path=`$WHICH "$new_path" 2> /dev/null`
44588    # bat and cmd files are not always considered executable in MSYS causing which
44589    # to not find them
44590    if test "x$new_path" = x \
44591        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44592        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44593      new_path="$path"
44594
44595  windows_path="$new_path"
44596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44597    unix_path=`$CYGPATH -u "$windows_path"`
44598    new_path="$unix_path"
44599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44601    new_path="$unix_path"
44602  fi
44603
44604    fi
44605
44606    if test "x$new_path" = x; then
44607      # It's still not found. Now this is an unrecoverable error.
44608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44609$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44610      has_space=`$ECHO "$complete" | $GREP " "`
44611      if test "x$has_space" != x; then
44612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44614      fi
44615      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44616    fi
44617  fi
44618
44619  # Now new_path has a complete unix path to the binary
44620  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44621    # Keep paths in /bin as-is, but remove trailing .exe if any
44622    new_path="${new_path/%.exe/}"
44623    # Do not save /bin paths to all_fixpath_prefixes!
44624  else
44625    # Not in mixed or Windows style, start by that.
44626    new_path=`cmd //c echo $new_path`
44627
44628  input_path="$new_path"
44629  # Check if we need to convert this using DOS-style short mode. If the path
44630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44631  # take no chances and rewrite it.
44632  # Note: m4 eats our [], so we need to use [ and ] instead.
44633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44634  if test "x$has_forbidden_chars" != x; then
44635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44637  fi
44638
44639    # Output is in $new_path
44640
44641  windows_path="$new_path"
44642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44643    unix_path=`$CYGPATH -u "$windows_path"`
44644    new_path="$unix_path"
44645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44647    new_path="$unix_path"
44648  fi
44649
44650    # remove trailing .exe if any
44651    new_path="${new_path/%.exe/}"
44652
44653    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44654    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44655  fi
44656
44657    else
44658      # We're on a unix platform. Hooray! :)
44659      # First separate the path from the arguments. This will split at the first
44660      # space.
44661      complete="$OBJDUMP"
44662      path="${complete%% *}"
44663      tmp="$complete EOL"
44664      arguments="${tmp#* }"
44665
44666      # Cannot rely on the command "which" here since it doesn't always work.
44667      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44668      if test -z "$is_absolute_path"; then
44669        # Path to executable is not absolute. Find it.
44670        IFS_save="$IFS"
44671        IFS=:
44672        for p in $PATH; do
44673          if test -f "$p/$path" && test -x "$p/$path"; then
44674            new_path="$p/$path"
44675            break
44676          fi
44677        done
44678        IFS="$IFS_save"
44679      else
44680        # This is an absolute path, we can use it without further modifications.
44681        new_path="$path"
44682      fi
44683
44684      if test "x$new_path" = x; then
44685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44686$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44687        has_space=`$ECHO "$complete" | $GREP " "`
44688        if test "x$has_space" != x; then
44689          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44690$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44691        fi
44692        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44693      fi
44694    fi
44695
44696    # Now join together the path and the arguments once again
44697    if test "x$arguments" != xEOL; then
44698      new_complete="$new_path ${arguments% *}"
44699    else
44700      new_complete="$new_path"
44701    fi
44702
44703    if test "x$complete" != "x$new_complete"; then
44704      OBJDUMP="$new_complete"
44705      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44706$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44707    fi
44708  fi
44709
44710  fi
44711
44712
44713  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44714  # to remain in place. Otherwise the compiler will not work in some siutations
44715  # in later configure checks.
44716  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44717    PATH="$OLD_PATH"
44718  fi
44719
44720  # Restore the flags to the user specified values.
44721  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44722  CFLAGS="$ORG_CFLAGS"
44723  CXXFLAGS="$ORG_CXXFLAGS"
44724
44725
44726# Finally do some processing after the detection phase
44727
44728  if test "x$COMPILE_TYPE" = "xcross"; then
44729    # Now we need to find a C/C++ compiler that can build executables for the
44730    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44731    # used once. Also, we need to do this without adding a tools dir to the
44732    # path, otherwise we might pick up cross-compilers which don't use standard
44733    # naming.
44734
44735    OLDPATH="$PATH"
44736
44737
44738# Check whether --with-build-devkit was given.
44739if test "${with_build_devkit+set}" = set; then :
44740  withval=$with_build_devkit;
44741fi
44742
44743    if test "x$with_build_devkit" = "xyes"; then
44744      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44745    elif test -n "$with_build_devkit"; then
44746      if test ! -d "$with_build_devkit"; then
44747        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44748      else
44749
44750  # Only process if variable expands to non-empty
44751
44752  if test "x$with_build_devkit" != x; then
44753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44754
44755  # Input might be given as Windows format, start by converting to
44756  # unix format.
44757  path="$with_build_devkit"
44758  new_path=`$CYGPATH -u "$path"`
44759
44760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44763  # "foo.exe" is OK but "foo" is an error.
44764  #
44765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44766  # It is also a way to make sure we got the proper file name for the real test later on.
44767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44768  if test "x$test_shortpath" = x; then
44769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44770$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44771    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44772  fi
44773
44774  # Call helper function which possibly converts this using DOS-style short mode.
44775  # If so, the updated path is stored in $new_path.
44776
44777  input_path="$new_path"
44778  # Check if we need to convert this using DOS-style short mode. If the path
44779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44780  # take no chances and rewrite it.
44781  # Note: m4 eats our [], so we need to use [ and ] instead.
44782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44783  if test "x$has_forbidden_chars" != x; then
44784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44788      # Going to short mode and back again did indeed matter. Since short mode is
44789      # case insensitive, let's make it lowercase to improve readability.
44790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44791      # Now convert it back to Unix-style (cygpath)
44792      input_path=`$CYGPATH -u "$shortmode_path"`
44793      new_path="$input_path"
44794    fi
44795  fi
44796
44797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44798  if test "x$test_cygdrive_prefix" = x; then
44799    # As a simple fix, exclude /usr/bin since it's not a real path.
44800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44802      # a path prefixed by /cygdrive for fixpath to work.
44803      new_path="$CYGWIN_ROOT_PATH$input_path"
44804    fi
44805  fi
44806
44807
44808  if test "x$path" != "x$new_path"; then
44809    with_build_devkit="$new_path"
44810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44811$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44812  fi
44813
44814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44815
44816  path="$with_build_devkit"
44817  has_colon=`$ECHO $path | $GREP ^.:`
44818  new_path="$path"
44819  if test "x$has_colon" = x; then
44820    # Not in mixed or Windows style, start by that.
44821    new_path=`cmd //c echo $path`
44822  fi
44823
44824
44825  input_path="$new_path"
44826  # Check if we need to convert this using DOS-style short mode. If the path
44827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44828  # take no chances and rewrite it.
44829  # Note: m4 eats our [], so we need to use [ and ] instead.
44830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44831  if test "x$has_forbidden_chars" != x; then
44832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44834  fi
44835
44836
44837  windows_path="$new_path"
44838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44839    unix_path=`$CYGPATH -u "$windows_path"`
44840    new_path="$unix_path"
44841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44843    new_path="$unix_path"
44844  fi
44845
44846  if test "x$path" != "x$new_path"; then
44847    with_build_devkit="$new_path"
44848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44849$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44850  fi
44851
44852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44854
44855    else
44856      # We're on a unix platform. Hooray! :)
44857      path="$with_build_devkit"
44858      has_space=`$ECHO "$path" | $GREP " "`
44859      if test "x$has_space" != x; then
44860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44861$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44862        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44863      fi
44864
44865      # Use eval to expand a potential ~
44866      eval path="$path"
44867      if test ! -f "$path" && test ! -d "$path"; then
44868        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44869      fi
44870
44871      if test -d "$path"; then
44872        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44873      else
44874        dir="`$DIRNAME "$path"`"
44875        base="`$BASENAME "$path"`"
44876        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44877      fi
44878    fi
44879  fi
44880
44881        BUILD_DEVKIT_ROOT="$with_build_devkit"
44882        # Check for a meta data info file in the root of the devkit
44883        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44884          # Process devkit.info so that existing devkit variables are not
44885          # modified by this
44886          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44887              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44888              -e "s/\$host/\$build/g" \
44889              $BUILD_DEVKIT_ROOT/devkit.info \
44890              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44891          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44892          # This potentially sets the following:
44893          # A descriptive name of the devkit
44894
44895  if test "x$BUILD_DEVKIT_NAME" = x; then
44896    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44897  fi
44898
44899          # Corresponds to --with-extra-path
44900
44901  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44902    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44903  fi
44904
44905          # Corresponds to --with-toolchain-path
44906
44907  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44908    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44909  fi
44910
44911          # Corresponds to --with-sysroot
44912
44913  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44914    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44915  fi
44916
44917          # Skip the Window specific parts
44918        fi
44919
44920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44921$as_echo_n "checking for build platform devkit... " >&6; }
44922        if test "x$BUILD_DEVKIT_NAME" != x; then
44923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44924$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44925        else
44926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44927$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44928        fi
44929
44930        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44931
44932  if test "x$BUILD_SYSROOT" != "x"; then
44933    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44934      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44935        # Solaris Studio does not have a concept of sysroot. Instead we must
44936        # make sure the default include and lib dirs are appended to each
44937        # compile and link command line. Must also add -I-xbuiltin to enable
44938        # inlining of system functions and intrinsics.
44939        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44940        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44941            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44942      fi
44943    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44944      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44945      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44946    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44947      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44948      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44949    fi
44950    # The global CFLAGS and LDFLAGS variables need these for configure to function
44951    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44952    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44953    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44954    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44955  fi
44956
44957  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44958    # We also need -iframework<path>/System/Library/Frameworks
44959    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44960    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44961    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44962    # set this here so it doesn't have to be peppered throughout the forest
44963    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44964    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44965  fi
44966
44967
44968
44969
44970
44971         # Fallback default of just /bin if DEVKIT_PATH is not defined
44972        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44973          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44974        fi
44975        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44976      fi
44977    fi
44978
44979    # FIXME: we should list the discovered compilers as an exclude pattern!
44980    # If we do that, we can do this detection before POST_DETECTION, and still
44981    # find the build compilers in the tools dir, if needed.
44982
44983
44984
44985  # Publish this variable in the help.
44986
44987
44988  if [ -z "${BUILD_CC+x}" ]; then
44989    # The variable is not set by user, try to locate tool using the code snippet
44990    for ac_prog in cl cc gcc
44991do
44992  # Extract the first word of "$ac_prog", so it can be a program name with args.
44993set dummy $ac_prog; ac_word=$2
44994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44995$as_echo_n "checking for $ac_word... " >&6; }
44996if ${ac_cv_path_BUILD_CC+:} false; then :
44997  $as_echo_n "(cached) " >&6
44998else
44999  case $BUILD_CC in
45000  [\\/]* | ?:[\\/]*)
45001  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45002  ;;
45003  *)
45004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45005for as_dir in $PATH
45006do
45007  IFS=$as_save_IFS
45008  test -z "$as_dir" && as_dir=.
45009    for ac_exec_ext in '' $ac_executable_extensions; do
45010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45011    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45013    break 2
45014  fi
45015done
45016  done
45017IFS=$as_save_IFS
45018
45019  ;;
45020esac
45021fi
45022BUILD_CC=$ac_cv_path_BUILD_CC
45023if test -n "$BUILD_CC"; then
45024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45025$as_echo "$BUILD_CC" >&6; }
45026else
45027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45028$as_echo "no" >&6; }
45029fi
45030
45031
45032  test -n "$BUILD_CC" && break
45033done
45034
45035  else
45036    # The variable is set, but is it from the command line or the environment?
45037
45038    # Try to remove the string !BUILD_CC! from our list.
45039    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
45040    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45041      # If it failed, the variable was not from the command line. Ignore it,
45042      # but warn the user (except for BASH, which is always set by the calling BASH).
45043      if test "xBUILD_CC" != xBASH; then
45044        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45045$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45046      fi
45047      # Try to locate tool using the code snippet
45048      for ac_prog in cl cc gcc
45049do
45050  # Extract the first word of "$ac_prog", so it can be a program name with args.
45051set dummy $ac_prog; ac_word=$2
45052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45053$as_echo_n "checking for $ac_word... " >&6; }
45054if ${ac_cv_path_BUILD_CC+:} false; then :
45055  $as_echo_n "(cached) " >&6
45056else
45057  case $BUILD_CC in
45058  [\\/]* | ?:[\\/]*)
45059  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45060  ;;
45061  *)
45062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45063for as_dir in $PATH
45064do
45065  IFS=$as_save_IFS
45066  test -z "$as_dir" && as_dir=.
45067    for ac_exec_ext in '' $ac_executable_extensions; do
45068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45069    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45071    break 2
45072  fi
45073done
45074  done
45075IFS=$as_save_IFS
45076
45077  ;;
45078esac
45079fi
45080BUILD_CC=$ac_cv_path_BUILD_CC
45081if test -n "$BUILD_CC"; then
45082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45083$as_echo "$BUILD_CC" >&6; }
45084else
45085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45086$as_echo "no" >&6; }
45087fi
45088
45089
45090  test -n "$BUILD_CC" && break
45091done
45092
45093    else
45094      # If it succeeded, then it was overridden by the user. We will use it
45095      # for the tool.
45096
45097      # First remove it from the list of overridden variables, so we can test
45098      # for unknown variables in the end.
45099      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45100
45101      # Check if we try to supply an empty value
45102      if test "x$BUILD_CC" = x; then
45103        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45104$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45105        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45106$as_echo_n "checking for BUILD_CC... " >&6; }
45107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45108$as_echo "disabled" >&6; }
45109      else
45110        # Check if the provided tool contains a complete path.
45111        tool_specified="$BUILD_CC"
45112        tool_basename="${tool_specified##*/}"
45113        if test "x$tool_basename" = "x$tool_specified"; then
45114          # A command without a complete path is provided, search $PATH.
45115          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45116$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45117          # Extract the first word of "$tool_basename", so it can be a program name with args.
45118set dummy $tool_basename; ac_word=$2
45119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45120$as_echo_n "checking for $ac_word... " >&6; }
45121if ${ac_cv_path_BUILD_CC+:} false; then :
45122  $as_echo_n "(cached) " >&6
45123else
45124  case $BUILD_CC in
45125  [\\/]* | ?:[\\/]*)
45126  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45127  ;;
45128  *)
45129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45130for as_dir in $PATH
45131do
45132  IFS=$as_save_IFS
45133  test -z "$as_dir" && as_dir=.
45134    for ac_exec_ext in '' $ac_executable_extensions; do
45135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45136    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45138    break 2
45139  fi
45140done
45141  done
45142IFS=$as_save_IFS
45143
45144  ;;
45145esac
45146fi
45147BUILD_CC=$ac_cv_path_BUILD_CC
45148if test -n "$BUILD_CC"; then
45149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45150$as_echo "$BUILD_CC" >&6; }
45151else
45152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45153$as_echo "no" >&6; }
45154fi
45155
45156
45157          if test "x$BUILD_CC" = x; then
45158            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45159          fi
45160        else
45161          # Otherwise we believe it is a complete path. Use it as it is.
45162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45163$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45164          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45165$as_echo_n "checking for BUILD_CC... " >&6; }
45166          if test ! -x "$tool_specified"; then
45167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45168$as_echo "not found" >&6; }
45169            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45170          fi
45171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45172$as_echo "$tool_specified" >&6; }
45173        fi
45174      fi
45175    fi
45176
45177  fi
45178
45179
45180
45181  if test "x$BUILD_CC" = x; then
45182    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45183  fi
45184
45185
45186
45187  # Only process if variable expands to non-empty
45188
45189  if test "x$BUILD_CC" != x; then
45190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45191
45192  # First separate the path from the arguments. This will split at the first
45193  # space.
45194  complete="$BUILD_CC"
45195  path="${complete%% *}"
45196  tmp="$complete EOL"
45197  arguments="${tmp#* }"
45198
45199  # Input might be given as Windows format, start by converting to
45200  # unix format.
45201  new_path=`$CYGPATH -u "$path"`
45202
45203  # Now try to locate executable using which
45204  new_path=`$WHICH "$new_path" 2> /dev/null`
45205  # bat and cmd files are not always considered executable in cygwin causing which
45206  # to not find them
45207  if test "x$new_path" = x \
45208      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45209      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45210    new_path=`$CYGPATH -u "$path"`
45211  fi
45212  if test "x$new_path" = x; then
45213    # Oops. Which didn't find the executable.
45214    # The splitting of arguments from the executable at a space might have been incorrect,
45215    # since paths with space are more likely in Windows. Give it another try with the whole
45216    # argument.
45217    path="$complete"
45218    arguments="EOL"
45219    new_path=`$CYGPATH -u "$path"`
45220    new_path=`$WHICH "$new_path" 2> /dev/null`
45221    # bat and cmd files are not always considered executable in cygwin causing which
45222    # to not find them
45223    if test "x$new_path" = x \
45224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45226      new_path=`$CYGPATH -u "$path"`
45227    fi
45228    if test "x$new_path" = x; then
45229      # It's still not found. Now this is an unrecoverable error.
45230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45231$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45232      has_space=`$ECHO "$complete" | $GREP " "`
45233      if test "x$has_space" != x; then
45234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45236      fi
45237      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45238    fi
45239  fi
45240
45241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45244  # "foo.exe" is OK but "foo" is an error.
45245  #
45246  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45247  # It is also a way to make sure we got the proper file name for the real test later on.
45248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45249  if test "x$test_shortpath" = x; then
45250    # Short path failed, file does not exist as specified.
45251    # Try adding .exe or .cmd
45252    if test -f "${new_path}.exe"; then
45253      input_to_shortpath="${new_path}.exe"
45254    elif test -f "${new_path}.cmd"; then
45255      input_to_shortpath="${new_path}.cmd"
45256    else
45257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45258$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45259      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45260$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45261      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45262    fi
45263  else
45264    input_to_shortpath="$new_path"
45265  fi
45266
45267  # Call helper function which possibly converts this using DOS-style short mode.
45268  # If so, the updated path is stored in $new_path.
45269  new_path="$input_to_shortpath"
45270
45271  input_path="$input_to_shortpath"
45272  # Check if we need to convert this using DOS-style short mode. If the path
45273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45274  # take no chances and rewrite it.
45275  # Note: m4 eats our [], so we need to use [ and ] instead.
45276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45277  if test "x$has_forbidden_chars" != x; then
45278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45282      # Going to short mode and back again did indeed matter. Since short mode is
45283      # case insensitive, let's make it lowercase to improve readability.
45284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45285      # Now convert it back to Unix-style (cygpath)
45286      input_path=`$CYGPATH -u "$shortmode_path"`
45287      new_path="$input_path"
45288    fi
45289  fi
45290
45291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45292  if test "x$test_cygdrive_prefix" = x; then
45293    # As a simple fix, exclude /usr/bin since it's not a real path.
45294    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45296      # a path prefixed by /cygdrive for fixpath to work.
45297      new_path="$CYGWIN_ROOT_PATH$input_path"
45298    fi
45299  fi
45300
45301  # remove trailing .exe if any
45302  new_path="${new_path/%.exe/}"
45303
45304    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45305
45306  # First separate the path from the arguments. This will split at the first
45307  # space.
45308  complete="$BUILD_CC"
45309  path="${complete%% *}"
45310  tmp="$complete EOL"
45311  arguments="${tmp#* }"
45312
45313  # Input might be given as Windows format, start by converting to
45314  # unix format.
45315  new_path="$path"
45316
45317  windows_path="$new_path"
45318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45319    unix_path=`$CYGPATH -u "$windows_path"`
45320    new_path="$unix_path"
45321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45323    new_path="$unix_path"
45324  fi
45325
45326
45327  # Now try to locate executable using which
45328  new_path=`$WHICH "$new_path" 2> /dev/null`
45329
45330  if test "x$new_path" = x; then
45331    # Oops. Which didn't find the executable.
45332    # The splitting of arguments from the executable at a space might have been incorrect,
45333    # since paths with space are more likely in Windows. Give it another try with the whole
45334    # argument.
45335    path="$complete"
45336    arguments="EOL"
45337    new_path="$path"
45338
45339  windows_path="$new_path"
45340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45341    unix_path=`$CYGPATH -u "$windows_path"`
45342    new_path="$unix_path"
45343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45345    new_path="$unix_path"
45346  fi
45347
45348
45349    new_path=`$WHICH "$new_path" 2> /dev/null`
45350    # bat and cmd files are not always considered executable in MSYS causing which
45351    # to not find them
45352    if test "x$new_path" = x \
45353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45355      new_path="$path"
45356
45357  windows_path="$new_path"
45358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45359    unix_path=`$CYGPATH -u "$windows_path"`
45360    new_path="$unix_path"
45361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45363    new_path="$unix_path"
45364  fi
45365
45366    fi
45367
45368    if test "x$new_path" = x; then
45369      # It's still not found. Now this is an unrecoverable error.
45370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45371$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45372      has_space=`$ECHO "$complete" | $GREP " "`
45373      if test "x$has_space" != x; then
45374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45376      fi
45377      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45378    fi
45379  fi
45380
45381  # Now new_path has a complete unix path to the binary
45382  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45383    # Keep paths in /bin as-is, but remove trailing .exe if any
45384    new_path="${new_path/%.exe/}"
45385    # Do not save /bin paths to all_fixpath_prefixes!
45386  else
45387    # Not in mixed or Windows style, start by that.
45388    new_path=`cmd //c echo $new_path`
45389
45390  input_path="$new_path"
45391  # Check if we need to convert this using DOS-style short mode. If the path
45392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45393  # take no chances and rewrite it.
45394  # Note: m4 eats our [], so we need to use [ and ] instead.
45395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45396  if test "x$has_forbidden_chars" != x; then
45397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45399  fi
45400
45401    # Output is in $new_path
45402
45403  windows_path="$new_path"
45404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45405    unix_path=`$CYGPATH -u "$windows_path"`
45406    new_path="$unix_path"
45407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45409    new_path="$unix_path"
45410  fi
45411
45412    # remove trailing .exe if any
45413    new_path="${new_path/%.exe/}"
45414
45415    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45416    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45417  fi
45418
45419    else
45420      # We're on a unix platform. Hooray! :)
45421      # First separate the path from the arguments. This will split at the first
45422      # space.
45423      complete="$BUILD_CC"
45424      path="${complete%% *}"
45425      tmp="$complete EOL"
45426      arguments="${tmp#* }"
45427
45428      # Cannot rely on the command "which" here since it doesn't always work.
45429      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45430      if test -z "$is_absolute_path"; then
45431        # Path to executable is not absolute. Find it.
45432        IFS_save="$IFS"
45433        IFS=:
45434        for p in $PATH; do
45435          if test -f "$p/$path" && test -x "$p/$path"; then
45436            new_path="$p/$path"
45437            break
45438          fi
45439        done
45440        IFS="$IFS_save"
45441      else
45442        # This is an absolute path, we can use it without further modifications.
45443        new_path="$path"
45444      fi
45445
45446      if test "x$new_path" = x; then
45447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45448$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45449        has_space=`$ECHO "$complete" | $GREP " "`
45450        if test "x$has_space" != x; then
45451          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45452$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45453        fi
45454        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45455      fi
45456    fi
45457
45458    # Now join together the path and the arguments once again
45459    if test "x$arguments" != xEOL; then
45460      new_complete="$new_path ${arguments% *}"
45461    else
45462      new_complete="$new_path"
45463    fi
45464
45465    if test "x$complete" != "x$new_complete"; then
45466      BUILD_CC="$new_complete"
45467      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45468$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45469    fi
45470  fi
45471
45472
45473
45474
45475  # Publish this variable in the help.
45476
45477
45478  if [ -z "${BUILD_CXX+x}" ]; then
45479    # The variable is not set by user, try to locate tool using the code snippet
45480    for ac_prog in cl CC g++
45481do
45482  # Extract the first word of "$ac_prog", so it can be a program name with args.
45483set dummy $ac_prog; ac_word=$2
45484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45485$as_echo_n "checking for $ac_word... " >&6; }
45486if ${ac_cv_path_BUILD_CXX+:} false; then :
45487  $as_echo_n "(cached) " >&6
45488else
45489  case $BUILD_CXX in
45490  [\\/]* | ?:[\\/]*)
45491  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45492  ;;
45493  *)
45494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45495for as_dir in $PATH
45496do
45497  IFS=$as_save_IFS
45498  test -z "$as_dir" && as_dir=.
45499    for ac_exec_ext in '' $ac_executable_extensions; do
45500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45501    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45503    break 2
45504  fi
45505done
45506  done
45507IFS=$as_save_IFS
45508
45509  ;;
45510esac
45511fi
45512BUILD_CXX=$ac_cv_path_BUILD_CXX
45513if test -n "$BUILD_CXX"; then
45514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45515$as_echo "$BUILD_CXX" >&6; }
45516else
45517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45518$as_echo "no" >&6; }
45519fi
45520
45521
45522  test -n "$BUILD_CXX" && break
45523done
45524
45525  else
45526    # The variable is set, but is it from the command line or the environment?
45527
45528    # Try to remove the string !BUILD_CXX! from our list.
45529    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45530    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45531      # If it failed, the variable was not from the command line. Ignore it,
45532      # but warn the user (except for BASH, which is always set by the calling BASH).
45533      if test "xBUILD_CXX" != xBASH; then
45534        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45535$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45536      fi
45537      # Try to locate tool using the code snippet
45538      for ac_prog in cl CC g++
45539do
45540  # Extract the first word of "$ac_prog", so it can be a program name with args.
45541set dummy $ac_prog; ac_word=$2
45542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45543$as_echo_n "checking for $ac_word... " >&6; }
45544if ${ac_cv_path_BUILD_CXX+:} false; then :
45545  $as_echo_n "(cached) " >&6
45546else
45547  case $BUILD_CXX in
45548  [\\/]* | ?:[\\/]*)
45549  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45550  ;;
45551  *)
45552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45553for as_dir in $PATH
45554do
45555  IFS=$as_save_IFS
45556  test -z "$as_dir" && as_dir=.
45557    for ac_exec_ext in '' $ac_executable_extensions; do
45558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45559    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45561    break 2
45562  fi
45563done
45564  done
45565IFS=$as_save_IFS
45566
45567  ;;
45568esac
45569fi
45570BUILD_CXX=$ac_cv_path_BUILD_CXX
45571if test -n "$BUILD_CXX"; then
45572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45573$as_echo "$BUILD_CXX" >&6; }
45574else
45575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45576$as_echo "no" >&6; }
45577fi
45578
45579
45580  test -n "$BUILD_CXX" && break
45581done
45582
45583    else
45584      # If it succeeded, then it was overridden by the user. We will use it
45585      # for the tool.
45586
45587      # First remove it from the list of overridden variables, so we can test
45588      # for unknown variables in the end.
45589      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45590
45591      # Check if we try to supply an empty value
45592      if test "x$BUILD_CXX" = x; then
45593        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45594$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45596$as_echo_n "checking for BUILD_CXX... " >&6; }
45597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45598$as_echo "disabled" >&6; }
45599      else
45600        # Check if the provided tool contains a complete path.
45601        tool_specified="$BUILD_CXX"
45602        tool_basename="${tool_specified##*/}"
45603        if test "x$tool_basename" = "x$tool_specified"; then
45604          # A command without a complete path is provided, search $PATH.
45605          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45606$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45607          # Extract the first word of "$tool_basename", so it can be a program name with args.
45608set dummy $tool_basename; ac_word=$2
45609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45610$as_echo_n "checking for $ac_word... " >&6; }
45611if ${ac_cv_path_BUILD_CXX+:} false; then :
45612  $as_echo_n "(cached) " >&6
45613else
45614  case $BUILD_CXX in
45615  [\\/]* | ?:[\\/]*)
45616  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45617  ;;
45618  *)
45619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45620for as_dir in $PATH
45621do
45622  IFS=$as_save_IFS
45623  test -z "$as_dir" && as_dir=.
45624    for ac_exec_ext in '' $ac_executable_extensions; do
45625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45626    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45628    break 2
45629  fi
45630done
45631  done
45632IFS=$as_save_IFS
45633
45634  ;;
45635esac
45636fi
45637BUILD_CXX=$ac_cv_path_BUILD_CXX
45638if test -n "$BUILD_CXX"; then
45639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45640$as_echo "$BUILD_CXX" >&6; }
45641else
45642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45643$as_echo "no" >&6; }
45644fi
45645
45646
45647          if test "x$BUILD_CXX" = x; then
45648            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45649          fi
45650        else
45651          # Otherwise we believe it is a complete path. Use it as it is.
45652          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45653$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45654          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45655$as_echo_n "checking for BUILD_CXX... " >&6; }
45656          if test ! -x "$tool_specified"; then
45657            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45658$as_echo "not found" >&6; }
45659            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45660          fi
45661          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45662$as_echo "$tool_specified" >&6; }
45663        fi
45664      fi
45665    fi
45666
45667  fi
45668
45669
45670
45671  if test "x$BUILD_CXX" = x; then
45672    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45673  fi
45674
45675
45676
45677  # Only process if variable expands to non-empty
45678
45679  if test "x$BUILD_CXX" != x; then
45680    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45681
45682  # First separate the path from the arguments. This will split at the first
45683  # space.
45684  complete="$BUILD_CXX"
45685  path="${complete%% *}"
45686  tmp="$complete EOL"
45687  arguments="${tmp#* }"
45688
45689  # Input might be given as Windows format, start by converting to
45690  # unix format.
45691  new_path=`$CYGPATH -u "$path"`
45692
45693  # Now try to locate executable using which
45694  new_path=`$WHICH "$new_path" 2> /dev/null`
45695  # bat and cmd files are not always considered executable in cygwin causing which
45696  # to not find them
45697  if test "x$new_path" = x \
45698      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45699      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45700    new_path=`$CYGPATH -u "$path"`
45701  fi
45702  if test "x$new_path" = x; then
45703    # Oops. Which didn't find the executable.
45704    # The splitting of arguments from the executable at a space might have been incorrect,
45705    # since paths with space are more likely in Windows. Give it another try with the whole
45706    # argument.
45707    path="$complete"
45708    arguments="EOL"
45709    new_path=`$CYGPATH -u "$path"`
45710    new_path=`$WHICH "$new_path" 2> /dev/null`
45711    # bat and cmd files are not always considered executable in cygwin causing which
45712    # to not find them
45713    if test "x$new_path" = x \
45714        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45715        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45716      new_path=`$CYGPATH -u "$path"`
45717    fi
45718    if test "x$new_path" = x; then
45719      # It's still not found. Now this is an unrecoverable error.
45720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45721$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45722      has_space=`$ECHO "$complete" | $GREP " "`
45723      if test "x$has_space" != x; then
45724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45726      fi
45727      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45728    fi
45729  fi
45730
45731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45734  # "foo.exe" is OK but "foo" is an error.
45735  #
45736  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45737  # It is also a way to make sure we got the proper file name for the real test later on.
45738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45739  if test "x$test_shortpath" = x; then
45740    # Short path failed, file does not exist as specified.
45741    # Try adding .exe or .cmd
45742    if test -f "${new_path}.exe"; then
45743      input_to_shortpath="${new_path}.exe"
45744    elif test -f "${new_path}.cmd"; then
45745      input_to_shortpath="${new_path}.cmd"
45746    else
45747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45748$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45749      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45750$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45751      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45752    fi
45753  else
45754    input_to_shortpath="$new_path"
45755  fi
45756
45757  # Call helper function which possibly converts this using DOS-style short mode.
45758  # If so, the updated path is stored in $new_path.
45759  new_path="$input_to_shortpath"
45760
45761  input_path="$input_to_shortpath"
45762  # Check if we need to convert this using DOS-style short mode. If the path
45763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45764  # take no chances and rewrite it.
45765  # Note: m4 eats our [], so we need to use [ and ] instead.
45766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45767  if test "x$has_forbidden_chars" != x; then
45768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45772      # Going to short mode and back again did indeed matter. Since short mode is
45773      # case insensitive, let's make it lowercase to improve readability.
45774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45775      # Now convert it back to Unix-style (cygpath)
45776      input_path=`$CYGPATH -u "$shortmode_path"`
45777      new_path="$input_path"
45778    fi
45779  fi
45780
45781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45782  if test "x$test_cygdrive_prefix" = x; then
45783    # As a simple fix, exclude /usr/bin since it's not a real path.
45784    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45786      # a path prefixed by /cygdrive for fixpath to work.
45787      new_path="$CYGWIN_ROOT_PATH$input_path"
45788    fi
45789  fi
45790
45791  # remove trailing .exe if any
45792  new_path="${new_path/%.exe/}"
45793
45794    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45795
45796  # First separate the path from the arguments. This will split at the first
45797  # space.
45798  complete="$BUILD_CXX"
45799  path="${complete%% *}"
45800  tmp="$complete EOL"
45801  arguments="${tmp#* }"
45802
45803  # Input might be given as Windows format, start by converting to
45804  # unix format.
45805  new_path="$path"
45806
45807  windows_path="$new_path"
45808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45809    unix_path=`$CYGPATH -u "$windows_path"`
45810    new_path="$unix_path"
45811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45813    new_path="$unix_path"
45814  fi
45815
45816
45817  # Now try to locate executable using which
45818  new_path=`$WHICH "$new_path" 2> /dev/null`
45819
45820  if test "x$new_path" = x; then
45821    # Oops. Which didn't find the executable.
45822    # The splitting of arguments from the executable at a space might have been incorrect,
45823    # since paths with space are more likely in Windows. Give it another try with the whole
45824    # argument.
45825    path="$complete"
45826    arguments="EOL"
45827    new_path="$path"
45828
45829  windows_path="$new_path"
45830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45831    unix_path=`$CYGPATH -u "$windows_path"`
45832    new_path="$unix_path"
45833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45835    new_path="$unix_path"
45836  fi
45837
45838
45839    new_path=`$WHICH "$new_path" 2> /dev/null`
45840    # bat and cmd files are not always considered executable in MSYS causing which
45841    # to not find them
45842    if test "x$new_path" = x \
45843        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45844        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45845      new_path="$path"
45846
45847  windows_path="$new_path"
45848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45849    unix_path=`$CYGPATH -u "$windows_path"`
45850    new_path="$unix_path"
45851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45853    new_path="$unix_path"
45854  fi
45855
45856    fi
45857
45858    if test "x$new_path" = x; then
45859      # It's still not found. Now this is an unrecoverable error.
45860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45861$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45862      has_space=`$ECHO "$complete" | $GREP " "`
45863      if test "x$has_space" != x; then
45864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45866      fi
45867      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45868    fi
45869  fi
45870
45871  # Now new_path has a complete unix path to the binary
45872  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45873    # Keep paths in /bin as-is, but remove trailing .exe if any
45874    new_path="${new_path/%.exe/}"
45875    # Do not save /bin paths to all_fixpath_prefixes!
45876  else
45877    # Not in mixed or Windows style, start by that.
45878    new_path=`cmd //c echo $new_path`
45879
45880  input_path="$new_path"
45881  # Check if we need to convert this using DOS-style short mode. If the path
45882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45883  # take no chances and rewrite it.
45884  # Note: m4 eats our [], so we need to use [ and ] instead.
45885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45886  if test "x$has_forbidden_chars" != x; then
45887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45889  fi
45890
45891    # Output is in $new_path
45892
45893  windows_path="$new_path"
45894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45895    unix_path=`$CYGPATH -u "$windows_path"`
45896    new_path="$unix_path"
45897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45899    new_path="$unix_path"
45900  fi
45901
45902    # remove trailing .exe if any
45903    new_path="${new_path/%.exe/}"
45904
45905    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45906    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45907  fi
45908
45909    else
45910      # We're on a unix platform. Hooray! :)
45911      # First separate the path from the arguments. This will split at the first
45912      # space.
45913      complete="$BUILD_CXX"
45914      path="${complete%% *}"
45915      tmp="$complete EOL"
45916      arguments="${tmp#* }"
45917
45918      # Cannot rely on the command "which" here since it doesn't always work.
45919      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45920      if test -z "$is_absolute_path"; then
45921        # Path to executable is not absolute. Find it.
45922        IFS_save="$IFS"
45923        IFS=:
45924        for p in $PATH; do
45925          if test -f "$p/$path" && test -x "$p/$path"; then
45926            new_path="$p/$path"
45927            break
45928          fi
45929        done
45930        IFS="$IFS_save"
45931      else
45932        # This is an absolute path, we can use it without further modifications.
45933        new_path="$path"
45934      fi
45935
45936      if test "x$new_path" = x; then
45937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45938$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45939        has_space=`$ECHO "$complete" | $GREP " "`
45940        if test "x$has_space" != x; then
45941          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45942$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45943        fi
45944        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45945      fi
45946    fi
45947
45948    # Now join together the path and the arguments once again
45949    if test "x$arguments" != xEOL; then
45950      new_complete="$new_path ${arguments% *}"
45951    else
45952      new_complete="$new_path"
45953    fi
45954
45955    if test "x$complete" != "x$new_complete"; then
45956      BUILD_CXX="$new_complete"
45957      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45958$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45959    fi
45960  fi
45961
45962
45963
45964  # Publish this variable in the help.
45965
45966
45967  if [ -z "${BUILD_NM+x}" ]; then
45968    # The variable is not set by user, try to locate tool using the code snippet
45969    for ac_prog in nm gcc-nm
45970do
45971  # Extract the first word of "$ac_prog", so it can be a program name with args.
45972set dummy $ac_prog; ac_word=$2
45973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45974$as_echo_n "checking for $ac_word... " >&6; }
45975if ${ac_cv_path_BUILD_NM+:} false; then :
45976  $as_echo_n "(cached) " >&6
45977else
45978  case $BUILD_NM in
45979  [\\/]* | ?:[\\/]*)
45980  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45981  ;;
45982  *)
45983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45984for as_dir in $PATH
45985do
45986  IFS=$as_save_IFS
45987  test -z "$as_dir" && as_dir=.
45988    for ac_exec_ext in '' $ac_executable_extensions; do
45989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45990    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45992    break 2
45993  fi
45994done
45995  done
45996IFS=$as_save_IFS
45997
45998  ;;
45999esac
46000fi
46001BUILD_NM=$ac_cv_path_BUILD_NM
46002if test -n "$BUILD_NM"; then
46003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46004$as_echo "$BUILD_NM" >&6; }
46005else
46006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46007$as_echo "no" >&6; }
46008fi
46009
46010
46011  test -n "$BUILD_NM" && break
46012done
46013
46014  else
46015    # The variable is set, but is it from the command line or the environment?
46016
46017    # Try to remove the string !BUILD_NM! from our list.
46018    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
46019    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46020      # If it failed, the variable was not from the command line. Ignore it,
46021      # but warn the user (except for BASH, which is always set by the calling BASH).
46022      if test "xBUILD_NM" != xBASH; then
46023        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
46024$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
46025      fi
46026      # Try to locate tool using the code snippet
46027      for ac_prog in nm gcc-nm
46028do
46029  # Extract the first word of "$ac_prog", so it can be a program name with args.
46030set dummy $ac_prog; ac_word=$2
46031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46032$as_echo_n "checking for $ac_word... " >&6; }
46033if ${ac_cv_path_BUILD_NM+:} false; then :
46034  $as_echo_n "(cached) " >&6
46035else
46036  case $BUILD_NM in
46037  [\\/]* | ?:[\\/]*)
46038  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46039  ;;
46040  *)
46041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46042for as_dir in $PATH
46043do
46044  IFS=$as_save_IFS
46045  test -z "$as_dir" && as_dir=.
46046    for ac_exec_ext in '' $ac_executable_extensions; do
46047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46048    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46050    break 2
46051  fi
46052done
46053  done
46054IFS=$as_save_IFS
46055
46056  ;;
46057esac
46058fi
46059BUILD_NM=$ac_cv_path_BUILD_NM
46060if test -n "$BUILD_NM"; then
46061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46062$as_echo "$BUILD_NM" >&6; }
46063else
46064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46065$as_echo "no" >&6; }
46066fi
46067
46068
46069  test -n "$BUILD_NM" && break
46070done
46071
46072    else
46073      # If it succeeded, then it was overridden by the user. We will use it
46074      # for the tool.
46075
46076      # First remove it from the list of overridden variables, so we can test
46077      # for unknown variables in the end.
46078      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46079
46080      # Check if we try to supply an empty value
46081      if test "x$BUILD_NM" = x; then
46082        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46083$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46084        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46085$as_echo_n "checking for BUILD_NM... " >&6; }
46086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46087$as_echo "disabled" >&6; }
46088      else
46089        # Check if the provided tool contains a complete path.
46090        tool_specified="$BUILD_NM"
46091        tool_basename="${tool_specified##*/}"
46092        if test "x$tool_basename" = "x$tool_specified"; then
46093          # A command without a complete path is provided, search $PATH.
46094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46095$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46096          # Extract the first word of "$tool_basename", so it can be a program name with args.
46097set dummy $tool_basename; ac_word=$2
46098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46099$as_echo_n "checking for $ac_word... " >&6; }
46100if ${ac_cv_path_BUILD_NM+:} false; then :
46101  $as_echo_n "(cached) " >&6
46102else
46103  case $BUILD_NM in
46104  [\\/]* | ?:[\\/]*)
46105  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46106  ;;
46107  *)
46108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46109for as_dir in $PATH
46110do
46111  IFS=$as_save_IFS
46112  test -z "$as_dir" && as_dir=.
46113    for ac_exec_ext in '' $ac_executable_extensions; do
46114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46115    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46117    break 2
46118  fi
46119done
46120  done
46121IFS=$as_save_IFS
46122
46123  ;;
46124esac
46125fi
46126BUILD_NM=$ac_cv_path_BUILD_NM
46127if test -n "$BUILD_NM"; then
46128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46129$as_echo "$BUILD_NM" >&6; }
46130else
46131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46132$as_echo "no" >&6; }
46133fi
46134
46135
46136          if test "x$BUILD_NM" = x; then
46137            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46138          fi
46139        else
46140          # Otherwise we believe it is a complete path. Use it as it is.
46141          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
46142$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
46143          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46144$as_echo_n "checking for BUILD_NM... " >&6; }
46145          if test ! -x "$tool_specified"; then
46146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46147$as_echo "not found" >&6; }
46148            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
46149          fi
46150          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46151$as_echo "$tool_specified" >&6; }
46152        fi
46153      fi
46154    fi
46155
46156  fi
46157
46158
46159
46160  # Only process if variable expands to non-empty
46161
46162  if test "x$BUILD_NM" != x; then
46163    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46164
46165  # First separate the path from the arguments. This will split at the first
46166  # space.
46167  complete="$BUILD_NM"
46168  path="${complete%% *}"
46169  tmp="$complete EOL"
46170  arguments="${tmp#* }"
46171
46172  # Input might be given as Windows format, start by converting to
46173  # unix format.
46174  new_path=`$CYGPATH -u "$path"`
46175
46176  # Now try to locate executable using which
46177  new_path=`$WHICH "$new_path" 2> /dev/null`
46178  # bat and cmd files are not always considered executable in cygwin causing which
46179  # to not find them
46180  if test "x$new_path" = x \
46181      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46182      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46183    new_path=`$CYGPATH -u "$path"`
46184  fi
46185  if test "x$new_path" = x; then
46186    # Oops. Which didn't find the executable.
46187    # The splitting of arguments from the executable at a space might have been incorrect,
46188    # since paths with space are more likely in Windows. Give it another try with the whole
46189    # argument.
46190    path="$complete"
46191    arguments="EOL"
46192    new_path=`$CYGPATH -u "$path"`
46193    new_path=`$WHICH "$new_path" 2> /dev/null`
46194    # bat and cmd files are not always considered executable in cygwin causing which
46195    # to not find them
46196    if test "x$new_path" = x \
46197        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46198        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46199      new_path=`$CYGPATH -u "$path"`
46200    fi
46201    if test "x$new_path" = x; then
46202      # It's still not found. Now this is an unrecoverable error.
46203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46204$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46205      has_space=`$ECHO "$complete" | $GREP " "`
46206      if test "x$has_space" != x; then
46207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46209      fi
46210      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46211    fi
46212  fi
46213
46214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46217  # "foo.exe" is OK but "foo" is an error.
46218  #
46219  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46220  # It is also a way to make sure we got the proper file name for the real test later on.
46221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46222  if test "x$test_shortpath" = x; then
46223    # Short path failed, file does not exist as specified.
46224    # Try adding .exe or .cmd
46225    if test -f "${new_path}.exe"; then
46226      input_to_shortpath="${new_path}.exe"
46227    elif test -f "${new_path}.cmd"; then
46228      input_to_shortpath="${new_path}.cmd"
46229    else
46230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46231$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46232      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46233$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46234      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46235    fi
46236  else
46237    input_to_shortpath="$new_path"
46238  fi
46239
46240  # Call helper function which possibly converts this using DOS-style short mode.
46241  # If so, the updated path is stored in $new_path.
46242  new_path="$input_to_shortpath"
46243
46244  input_path="$input_to_shortpath"
46245  # Check if we need to convert this using DOS-style short mode. If the path
46246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46247  # take no chances and rewrite it.
46248  # Note: m4 eats our [], so we need to use [ and ] instead.
46249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46250  if test "x$has_forbidden_chars" != x; then
46251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46255      # Going to short mode and back again did indeed matter. Since short mode is
46256      # case insensitive, let's make it lowercase to improve readability.
46257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46258      # Now convert it back to Unix-style (cygpath)
46259      input_path=`$CYGPATH -u "$shortmode_path"`
46260      new_path="$input_path"
46261    fi
46262  fi
46263
46264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46265  if test "x$test_cygdrive_prefix" = x; then
46266    # As a simple fix, exclude /usr/bin since it's not a real path.
46267    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46269      # a path prefixed by /cygdrive for fixpath to work.
46270      new_path="$CYGWIN_ROOT_PATH$input_path"
46271    fi
46272  fi
46273
46274  # remove trailing .exe if any
46275  new_path="${new_path/%.exe/}"
46276
46277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46278
46279  # First separate the path from the arguments. This will split at the first
46280  # space.
46281  complete="$BUILD_NM"
46282  path="${complete%% *}"
46283  tmp="$complete EOL"
46284  arguments="${tmp#* }"
46285
46286  # Input might be given as Windows format, start by converting to
46287  # unix format.
46288  new_path="$path"
46289
46290  windows_path="$new_path"
46291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46292    unix_path=`$CYGPATH -u "$windows_path"`
46293    new_path="$unix_path"
46294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46296    new_path="$unix_path"
46297  fi
46298
46299
46300  # Now try to locate executable using which
46301  new_path=`$WHICH "$new_path" 2> /dev/null`
46302
46303  if test "x$new_path" = x; then
46304    # Oops. Which didn't find the executable.
46305    # The splitting of arguments from the executable at a space might have been incorrect,
46306    # since paths with space are more likely in Windows. Give it another try with the whole
46307    # argument.
46308    path="$complete"
46309    arguments="EOL"
46310    new_path="$path"
46311
46312  windows_path="$new_path"
46313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46314    unix_path=`$CYGPATH -u "$windows_path"`
46315    new_path="$unix_path"
46316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46318    new_path="$unix_path"
46319  fi
46320
46321
46322    new_path=`$WHICH "$new_path" 2> /dev/null`
46323    # bat and cmd files are not always considered executable in MSYS causing which
46324    # to not find them
46325    if test "x$new_path" = x \
46326        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46327        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46328      new_path="$path"
46329
46330  windows_path="$new_path"
46331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46332    unix_path=`$CYGPATH -u "$windows_path"`
46333    new_path="$unix_path"
46334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46336    new_path="$unix_path"
46337  fi
46338
46339    fi
46340
46341    if test "x$new_path" = x; then
46342      # It's still not found. Now this is an unrecoverable error.
46343      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46344$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46345      has_space=`$ECHO "$complete" | $GREP " "`
46346      if test "x$has_space" != x; then
46347        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46348$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46349      fi
46350      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46351    fi
46352  fi
46353
46354  # Now new_path has a complete unix path to the binary
46355  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46356    # Keep paths in /bin as-is, but remove trailing .exe if any
46357    new_path="${new_path/%.exe/}"
46358    # Do not save /bin paths to all_fixpath_prefixes!
46359  else
46360    # Not in mixed or Windows style, start by that.
46361    new_path=`cmd //c echo $new_path`
46362
46363  input_path="$new_path"
46364  # Check if we need to convert this using DOS-style short mode. If the path
46365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46366  # take no chances and rewrite it.
46367  # Note: m4 eats our [], so we need to use [ and ] instead.
46368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46369  if test "x$has_forbidden_chars" != x; then
46370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46371    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46372  fi
46373
46374    # Output is in $new_path
46375
46376  windows_path="$new_path"
46377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46378    unix_path=`$CYGPATH -u "$windows_path"`
46379    new_path="$unix_path"
46380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46382    new_path="$unix_path"
46383  fi
46384
46385    # remove trailing .exe if any
46386    new_path="${new_path/%.exe/}"
46387
46388    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46389    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46390  fi
46391
46392    else
46393      # We're on a unix platform. Hooray! :)
46394      # First separate the path from the arguments. This will split at the first
46395      # space.
46396      complete="$BUILD_NM"
46397      path="${complete%% *}"
46398      tmp="$complete EOL"
46399      arguments="${tmp#* }"
46400
46401      # Cannot rely on the command "which" here since it doesn't always work.
46402      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46403      if test -z "$is_absolute_path"; then
46404        # Path to executable is not absolute. Find it.
46405        IFS_save="$IFS"
46406        IFS=:
46407        for p in $PATH; do
46408          if test -f "$p/$path" && test -x "$p/$path"; then
46409            new_path="$p/$path"
46410            break
46411          fi
46412        done
46413        IFS="$IFS_save"
46414      else
46415        # This is an absolute path, we can use it without further modifications.
46416        new_path="$path"
46417      fi
46418
46419      if test "x$new_path" = x; then
46420        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46421$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46422        has_space=`$ECHO "$complete" | $GREP " "`
46423        if test "x$has_space" != x; then
46424          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46425$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46426        fi
46427        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46428      fi
46429    fi
46430
46431    # Now join together the path and the arguments once again
46432    if test "x$arguments" != xEOL; then
46433      new_complete="$new_path ${arguments% *}"
46434    else
46435      new_complete="$new_path"
46436    fi
46437
46438    if test "x$complete" != "x$new_complete"; then
46439      BUILD_NM="$new_complete"
46440      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46441$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46442    fi
46443  fi
46444
46445
46446
46447  # Publish this variable in the help.
46448
46449
46450  if [ -z "${BUILD_AR+x}" ]; then
46451    # The variable is not set by user, try to locate tool using the code snippet
46452    for ac_prog in ar gcc-ar
46453do
46454  # Extract the first word of "$ac_prog", so it can be a program name with args.
46455set dummy $ac_prog; ac_word=$2
46456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46457$as_echo_n "checking for $ac_word... " >&6; }
46458if ${ac_cv_path_BUILD_AR+:} false; then :
46459  $as_echo_n "(cached) " >&6
46460else
46461  case $BUILD_AR in
46462  [\\/]* | ?:[\\/]*)
46463  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46464  ;;
46465  *)
46466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46467for as_dir in $PATH
46468do
46469  IFS=$as_save_IFS
46470  test -z "$as_dir" && as_dir=.
46471    for ac_exec_ext in '' $ac_executable_extensions; do
46472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46473    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46475    break 2
46476  fi
46477done
46478  done
46479IFS=$as_save_IFS
46480
46481  ;;
46482esac
46483fi
46484BUILD_AR=$ac_cv_path_BUILD_AR
46485if test -n "$BUILD_AR"; then
46486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46487$as_echo "$BUILD_AR" >&6; }
46488else
46489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46490$as_echo "no" >&6; }
46491fi
46492
46493
46494  test -n "$BUILD_AR" && break
46495done
46496
46497  else
46498    # The variable is set, but is it from the command line or the environment?
46499
46500    # Try to remove the string !BUILD_AR! from our list.
46501    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46502    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46503      # If it failed, the variable was not from the command line. Ignore it,
46504      # but warn the user (except for BASH, which is always set by the calling BASH).
46505      if test "xBUILD_AR" != xBASH; then
46506        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46507$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46508      fi
46509      # Try to locate tool using the code snippet
46510      for ac_prog in ar gcc-ar
46511do
46512  # Extract the first word of "$ac_prog", so it can be a program name with args.
46513set dummy $ac_prog; ac_word=$2
46514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46515$as_echo_n "checking for $ac_word... " >&6; }
46516if ${ac_cv_path_BUILD_AR+:} false; then :
46517  $as_echo_n "(cached) " >&6
46518else
46519  case $BUILD_AR in
46520  [\\/]* | ?:[\\/]*)
46521  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46522  ;;
46523  *)
46524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46525for as_dir in $PATH
46526do
46527  IFS=$as_save_IFS
46528  test -z "$as_dir" && as_dir=.
46529    for ac_exec_ext in '' $ac_executable_extensions; do
46530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46531    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46533    break 2
46534  fi
46535done
46536  done
46537IFS=$as_save_IFS
46538
46539  ;;
46540esac
46541fi
46542BUILD_AR=$ac_cv_path_BUILD_AR
46543if test -n "$BUILD_AR"; then
46544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46545$as_echo "$BUILD_AR" >&6; }
46546else
46547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46548$as_echo "no" >&6; }
46549fi
46550
46551
46552  test -n "$BUILD_AR" && break
46553done
46554
46555    else
46556      # If it succeeded, then it was overridden by the user. We will use it
46557      # for the tool.
46558
46559      # First remove it from the list of overridden variables, so we can test
46560      # for unknown variables in the end.
46561      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46562
46563      # Check if we try to supply an empty value
46564      if test "x$BUILD_AR" = x; then
46565        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46566$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46567        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46568$as_echo_n "checking for BUILD_AR... " >&6; }
46569        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46570$as_echo "disabled" >&6; }
46571      else
46572        # Check if the provided tool contains a complete path.
46573        tool_specified="$BUILD_AR"
46574        tool_basename="${tool_specified##*/}"
46575        if test "x$tool_basename" = "x$tool_specified"; then
46576          # A command without a complete path is provided, search $PATH.
46577          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46578$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46579          # Extract the first word of "$tool_basename", so it can be a program name with args.
46580set dummy $tool_basename; ac_word=$2
46581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46582$as_echo_n "checking for $ac_word... " >&6; }
46583if ${ac_cv_path_BUILD_AR+:} false; then :
46584  $as_echo_n "(cached) " >&6
46585else
46586  case $BUILD_AR in
46587  [\\/]* | ?:[\\/]*)
46588  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46589  ;;
46590  *)
46591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46592for as_dir in $PATH
46593do
46594  IFS=$as_save_IFS
46595  test -z "$as_dir" && as_dir=.
46596    for ac_exec_ext in '' $ac_executable_extensions; do
46597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46598    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46600    break 2
46601  fi
46602done
46603  done
46604IFS=$as_save_IFS
46605
46606  ;;
46607esac
46608fi
46609BUILD_AR=$ac_cv_path_BUILD_AR
46610if test -n "$BUILD_AR"; then
46611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46612$as_echo "$BUILD_AR" >&6; }
46613else
46614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46615$as_echo "no" >&6; }
46616fi
46617
46618
46619          if test "x$BUILD_AR" = x; then
46620            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46621          fi
46622        else
46623          # Otherwise we believe it is a complete path. Use it as it is.
46624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46625$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46626          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46627$as_echo_n "checking for BUILD_AR... " >&6; }
46628          if test ! -x "$tool_specified"; then
46629            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46630$as_echo "not found" >&6; }
46631            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46632          fi
46633          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46634$as_echo "$tool_specified" >&6; }
46635        fi
46636      fi
46637    fi
46638
46639  fi
46640
46641
46642
46643  # Only process if variable expands to non-empty
46644
46645  if test "x$BUILD_AR" != x; then
46646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46647
46648  # First separate the path from the arguments. This will split at the first
46649  # space.
46650  complete="$BUILD_AR"
46651  path="${complete%% *}"
46652  tmp="$complete EOL"
46653  arguments="${tmp#* }"
46654
46655  # Input might be given as Windows format, start by converting to
46656  # unix format.
46657  new_path=`$CYGPATH -u "$path"`
46658
46659  # Now try to locate executable using which
46660  new_path=`$WHICH "$new_path" 2> /dev/null`
46661  # bat and cmd files are not always considered executable in cygwin causing which
46662  # to not find them
46663  if test "x$new_path" = x \
46664      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46665      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46666    new_path=`$CYGPATH -u "$path"`
46667  fi
46668  if test "x$new_path" = x; then
46669    # Oops. Which didn't find the executable.
46670    # The splitting of arguments from the executable at a space might have been incorrect,
46671    # since paths with space are more likely in Windows. Give it another try with the whole
46672    # argument.
46673    path="$complete"
46674    arguments="EOL"
46675    new_path=`$CYGPATH -u "$path"`
46676    new_path=`$WHICH "$new_path" 2> /dev/null`
46677    # bat and cmd files are not always considered executable in cygwin causing which
46678    # to not find them
46679    if test "x$new_path" = x \
46680        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46681        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46682      new_path=`$CYGPATH -u "$path"`
46683    fi
46684    if test "x$new_path" = x; then
46685      # It's still not found. Now this is an unrecoverable error.
46686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46687$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46688      has_space=`$ECHO "$complete" | $GREP " "`
46689      if test "x$has_space" != x; then
46690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46692      fi
46693      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46694    fi
46695  fi
46696
46697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46700  # "foo.exe" is OK but "foo" is an error.
46701  #
46702  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46703  # It is also a way to make sure we got the proper file name for the real test later on.
46704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46705  if test "x$test_shortpath" = x; then
46706    # Short path failed, file does not exist as specified.
46707    # Try adding .exe or .cmd
46708    if test -f "${new_path}.exe"; then
46709      input_to_shortpath="${new_path}.exe"
46710    elif test -f "${new_path}.cmd"; then
46711      input_to_shortpath="${new_path}.cmd"
46712    else
46713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46714$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46715      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46716$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46717      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46718    fi
46719  else
46720    input_to_shortpath="$new_path"
46721  fi
46722
46723  # Call helper function which possibly converts this using DOS-style short mode.
46724  # If so, the updated path is stored in $new_path.
46725  new_path="$input_to_shortpath"
46726
46727  input_path="$input_to_shortpath"
46728  # Check if we need to convert this using DOS-style short mode. If the path
46729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46730  # take no chances and rewrite it.
46731  # Note: m4 eats our [], so we need to use [ and ] instead.
46732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46733  if test "x$has_forbidden_chars" != x; then
46734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46738      # Going to short mode and back again did indeed matter. Since short mode is
46739      # case insensitive, let's make it lowercase to improve readability.
46740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46741      # Now convert it back to Unix-style (cygpath)
46742      input_path=`$CYGPATH -u "$shortmode_path"`
46743      new_path="$input_path"
46744    fi
46745  fi
46746
46747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46748  if test "x$test_cygdrive_prefix" = x; then
46749    # As a simple fix, exclude /usr/bin since it's not a real path.
46750    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46752      # a path prefixed by /cygdrive for fixpath to work.
46753      new_path="$CYGWIN_ROOT_PATH$input_path"
46754    fi
46755  fi
46756
46757  # remove trailing .exe if any
46758  new_path="${new_path/%.exe/}"
46759
46760    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46761
46762  # First separate the path from the arguments. This will split at the first
46763  # space.
46764  complete="$BUILD_AR"
46765  path="${complete%% *}"
46766  tmp="$complete EOL"
46767  arguments="${tmp#* }"
46768
46769  # Input might be given as Windows format, start by converting to
46770  # unix format.
46771  new_path="$path"
46772
46773  windows_path="$new_path"
46774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46775    unix_path=`$CYGPATH -u "$windows_path"`
46776    new_path="$unix_path"
46777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46779    new_path="$unix_path"
46780  fi
46781
46782
46783  # Now try to locate executable using which
46784  new_path=`$WHICH "$new_path" 2> /dev/null`
46785
46786  if test "x$new_path" = x; then
46787    # Oops. Which didn't find the executable.
46788    # The splitting of arguments from the executable at a space might have been incorrect,
46789    # since paths with space are more likely in Windows. Give it another try with the whole
46790    # argument.
46791    path="$complete"
46792    arguments="EOL"
46793    new_path="$path"
46794
46795  windows_path="$new_path"
46796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46797    unix_path=`$CYGPATH -u "$windows_path"`
46798    new_path="$unix_path"
46799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46801    new_path="$unix_path"
46802  fi
46803
46804
46805    new_path=`$WHICH "$new_path" 2> /dev/null`
46806    # bat and cmd files are not always considered executable in MSYS causing which
46807    # to not find them
46808    if test "x$new_path" = x \
46809        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46810        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46811      new_path="$path"
46812
46813  windows_path="$new_path"
46814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46815    unix_path=`$CYGPATH -u "$windows_path"`
46816    new_path="$unix_path"
46817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46819    new_path="$unix_path"
46820  fi
46821
46822    fi
46823
46824    if test "x$new_path" = x; then
46825      # It's still not found. Now this is an unrecoverable error.
46826      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46827$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46828      has_space=`$ECHO "$complete" | $GREP " "`
46829      if test "x$has_space" != x; then
46830        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46831$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46832      fi
46833      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46834    fi
46835  fi
46836
46837  # Now new_path has a complete unix path to the binary
46838  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46839    # Keep paths in /bin as-is, but remove trailing .exe if any
46840    new_path="${new_path/%.exe/}"
46841    # Do not save /bin paths to all_fixpath_prefixes!
46842  else
46843    # Not in mixed or Windows style, start by that.
46844    new_path=`cmd //c echo $new_path`
46845
46846  input_path="$new_path"
46847  # Check if we need to convert this using DOS-style short mode. If the path
46848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46849  # take no chances and rewrite it.
46850  # Note: m4 eats our [], so we need to use [ and ] instead.
46851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46852  if test "x$has_forbidden_chars" != x; then
46853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46854    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46855  fi
46856
46857    # Output is in $new_path
46858
46859  windows_path="$new_path"
46860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46861    unix_path=`$CYGPATH -u "$windows_path"`
46862    new_path="$unix_path"
46863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46865    new_path="$unix_path"
46866  fi
46867
46868    # remove trailing .exe if any
46869    new_path="${new_path/%.exe/}"
46870
46871    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46872    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46873  fi
46874
46875    else
46876      # We're on a unix platform. Hooray! :)
46877      # First separate the path from the arguments. This will split at the first
46878      # space.
46879      complete="$BUILD_AR"
46880      path="${complete%% *}"
46881      tmp="$complete EOL"
46882      arguments="${tmp#* }"
46883
46884      # Cannot rely on the command "which" here since it doesn't always work.
46885      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46886      if test -z "$is_absolute_path"; then
46887        # Path to executable is not absolute. Find it.
46888        IFS_save="$IFS"
46889        IFS=:
46890        for p in $PATH; do
46891          if test -f "$p/$path" && test -x "$p/$path"; then
46892            new_path="$p/$path"
46893            break
46894          fi
46895        done
46896        IFS="$IFS_save"
46897      else
46898        # This is an absolute path, we can use it without further modifications.
46899        new_path="$path"
46900      fi
46901
46902      if test "x$new_path" = x; then
46903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46904$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46905        has_space=`$ECHO "$complete" | $GREP " "`
46906        if test "x$has_space" != x; then
46907          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46908$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46909        fi
46910        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46911      fi
46912    fi
46913
46914    # Now join together the path and the arguments once again
46915    if test "x$arguments" != xEOL; then
46916      new_complete="$new_path ${arguments% *}"
46917    else
46918      new_complete="$new_path"
46919    fi
46920
46921    if test "x$complete" != "x$new_complete"; then
46922      BUILD_AR="$new_complete"
46923      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46924$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46925    fi
46926  fi
46927
46928
46929
46930  # Publish this variable in the help.
46931
46932
46933  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46934    # The variable is not set by user, try to locate tool using the code snippet
46935    for ac_prog in objcopy
46936do
46937  # Extract the first word of "$ac_prog", so it can be a program name with args.
46938set dummy $ac_prog; ac_word=$2
46939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46940$as_echo_n "checking for $ac_word... " >&6; }
46941if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46942  $as_echo_n "(cached) " >&6
46943else
46944  case $BUILD_OBJCOPY in
46945  [\\/]* | ?:[\\/]*)
46946  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46947  ;;
46948  *)
46949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46950for as_dir in $PATH
46951do
46952  IFS=$as_save_IFS
46953  test -z "$as_dir" && as_dir=.
46954    for ac_exec_ext in '' $ac_executable_extensions; do
46955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46956    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46958    break 2
46959  fi
46960done
46961  done
46962IFS=$as_save_IFS
46963
46964  ;;
46965esac
46966fi
46967BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46968if test -n "$BUILD_OBJCOPY"; then
46969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46970$as_echo "$BUILD_OBJCOPY" >&6; }
46971else
46972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46973$as_echo "no" >&6; }
46974fi
46975
46976
46977  test -n "$BUILD_OBJCOPY" && break
46978done
46979
46980  else
46981    # The variable is set, but is it from the command line or the environment?
46982
46983    # Try to remove the string !BUILD_OBJCOPY! from our list.
46984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46986      # If it failed, the variable was not from the command line. Ignore it,
46987      # but warn the user (except for BASH, which is always set by the calling BASH).
46988      if test "xBUILD_OBJCOPY" != xBASH; then
46989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46990$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46991      fi
46992      # Try to locate tool using the code snippet
46993      for ac_prog in objcopy
46994do
46995  # Extract the first word of "$ac_prog", so it can be a program name with args.
46996set dummy $ac_prog; ac_word=$2
46997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46998$as_echo_n "checking for $ac_word... " >&6; }
46999if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47000  $as_echo_n "(cached) " >&6
47001else
47002  case $BUILD_OBJCOPY in
47003  [\\/]* | ?:[\\/]*)
47004  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47005  ;;
47006  *)
47007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47008for as_dir in $PATH
47009do
47010  IFS=$as_save_IFS
47011  test -z "$as_dir" && as_dir=.
47012    for ac_exec_ext in '' $ac_executable_extensions; do
47013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47014    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47016    break 2
47017  fi
47018done
47019  done
47020IFS=$as_save_IFS
47021
47022  ;;
47023esac
47024fi
47025BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47026if test -n "$BUILD_OBJCOPY"; then
47027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47028$as_echo "$BUILD_OBJCOPY" >&6; }
47029else
47030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47031$as_echo "no" >&6; }
47032fi
47033
47034
47035  test -n "$BUILD_OBJCOPY" && break
47036done
47037
47038    else
47039      # If it succeeded, then it was overridden by the user. We will use it
47040      # for the tool.
47041
47042      # First remove it from the list of overridden variables, so we can test
47043      # for unknown variables in the end.
47044      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47045
47046      # Check if we try to supply an empty value
47047      if test "x$BUILD_OBJCOPY" = x; then
47048        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47049$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47050        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47051$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47052        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47053$as_echo "disabled" >&6; }
47054      else
47055        # Check if the provided tool contains a complete path.
47056        tool_specified="$BUILD_OBJCOPY"
47057        tool_basename="${tool_specified##*/}"
47058        if test "x$tool_basename" = "x$tool_specified"; then
47059          # A command without a complete path is provided, search $PATH.
47060          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47061$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47062          # Extract the first word of "$tool_basename", so it can be a program name with args.
47063set dummy $tool_basename; ac_word=$2
47064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47065$as_echo_n "checking for $ac_word... " >&6; }
47066if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47067  $as_echo_n "(cached) " >&6
47068else
47069  case $BUILD_OBJCOPY in
47070  [\\/]* | ?:[\\/]*)
47071  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47072  ;;
47073  *)
47074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47075for as_dir in $PATH
47076do
47077  IFS=$as_save_IFS
47078  test -z "$as_dir" && as_dir=.
47079    for ac_exec_ext in '' $ac_executable_extensions; do
47080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47081    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47083    break 2
47084  fi
47085done
47086  done
47087IFS=$as_save_IFS
47088
47089  ;;
47090esac
47091fi
47092BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47093if test -n "$BUILD_OBJCOPY"; then
47094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47095$as_echo "$BUILD_OBJCOPY" >&6; }
47096else
47097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47098$as_echo "no" >&6; }
47099fi
47100
47101
47102          if test "x$BUILD_OBJCOPY" = x; then
47103            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47104          fi
47105        else
47106          # Otherwise we believe it is a complete path. Use it as it is.
47107          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47108$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47109          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47110$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47111          if test ! -x "$tool_specified"; then
47112            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47113$as_echo "not found" >&6; }
47114            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47115          fi
47116          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47117$as_echo "$tool_specified" >&6; }
47118        fi
47119      fi
47120    fi
47121
47122  fi
47123
47124
47125
47126  # Only process if variable expands to non-empty
47127
47128  if test "x$BUILD_OBJCOPY" != x; then
47129    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47130
47131  # First separate the path from the arguments. This will split at the first
47132  # space.
47133  complete="$BUILD_OBJCOPY"
47134  path="${complete%% *}"
47135  tmp="$complete EOL"
47136  arguments="${tmp#* }"
47137
47138  # Input might be given as Windows format, start by converting to
47139  # unix format.
47140  new_path=`$CYGPATH -u "$path"`
47141
47142  # Now try to locate executable using which
47143  new_path=`$WHICH "$new_path" 2> /dev/null`
47144  # bat and cmd files are not always considered executable in cygwin causing which
47145  # to not find them
47146  if test "x$new_path" = x \
47147      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47148      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47149    new_path=`$CYGPATH -u "$path"`
47150  fi
47151  if test "x$new_path" = x; then
47152    # Oops. Which didn't find the executable.
47153    # The splitting of arguments from the executable at a space might have been incorrect,
47154    # since paths with space are more likely in Windows. Give it another try with the whole
47155    # argument.
47156    path="$complete"
47157    arguments="EOL"
47158    new_path=`$CYGPATH -u "$path"`
47159    new_path=`$WHICH "$new_path" 2> /dev/null`
47160    # bat and cmd files are not always considered executable in cygwin causing which
47161    # to not find them
47162    if test "x$new_path" = x \
47163        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47164        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47165      new_path=`$CYGPATH -u "$path"`
47166    fi
47167    if test "x$new_path" = x; then
47168      # It's still not found. Now this is an unrecoverable error.
47169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47170$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47171      has_space=`$ECHO "$complete" | $GREP " "`
47172      if test "x$has_space" != x; then
47173        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47174$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47175      fi
47176      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47177    fi
47178  fi
47179
47180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47183  # "foo.exe" is OK but "foo" is an error.
47184  #
47185  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47186  # It is also a way to make sure we got the proper file name for the real test later on.
47187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47188  if test "x$test_shortpath" = x; then
47189    # Short path failed, file does not exist as specified.
47190    # Try adding .exe or .cmd
47191    if test -f "${new_path}.exe"; then
47192      input_to_shortpath="${new_path}.exe"
47193    elif test -f "${new_path}.cmd"; then
47194      input_to_shortpath="${new_path}.cmd"
47195    else
47196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47197$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47198      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47199$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47200      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47201    fi
47202  else
47203    input_to_shortpath="$new_path"
47204  fi
47205
47206  # Call helper function which possibly converts this using DOS-style short mode.
47207  # If so, the updated path is stored in $new_path.
47208  new_path="$input_to_shortpath"
47209
47210  input_path="$input_to_shortpath"
47211  # Check if we need to convert this using DOS-style short mode. If the path
47212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47213  # take no chances and rewrite it.
47214  # Note: m4 eats our [], so we need to use [ and ] instead.
47215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47216  if test "x$has_forbidden_chars" != x; then
47217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47221      # Going to short mode and back again did indeed matter. Since short mode is
47222      # case insensitive, let's make it lowercase to improve readability.
47223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47224      # Now convert it back to Unix-style (cygpath)
47225      input_path=`$CYGPATH -u "$shortmode_path"`
47226      new_path="$input_path"
47227    fi
47228  fi
47229
47230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47231  if test "x$test_cygdrive_prefix" = x; then
47232    # As a simple fix, exclude /usr/bin since it's not a real path.
47233    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47235      # a path prefixed by /cygdrive for fixpath to work.
47236      new_path="$CYGWIN_ROOT_PATH$input_path"
47237    fi
47238  fi
47239
47240  # remove trailing .exe if any
47241  new_path="${new_path/%.exe/}"
47242
47243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47244
47245  # First separate the path from the arguments. This will split at the first
47246  # space.
47247  complete="$BUILD_OBJCOPY"
47248  path="${complete%% *}"
47249  tmp="$complete EOL"
47250  arguments="${tmp#* }"
47251
47252  # Input might be given as Windows format, start by converting to
47253  # unix format.
47254  new_path="$path"
47255
47256  windows_path="$new_path"
47257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47258    unix_path=`$CYGPATH -u "$windows_path"`
47259    new_path="$unix_path"
47260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47262    new_path="$unix_path"
47263  fi
47264
47265
47266  # Now try to locate executable using which
47267  new_path=`$WHICH "$new_path" 2> /dev/null`
47268
47269  if test "x$new_path" = x; then
47270    # Oops. Which didn't find the executable.
47271    # The splitting of arguments from the executable at a space might have been incorrect,
47272    # since paths with space are more likely in Windows. Give it another try with the whole
47273    # argument.
47274    path="$complete"
47275    arguments="EOL"
47276    new_path="$path"
47277
47278  windows_path="$new_path"
47279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47280    unix_path=`$CYGPATH -u "$windows_path"`
47281    new_path="$unix_path"
47282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47284    new_path="$unix_path"
47285  fi
47286
47287
47288    new_path=`$WHICH "$new_path" 2> /dev/null`
47289    # bat and cmd files are not always considered executable in MSYS causing which
47290    # to not find them
47291    if test "x$new_path" = x \
47292        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47293        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47294      new_path="$path"
47295
47296  windows_path="$new_path"
47297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47298    unix_path=`$CYGPATH -u "$windows_path"`
47299    new_path="$unix_path"
47300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47302    new_path="$unix_path"
47303  fi
47304
47305    fi
47306
47307    if test "x$new_path" = x; then
47308      # It's still not found. Now this is an unrecoverable error.
47309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47310$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47311      has_space=`$ECHO "$complete" | $GREP " "`
47312      if test "x$has_space" != x; then
47313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47315      fi
47316      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47317    fi
47318  fi
47319
47320  # Now new_path has a complete unix path to the binary
47321  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47322    # Keep paths in /bin as-is, but remove trailing .exe if any
47323    new_path="${new_path/%.exe/}"
47324    # Do not save /bin paths to all_fixpath_prefixes!
47325  else
47326    # Not in mixed or Windows style, start by that.
47327    new_path=`cmd //c echo $new_path`
47328
47329  input_path="$new_path"
47330  # Check if we need to convert this using DOS-style short mode. If the path
47331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47332  # take no chances and rewrite it.
47333  # Note: m4 eats our [], so we need to use [ and ] instead.
47334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47335  if test "x$has_forbidden_chars" != x; then
47336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47337    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47338  fi
47339
47340    # Output is in $new_path
47341
47342  windows_path="$new_path"
47343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47344    unix_path=`$CYGPATH -u "$windows_path"`
47345    new_path="$unix_path"
47346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47348    new_path="$unix_path"
47349  fi
47350
47351    # remove trailing .exe if any
47352    new_path="${new_path/%.exe/}"
47353
47354    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47355    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47356  fi
47357
47358    else
47359      # We're on a unix platform. Hooray! :)
47360      # First separate the path from the arguments. This will split at the first
47361      # space.
47362      complete="$BUILD_OBJCOPY"
47363      path="${complete%% *}"
47364      tmp="$complete EOL"
47365      arguments="${tmp#* }"
47366
47367      # Cannot rely on the command "which" here since it doesn't always work.
47368      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47369      if test -z "$is_absolute_path"; then
47370        # Path to executable is not absolute. Find it.
47371        IFS_save="$IFS"
47372        IFS=:
47373        for p in $PATH; do
47374          if test -f "$p/$path" && test -x "$p/$path"; then
47375            new_path="$p/$path"
47376            break
47377          fi
47378        done
47379        IFS="$IFS_save"
47380      else
47381        # This is an absolute path, we can use it without further modifications.
47382        new_path="$path"
47383      fi
47384
47385      if test "x$new_path" = x; then
47386        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47387$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47388        has_space=`$ECHO "$complete" | $GREP " "`
47389        if test "x$has_space" != x; then
47390          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47391$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47392        fi
47393        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47394      fi
47395    fi
47396
47397    # Now join together the path and the arguments once again
47398    if test "x$arguments" != xEOL; then
47399      new_complete="$new_path ${arguments% *}"
47400    else
47401      new_complete="$new_path"
47402    fi
47403
47404    if test "x$complete" != "x$new_complete"; then
47405      BUILD_OBJCOPY="$new_complete"
47406      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47407$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47408    fi
47409  fi
47410
47411
47412
47413  # Publish this variable in the help.
47414
47415
47416  if [ -z "${BUILD_STRIP+x}" ]; then
47417    # The variable is not set by user, try to locate tool using the code snippet
47418    for ac_prog in strip
47419do
47420  # Extract the first word of "$ac_prog", so it can be a program name with args.
47421set dummy $ac_prog; ac_word=$2
47422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47423$as_echo_n "checking for $ac_word... " >&6; }
47424if ${ac_cv_path_BUILD_STRIP+:} false; then :
47425  $as_echo_n "(cached) " >&6
47426else
47427  case $BUILD_STRIP in
47428  [\\/]* | ?:[\\/]*)
47429  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47430  ;;
47431  *)
47432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47433for as_dir in $PATH
47434do
47435  IFS=$as_save_IFS
47436  test -z "$as_dir" && as_dir=.
47437    for ac_exec_ext in '' $ac_executable_extensions; do
47438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47439    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47441    break 2
47442  fi
47443done
47444  done
47445IFS=$as_save_IFS
47446
47447  ;;
47448esac
47449fi
47450BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47451if test -n "$BUILD_STRIP"; then
47452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47453$as_echo "$BUILD_STRIP" >&6; }
47454else
47455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47456$as_echo "no" >&6; }
47457fi
47458
47459
47460  test -n "$BUILD_STRIP" && break
47461done
47462
47463  else
47464    # The variable is set, but is it from the command line or the environment?
47465
47466    # Try to remove the string !BUILD_STRIP! from our list.
47467    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47468    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47469      # If it failed, the variable was not from the command line. Ignore it,
47470      # but warn the user (except for BASH, which is always set by the calling BASH).
47471      if test "xBUILD_STRIP" != xBASH; then
47472        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47473$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47474      fi
47475      # Try to locate tool using the code snippet
47476      for ac_prog in strip
47477do
47478  # Extract the first word of "$ac_prog", so it can be a program name with args.
47479set dummy $ac_prog; ac_word=$2
47480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47481$as_echo_n "checking for $ac_word... " >&6; }
47482if ${ac_cv_path_BUILD_STRIP+:} false; then :
47483  $as_echo_n "(cached) " >&6
47484else
47485  case $BUILD_STRIP in
47486  [\\/]* | ?:[\\/]*)
47487  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47488  ;;
47489  *)
47490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47491for as_dir in $PATH
47492do
47493  IFS=$as_save_IFS
47494  test -z "$as_dir" && as_dir=.
47495    for ac_exec_ext in '' $ac_executable_extensions; do
47496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47497    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47499    break 2
47500  fi
47501done
47502  done
47503IFS=$as_save_IFS
47504
47505  ;;
47506esac
47507fi
47508BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47509if test -n "$BUILD_STRIP"; then
47510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47511$as_echo "$BUILD_STRIP" >&6; }
47512else
47513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47514$as_echo "no" >&6; }
47515fi
47516
47517
47518  test -n "$BUILD_STRIP" && break
47519done
47520
47521    else
47522      # If it succeeded, then it was overridden by the user. We will use it
47523      # for the tool.
47524
47525      # First remove it from the list of overridden variables, so we can test
47526      # for unknown variables in the end.
47527      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47528
47529      # Check if we try to supply an empty value
47530      if test "x$BUILD_STRIP" = x; then
47531        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47532$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47534$as_echo_n "checking for BUILD_STRIP... " >&6; }
47535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47536$as_echo "disabled" >&6; }
47537      else
47538        # Check if the provided tool contains a complete path.
47539        tool_specified="$BUILD_STRIP"
47540        tool_basename="${tool_specified##*/}"
47541        if test "x$tool_basename" = "x$tool_specified"; then
47542          # A command without a complete path is provided, search $PATH.
47543          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47544$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47545          # Extract the first word of "$tool_basename", so it can be a program name with args.
47546set dummy $tool_basename; ac_word=$2
47547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47548$as_echo_n "checking for $ac_word... " >&6; }
47549if ${ac_cv_path_BUILD_STRIP+:} false; then :
47550  $as_echo_n "(cached) " >&6
47551else
47552  case $BUILD_STRIP in
47553  [\\/]* | ?:[\\/]*)
47554  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47555  ;;
47556  *)
47557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47558for as_dir in $PATH
47559do
47560  IFS=$as_save_IFS
47561  test -z "$as_dir" && as_dir=.
47562    for ac_exec_ext in '' $ac_executable_extensions; do
47563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47564    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47566    break 2
47567  fi
47568done
47569  done
47570IFS=$as_save_IFS
47571
47572  ;;
47573esac
47574fi
47575BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47576if test -n "$BUILD_STRIP"; then
47577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47578$as_echo "$BUILD_STRIP" >&6; }
47579else
47580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47581$as_echo "no" >&6; }
47582fi
47583
47584
47585          if test "x$BUILD_STRIP" = x; then
47586            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47587          fi
47588        else
47589          # Otherwise we believe it is a complete path. Use it as it is.
47590          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47591$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47592          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47593$as_echo_n "checking for BUILD_STRIP... " >&6; }
47594          if test ! -x "$tool_specified"; then
47595            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47596$as_echo "not found" >&6; }
47597            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47598          fi
47599          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47600$as_echo "$tool_specified" >&6; }
47601        fi
47602      fi
47603    fi
47604
47605  fi
47606
47607
47608
47609  # Only process if variable expands to non-empty
47610
47611  if test "x$BUILD_STRIP" != x; then
47612    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47613
47614  # First separate the path from the arguments. This will split at the first
47615  # space.
47616  complete="$BUILD_STRIP"
47617  path="${complete%% *}"
47618  tmp="$complete EOL"
47619  arguments="${tmp#* }"
47620
47621  # Input might be given as Windows format, start by converting to
47622  # unix format.
47623  new_path=`$CYGPATH -u "$path"`
47624
47625  # Now try to locate executable using which
47626  new_path=`$WHICH "$new_path" 2> /dev/null`
47627  # bat and cmd files are not always considered executable in cygwin causing which
47628  # to not find them
47629  if test "x$new_path" = x \
47630      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47631      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47632    new_path=`$CYGPATH -u "$path"`
47633  fi
47634  if test "x$new_path" = x; then
47635    # Oops. Which didn't find the executable.
47636    # The splitting of arguments from the executable at a space might have been incorrect,
47637    # since paths with space are more likely in Windows. Give it another try with the whole
47638    # argument.
47639    path="$complete"
47640    arguments="EOL"
47641    new_path=`$CYGPATH -u "$path"`
47642    new_path=`$WHICH "$new_path" 2> /dev/null`
47643    # bat and cmd files are not always considered executable in cygwin causing which
47644    # to not find them
47645    if test "x$new_path" = x \
47646        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47647        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47648      new_path=`$CYGPATH -u "$path"`
47649    fi
47650    if test "x$new_path" = x; then
47651      # It's still not found. Now this is an unrecoverable error.
47652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47653$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47654      has_space=`$ECHO "$complete" | $GREP " "`
47655      if test "x$has_space" != x; then
47656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47658      fi
47659      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47660    fi
47661  fi
47662
47663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47666  # "foo.exe" is OK but "foo" is an error.
47667  #
47668  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47669  # It is also a way to make sure we got the proper file name for the real test later on.
47670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47671  if test "x$test_shortpath" = x; then
47672    # Short path failed, file does not exist as specified.
47673    # Try adding .exe or .cmd
47674    if test -f "${new_path}.exe"; then
47675      input_to_shortpath="${new_path}.exe"
47676    elif test -f "${new_path}.cmd"; then
47677      input_to_shortpath="${new_path}.cmd"
47678    else
47679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47680$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47681      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47682$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47683      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47684    fi
47685  else
47686    input_to_shortpath="$new_path"
47687  fi
47688
47689  # Call helper function which possibly converts this using DOS-style short mode.
47690  # If so, the updated path is stored in $new_path.
47691  new_path="$input_to_shortpath"
47692
47693  input_path="$input_to_shortpath"
47694  # Check if we need to convert this using DOS-style short mode. If the path
47695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47696  # take no chances and rewrite it.
47697  # Note: m4 eats our [], so we need to use [ and ] instead.
47698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47699  if test "x$has_forbidden_chars" != x; then
47700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47704      # Going to short mode and back again did indeed matter. Since short mode is
47705      # case insensitive, let's make it lowercase to improve readability.
47706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47707      # Now convert it back to Unix-style (cygpath)
47708      input_path=`$CYGPATH -u "$shortmode_path"`
47709      new_path="$input_path"
47710    fi
47711  fi
47712
47713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47714  if test "x$test_cygdrive_prefix" = x; then
47715    # As a simple fix, exclude /usr/bin since it's not a real path.
47716    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47718      # a path prefixed by /cygdrive for fixpath to work.
47719      new_path="$CYGWIN_ROOT_PATH$input_path"
47720    fi
47721  fi
47722
47723  # remove trailing .exe if any
47724  new_path="${new_path/%.exe/}"
47725
47726    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47727
47728  # First separate the path from the arguments. This will split at the first
47729  # space.
47730  complete="$BUILD_STRIP"
47731  path="${complete%% *}"
47732  tmp="$complete EOL"
47733  arguments="${tmp#* }"
47734
47735  # Input might be given as Windows format, start by converting to
47736  # unix format.
47737  new_path="$path"
47738
47739  windows_path="$new_path"
47740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47741    unix_path=`$CYGPATH -u "$windows_path"`
47742    new_path="$unix_path"
47743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47745    new_path="$unix_path"
47746  fi
47747
47748
47749  # Now try to locate executable using which
47750  new_path=`$WHICH "$new_path" 2> /dev/null`
47751
47752  if test "x$new_path" = x; then
47753    # Oops. Which didn't find the executable.
47754    # The splitting of arguments from the executable at a space might have been incorrect,
47755    # since paths with space are more likely in Windows. Give it another try with the whole
47756    # argument.
47757    path="$complete"
47758    arguments="EOL"
47759    new_path="$path"
47760
47761  windows_path="$new_path"
47762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47763    unix_path=`$CYGPATH -u "$windows_path"`
47764    new_path="$unix_path"
47765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47767    new_path="$unix_path"
47768  fi
47769
47770
47771    new_path=`$WHICH "$new_path" 2> /dev/null`
47772    # bat and cmd files are not always considered executable in MSYS causing which
47773    # to not find them
47774    if test "x$new_path" = x \
47775        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47776        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47777      new_path="$path"
47778
47779  windows_path="$new_path"
47780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47781    unix_path=`$CYGPATH -u "$windows_path"`
47782    new_path="$unix_path"
47783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47785    new_path="$unix_path"
47786  fi
47787
47788    fi
47789
47790    if test "x$new_path" = x; then
47791      # It's still not found. Now this is an unrecoverable error.
47792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47793$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47794      has_space=`$ECHO "$complete" | $GREP " "`
47795      if test "x$has_space" != x; then
47796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47798      fi
47799      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47800    fi
47801  fi
47802
47803  # Now new_path has a complete unix path to the binary
47804  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47805    # Keep paths in /bin as-is, but remove trailing .exe if any
47806    new_path="${new_path/%.exe/}"
47807    # Do not save /bin paths to all_fixpath_prefixes!
47808  else
47809    # Not in mixed or Windows style, start by that.
47810    new_path=`cmd //c echo $new_path`
47811
47812  input_path="$new_path"
47813  # Check if we need to convert this using DOS-style short mode. If the path
47814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47815  # take no chances and rewrite it.
47816  # Note: m4 eats our [], so we need to use [ and ] instead.
47817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47818  if test "x$has_forbidden_chars" != x; then
47819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47821  fi
47822
47823    # Output is in $new_path
47824
47825  windows_path="$new_path"
47826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47827    unix_path=`$CYGPATH -u "$windows_path"`
47828    new_path="$unix_path"
47829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47831    new_path="$unix_path"
47832  fi
47833
47834    # remove trailing .exe if any
47835    new_path="${new_path/%.exe/}"
47836
47837    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47838    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47839  fi
47840
47841    else
47842      # We're on a unix platform. Hooray! :)
47843      # First separate the path from the arguments. This will split at the first
47844      # space.
47845      complete="$BUILD_STRIP"
47846      path="${complete%% *}"
47847      tmp="$complete EOL"
47848      arguments="${tmp#* }"
47849
47850      # Cannot rely on the command "which" here since it doesn't always work.
47851      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47852      if test -z "$is_absolute_path"; then
47853        # Path to executable is not absolute. Find it.
47854        IFS_save="$IFS"
47855        IFS=:
47856        for p in $PATH; do
47857          if test -f "$p/$path" && test -x "$p/$path"; then
47858            new_path="$p/$path"
47859            break
47860          fi
47861        done
47862        IFS="$IFS_save"
47863      else
47864        # This is an absolute path, we can use it without further modifications.
47865        new_path="$path"
47866      fi
47867
47868      if test "x$new_path" = x; then
47869        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47870$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47871        has_space=`$ECHO "$complete" | $GREP " "`
47872        if test "x$has_space" != x; then
47873          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47874$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47875        fi
47876        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47877      fi
47878    fi
47879
47880    # Now join together the path and the arguments once again
47881    if test "x$arguments" != xEOL; then
47882      new_complete="$new_path ${arguments% *}"
47883    else
47884      new_complete="$new_path"
47885    fi
47886
47887    if test "x$complete" != "x$new_complete"; then
47888      BUILD_STRIP="$new_complete"
47889      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47890$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47891    fi
47892  fi
47893
47894    # Assume the C compiler is the assembler
47895    BUILD_AS="$BUILD_CC -c"
47896    # Just like for the target compiler, use the compiler as linker
47897    BUILD_LD="$BUILD_CC"
47898    BUILD_LDCXX="$BUILD_CXX"
47899
47900    PATH="$OLDPATH"
47901
47902
47903  COMPILER=$BUILD_CC
47904  COMPILER_NAME=BuildC
47905
47906  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47907    # cc -V output typically looks like
47908    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47909    # or
47910    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47911    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47912    # Check that this is likely to be the Solaris Studio cc.
47913    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47914    if test $? -ne 0; then
47915      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47916      { $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
47917$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47918      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47919$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47920      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47921$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47922      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47923    fi
47924    # Remove usage instructions (if present), and
47925    # collapse compiler output into a single line
47926    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47927        $SED -e 's/ *[Uu]sage:.*//'`
47928    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47929        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47930  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47931    # xlc -qversion output typically looks like
47932    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47933    #     Version: 11.01.0000.0015
47934    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47935    # Check that this is likely to be the IBM XL C compiler.
47936    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47937    if test $? -ne 0; then
47938      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47939      { $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
47940$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47941      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47942$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47943      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47944$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47945      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47946    fi
47947    # Collapse compiler output into a single line
47948    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47949    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47950        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47951  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47952    # There is no specific version flag, but all output starts with a version string.
47953    # First line typically looks something like:
47954    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47955    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47956    # Check that this is likely to be Microsoft CL.EXE.
47957    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47958    if test $? -ne 0; then
47959      { $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
47960$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47961      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47962$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47963      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47964    fi
47965    # Collapse compiler output into a single line
47966    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47967    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47968        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47969  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47970    # gcc --version output typically looks like
47971    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47972    #     Copyright (C) 2013 Free Software Foundation, Inc.
47973    #     This is free software; see the source for copying conditions.  There is NO
47974    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47975    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47976    # Check that this is likely to be GCC.
47977    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47978    if test $? -ne 0; then
47979      { $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
47980$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47981      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47982$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47983      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47984    fi
47985    # Remove Copyright and legalese from version string, and
47986    # collapse into a single line
47987    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47988        $SED -e 's/ *Copyright .*//'`
47989    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47990        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47991  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47992    # clang --version output typically looks like
47993    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47994    #    clang version 3.3 (tags/RELEASE_33/final)
47995    # or
47996    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47997    #    Target: x86_64-pc-linux-gnu
47998    #    Thread model: posix
47999    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48000    # Check that this is likely to be clang
48001    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48002    if test $? -ne 0; then
48003      { $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
48004$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48005      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48006$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48007      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48008    fi
48009    # Collapse compiler output into a single line
48010    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48011    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48012        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48013  else
48014      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48015  fi
48016  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48017  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48018  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48019  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
48020
48021  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48022$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48023
48024
48025  COMPILER=$BUILD_CXX
48026  COMPILER_NAME=BuildC++
48027
48028  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48029    # cc -V output typically looks like
48030    #     cc: Sun C 5.12 Linux_i386 2011/11/16
48031    # or
48032    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48033    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48034    # Check that this is likely to be the Solaris Studio cc.
48035    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48036    if test $? -ne 0; then
48037      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48038      { $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
48039$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48040      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48041$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48042      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48043$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48044      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48045    fi
48046    # Remove usage instructions (if present), and
48047    # collapse compiler output into a single line
48048    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48049        $SED -e 's/ *[Uu]sage:.*//'`
48050    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48051        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48052  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48053    # xlc -qversion output typically looks like
48054    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48055    #     Version: 11.01.0000.0015
48056    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48057    # Check that this is likely to be the IBM XL C compiler.
48058    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48059    if test $? -ne 0; then
48060      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48061      { $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
48062$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48063      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48064$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48065      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48066$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48067      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48068    fi
48069    # Collapse compiler output into a single line
48070    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48071    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48072        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48073  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48074    # There is no specific version flag, but all output starts with a version string.
48075    # First line typically looks something like:
48076    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48077    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48078    # Check that this is likely to be Microsoft CL.EXE.
48079    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48080    if test $? -ne 0; then
48081      { $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
48082$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48083      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48084$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48085      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48086    fi
48087    # Collapse compiler output into a single line
48088    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48089    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48090        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48091  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48092    # gcc --version output typically looks like
48093    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48094    #     Copyright (C) 2013 Free Software Foundation, Inc.
48095    #     This is free software; see the source for copying conditions.  There is NO
48096    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48097    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48098    # Check that this is likely to be GCC.
48099    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48100    if test $? -ne 0; then
48101      { $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
48102$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48103      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48104$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48105      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48106    fi
48107    # Remove Copyright and legalese from version string, and
48108    # collapse into a single line
48109    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48110        $SED -e 's/ *Copyright .*//'`
48111    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48112        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48113  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48114    # clang --version output typically looks like
48115    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48116    #    clang version 3.3 (tags/RELEASE_33/final)
48117    # or
48118    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48119    #    Target: x86_64-pc-linux-gnu
48120    #    Thread model: posix
48121    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48122    # Check that this is likely to be clang
48123    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48124    if test $? -ne 0; then
48125      { $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
48126$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48127      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48128$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48129      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48130    fi
48131    # Collapse compiler output into a single line
48132    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48133    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48134        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48135  else
48136      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48137  fi
48138  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48139  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48140  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48141  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
48142
48143  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48144$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48145
48146
48147  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
48148    { $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
48149$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
48150    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48151$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48152  fi
48153
48154  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48155  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48156    { $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
48157$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;}
48158  fi
48159
48160  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48161    { $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
48162$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48163  fi
48164
48165  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48166
48167  else
48168    # If we are not cross compiling, use the normal target compilers for
48169    # building the build platform executables.
48170    BUILD_CC="$CC"
48171    BUILD_CXX="$CXX"
48172    BUILD_LD="$LD"
48173    BUILD_LDCXX="$LDCXX"
48174    BUILD_NM="$NM"
48175    BUILD_AS="$AS"
48176    BUILD_OBJCOPY="$OBJCOPY"
48177    BUILD_STRIP="$STRIP"
48178    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48179    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48180    BUILD_AR="$AR"
48181
48182
48183  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48184    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48185$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48186    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48187$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48188  fi
48189
48190  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48191  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48192    { $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
48193$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;}
48194  fi
48195
48196  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48197    { $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
48198$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48199  fi
48200
48201  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48202
48203  fi
48204
48205
48206
48207
48208
48209
48210
48211
48212
48213
48214
48215
48216
48217
48218  # The package path is used only on macosx?
48219  # FIXME: clean this up, and/or move it elsewhere.
48220  PACKAGE_PATH=/opt/local
48221
48222
48223  # Check for extra potential brokenness.
48224  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48225    # On Windows, double-check that we got the right compiler.
48226    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48227    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48228    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48229      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48230        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
48231      fi
48232    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48233      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48234        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48235      fi
48236    fi
48237  fi
48238
48239  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48240    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48241    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48242    # This is later checked when setting flags.
48243
48244    # "-Og" suppported for GCC 4.8 and later
48245    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48246
48247
48248
48249
48250
48251
48252
48253
48254
48255
48256
48257
48258
48259
48260
48261
48262
48263
48264
48265
48266
48267
48268
48269
48270
48271
48272
48273
48274
48275
48276
48277
48278
48279
48280
48281
48282
48283
48284
48285
48286
48287
48288
48289
48290
48291
48292
48293    # Execute function body
48294
48295
48296
48297
48298
48299
48300
48301
48302
48303
48304
48305
48306
48307
48308
48309
48310
48311
48312
48313
48314
48315
48316
48317
48318
48319
48320
48321
48322
48323
48324
48325
48326
48327
48328
48329
48330
48331
48332
48333
48334
48335
48336
48337
48338
48339
48340
48341
48342    # Execute function body
48343
48344  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48345$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48346  supports=yes
48347
48348  saved_cflags="$CFLAGS"
48349  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48350  ac_ext=c
48351ac_cpp='$CPP $CPPFLAGS'
48352ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48353ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48354ac_compiler_gnu=$ac_cv_c_compiler_gnu
48355
48356  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48357/* end confdefs.h.  */
48358int i;
48359_ACEOF
48360if ac_fn_c_try_compile "$LINENO"; then :
48361
48362else
48363  supports=no
48364fi
48365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48366  ac_ext=cpp
48367ac_cpp='$CXXCPP $CPPFLAGS'
48368ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48369ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48370ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48371
48372  CFLAGS="$saved_cflags"
48373
48374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48375$as_echo "$supports" >&6; }
48376  if test "x$supports" = "xyes" ; then
48377    :
48378    C_COMP_SUPPORTS="yes"
48379  else
48380    :
48381    C_COMP_SUPPORTS="no"
48382  fi
48383
48384
48385
48386
48387
48388
48389
48390
48391
48392
48393
48394
48395
48396
48397
48398
48399
48400
48401
48402
48403
48404
48405
48406
48407
48408
48409
48410
48411
48412
48413
48414
48415
48416
48417
48418
48419
48420
48421
48422
48423
48424
48425
48426
48427
48428
48429
48430
48431
48432
48433
48434
48435
48436
48437
48438
48439
48440
48441
48442    # Execute function body
48443
48444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48445$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48446  supports=yes
48447
48448  saved_cxxflags="$CXXFLAGS"
48449  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48450  ac_ext=cpp
48451ac_cpp='$CXXCPP $CPPFLAGS'
48452ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48453ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48454ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48455
48456  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48457/* end confdefs.h.  */
48458int i;
48459_ACEOF
48460if ac_fn_cxx_try_compile "$LINENO"; then :
48461
48462else
48463  supports=no
48464fi
48465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48466  ac_ext=cpp
48467ac_cpp='$CXXCPP $CPPFLAGS'
48468ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48469ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48470ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48471
48472  CXXFLAGS="$saved_cxxflags"
48473
48474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48475$as_echo "$supports" >&6; }
48476  if test "x$supports" = "xyes" ; then
48477    :
48478    CXX_COMP_SUPPORTS="yes"
48479  else
48480    :
48481    CXX_COMP_SUPPORTS="no"
48482  fi
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493
48494
48495
48496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48497$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48498  supports=no
48499  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48500
48501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48502$as_echo "$supports" >&6; }
48503  if test "x$supports" = "xyes" ; then
48504    :
48505    HAS_CFLAG_OPTIMIZE_DEBUG=true
48506  else
48507    :
48508    HAS_CFLAG_OPTIMIZE_DEBUG=false
48509  fi
48510
48511
48512
48513
48514
48515
48516
48517    # "-z relro" supported in GNU binutils 2.17 and later
48518    LINKER_RELRO_FLAG="-Wl,-z,relro"
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546
48547
48548
48549
48550
48551
48552
48553
48554
48555
48556
48557
48558
48559
48560
48561
48562
48563
48564
48565
48566    # Execute function body
48567
48568  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48569$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48570  supports=yes
48571
48572  saved_ldflags="$LDFLAGS"
48573  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48574  ac_ext=c
48575ac_cpp='$CPP $CPPFLAGS'
48576ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48577ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48578ac_compiler_gnu=$ac_cv_c_compiler_gnu
48579
48580  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48581/* end confdefs.h.  */
48582
48583int
48584main ()
48585{
48586
48587  ;
48588  return 0;
48589}
48590_ACEOF
48591if ac_fn_c_try_link "$LINENO"; then :
48592
48593else
48594  supports=no
48595fi
48596rm -f core conftest.err conftest.$ac_objext \
48597    conftest$ac_exeext conftest.$ac_ext
48598  ac_ext=cpp
48599ac_cpp='$CXXCPP $CPPFLAGS'
48600ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48601ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48602ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48603
48604  LDFLAGS="$saved_ldflags"
48605
48606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48607$as_echo "$supports" >&6; }
48608  if test "x$supports" = "xyes" ; then
48609    :
48610    HAS_LINKER_RELRO=true
48611  else
48612    :
48613    HAS_LINKER_RELRO=false
48614  fi
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625
48626
48627
48628    # "-z now" supported in GNU binutils 2.11 and later
48629    LINKER_NOW_FLAG="-Wl,-z,now"
48630
48631
48632
48633
48634
48635
48636
48637
48638
48639
48640
48641
48642
48643
48644
48645
48646
48647
48648
48649
48650
48651
48652
48653
48654
48655
48656
48657
48658
48659
48660
48661
48662
48663
48664
48665
48666
48667
48668
48669
48670
48671
48672
48673
48674
48675
48676
48677    # Execute function body
48678
48679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48680$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48681  supports=yes
48682
48683  saved_ldflags="$LDFLAGS"
48684  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48685  ac_ext=c
48686ac_cpp='$CPP $CPPFLAGS'
48687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48689ac_compiler_gnu=$ac_cv_c_compiler_gnu
48690
48691  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48692/* end confdefs.h.  */
48693
48694int
48695main ()
48696{
48697
48698  ;
48699  return 0;
48700}
48701_ACEOF
48702if ac_fn_c_try_link "$LINENO"; then :
48703
48704else
48705  supports=no
48706fi
48707rm -f core conftest.err conftest.$ac_objext \
48708    conftest$ac_exeext conftest.$ac_ext
48709  ac_ext=cpp
48710ac_cpp='$CXXCPP $CPPFLAGS'
48711ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48712ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48713ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48714
48715  LDFLAGS="$saved_ldflags"
48716
48717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48718$as_echo "$supports" >&6; }
48719  if test "x$supports" = "xyes" ; then
48720    :
48721    HAS_LINKER_NOW=true
48722  else
48723    :
48724    HAS_LINKER_NOW=false
48725  fi
48726
48727
48728
48729
48730
48731
48732
48733
48734
48735
48736
48737
48738  fi
48739
48740  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48741  # in executable.'
48742  USING_BROKEN_SUSE_LD=no
48743  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48744    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48745$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48746    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48747    $ECHO "int main() { }" > main.c
48748    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48750$as_echo "no" >&6; }
48751      USING_BROKEN_SUSE_LD=no
48752    else
48753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48754$as_echo "yes" >&6; }
48755      USING_BROKEN_SUSE_LD=yes
48756    fi
48757    $RM version-script.map main.c a.out
48758  fi
48759
48760
48761  # Setup hotspot lecagy names for toolchains
48762  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48763  if test "x$TOOLCHAIN_TYPE" = xclang; then
48764    HOTSPOT_TOOLCHAIN_TYPE=gcc
48765  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48766    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48767  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48768    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48769  fi
48770
48771
48772
48773# Setup the JTReg Regression Test Harness.
48774
48775
48776# Check whether --with-jtreg was given.
48777if test "${with_jtreg+set}" = set; then :
48778  withval=$with_jtreg;
48779fi
48780
48781
48782  if test "x$with_jtreg" = xno; then
48783    # jtreg disabled
48784    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48785$as_echo_n "checking for jtreg test harness... " >&6; }
48786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
48787$as_echo "no, disabled" >&6; }
48788  elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
48789    # An explicit path is specified, use it.
48790    JT_HOME="$with_jtreg"
48791    if test ! -d "$JT_HOME"; then
48792      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
48793    fi
48794
48795    if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48796      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
48797    fi
48798
48799    JTREGEXE="$JT_HOME/bin/jtreg"
48800    if test ! -x "$JTREGEXE"; then
48801      as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
48802    fi
48803
48804    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48805$as_echo_n "checking for jtreg test harness... " >&6; }
48806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48807$as_echo "$JT_HOME" >&6; }
48808  else
48809    # Try to locate jtreg
48810    if test "x$JT_HOME" != x; then
48811      # JT_HOME set in environment, use it
48812      if test ! -d "$JT_HOME"; then
48813        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
48814$as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
48815        JT_HOME=
48816      else
48817        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48818          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
48819$as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
48820          JT_HOME=
48821        elif test ! -x "$JT_HOME/bin/jtreg"; then
48822          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
48823$as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
48824          JT_HOME=
48825        else
48826          JTREGEXE="$JT_HOME/bin/jtreg"
48827          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
48828$as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
48829        fi
48830      fi
48831    fi
48832
48833    if test "x$JT_HOME" = x; then
48834      # JT_HOME is not set in environment, or was deemed invalid.
48835      # Try to find jtreg on path
48836
48837
48838  # Publish this variable in the help.
48839
48840
48841  if [ -z "${JTREGEXE+x}" ]; then
48842    # The variable is not set by user, try to locate tool using the code snippet
48843    for ac_prog in jtreg
48844do
48845  # Extract the first word of "$ac_prog", so it can be a program name with args.
48846set dummy $ac_prog; ac_word=$2
48847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48848$as_echo_n "checking for $ac_word... " >&6; }
48849if ${ac_cv_path_JTREGEXE+:} false; then :
48850  $as_echo_n "(cached) " >&6
48851else
48852  case $JTREGEXE in
48853  [\\/]* | ?:[\\/]*)
48854  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48855  ;;
48856  *)
48857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48858for as_dir in $PATH
48859do
48860  IFS=$as_save_IFS
48861  test -z "$as_dir" && as_dir=.
48862    for ac_exec_ext in '' $ac_executable_extensions; do
48863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48864    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48866    break 2
48867  fi
48868done
48869  done
48870IFS=$as_save_IFS
48871
48872  ;;
48873esac
48874fi
48875JTREGEXE=$ac_cv_path_JTREGEXE
48876if test -n "$JTREGEXE"; then
48877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48878$as_echo "$JTREGEXE" >&6; }
48879else
48880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48881$as_echo "no" >&6; }
48882fi
48883
48884
48885  test -n "$JTREGEXE" && break
48886done
48887
48888  else
48889    # The variable is set, but is it from the command line or the environment?
48890
48891    # Try to remove the string !JTREGEXE! from our list.
48892    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48893    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48894      # If it failed, the variable was not from the command line. Ignore it,
48895      # but warn the user (except for BASH, which is always set by the calling BASH).
48896      if test "xJTREGEXE" != xBASH; then
48897        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48898$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48899      fi
48900      # Try to locate tool using the code snippet
48901      for ac_prog in jtreg
48902do
48903  # Extract the first word of "$ac_prog", so it can be a program name with args.
48904set dummy $ac_prog; ac_word=$2
48905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48906$as_echo_n "checking for $ac_word... " >&6; }
48907if ${ac_cv_path_JTREGEXE+:} false; then :
48908  $as_echo_n "(cached) " >&6
48909else
48910  case $JTREGEXE in
48911  [\\/]* | ?:[\\/]*)
48912  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48913  ;;
48914  *)
48915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48916for as_dir in $PATH
48917do
48918  IFS=$as_save_IFS
48919  test -z "$as_dir" && as_dir=.
48920    for ac_exec_ext in '' $ac_executable_extensions; do
48921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48922    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48924    break 2
48925  fi
48926done
48927  done
48928IFS=$as_save_IFS
48929
48930  ;;
48931esac
48932fi
48933JTREGEXE=$ac_cv_path_JTREGEXE
48934if test -n "$JTREGEXE"; then
48935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48936$as_echo "$JTREGEXE" >&6; }
48937else
48938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48939$as_echo "no" >&6; }
48940fi
48941
48942
48943  test -n "$JTREGEXE" && break
48944done
48945
48946    else
48947      # If it succeeded, then it was overridden by the user. We will use it
48948      # for the tool.
48949
48950      # First remove it from the list of overridden variables, so we can test
48951      # for unknown variables in the end.
48952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48953
48954      # Check if we try to supply an empty value
48955      if test "x$JTREGEXE" = x; then
48956        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48957$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48959$as_echo_n "checking for JTREGEXE... " >&6; }
48960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48961$as_echo "disabled" >&6; }
48962      else
48963        # Check if the provided tool contains a complete path.
48964        tool_specified="$JTREGEXE"
48965        tool_basename="${tool_specified##*/}"
48966        if test "x$tool_basename" = "x$tool_specified"; then
48967          # A command without a complete path is provided, search $PATH.
48968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48969$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48970          # Extract the first word of "$tool_basename", so it can be a program name with args.
48971set dummy $tool_basename; ac_word=$2
48972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48973$as_echo_n "checking for $ac_word... " >&6; }
48974if ${ac_cv_path_JTREGEXE+:} false; then :
48975  $as_echo_n "(cached) " >&6
48976else
48977  case $JTREGEXE in
48978  [\\/]* | ?:[\\/]*)
48979  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48980  ;;
48981  *)
48982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48983for as_dir in $PATH
48984do
48985  IFS=$as_save_IFS
48986  test -z "$as_dir" && as_dir=.
48987    for ac_exec_ext in '' $ac_executable_extensions; do
48988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48989    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48991    break 2
48992  fi
48993done
48994  done
48995IFS=$as_save_IFS
48996
48997  ;;
48998esac
48999fi
49000JTREGEXE=$ac_cv_path_JTREGEXE
49001if test -n "$JTREGEXE"; then
49002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49003$as_echo "$JTREGEXE" >&6; }
49004else
49005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49006$as_echo "no" >&6; }
49007fi
49008
49009
49010          if test "x$JTREGEXE" = x; then
49011            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49012          fi
49013        else
49014          # Otherwise we believe it is a complete path. Use it as it is.
49015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
49016$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
49017          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49018$as_echo_n "checking for JTREGEXE... " >&6; }
49019          if test ! -x "$tool_specified"; then
49020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49021$as_echo "not found" >&6; }
49022            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
49023          fi
49024          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49025$as_echo "$tool_specified" >&6; }
49026        fi
49027      fi
49028    fi
49029
49030  fi
49031
49032
49033      if test "x$JTREGEXE" != x; then
49034        # That's good, now try to derive JT_HOME
49035        JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
49036        if test ! -e "$JT_HOME/lib/jtreg.jar"; then
49037          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
49038$as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
49039          JT_HOME=
49040          JTREGEXE=
49041        else
49042          { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
49043$as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
49044        fi
49045      fi
49046    fi
49047
49048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
49049$as_echo_n "checking for jtreg test harness... " >&6; }
49050    if test "x$JT_HOME" != x; then
49051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
49052$as_echo "$JT_HOME" >&6; }
49053    else
49054      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
49055$as_echo "no, not found" >&6; }
49056
49057      if test "x$with_jtreg" = xyes; then
49058        as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
49059      fi
49060    fi
49061  fi
49062
49063
49064  # Only process if variable expands to non-empty
49065
49066  if test "x$JTREGEXE" != x; then
49067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49068
49069  # First separate the path from the arguments. This will split at the first
49070  # space.
49071  complete="$JTREGEXE"
49072  path="${complete%% *}"
49073  tmp="$complete EOL"
49074  arguments="${tmp#* }"
49075
49076  # Input might be given as Windows format, start by converting to
49077  # unix format.
49078  new_path=`$CYGPATH -u "$path"`
49079
49080  # Now try to locate executable using which
49081  new_path=`$WHICH "$new_path" 2> /dev/null`
49082  # bat and cmd files are not always considered executable in cygwin causing which
49083  # to not find them
49084  if test "x$new_path" = x \
49085      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49086      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49087    new_path=`$CYGPATH -u "$path"`
49088  fi
49089  if test "x$new_path" = x; then
49090    # Oops. Which didn't find the executable.
49091    # The splitting of arguments from the executable at a space might have been incorrect,
49092    # since paths with space are more likely in Windows. Give it another try with the whole
49093    # argument.
49094    path="$complete"
49095    arguments="EOL"
49096    new_path=`$CYGPATH -u "$path"`
49097    new_path=`$WHICH "$new_path" 2> /dev/null`
49098    # bat and cmd files are not always considered executable in cygwin causing which
49099    # to not find them
49100    if test "x$new_path" = x \
49101        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49102        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49103      new_path=`$CYGPATH -u "$path"`
49104    fi
49105    if test "x$new_path" = x; then
49106      # It's still not found. Now this is an unrecoverable error.
49107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49108$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49109      has_space=`$ECHO "$complete" | $GREP " "`
49110      if test "x$has_space" != x; then
49111        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49113      fi
49114      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49115    fi
49116  fi
49117
49118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49121  # "foo.exe" is OK but "foo" is an error.
49122  #
49123  # This test is therefore slightly more accurate than "test -f" to check for file presence.
49124  # It is also a way to make sure we got the proper file name for the real test later on.
49125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49126  if test "x$test_shortpath" = x; then
49127    # Short path failed, file does not exist as specified.
49128    # Try adding .exe or .cmd
49129    if test -f "${new_path}.exe"; then
49130      input_to_shortpath="${new_path}.exe"
49131    elif test -f "${new_path}.cmd"; then
49132      input_to_shortpath="${new_path}.cmd"
49133    else
49134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
49135$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
49136      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
49137$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
49138      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49139    fi
49140  else
49141    input_to_shortpath="$new_path"
49142  fi
49143
49144  # Call helper function which possibly converts this using DOS-style short mode.
49145  # If so, the updated path is stored in $new_path.
49146  new_path="$input_to_shortpath"
49147
49148  input_path="$input_to_shortpath"
49149  # Check if we need to convert this using DOS-style short mode. If the path
49150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49151  # take no chances and rewrite it.
49152  # Note: m4 eats our [], so we need to use [ and ] instead.
49153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49154  if test "x$has_forbidden_chars" != x; then
49155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49159      # Going to short mode and back again did indeed matter. Since short mode is
49160      # case insensitive, let's make it lowercase to improve readability.
49161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49162      # Now convert it back to Unix-style (cygpath)
49163      input_path=`$CYGPATH -u "$shortmode_path"`
49164      new_path="$input_path"
49165    fi
49166  fi
49167
49168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49169  if test "x$test_cygdrive_prefix" = x; then
49170    # As a simple fix, exclude /usr/bin since it's not a real path.
49171    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
49172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49173      # a path prefixed by /cygdrive for fixpath to work.
49174      new_path="$CYGWIN_ROOT_PATH$input_path"
49175    fi
49176  fi
49177
49178  # remove trailing .exe if any
49179  new_path="${new_path/%.exe/}"
49180
49181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49182
49183  # First separate the path from the arguments. This will split at the first
49184  # space.
49185  complete="$JTREGEXE"
49186  path="${complete%% *}"
49187  tmp="$complete EOL"
49188  arguments="${tmp#* }"
49189
49190  # Input might be given as Windows format, start by converting to
49191  # unix format.
49192  new_path="$path"
49193
49194  windows_path="$new_path"
49195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49196    unix_path=`$CYGPATH -u "$windows_path"`
49197    new_path="$unix_path"
49198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49200    new_path="$unix_path"
49201  fi
49202
49203
49204  # Now try to locate executable using which
49205  new_path=`$WHICH "$new_path" 2> /dev/null`
49206
49207  if test "x$new_path" = x; then
49208    # Oops. Which didn't find the executable.
49209    # The splitting of arguments from the executable at a space might have been incorrect,
49210    # since paths with space are more likely in Windows. Give it another try with the whole
49211    # argument.
49212    path="$complete"
49213    arguments="EOL"
49214    new_path="$path"
49215
49216  windows_path="$new_path"
49217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49218    unix_path=`$CYGPATH -u "$windows_path"`
49219    new_path="$unix_path"
49220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49222    new_path="$unix_path"
49223  fi
49224
49225
49226    new_path=`$WHICH "$new_path" 2> /dev/null`
49227    # bat and cmd files are not always considered executable in MSYS causing which
49228    # to not find them
49229    if test "x$new_path" = x \
49230        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49231        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49232      new_path="$path"
49233
49234  windows_path="$new_path"
49235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49236    unix_path=`$CYGPATH -u "$windows_path"`
49237    new_path="$unix_path"
49238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49240    new_path="$unix_path"
49241  fi
49242
49243    fi
49244
49245    if test "x$new_path" = x; then
49246      # It's still not found. Now this is an unrecoverable error.
49247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49248$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49249      has_space=`$ECHO "$complete" | $GREP " "`
49250      if test "x$has_space" != x; then
49251        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49252$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49253      fi
49254      as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49255    fi
49256  fi
49257
49258  # Now new_path has a complete unix path to the binary
49259  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
49260    # Keep paths in /bin as-is, but remove trailing .exe if any
49261    new_path="${new_path/%.exe/}"
49262    # Do not save /bin paths to all_fixpath_prefixes!
49263  else
49264    # Not in mixed or Windows style, start by that.
49265    new_path=`cmd //c echo $new_path`
49266
49267  input_path="$new_path"
49268  # Check if we need to convert this using DOS-style short mode. If the path
49269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49270  # take no chances and rewrite it.
49271  # Note: m4 eats our [], so we need to use [ and ] instead.
49272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49273  if test "x$has_forbidden_chars" != x; then
49274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49276  fi
49277
49278    # Output is in $new_path
49279
49280  windows_path="$new_path"
49281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49282    unix_path=`$CYGPATH -u "$windows_path"`
49283    new_path="$unix_path"
49284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49286    new_path="$unix_path"
49287  fi
49288
49289    # remove trailing .exe if any
49290    new_path="${new_path/%.exe/}"
49291
49292    # Save the first 10 bytes of this path to the storage, so fixpath can work.
49293    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49294  fi
49295
49296    else
49297      # We're on a unix platform. Hooray! :)
49298      # First separate the path from the arguments. This will split at the first
49299      # space.
49300      complete="$JTREGEXE"
49301      path="${complete%% *}"
49302      tmp="$complete EOL"
49303      arguments="${tmp#* }"
49304
49305      # Cannot rely on the command "which" here since it doesn't always work.
49306      is_absolute_path=`$ECHO "$path" | $GREP ^/`
49307      if test -z "$is_absolute_path"; then
49308        # Path to executable is not absolute. Find it.
49309        IFS_save="$IFS"
49310        IFS=:
49311        for p in $PATH; do
49312          if test -f "$p/$path" && test -x "$p/$path"; then
49313            new_path="$p/$path"
49314            break
49315          fi
49316        done
49317        IFS="$IFS_save"
49318      else
49319        # This is an absolute path, we can use it without further modifications.
49320        new_path="$path"
49321      fi
49322
49323      if test "x$new_path" = x; then
49324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49325$as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49326        has_space=`$ECHO "$complete" | $GREP " "`
49327        if test "x$has_space" != x; then
49328          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
49329$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
49330        fi
49331        as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49332      fi
49333    fi
49334
49335    # Now join together the path and the arguments once again
49336    if test "x$arguments" != xEOL; then
49337      new_complete="$new_path ${arguments% *}"
49338    else
49339      new_complete="$new_path"
49340    fi
49341
49342    if test "x$complete" != "x$new_complete"; then
49343      JTREGEXE="$new_complete"
49344      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
49345$as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
49346    fi
49347  fi
49348
49349
49350  # Only process if variable expands to non-empty
49351
49352  if test "x$JT_HOME" != x; then
49353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49354
49355  # Input might be given as Windows format, start by converting to
49356  # unix format.
49357  path="$JT_HOME"
49358  new_path=`$CYGPATH -u "$path"`
49359
49360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49363  # "foo.exe" is OK but "foo" is an error.
49364  #
49365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49366  # It is also a way to make sure we got the proper file name for the real test later on.
49367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49368  if test "x$test_shortpath" = x; then
49369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49370$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49371    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49372  fi
49373
49374  # Call helper function which possibly converts this using DOS-style short mode.
49375  # If so, the updated path is stored in $new_path.
49376
49377  input_path="$new_path"
49378  # Check if we need to convert this using DOS-style short mode. If the path
49379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49380  # take no chances and rewrite it.
49381  # Note: m4 eats our [], so we need to use [ and ] instead.
49382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49383  if test "x$has_forbidden_chars" != x; then
49384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49388      # Going to short mode and back again did indeed matter. Since short mode is
49389      # case insensitive, let's make it lowercase to improve readability.
49390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49391      # Now convert it back to Unix-style (cygpath)
49392      input_path=`$CYGPATH -u "$shortmode_path"`
49393      new_path="$input_path"
49394    fi
49395  fi
49396
49397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49398  if test "x$test_cygdrive_prefix" = x; then
49399    # As a simple fix, exclude /usr/bin since it's not a real path.
49400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49402      # a path prefixed by /cygdrive for fixpath to work.
49403      new_path="$CYGWIN_ROOT_PATH$input_path"
49404    fi
49405  fi
49406
49407
49408  if test "x$path" != "x$new_path"; then
49409    JT_HOME="$new_path"
49410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49411$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49412  fi
49413
49414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49415
49416  path="$JT_HOME"
49417  has_colon=`$ECHO $path | $GREP ^.:`
49418  new_path="$path"
49419  if test "x$has_colon" = x; then
49420    # Not in mixed or Windows style, start by that.
49421    new_path=`cmd //c echo $path`
49422  fi
49423
49424
49425  input_path="$new_path"
49426  # Check if we need to convert this using DOS-style short mode. If the path
49427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49428  # take no chances and rewrite it.
49429  # Note: m4 eats our [], so we need to use [ and ] instead.
49430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49431  if test "x$has_forbidden_chars" != x; then
49432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49434  fi
49435
49436
49437  windows_path="$new_path"
49438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49439    unix_path=`$CYGPATH -u "$windows_path"`
49440    new_path="$unix_path"
49441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49443    new_path="$unix_path"
49444  fi
49445
49446  if test "x$path" != "x$new_path"; then
49447    JT_HOME="$new_path"
49448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49449$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49450  fi
49451
49452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49454
49455    else
49456      # We're on a unix platform. Hooray! :)
49457      path="$JT_HOME"
49458      has_space=`$ECHO "$path" | $GREP " "`
49459      if test "x$has_space" != x; then
49460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49461$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49462        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49463      fi
49464
49465      # Use eval to expand a potential ~
49466      eval path="$path"
49467      if test ! -f "$path" && test ! -d "$path"; then
49468        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
49469      fi
49470
49471      if test -d "$path"; then
49472        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
49473      else
49474        dir="`$DIRNAME "$path"`"
49475        base="`$BASENAME "$path"`"
49476        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
49477      fi
49478    fi
49479  fi
49480
49481
49482
49483
49484
49485# Setup Jib dependency tool
49486
49487
49488# Check whether --with-jib was given.
49489if test "${with_jib+set}" = set; then :
49490  withval=$with_jib;
49491fi
49492
49493
49494  if test "x$with_jib" = xno || test "x$with_jib" = x; then
49495    # jib disabled
49496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49497$as_echo_n "checking for jib... " >&6; }
49498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49499$as_echo "no" >&6; }
49500  elif test "x$with_jib" = xyes; then
49501    as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
49502  else
49503    JIB_HOME="${with_jib}"
49504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
49505$as_echo_n "checking for jib... " >&6; }
49506    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
49507$as_echo "${JIB_HOME}" >&6; }
49508    if test ! -d "${JIB_HOME}"; then
49509      as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
49510    fi
49511    JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
49512    if test ! -f "${JIB_JAR}"; then
49513      as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
49514    fi
49515  fi
49516
49517
49518
49519
49520
49521  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49522  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49523  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49524  #                              commands produced by the link step (currently AIX only)
49525  if test "x$TOOLCHAIN_TYPE" = xxlc; then
49526    COMPILER_TARGET_BITS_FLAG="-q"
49527    COMPILER_COMMAND_FILE_FLAG="-f"
49528    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49529  else
49530    COMPILER_TARGET_BITS_FLAG="-m"
49531    COMPILER_COMMAND_FILE_FLAG="@"
49532    COMPILER_BINDCMD_FILE_FLAG=""
49533
49534    # The solstudio linker does not support @-files.
49535    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49536      COMPILER_COMMAND_FILE_FLAG=
49537    fi
49538
49539    # Check if @file is supported by gcc
49540    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49541      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49542$as_echo_n "checking if @file is supported by gcc... " >&6; }
49543      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49544      $ECHO "" "--version" > command.file
49545      if $CXX @command.file 2>&5 >&5; then
49546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49547$as_echo "yes" >&6; }
49548        COMPILER_COMMAND_FILE_FLAG="@"
49549      else
49550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49551$as_echo "no" >&6; }
49552        COMPILER_COMMAND_FILE_FLAG=
49553      fi
49554      $RM command.file
49555    fi
49556  fi
49557
49558
49559
49560
49561  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49562  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49563    ARFLAGS="-r"
49564  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49565    ARFLAGS="-X64"
49566  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49567    # lib.exe is used as AR to create static libraries.
49568    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49569  else
49570    ARFLAGS=""
49571  fi
49572
49573
49574  ## Setup strip.
49575  # FIXME: should this really be per platform, or should it be per toolchain type?
49576  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49577  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49578  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49579    STRIPFLAGS="-g"
49580  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49581    STRIPFLAGS="-x"
49582  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49583    STRIPFLAGS="-S"
49584  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49585    STRIPFLAGS="-X32_64"
49586  fi
49587
49588
49589
49590  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49591    CC_OUT_OPTION=-Fo
49592    EXE_OUT_OPTION=-out:
49593    LD_OUT_OPTION=-out:
49594    AR_OUT_OPTION=-out:
49595  else
49596    # The option used to specify the target .o,.a or .so file.
49597    # When compiling, how to specify the to be created object file.
49598    CC_OUT_OPTION='-o$(SPACE)'
49599    # When linking, how to specify the to be created executable.
49600    EXE_OUT_OPTION='-o$(SPACE)'
49601    # When linking, how to specify the to be created dynamically linkable library.
49602    LD_OUT_OPTION='-o$(SPACE)'
49603    # When archiving, how to specify the to be create static archive for object files.
49604    AR_OUT_OPTION='rcs$(SPACE)'
49605  fi
49606
49607
49608
49609
49610
49611  # On Windows, we need to set RC flags.
49612  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49613    RC_FLAGS="-nologo -l0x409"
49614    JVM_RCFLAGS="-nologo"
49615    if test "x$DEBUG_LEVEL" = xrelease; then
49616      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49617      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49618    fi
49619
49620    # The version variables used to create RC_FLAGS may be overridden
49621    # in a custom configure script, or possibly the command line.
49622    # Let those variables be expanded at make time in spec.gmk.
49623    # The \$ are escaped to the shell, and the $(...) variables
49624    # are evaluated by make.
49625    RC_FLAGS="$RC_FLAGS \
49626        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49627        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49628        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49629        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49630        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49631        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49632        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49633
49634    JVM_RCFLAGS="$JVM_RCFLAGS \
49635        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49636        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49637        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49638        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49639        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49640        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49641        -D\"HS_FNAME=jvm.dll\" \
49642        -D\"HS_INTERNAL_NAME=jvm\""
49643  fi
49644
49645
49646
49647  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49648    # silence copyright notice and other headers.
49649    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49650  fi
49651
49652
49653# Now we can test some aspects on the target using configure macros.
49654
49655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49656$as_echo_n "checking for ANSI C header files... " >&6; }
49657if ${ac_cv_header_stdc+:} false; then :
49658  $as_echo_n "(cached) " >&6
49659else
49660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49661/* end confdefs.h.  */
49662#include <stdlib.h>
49663#include <stdarg.h>
49664#include <string.h>
49665#include <float.h>
49666
49667int
49668main ()
49669{
49670
49671  ;
49672  return 0;
49673}
49674_ACEOF
49675if ac_fn_cxx_try_compile "$LINENO"; then :
49676  ac_cv_header_stdc=yes
49677else
49678  ac_cv_header_stdc=no
49679fi
49680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49681
49682if test $ac_cv_header_stdc = yes; then
49683  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49684  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49685/* end confdefs.h.  */
49686#include <string.h>
49687
49688_ACEOF
49689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49690  $EGREP "memchr" >/dev/null 2>&1; then :
49691
49692else
49693  ac_cv_header_stdc=no
49694fi
49695rm -f conftest*
49696
49697fi
49698
49699if test $ac_cv_header_stdc = yes; then
49700  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49701  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49702/* end confdefs.h.  */
49703#include <stdlib.h>
49704
49705_ACEOF
49706if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49707  $EGREP "free" >/dev/null 2>&1; then :
49708
49709else
49710  ac_cv_header_stdc=no
49711fi
49712rm -f conftest*
49713
49714fi
49715
49716if test $ac_cv_header_stdc = yes; then
49717  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49718  if test "$cross_compiling" = yes; then :
49719  :
49720else
49721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49722/* end confdefs.h.  */
49723#include <ctype.h>
49724#include <stdlib.h>
49725#if ((' ' & 0x0FF) == 0x020)
49726# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49727# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49728#else
49729# define ISLOWER(c) \
49730		   (('a' <= (c) && (c) <= 'i') \
49731		     || ('j' <= (c) && (c) <= 'r') \
49732		     || ('s' <= (c) && (c) <= 'z'))
49733# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49734#endif
49735
49736#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49737int
49738main ()
49739{
49740  int i;
49741  for (i = 0; i < 256; i++)
49742    if (XOR (islower (i), ISLOWER (i))
49743	|| toupper (i) != TOUPPER (i))
49744      return 2;
49745  return 0;
49746}
49747_ACEOF
49748if ac_fn_cxx_try_run "$LINENO"; then :
49749
49750else
49751  ac_cv_header_stdc=no
49752fi
49753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49754  conftest.$ac_objext conftest.beam conftest.$ac_ext
49755fi
49756
49757fi
49758fi
49759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49760$as_echo "$ac_cv_header_stdc" >&6; }
49761if test $ac_cv_header_stdc = yes; then
49762
49763$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49764
49765fi
49766
49767# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49768for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49769		  inttypes.h stdint.h unistd.h
49770do :
49771  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49772ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49773"
49774if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49775  cat >>confdefs.h <<_ACEOF
49776#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49777_ACEOF
49778
49779fi
49780
49781done
49782
49783
49784
49785  ###############################################################################
49786  #
49787  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49788  # (The JVM can use 32 or 64 bit Java pointers but that decision
49789  # is made at runtime.)
49790  #
49791
49792  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49793    # Always specify -m flag on Solaris
49794    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49795
49796  # When we add flags to the "official" CFLAGS etc, we need to
49797  # keep track of these additions in ADDED_CFLAGS etc. These
49798  # will later be checked to make sure only controlled additions
49799  # have been made to CFLAGS etc.
49800  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49801  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49802  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49803
49804  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49805  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49806  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49807
49808  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49809  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49810  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49811
49812  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49813  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49814  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49815
49816  elif test "x$COMPILE_TYPE" = xreduced; then
49817    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49818      # Specify -m if running reduced on unix platforms
49819
49820  # When we add flags to the "official" CFLAGS etc, we need to
49821  # keep track of these additions in ADDED_CFLAGS etc. These
49822  # will later be checked to make sure only controlled additions
49823  # have been made to CFLAGS etc.
49824  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49825  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49826  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49827
49828  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49829  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49830  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49831
49832  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49833  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49834  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49835
49836  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49837  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49838  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49839
49840    fi
49841  fi
49842  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49843    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49844    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49845    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49846  fi
49847
49848  # Make compilation sanity check
49849  for ac_header in stdio.h
49850do :
49851  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49852if test "x$ac_cv_header_stdio_h" = xyes; then :
49853  cat >>confdefs.h <<_ACEOF
49854#define HAVE_STDIO_H 1
49855_ACEOF
49856
49857else
49858
49859    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49860$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49861    if test "x$COMPILE_TYPE" = xreduced; then
49862
49863  # Print a helpful message on how to acquire the necessary build dependency.
49864  # reduced is the help tag: freetype, cups, alsa etc
49865  MISSING_DEPENDENCY=reduced
49866
49867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49868    cygwin_help $MISSING_DEPENDENCY
49869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49870    msys_help $MISSING_DEPENDENCY
49871  else
49872    PKGHANDLER_COMMAND=
49873
49874    case $PKGHANDLER in
49875      apt-get)
49876        apt_help     $MISSING_DEPENDENCY ;;
49877      yum)
49878        yum_help     $MISSING_DEPENDENCY ;;
49879      brew)
49880        brew_help    $MISSING_DEPENDENCY ;;
49881      port)
49882        port_help    $MISSING_DEPENDENCY ;;
49883      pkgutil)
49884        pkgutil_help $MISSING_DEPENDENCY ;;
49885      pkgadd)
49886        pkgadd_help  $MISSING_DEPENDENCY ;;
49887    esac
49888
49889    if test "x$PKGHANDLER_COMMAND" != x; then
49890      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49891    fi
49892  fi
49893
49894      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49895$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49896    elif test "x$COMPILE_TYPE" = xcross; then
49897      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49898$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49899    fi
49900    as_fn_error $? "Cannot continue." "$LINENO" 5
49901
49902fi
49903
49904done
49905
49906
49907  # The cast to long int works around a bug in the HP C Compiler
49908# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49909# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49910# This bug is HP SR number 8606223364.
49911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49912$as_echo_n "checking size of int *... " >&6; }
49913if ${ac_cv_sizeof_int_p+:} false; then :
49914  $as_echo_n "(cached) " >&6
49915else
49916  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49917
49918else
49919  if test "$ac_cv_type_int_p" = yes; then
49920     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49921$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49922as_fn_error 77 "cannot compute sizeof (int *)
49923See \`config.log' for more details" "$LINENO" 5; }
49924   else
49925     ac_cv_sizeof_int_p=0
49926   fi
49927fi
49928
49929fi
49930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49931$as_echo "$ac_cv_sizeof_int_p" >&6; }
49932
49933
49934
49935cat >>confdefs.h <<_ACEOF
49936#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49937_ACEOF
49938
49939
49940
49941  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49942  if test "x$ac_cv_sizeof_int_p" = x; then
49943    # The test failed, lets stick to the assumed value.
49944    { $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
49945$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49946  else
49947    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49948
49949    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49950      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49951      # Let's try to implicitely set the compilers target architecture and retry the test
49952      { $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
49953$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;}
49954      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49955$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49956
49957  # When we add flags to the "official" CFLAGS etc, we need to
49958  # keep track of these additions in ADDED_CFLAGS etc. These
49959  # will later be checked to make sure only controlled additions
49960  # have been made to CFLAGS etc.
49961  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49962  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49963  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49964
49965  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49966  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49967  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49968
49969  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49970  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49971  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49972
49973  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49974  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49975  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49976
49977
49978      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49979      unset ac_cv_sizeof_int_p
49980      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49981      cat >>confdefs.h <<_ACEOF
49982#undef SIZEOF_INT_P
49983_ACEOF
49984
49985      # The cast to long int works around a bug in the HP C Compiler
49986# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49987# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49988# This bug is HP SR number 8606223364.
49989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49990$as_echo_n "checking size of int *... " >&6; }
49991if ${ac_cv_sizeof_int_p+:} false; then :
49992  $as_echo_n "(cached) " >&6
49993else
49994  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49995
49996else
49997  if test "$ac_cv_type_int_p" = yes; then
49998     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49999$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50000as_fn_error 77 "cannot compute sizeof (int *)
50001See \`config.log' for more details" "$LINENO" 5; }
50002   else
50003     ac_cv_sizeof_int_p=0
50004   fi
50005fi
50006
50007fi
50008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50009$as_echo "$ac_cv_sizeof_int_p" >&6; }
50010
50011
50012
50013cat >>confdefs.h <<_ACEOF
50014#define SIZEOF_INT_P $ac_cv_sizeof_int_p
50015_ACEOF
50016
50017
50018
50019      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50020
50021      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50022        { $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
50023$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;}
50024        if test "x$COMPILE_TYPE" = xreduced; then
50025
50026  # Print a helpful message on how to acquire the necessary build dependency.
50027  # reduced is the help tag: freetype, cups, alsa etc
50028  MISSING_DEPENDENCY=reduced
50029
50030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50031    cygwin_help $MISSING_DEPENDENCY
50032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50033    msys_help $MISSING_DEPENDENCY
50034  else
50035    PKGHANDLER_COMMAND=
50036
50037    case $PKGHANDLER in
50038      apt-get)
50039        apt_help     $MISSING_DEPENDENCY ;;
50040      yum)
50041        yum_help     $MISSING_DEPENDENCY ;;
50042      brew)
50043        brew_help    $MISSING_DEPENDENCY ;;
50044      port)
50045        port_help    $MISSING_DEPENDENCY ;;
50046      pkgutil)
50047        pkgutil_help $MISSING_DEPENDENCY ;;
50048      pkgadd)
50049        pkgadd_help  $MISSING_DEPENDENCY ;;
50050    esac
50051
50052    if test "x$PKGHANDLER_COMMAND" != x; then
50053      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50054    fi
50055  fi
50056
50057          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50058$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50059        elif test "x$COMPILE_TYPE" = xcross; then
50060          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50061$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50062        fi
50063        as_fn_error $? "Cannot continue." "$LINENO" 5
50064      fi
50065    fi
50066  fi
50067
50068  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
50069$as_echo_n "checking for target address size... " >&6; }
50070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
50071$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
50072
50073
50074  ###############################################################################
50075  #
50076  # Is the target little of big endian?
50077  #
50078   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
50079$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
50080if ${ac_cv_c_bigendian+:} false; then :
50081  $as_echo_n "(cached) " >&6
50082else
50083  ac_cv_c_bigendian=unknown
50084    # See if we're dealing with a universal compiler.
50085    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50086/* end confdefs.h.  */
50087#ifndef __APPLE_CC__
50088	       not a universal capable compiler
50089	     #endif
50090	     typedef int dummy;
50091
50092_ACEOF
50093if ac_fn_cxx_try_compile "$LINENO"; then :
50094
50095	# Check for potential -arch flags.  It is not universal unless
50096	# there are at least two -arch flags with different values.
50097	ac_arch=
50098	ac_prev=
50099	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
50100	 if test -n "$ac_prev"; then
50101	   case $ac_word in
50102	     i?86 | x86_64 | ppc | ppc64)
50103	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
50104		 ac_arch=$ac_word
50105	       else
50106		 ac_cv_c_bigendian=universal
50107		 break
50108	       fi
50109	       ;;
50110	   esac
50111	   ac_prev=
50112	 elif test "x$ac_word" = "x-arch"; then
50113	   ac_prev=arch
50114	 fi
50115       done
50116fi
50117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50118    if test $ac_cv_c_bigendian = unknown; then
50119      # See if sys/param.h defines the BYTE_ORDER macro.
50120      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50121/* end confdefs.h.  */
50122#include <sys/types.h>
50123	     #include <sys/param.h>
50124
50125int
50126main ()
50127{
50128#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
50129		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
50130		     && LITTLE_ENDIAN)
50131	      bogus endian macros
50132	     #endif
50133
50134  ;
50135  return 0;
50136}
50137_ACEOF
50138if ac_fn_cxx_try_compile "$LINENO"; then :
50139  # It does; now see whether it defined to BIG_ENDIAN or not.
50140	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50141/* end confdefs.h.  */
50142#include <sys/types.h>
50143		#include <sys/param.h>
50144
50145int
50146main ()
50147{
50148#if BYTE_ORDER != BIG_ENDIAN
50149		 not big endian
50150		#endif
50151
50152  ;
50153  return 0;
50154}
50155_ACEOF
50156if ac_fn_cxx_try_compile "$LINENO"; then :
50157  ac_cv_c_bigendian=yes
50158else
50159  ac_cv_c_bigendian=no
50160fi
50161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50162fi
50163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50164    fi
50165    if test $ac_cv_c_bigendian = unknown; then
50166      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
50167      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50168/* end confdefs.h.  */
50169#include <limits.h>
50170
50171int
50172main ()
50173{
50174#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
50175	      bogus endian macros
50176	     #endif
50177
50178  ;
50179  return 0;
50180}
50181_ACEOF
50182if ac_fn_cxx_try_compile "$LINENO"; then :
50183  # It does; now see whether it defined to _BIG_ENDIAN or not.
50184	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50185/* end confdefs.h.  */
50186#include <limits.h>
50187
50188int
50189main ()
50190{
50191#ifndef _BIG_ENDIAN
50192		 not big endian
50193		#endif
50194
50195  ;
50196  return 0;
50197}
50198_ACEOF
50199if ac_fn_cxx_try_compile "$LINENO"; then :
50200  ac_cv_c_bigendian=yes
50201else
50202  ac_cv_c_bigendian=no
50203fi
50204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50205fi
50206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50207    fi
50208    if test $ac_cv_c_bigendian = unknown; then
50209      # Compile a test program.
50210      if test "$cross_compiling" = yes; then :
50211  # Try to guess by grepping values from an object file.
50212	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50213/* end confdefs.h.  */
50214short int ascii_mm[] =
50215		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
50216		short int ascii_ii[] =
50217		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
50218		int use_ascii (int i) {
50219		  return ascii_mm[i] + ascii_ii[i];
50220		}
50221		short int ebcdic_ii[] =
50222		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
50223		short int ebcdic_mm[] =
50224		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
50225		int use_ebcdic (int i) {
50226		  return ebcdic_mm[i] + ebcdic_ii[i];
50227		}
50228		extern int foo;
50229
50230int
50231main ()
50232{
50233return use_ascii (foo) == use_ebcdic (foo);
50234  ;
50235  return 0;
50236}
50237_ACEOF
50238if ac_fn_cxx_try_compile "$LINENO"; then :
50239  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
50240	      ac_cv_c_bigendian=yes
50241	    fi
50242	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
50243	      if test "$ac_cv_c_bigendian" = unknown; then
50244		ac_cv_c_bigendian=no
50245	      else
50246		# finding both strings is unlikely to happen, but who knows?
50247		ac_cv_c_bigendian=unknown
50248	      fi
50249	    fi
50250fi
50251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50252else
50253  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50254/* end confdefs.h.  */
50255$ac_includes_default
50256int
50257main ()
50258{
50259
50260	     /* Are we little or big endian?  From Harbison&Steele.  */
50261	     union
50262	     {
50263	       long int l;
50264	       char c[sizeof (long int)];
50265	     } u;
50266	     u.l = 1;
50267	     return u.c[sizeof (long int) - 1] == 1;
50268
50269  ;
50270  return 0;
50271}
50272_ACEOF
50273if ac_fn_cxx_try_run "$LINENO"; then :
50274  ac_cv_c_bigendian=no
50275else
50276  ac_cv_c_bigendian=yes
50277fi
50278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50279  conftest.$ac_objext conftest.beam conftest.$ac_ext
50280fi
50281
50282    fi
50283fi
50284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
50285$as_echo "$ac_cv_c_bigendian" >&6; }
50286 case $ac_cv_c_bigendian in #(
50287   yes)
50288     ENDIAN="big";; #(
50289   no)
50290     ENDIAN="little" ;; #(
50291   universal)
50292     ENDIAN="universal_endianness"
50293     ;; #(
50294   *)
50295     ENDIAN="unknown" ;;
50296 esac
50297
50298
50299  if test "x$ENDIAN" = xuniversal_endianness; then
50300    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
50301  fi
50302  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
50303    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
50304  fi
50305
50306
50307# Configure flags for the tools
50308
50309  ###############################################################################
50310  #
50311  # How to compile shared libraries.
50312  #
50313
50314  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50315    PICFLAG="-fPIC"
50316    C_FLAG_REORDER=''
50317    CXX_FLAG_REORDER=''
50318
50319    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50320      # Linking is different on MacOSX
50321      if test "x$STATIC_BUILD" = xtrue; then
50322        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
50323      else
50324        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50325        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50326      fi
50327      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50328      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50329      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50330      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50331    else
50332      # Default works for linux, might work on other platforms as well.
50333      SHARED_LIBRARY_FLAGS='-shared'
50334      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50335      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50336      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50337      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50338    fi
50339  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50340    C_FLAG_REORDER=''
50341    CXX_FLAG_REORDER=''
50342
50343    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50344      # Linking is different on MacOSX
50345      PICFLAG=''
50346      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50347      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50348      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50349      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50350      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50351
50352      if test "x$STATIC_BUILD" = xfalse; then
50353        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50354      fi
50355    else
50356      # Default works for linux, might work on other platforms as well.
50357      PICFLAG='-fPIC'
50358      SHARED_LIBRARY_FLAGS='-shared'
50359      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50360      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50361      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50362
50363      # arm specific settings
50364      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50365        # '-Wl,-z,origin' isn't used on arm.
50366        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50367      else
50368        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50369      fi
50370
50371    fi
50372  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50373    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50374      PICFLAG="-xcode=pic32"
50375    else
50376      PICFLAG="-KPIC"
50377    fi
50378    C_FLAG_REORDER='-xF'
50379    CXX_FLAG_REORDER='-xF'
50380    SHARED_LIBRARY_FLAGS="-G"
50381    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50382    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50383    SET_SHARED_LIBRARY_NAME='-h $1'
50384    SET_SHARED_LIBRARY_MAPFILE='-M$1'
50385  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50386    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50387    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50388    # will have to patch this single instruction with a call to some out-of-order code which
50389    # does the load from the TOC. This is of course slow. But in that case we also would have
50390    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50391    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50392    # can be patched directly by the linker and does not require a jump to out-of-order code.
50393    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50394    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50395    # loads for accessing a global variable). But there are rumors that this may be seen as a
50396    # 'performance feature' because of improved code locality of the symbols used in a
50397    # compilation unit.
50398    PICFLAG="-qpic"
50399    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50400    C_FLAG_REORDER=''
50401    CXX_FLAG_REORDER=''
50402    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50403    SET_EXECUTABLE_ORIGIN=""
50404    SET_SHARED_LIBRARY_ORIGIN=''
50405    SET_SHARED_LIBRARY_NAME=''
50406    SET_SHARED_LIBRARY_MAPFILE=''
50407  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50408    PICFLAG=""
50409    C_FLAG_REORDER=''
50410    CXX_FLAG_REORDER=''
50411    SHARED_LIBRARY_FLAGS="-dll"
50412    SET_EXECUTABLE_ORIGIN=''
50413    SET_SHARED_LIBRARY_ORIGIN=''
50414    SET_SHARED_LIBRARY_NAME=''
50415    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50416  fi
50417
50418
50419
50420
50421
50422
50423
50424
50425
50426  # The (cross) compiler is now configured, we can now test capabilities
50427  # of the target platform.
50428
50429
50430
50431  ###############################################################################
50432  #
50433  # Setup the opt flags for different compilers
50434  # and different operating systems.
50435  #
50436
50437  # FIXME: this was indirectly the old default, but just inherited.
50438  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50439  #   C_FLAG_DEPS="-MMD -MF"
50440  # fi
50441
50442  # Generate make dependency files
50443  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50444    C_FLAG_DEPS="-MMD -MF"
50445  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50446    C_FLAG_DEPS="-MMD -MF"
50447  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50448    C_FLAG_DEPS="-xMMD -xMF"
50449  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50450    C_FLAG_DEPS="-qmakedep=gcc -MF"
50451  fi
50452  CXX_FLAG_DEPS="$C_FLAG_DEPS"
50453
50454
50455
50456  # Debug symbols
50457  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50458    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50459      # reduce from default "-g2" option to save space
50460      CFLAGS_DEBUG_SYMBOLS="-g1"
50461      CXXFLAGS_DEBUG_SYMBOLS="-g1"
50462    else
50463      CFLAGS_DEBUG_SYMBOLS="-g"
50464      CXXFLAGS_DEBUG_SYMBOLS="-g"
50465    fi
50466  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50467    CFLAGS_DEBUG_SYMBOLS="-g"
50468    CXXFLAGS_DEBUG_SYMBOLS="-g"
50469  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50470    CFLAGS_DEBUG_SYMBOLS="-g -xs"
50471    # -g0 enables debug symbols without disabling inlining.
50472    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50473  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50474    CFLAGS_DEBUG_SYMBOLS="-g"
50475    CXXFLAGS_DEBUG_SYMBOLS="-g"
50476  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50477    CFLAGS_DEBUG_SYMBOLS="-Zi"
50478    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50479  fi
50480
50481
50482
50483  # Debug symbols for JVM_CFLAGS
50484  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50485    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50486    if test "x$DEBUG_LEVEL" = xslowdebug; then
50487      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50488    else
50489      # -g0 does not disable inlining, which -g does.
50490      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50491    fi
50492  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50493    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50494  else
50495    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50496  fi
50497
50498
50499  # bounds, memory and behavior checking options
50500  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50501    case $DEBUG_LEVEL in
50502    release )
50503      # no adjustment
50504      ;;
50505    fastdebug )
50506      # no adjustment
50507      ;;
50508    slowdebug )
50509      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50510      # get's added conditionally on whether we produce debug symbols or not.
50511      # This is most likely not really correct.
50512
50513      # Add runtime stack smashing and undefined behavior checks.
50514      # Not all versions of gcc support -fstack-protector
50515      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50516
50517
50518
50519
50520
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558    # Execute function body
50559
50560
50561
50562
50563
50564
50565
50566
50567
50568
50569
50570
50571
50572
50573
50574
50575
50576
50577
50578
50579
50580
50581
50582
50583
50584
50585
50586
50587
50588
50589
50590
50591
50592
50593
50594
50595
50596
50597
50598
50599
50600
50601
50602
50603
50604
50605
50606
50607    # Execute function body
50608
50609  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50610$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50611  supports=yes
50612
50613  saved_cflags="$CFLAGS"
50614  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50615  ac_ext=c
50616ac_cpp='$CPP $CPPFLAGS'
50617ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50618ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50619ac_compiler_gnu=$ac_cv_c_compiler_gnu
50620
50621  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50622/* end confdefs.h.  */
50623int i;
50624_ACEOF
50625if ac_fn_c_try_compile "$LINENO"; then :
50626
50627else
50628  supports=no
50629fi
50630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50631  ac_ext=cpp
50632ac_cpp='$CXXCPP $CPPFLAGS'
50633ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50634ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50635ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50636
50637  CFLAGS="$saved_cflags"
50638
50639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50640$as_echo "$supports" >&6; }
50641  if test "x$supports" = "xyes" ; then
50642    :
50643    C_COMP_SUPPORTS="yes"
50644  else
50645    :
50646    C_COMP_SUPPORTS="no"
50647  fi
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660
50661
50662
50663
50664
50665
50666
50667
50668
50669
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707    # Execute function body
50708
50709  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50710$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50711  supports=yes
50712
50713  saved_cxxflags="$CXXFLAGS"
50714  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50715  ac_ext=cpp
50716ac_cpp='$CXXCPP $CPPFLAGS'
50717ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50718ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50719ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50720
50721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50722/* end confdefs.h.  */
50723int i;
50724_ACEOF
50725if ac_fn_cxx_try_compile "$LINENO"; then :
50726
50727else
50728  supports=no
50729fi
50730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50731  ac_ext=cpp
50732ac_cpp='$CXXCPP $CPPFLAGS'
50733ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50734ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50735ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50736
50737  CXXFLAGS="$saved_cxxflags"
50738
50739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50740$as_echo "$supports" >&6; }
50741  if test "x$supports" = "xyes" ; then
50742    :
50743    CXX_COMP_SUPPORTS="yes"
50744  else
50745    :
50746    CXX_COMP_SUPPORTS="no"
50747  fi
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50762$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50763  supports=no
50764  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50765
50766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50767$as_echo "$supports" >&6; }
50768  if test "x$supports" = "xyes" ; then
50769    :
50770
50771  else
50772    :
50773    STACK_PROTECTOR_CFLAG=""
50774  fi
50775
50776
50777
50778
50779
50780
50781
50782      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50783      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50784      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50785        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50786      fi
50787      ;;
50788    esac
50789  fi
50790
50791  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50792    if test "x$DEBUG_LEVEL" != xrelease; then
50793      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50794        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50795      fi
50796    fi
50797  fi
50798
50799  # Optimization levels
50800  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50801    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50802
50803    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50804      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50805      C_O_FLAG_HIGHEST_JVM="-xO4"
50806      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50807      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50808      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50809      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50810      C_O_FLAG_DEBUG_JVM=""
50811      C_O_FLAG_NONE="-xregs=no%frameptr"
50812      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50813      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50814      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50815      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50816      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50817      CXX_O_FLAG_DEBUG_JVM=""
50818      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50819      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50820        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50821        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50822      fi
50823    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50824      C_O_FLAG_HIGHEST_JVM="-xO4"
50825      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50826      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50827      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50828      C_O_FLAG_DEBUG=""
50829      C_O_FLAG_DEBUG_JVM=""
50830      C_O_FLAG_NONE=""
50831      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50832      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50833      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50834      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50835      CXX_O_FLAG_DEBUG=""
50836      CXX_O_FLAG_DEBUG_JVM=""
50837      CXX_O_FLAG_NONE=""
50838    fi
50839  else
50840    # The remaining toolchains share opt flags between CC and CXX;
50841    # setup for C and duplicate afterwards.
50842    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50843      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50844        # On MacOSX we optimize for size, something
50845        # we should do for all platforms?
50846        C_O_FLAG_HIGHEST_JVM="-Os"
50847        C_O_FLAG_HIGHEST="-Os"
50848        C_O_FLAG_HI="-Os"
50849        C_O_FLAG_NORM="-Os"
50850        C_O_FLAG_SIZE="-Os"
50851      else
50852        C_O_FLAG_HIGHEST_JVM="-O3"
50853        C_O_FLAG_HIGHEST="-O3"
50854        C_O_FLAG_HI="-O3"
50855        C_O_FLAG_NORM="-O2"
50856        C_O_FLAG_SIZE="-Os"
50857      fi
50858      C_O_FLAG_DEBUG="-O0"
50859      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50860        C_O_FLAG_DEBUG_JVM=""
50861      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50862        C_O_FLAG_DEBUG_JVM="-O0"
50863      fi
50864      C_O_FLAG_NONE="-O0"
50865    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50866      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50867        # On MacOSX we optimize for size, something
50868        # we should do for all platforms?
50869        C_O_FLAG_HIGHEST_JVM="-Os"
50870        C_O_FLAG_HIGHEST="-Os"
50871        C_O_FLAG_HI="-Os"
50872        C_O_FLAG_NORM="-Os"
50873        C_O_FLAG_SIZE="-Os"
50874      else
50875        C_O_FLAG_HIGHEST_JVM="-O3"
50876        C_O_FLAG_HIGHEST="-O3"
50877        C_O_FLAG_HI="-O3"
50878        C_O_FLAG_NORM="-O2"
50879        C_O_FLAG_SIZE="-Os"
50880      fi
50881      C_O_FLAG_DEBUG="-O0"
50882      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50883        C_O_FLAG_DEBUG_JVM=""
50884      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50885        C_O_FLAG_DEBUG_JVM="-O0"
50886      fi
50887      C_O_FLAG_NONE="-O0"
50888    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50889      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50890      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50891      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50892      C_O_FLAG_NORM="-O2"
50893      C_O_FLAG_DEBUG="-qnoopt"
50894      # FIXME: Value below not verified.
50895      C_O_FLAG_DEBUG_JVM=""
50896      C_O_FLAG_NONE="-qnoopt"
50897    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50898      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50899      C_O_FLAG_HIGHEST="-O2"
50900      C_O_FLAG_HI="-O1"
50901      C_O_FLAG_NORM="-O1"
50902      C_O_FLAG_DEBUG="-Od"
50903      C_O_FLAG_DEBUG_JVM=""
50904      C_O_FLAG_NONE="-Od"
50905      C_O_FLAG_SIZE="-Os"
50906    fi
50907    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50908    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50909    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50910    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50911    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50912    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50913    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50914    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50915  fi
50916
50917  # Adjust optimization flags according to debug level.
50918  case $DEBUG_LEVEL in
50919    release )
50920      # no adjustment
50921      ;;
50922    fastdebug )
50923      # Not quite so much optimization
50924      C_O_FLAG_HI="$C_O_FLAG_NORM"
50925      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50926      ;;
50927    slowdebug )
50928      # Disable optimization
50929      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50930      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50931      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50932      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50933      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50934      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50935      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50936      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50937      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50938      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50939      ;;
50940  esac
50941
50942
50943
50944
50945
50946
50947
50948
50949
50950
50951
50952
50953
50954
50955
50956
50957
50958
50959
50960
50961# Check whether --with-abi-profile was given.
50962if test "${with_abi_profile+set}" = set; then :
50963  withval=$with_abi_profile;
50964fi
50965
50966
50967  if test "x$with_abi_profile" != x; then
50968    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50969        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50970      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50971    fi
50972
50973    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50975$as_echo_n "checking for ABI profle... " >&6; }
50976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50977$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50978
50979    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50980      ARM_FLOAT_TYPE=vfp-sflt
50981      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50982    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50983      ARM_FLOAT_TYPE=vfp-hflt
50984      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50985    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50986      ARM_FLOAT_TYPE=sflt
50987      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50988    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50989      ARM_FLOAT_TYPE=vfp-sflt
50990      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50991    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50992      ARM_FLOAT_TYPE=vfp-hflt
50993      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50994    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50995      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50996      ARM_FLOAT_TYPE=
50997      ARM_ARCH_TYPE_FLAGS=
50998    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50999      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51000      ARM_FLOAT_TYPE=
51001      ARM_ARCH_TYPE_FLAGS=
51002    else
51003      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
51004    fi
51005
51006    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
51007      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
51008    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
51009      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
51010    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
51011      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
51012    fi
51013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
51014$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
51015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
51016$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
51017
51018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
51019$as_echo_n "checking for arch type flags... " >&6; }
51020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
51021$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
51022
51023    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
51024    # autoconf target triplet.
51025     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
51026    # Sanity check that it is a known ABI.
51027    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
51028        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
51029        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
51030          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
51031$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
51032    fi
51033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
51034$as_echo_n "checking for ABI property name... " >&6; }
51035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
51036$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
51037
51038
51039    # Pass these on to the open part of configure as if they were set using
51040    # --with-extra-c[xx]flags.
51041    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51042    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51043    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
51044    # FIXME: This should not really be set using extra_cflags.
51045    if test "x$OPENJDK_TARGET_CPU" = xarm; then
51046        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
51047        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
51048    fi
51049    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
51050    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
51051    # And pass the architecture flags to the linker as well
51052    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51053  fi
51054
51055  # When building with an abi profile, the name of that profile is appended on the
51056  # bundle platform, which is used in bundle names.
51057  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
51058    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
51059  fi
51060
51061
51062  # Optional POSIX functionality needed by the JVM
51063  #
51064  # Check if clock_gettime is available and in which library. This indicates
51065  # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
51066  # don't let it update LIBS.
51067  save_LIBS="$LIBS"
51068  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
51069$as_echo_n "checking for library containing clock_gettime... " >&6; }
51070if ${ac_cv_search_clock_gettime+:} false; then :
51071  $as_echo_n "(cached) " >&6
51072else
51073  ac_func_search_save_LIBS=$LIBS
51074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51075/* end confdefs.h.  */
51076
51077/* Override any GCC internal prototype to avoid an error.
51078   Use char because int might match the return type of a GCC
51079   builtin and then its argument prototype would still apply.  */
51080#ifdef __cplusplus
51081extern "C"
51082#endif
51083char clock_gettime ();
51084int
51085main ()
51086{
51087return clock_gettime ();
51088  ;
51089  return 0;
51090}
51091_ACEOF
51092for ac_lib in '' rt; do
51093  if test -z "$ac_lib"; then
51094    ac_res="none required"
51095  else
51096    ac_res=-l$ac_lib
51097    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
51098  fi
51099  if ac_fn_cxx_try_link "$LINENO"; then :
51100  ac_cv_search_clock_gettime=$ac_res
51101fi
51102rm -f core conftest.err conftest.$ac_objext \
51103    conftest$ac_exeext
51104  if ${ac_cv_search_clock_gettime+:} false; then :
51105  break
51106fi
51107done
51108if ${ac_cv_search_clock_gettime+:} false; then :
51109
51110else
51111  ac_cv_search_clock_gettime=no
51112fi
51113rm conftest.$ac_ext
51114LIBS=$ac_func_search_save_LIBS
51115fi
51116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
51117$as_echo "$ac_cv_search_clock_gettime" >&6; }
51118ac_res=$ac_cv_search_clock_gettime
51119if test "$ac_res" != no; then :
51120  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
51121  HAS_CLOCK_GETTIME=true
51122fi
51123
51124  if test "x$LIBS" = "x-lrt "; then
51125    CLOCK_GETTIME_IN_LIBRT=true
51126  fi
51127  LIBS="$save_LIBS"
51128
51129
51130  # Special extras...
51131  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51132    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51133      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51134      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51135    fi
51136    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51137    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51138  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51139    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51140    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51141  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51142    CXXSTD_CXXFLAG="-std=gnu++98"
51143
51144
51145
51146
51147
51148
51149
51150
51151
51152
51153
51154
51155
51156
51157
51158
51159
51160
51161
51162
51163
51164
51165
51166
51167
51168
51169
51170
51171
51172
51173
51174
51175
51176
51177
51178
51179
51180
51181
51182
51183
51184
51185    # Execute function body
51186
51187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
51188$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
51189  supports=yes
51190
51191  saved_cxxflags="$CXXFLAGS"
51192  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
51193  ac_ext=cpp
51194ac_cpp='$CXXCPP $CPPFLAGS'
51195ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51196ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51197ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51198
51199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51200/* end confdefs.h.  */
51201int i;
51202_ACEOF
51203if ac_fn_cxx_try_compile "$LINENO"; then :
51204
51205else
51206  supports=no
51207fi
51208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51209  ac_ext=cpp
51210ac_cpp='$CXXCPP $CPPFLAGS'
51211ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51212ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51213ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51214
51215  CXXFLAGS="$saved_cxxflags"
51216
51217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51218$as_echo "$supports" >&6; }
51219  if test "x$supports" = "xyes" ; then
51220    :
51221
51222  else
51223    :
51224    CXXSTD_CXXFLAG=""
51225  fi
51226
51227
51228
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
51239    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
51240
51241  fi
51242  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51243    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
51244    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
51245  fi
51246
51247  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
51248  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
51249  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
51250
51251  ###############################################################################
51252  #
51253  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51254  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51255  #
51256
51257  # Setup compiler/platform specific flags into
51258  #    CFLAGS_JDK    - C Compiler flags
51259  #    CXXFLAGS_JDK  - C++ Compiler flags
51260  #    COMMON_CCXXFLAGS_JDK - common to C and C++
51261  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51262    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51263    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51264    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
51265    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51266      # Force compatibility with i586 on 32 bit intel platforms.
51267      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51268      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51269    fi
51270    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51271        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51272    case $OPENJDK_TARGET_CPU_ARCH in
51273      arm )
51274        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51275        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51276        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
51277        ;;
51278      ppc )
51279        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51280        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51281        ;;
51282      s390 )
51283        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51284        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51285        ;;
51286      * )
51287        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51288        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51289        ;;
51290    esac
51291
51292
51293
51294
51295
51296
51297
51298
51299
51300
51301
51302
51303
51304
51305
51306
51307
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345    # Execute function body
51346
51347  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51348  REFERENCE_VERSION=6
51349
51350  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51351    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51352  fi
51353
51354  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51355    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51356  fi
51357
51358  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51359  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51360
51361  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51362    :
51363
51364  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51365  # runs afoul of the more aggressive versions of these optimisations.
51366  # Notably, value range propagation now assumes that the this pointer of C++
51367  # member functions is non-null.
51368  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51369        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51370        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51371$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51372  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51373  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51374
51375  else
51376    :
51377
51378  fi
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51394    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51395
51396    # Restrict the debug information created by Clang to avoid
51397    # too big object files and speed the build up a little bit
51398    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51399    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51400    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51401      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51402        # Force compatibility with i586 on 32 bit intel platforms.
51403        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51404        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51405      fi
51406      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51407      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51408          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51409      case $OPENJDK_TARGET_CPU_ARCH in
51410        ppc )
51411          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51412          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51413          ;;
51414        * )
51415          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51416          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51417          ;;
51418      esac
51419    fi
51420  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51421    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51422    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51423    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51424      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51425    fi
51426
51427    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51428    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51429  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51430    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51431    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51432    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51433  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51434    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51435        -MD -Zc:wchar_t- -W3 -wd4800 \
51436        -DWIN32_LEAN_AND_MEAN \
51437        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51438        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51439        -DWIN32 -DIAL"
51440    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51441      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51442    else
51443      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51444    fi
51445    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51446    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51447    # studio.
51448    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51449      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51450      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51451      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51452    fi
51453  fi
51454
51455  ###############################################################################
51456
51457  # Adjust flags according to debug level.
51458  case $DEBUG_LEVEL in
51459    fastdebug | slowdebug )
51460      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51461      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51462      ;;
51463    release )
51464      ;;
51465    * )
51466      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51467      ;;
51468  esac
51469
51470  # Set some common defines. These works for all compilers, but assume
51471  # -D is universally accepted.
51472
51473  # Setup endianness
51474  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51475    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51476    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51477    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51478    #   Note: -Dmacro         is the same as    #define macro 1
51479    #         -Dmacro=        is the same as    #define macro
51480    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51481      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51482    else
51483      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51484    fi
51485  else
51486    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51487    # are defined in the system?
51488    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51489      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51490    else
51491      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51492    fi
51493  fi
51494
51495  # Always enable optional macros for VM.
51496  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_FORMAT_MACROS"
51497  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_LIMIT_MACROS"
51498  JVM_CFLAGS="$JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
51499
51500  # Setup target OS define. Use OS target name but in upper case.
51501  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51502  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51503
51504  # Setup target CPU
51505  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51506      $OPENJDK_TARGET_ADD_LP64 \
51507      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51508
51509  # Setup debug/release defines
51510  if test "x$DEBUG_LEVEL" = xrelease; then
51511    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51512    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51513      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51514    fi
51515  else
51516    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51517  fi
51518
51519  # Optional POSIX functionality needed by the VM
51520
51521  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
51522    JVM_CFLAGS="$JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
51523    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
51524      JVM_CFLAGS="$JVM_CFLAGS -DNEEDS_LIBRT"
51525    fi
51526  fi
51527
51528
51529  # Set some additional per-OS defines.
51530  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51531    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51532    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51533        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51534  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51535    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51536    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51537        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
51538  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51539    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51540    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51541    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51542    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51543        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51544        -fno-omit-frame-pointer"
51545  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51546    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51547    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51548        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51549        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51550    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51551    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
51552    # so for slowdebug we build with '-qpic=large -bbigtoc'.
51553    if test "x$DEBUG_LEVEL" = xslowdebug; then
51554      JVM_CFLAGS="$JVM_CFLAGS -qpic=large"
51555    fi
51556  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51557    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51558  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51559    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51560    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51561  fi
51562
51563  # Set some additional per-CPU defines.
51564  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51565    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51566  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51567    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51568  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51569    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51570      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51571      # fixes `relocation truncated to fit' error for gcc 4.1.
51572      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51573      # Use ppc64 instructions, but schedule for power5
51574      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51575    elif test "x$OPENJDK_TARGET_OS" = xaix; then
51576      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51577    fi
51578  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51579    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51580      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51581      # Little endian machine uses ELFv2 ABI.
51582      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51583      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51584      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51585    fi
51586  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51587    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51588      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51589    fi
51590  fi
51591
51592  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51593    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51594  fi
51595
51596  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51597    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51598      # Solaris does not have _LP64=1 in the old build.
51599      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51600      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51601    fi
51602  fi
51603
51604  # Set JVM_CFLAGS warning handling
51605  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51606    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51607        -Wunused-value -Woverloaded-virtual"
51608
51609    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51610
51611
51612
51613
51614
51615
51616
51617
51618
51619
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664    # Execute function body
51665
51666  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51667  REFERENCE_VERSION=4.8
51668
51669  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51670    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51671  fi
51672
51673  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51674    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51675  fi
51676
51677  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51678  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51679
51680  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51681    :
51682
51683            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51684            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51685
51686
51687  else
51688    :
51689
51690  fi
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705    fi
51706    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51707      # Non-zero builds have stricter warnings
51708      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51709    else
51710      if test "x$TOOLCHAIN_TYPE" = xclang; then
51711        # Some versions of llvm do not like -Wundef
51712        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51713      fi
51714    fi
51715  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51716    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51717        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51718  fi
51719
51720  # Additional macosx handling
51721  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51722    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
51723    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
51724    # JDK can be built and makes the linked binaries compatible even if built on
51725    # a newer version of the OS.
51726    MACOSX_VERSION_MIN=10.7.0
51727
51728
51729    # Setting --with-macosx-version-max=<version> makes it an error to build or
51730    # link to macosx APIs that are newer than the given OS version. The expected
51731    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
51732
51733# Check whether --with-macosx-version-max was given.
51734if test "${with_macosx_version_max+set}" = set; then :
51735  withval=$with_macosx_version_max;
51736          if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
51737              MACOSX_VERSION_MAX=$with_macosx_version_max
51738          elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
51739              MACOSX_VERSION_MAX=$with_macosx_version_max
51740          elif test "x$with_macosx_version_max" = "xno"; then
51741              # Use build system default
51742              MACOSX_VERSION_MAX=
51743          else
51744              as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
51745          fi
51746
51747else
51748  MACOSX_VERSION_MAX=
51749
51750fi
51751
51752
51753
51754    # Let the flags variables get resolved in make for easier override on make
51755    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
51756    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51757        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51758        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51759    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51760    JVM_CFLAGS="$JVM_CFLAGS \
51761        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
51762        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51763
51764    if test -n "$MACOSX_VERSION_MAX"; then
51765        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51766            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51767        JVM_CFLAGS="$JVM_CFLAGS \
51768            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
51769    fi
51770  fi
51771
51772  # Setup some hard coded includes
51773  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51774      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51775      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51776      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51777      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51778      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51779      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51780
51781  # The shared libraries are compiled using the picflag.
51782  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51783      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51784  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51785      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51786
51787  # Executable flags
51788  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51789  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51790
51791
51792
51793
51794
51795
51796  # Setup LDFLAGS et al.
51797  #
51798
51799  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51800    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51801    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51802    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51803    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51804      LDFLAGS_SAFESH="-safeseh"
51805      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51806      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51807      # NOTE: Old build added -machine. Probably not needed.
51808      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51809    else
51810      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51811    fi
51812  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51813      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51814      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51815        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51816        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51817    fi
51818  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51819    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51820    # We have previously set HAS_GNU_HASH if this is the case
51821    if test -n "$HAS_GNU_HASH"; then
51822      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51823      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51824      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51825    fi
51826      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51827        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51828    fi
51829    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51830      # And since we now know that the linker is gnu, then add -z defs, to forbid
51831      # undefined symbols in object files.
51832      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51833      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51834      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51835      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51836      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51837      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51838        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51839      fi
51840      case $DEBUG_LEVEL in
51841        release )
51842          # tell linker to optimize libraries.
51843          # Should this be supplied to the OSS linker as well?
51844          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51845          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51846          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51847          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51848            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51849          fi
51850          ;;
51851        slowdebug )
51852          # Hotspot always let the linker optimize
51853          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51854          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51855            # do relocations at load
51856            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51857            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51858            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51859          fi
51860          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51861            # mark relocations read only
51862            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51863            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51864            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51865          fi
51866          ;;
51867        fastdebug )
51868          # Hotspot always let the linker optimize
51869          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51870          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51871            # mark relocations read only
51872            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51873            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51874            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51875          fi
51876          ;;
51877        * )
51878          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51879          ;;
51880        esac
51881    fi
51882  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51883    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51884    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51885    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51886    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51887    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51888    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51889      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51890    fi
51891  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51892    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51893    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51894    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51895    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51896    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
51897    # so for slowdebug we build with '-qpic=large -bbigtoc'.
51898    if test "x$DEBUG_LEVEL" = xslowdebug; then
51899      JVM_LDFLAGS="$JVM_LDFLAGS -bbigtoc"
51900    fi
51901  fi
51902
51903  # Customize LDFLAGS for executables
51904
51905  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51906
51907  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51908    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51909      LDFLAGS_STACK_SIZE=1048576
51910    else
51911      LDFLAGS_STACK_SIZE=327680
51912    fi
51913    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51914  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51915    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51916  fi
51917
51918  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51919
51920  # Customize LDFLAGS for libs
51921  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51922
51923  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51924  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51925    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51926        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51927    JDKLIB_LIBS=""
51928  else
51929    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51930        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51931
51932    if test "xTARGET" = "xTARGET"; then
51933      # On some platforms (mac) the linker warns about non existing -L dirs.
51934      # For any of the variants server, client or minimal, the dir matches the
51935      # variant name. The "main" variant should be used for linking. For the
51936      # rest, the dir is just server.
51937      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51938          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51939        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51940            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51941      else
51942        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51943            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51944      fi
51945    elif test "xTARGET" = "xBUILD"; then
51946      # When building a buildjdk, it's always only the server variant
51947      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51948          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51949    fi
51950
51951    JDKLIB_LIBS="-ljava -ljvm"
51952    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51953      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51954    fi
51955
51956  fi
51957
51958LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51959
51960  # Set JVM_LIBS (per os)
51961  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51962    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51963  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51964    # FIXME: This hard-coded path is not really proper.
51965    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51966      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51967    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51968      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51969    fi
51970    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51971        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51972  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51973    JVM_LIBS="$JVM_LIBS -lm"
51974  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51975    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51976  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51977    JVM_LIBS="$JVM_LIBS -lm"
51978  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51979    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51980        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51981        wsock32.lib winmm.lib version.lib psapi.lib"
51982    fi
51983
51984  # Set JVM_ASFLAGS
51985  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51986    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51987      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51988    fi
51989  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51990    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51991  fi
51992
51993  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009  # Special extras...
52010  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52011    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52012      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52013      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52014    fi
52015    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52016    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52017  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52018    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52019    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52020  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52021    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064    # Execute function body
52065
52066  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
52067$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
52068  supports=yes
52069
52070  saved_cxxflags="$CXXFLAGS"
52071  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
52072  ac_ext=cpp
52073ac_cpp='$CXXCPP $CPPFLAGS'
52074ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52075ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52076ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52077
52078  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52079/* end confdefs.h.  */
52080int i;
52081_ACEOF
52082if ac_fn_cxx_try_compile "$LINENO"; then :
52083
52084else
52085  supports=no
52086fi
52087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52088  ac_ext=cpp
52089ac_cpp='$CXXCPP $CPPFLAGS'
52090ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52091ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52092ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52093
52094  CXXFLAGS="$saved_cxxflags"
52095
52096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52097$as_echo "$supports" >&6; }
52098  if test "x$supports" = "xyes" ; then
52099    :
52100
52101  else
52102    :
52103    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
52104  fi
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52118    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
52119
52120  fi
52121  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52122    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
52123    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
52124  fi
52125
52126  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
52127  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
52128  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
52129
52130  ###############################################################################
52131  #
52132  # Now setup the CFLAGS and LDFLAGS for the JDK build.
52133  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
52134  #
52135
52136  # Setup compiler/platform specific flags into
52137  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
52138  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
52139  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
52140  if test "x$TOOLCHAIN_TYPE" = xgcc; then
52141    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52142    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52143    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
52144    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52145      # Force compatibility with i586 on 32 bit intel platforms.
52146      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52147      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52148    fi
52149    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52150        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52151    case $OPENJDK_BUILD_CPU_ARCH in
52152      arm )
52153        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52154        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52155        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
52156        ;;
52157      ppc )
52158        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52159        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52160        ;;
52161      s390 )
52162        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
52163        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52164        ;;
52165      * )
52166        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52167        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52168        ;;
52169    esac
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
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    # Execute function body
52225
52226  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52227  REFERENCE_VERSION=6
52228
52229  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52230    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52231  fi
52232
52233  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52234    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
52235  fi
52236
52237  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52238  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52239
52240  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52241    :
52242
52243  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
52244  # runs afoul of the more aggressive versions of these optimisations.
52245  # Notably, value range propagation now assumes that the this pointer of C++
52246  # member functions is non-null.
52247  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
52248        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
52249        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
52250$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
52251  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52252  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52253
52254  else
52255    :
52256
52257  fi
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52273    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52274
52275    # Restrict the debug information created by Clang to avoid
52276    # too big object files and speed the build up a little bit
52277    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
52278    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
52279    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52280      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52281        # Force compatibility with i586 on 32 bit intel platforms.
52282        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52283        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52284      fi
52285      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
52286      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52287          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52288      case $OPENJDK_BUILD_CPU_ARCH in
52289        ppc )
52290          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52291          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52292          ;;
52293        * )
52294          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52295          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52296          ;;
52297      esac
52298    fi
52299  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52300    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
52301    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
52302    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
52303      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
52304    fi
52305
52306    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
52307    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
52308  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52309    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52310    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52311    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52312  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52313    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52314        -MD -Zc:wchar_t- -W3 -wd4800 \
52315        -DWIN32_LEAN_AND_MEAN \
52316        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
52317        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
52318        -DWIN32 -DIAL"
52319    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52320      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
52321    else
52322      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
52323    fi
52324    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
52325    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
52326    # studio.
52327    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
52328      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52329      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52330      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52331    fi
52332  fi
52333
52334  ###############################################################################
52335
52336  # Adjust flags according to debug level.
52337  case $DEBUG_LEVEL in
52338    fastdebug | slowdebug )
52339      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52340      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52341      ;;
52342    release )
52343      ;;
52344    * )
52345      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52346      ;;
52347  esac
52348
52349  # Set some common defines. These works for all compilers, but assume
52350  # -D is universally accepted.
52351
52352  # Setup endianness
52353  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52354    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52355    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52356    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52357    #   Note: -Dmacro         is the same as    #define macro 1
52358    #         -Dmacro=        is the same as    #define macro
52359    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52360      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52361    else
52362      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52363    fi
52364  else
52365    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52366    # are defined in the system?
52367    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52368      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52369    else
52370      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52371    fi
52372  fi
52373
52374  # Always enable optional macros for VM.
52375  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_FORMAT_MACROS"
52376  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_LIMIT_MACROS"
52377  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
52378
52379  # Setup target OS define. Use OS target name but in upper case.
52380  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52381  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
52382
52383  # Setup target CPU
52384  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52385      $OPENJDK_BUILD_ADD_LP64 \
52386      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
52387
52388  # Setup debug/release defines
52389  if test "x$DEBUG_LEVEL" = xrelease; then
52390    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
52391    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52392      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
52393    fi
52394  else
52395    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
52396  fi
52397
52398  # Optional POSIX functionality needed by the VM
52399
52400  if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
52401    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
52402    if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
52403      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DNEEDS_LIBRT"
52404    fi
52405  fi
52406
52407
52408  # Set some additional per-OS defines.
52409  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52410    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
52411    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52412        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52413  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52414    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
52415    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
52416        -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
52417  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52418    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52419    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
52420    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52421    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52422        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52423        -fno-omit-frame-pointer"
52424  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52425    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
52426    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
52427        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52428        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52429    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52430    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52431    # so for slowdebug we build with '-qpic=large -bbigtoc'.
52432    if test "x$DEBUG_LEVEL" = xslowdebug; then
52433      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qpic=large"
52434    fi
52435  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52436    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52437  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52438    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52439    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
52440  fi
52441
52442  # Set some additional per-CPU defines.
52443  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
52444    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
52445  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52446    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
52447  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
52448    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52449      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52450      # fixes `relocation truncated to fit' error for gcc 4.1.
52451      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
52452      # Use ppc64 instructions, but schedule for power5
52453      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52454    elif test "x$OPENJDK_BUILD_OS" = xaix; then
52455      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
52456    fi
52457  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
52458    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52459      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52460      # Little endian machine uses ELFv2 ABI.
52461      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
52462      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52463      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
52464    fi
52465  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
52466    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52467      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
52468    fi
52469  fi
52470
52471  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52472    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52473  fi
52474
52475  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
52476    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
52477      # Solaris does not have _LP64=1 in the old build.
52478      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52479      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52480    fi
52481  fi
52482
52483  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52484  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52485    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52486        -Wunused-value -Woverloaded-virtual"
52487
52488    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543    # Execute function body
52544
52545  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52546  REFERENCE_VERSION=4.8
52547
52548  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52549    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52550  fi
52551
52552  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52553    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52554  fi
52555
52556  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52557  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52558
52559  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52560    :
52561
52562            # These flags either do not work or give spurious warnings prior to gcc 4.8.
52563            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52564
52565
52566  else
52567    :
52568
52569  fi
52570
52571
52572
52573
52574
52575
52576
52577
52578
52579
52580
52581
52582
52583
52584    fi
52585    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52586      # Non-zero builds have stricter warnings
52587      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52588    else
52589      if test "x$TOOLCHAIN_TYPE" = xclang; then
52590        # Some versions of llvm do not like -Wundef
52591        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52592      fi
52593    fi
52594  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52595    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52596        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52597  fi
52598
52599  # Additional macosx handling
52600  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52601    # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
52602    # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
52603    # JDK can be built and makes the linked binaries compatible even if built on
52604    # a newer version of the OS.
52605    MACOSX_VERSION_MIN=10.7.0
52606
52607
52608    # Setting --with-macosx-version-max=<version> makes it an error to build or
52609    # link to macosx APIs that are newer than the given OS version. The expected
52610    # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
52611
52612# Check whether --with-macosx-version-max was given.
52613if test "${with_macosx_version_max+set}" = set; then :
52614  withval=$with_macosx_version_max;
52615          if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
52616              MACOSX_VERSION_MAX=$with_macosx_version_max
52617          elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
52618              MACOSX_VERSION_MAX=$with_macosx_version_max
52619          elif test "x$with_macosx_version_max" = "xno"; then
52620              # Use build system default
52621              MACOSX_VERSION_MAX=
52622          else
52623              as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
52624          fi
52625
52626else
52627  MACOSX_VERSION_MAX=
52628
52629fi
52630
52631
52632
52633    # Let the flags variables get resolved in make for easier override on make
52634    # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
52635    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52636        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52637        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52638    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52639    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52640        -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52641        -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52642
52643    if test -n "$MACOSX_VERSION_MAX"; then
52644        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52645            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52646        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
52647            -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52648    fi
52649  fi
52650
52651  # Setup some hard coded includes
52652  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52653      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52654      -I${JDK_TOPDIR}/src/java.base/share/native/include \
52655      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52656      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52657      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
52658      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52659
52660  # The shared libraries are compiled using the picflag.
52661  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52662      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52663  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52664      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52665
52666  # Executable flags
52667  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52668  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52669
52670
52671
52672
52673
52674
52675  # Setup LDFLAGS et al.
52676  #
52677
52678  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52679    LDFLAGS_MICROSOFT="-nologo -opt:ref"
52680    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52681    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52682    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52683      LDFLAGS_SAFESH="-safeseh"
52684      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52685      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52686      # NOTE: Old build added -machine. Probably not needed.
52687      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52688    else
52689      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52690    fi
52691  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52692      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52693      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52694        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52695        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52696    fi
52697  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52698    # If this is a --hash-style=gnu system, use --hash-style=both, why?
52699    # We have previously set HAS_GNU_HASH if this is the case
52700    if test -n "$HAS_GNU_HASH"; then
52701      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52702      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52703      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52704    fi
52705      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52706        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52707    fi
52708    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52709      # And since we now know that the linker is gnu, then add -z defs, to forbid
52710      # undefined symbols in object files.
52711      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52712      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52713      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52714      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52715      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52716      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52717        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52718      fi
52719      case $DEBUG_LEVEL in
52720        release )
52721          # tell linker to optimize libraries.
52722          # Should this be supplied to the OSS linker as well?
52723          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52724          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52725          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52726          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52727            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52728          fi
52729          ;;
52730        slowdebug )
52731          # Hotspot always let the linker optimize
52732          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52733          if test "x$HAS_LINKER_NOW" = "xtrue"; then
52734            # do relocations at load
52735            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52736            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52737            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52738          fi
52739          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52740            # mark relocations read only
52741            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52742            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52743            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52744          fi
52745          ;;
52746        fastdebug )
52747          # Hotspot always let the linker optimize
52748          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52749          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52750            # mark relocations read only
52751            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52752            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52753            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52754          fi
52755          ;;
52756        * )
52757          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52758          ;;
52759        esac
52760    fi
52761  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52762    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52763    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52764    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52765    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52766    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52767    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52768      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52769    fi
52770  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52771    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52772    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52773    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52774    # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52775    # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52776    # so for slowdebug we build with '-qpic=large -bbigtoc'.
52777    if test "x$DEBUG_LEVEL" = xslowdebug; then
52778      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -bbigtoc"
52779    fi
52780  fi
52781
52782  # Customize LDFLAGS for executables
52783
52784  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52785
52786  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52787    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52788      LDFLAGS_STACK_SIZE=1048576
52789    else
52790      LDFLAGS_STACK_SIZE=327680
52791    fi
52792    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52793  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52794    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52795  fi
52796
52797  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52798
52799  # Customize LDFLAGS for libs
52800  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52801
52802  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52803  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52804    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52805        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52806    OPENJDK_BUILD_JDKLIB_LIBS=""
52807  else
52808    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52809        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52810
52811    if test "xBUILD" = "xTARGET"; then
52812      # On some platforms (mac) the linker warns about non existing -L dirs.
52813      # For any of the variants server, client or minimal, the dir matches the
52814      # variant name. The "main" variant should be used for linking. For the
52815      # rest, the dir is just server.
52816      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52817          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52818        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52819            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52820      else
52821        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52822            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52823      fi
52824    elif test "xBUILD" = "xBUILD"; then
52825      # When building a buildjdk, it's always only the server variant
52826      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52827          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52828    fi
52829
52830    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52831    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52832      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52833    fi
52834
52835  fi
52836
52837OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52838
52839  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52840  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52841    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52842  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52843    # FIXME: This hard-coded path is not really proper.
52844    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52845      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52846    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52847      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52848    fi
52849    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52850        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52851  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52852    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52853  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52854    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52855  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52856    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52857  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52858    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52859        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52860        wsock32.lib winmm.lib version.lib psapi.lib"
52861    fi
52862
52863  # Set OPENJDK_BUILD_JVM_ASFLAGS
52864  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52865    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52866      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52867    fi
52868  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52869    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52870  fi
52871
52872  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52873
52874
52875
52876
52877
52878
52879
52880
52881
52882
52883
52884
52885
52886
52887
52888  # Tests are only ever compiled for TARGET
52889  # Flags for compiling test libraries
52890  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52891  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52892
52893  # Flags for compiling test executables
52894  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52895  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52896
52897
52898
52899
52900
52901
52902  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52903  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52904
52905
52906
52907
52908
52909
52910  # Check that the compiler supports -mX (or -qX on AIX) flags
52911  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52912
52913
52914
52915
52916
52917
52918
52919
52920
52921
52922
52923
52924
52925
52926
52927
52928
52929
52930
52931
52932
52933
52934
52935
52936
52937
52938
52939
52940
52941
52942
52943
52944
52945
52946
52947
52948
52949
52950
52951
52952
52953
52954
52955
52956
52957
52958
52959    # Execute function body
52960
52961
52962
52963
52964
52965
52966
52967
52968
52969
52970
52971
52972
52973
52974
52975
52976
52977
52978
52979
52980
52981
52982
52983
52984
52985
52986
52987
52988
52989
52990
52991
52992
52993
52994
52995
52996
52997
52998
52999
53000
53001
53002
53003
53004
53005
53006
53007
53008    # Execute function body
53009
53010  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53011$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53012  supports=yes
53013
53014  saved_cflags="$CFLAGS"
53015  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53016  ac_ext=c
53017ac_cpp='$CPP $CPPFLAGS'
53018ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53019ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53020ac_compiler_gnu=$ac_cv_c_compiler_gnu
53021
53022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53023/* end confdefs.h.  */
53024int i;
53025_ACEOF
53026if ac_fn_c_try_compile "$LINENO"; then :
53027
53028else
53029  supports=no
53030fi
53031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53032  ac_ext=cpp
53033ac_cpp='$CXXCPP $CPPFLAGS'
53034ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53035ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53036ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53037
53038  CFLAGS="$saved_cflags"
53039
53040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53041$as_echo "$supports" >&6; }
53042  if test "x$supports" = "xyes" ; then
53043    :
53044    C_COMP_SUPPORTS="yes"
53045  else
53046    :
53047    C_COMP_SUPPORTS="no"
53048  fi
53049
53050
53051
53052
53053
53054
53055
53056
53057
53058
53059
53060
53061
53062
53063
53064
53065
53066
53067
53068
53069
53070
53071
53072
53073
53074
53075
53076
53077
53078
53079
53080
53081
53082
53083
53084
53085
53086
53087
53088
53089
53090
53091
53092
53093
53094
53095
53096
53097
53098
53099
53100
53101
53102
53103
53104
53105
53106
53107
53108    # Execute function body
53109
53110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53111$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53112  supports=yes
53113
53114  saved_cxxflags="$CXXFLAGS"
53115  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
53116  ac_ext=cpp
53117ac_cpp='$CXXCPP $CPPFLAGS'
53118ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53119ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53120ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53121
53122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53123/* end confdefs.h.  */
53124int i;
53125_ACEOF
53126if ac_fn_cxx_try_compile "$LINENO"; then :
53127
53128else
53129  supports=no
53130fi
53131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53132  ac_ext=cpp
53133ac_cpp='$CXXCPP $CPPFLAGS'
53134ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53135ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53136ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53137
53138  CXXFLAGS="$saved_cxxflags"
53139
53140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53141$as_echo "$supports" >&6; }
53142  if test "x$supports" = "xyes" ; then
53143    :
53144    CXX_COMP_SUPPORTS="yes"
53145  else
53146    :
53147    CXX_COMP_SUPPORTS="no"
53148  fi
53149
53150
53151
53152
53153
53154
53155
53156
53157
53158
53159
53160
53161
53162  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
53163$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
53164  supports=no
53165  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53166
53167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53168$as_echo "$supports" >&6; }
53169  if test "x$supports" = "xyes" ; then
53170    :
53171    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
53172  else
53173    :
53174    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
53175  fi
53176
53177
53178
53179
53180
53181
53182
53183
53184  # Check whether --enable-warnings-as-errors was given.
53185if test "${enable_warnings_as_errors+set}" = set; then :
53186  enableval=$enable_warnings_as_errors;
53187fi
53188
53189
53190  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
53191$as_echo_n "checking if native warnings are errors... " >&6; }
53192  if test "x$enable_warnings_as_errors" = "xyes"; then
53193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
53194$as_echo "yes (explicitly set)" >&6; }
53195    WARNINGS_AS_ERRORS=true
53196  elif test "x$enable_warnings_as_errors" = "xno"; then
53197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53198$as_echo "no" >&6; }
53199    WARNINGS_AS_ERRORS=false
53200  elif test "x$enable_warnings_as_errors" = "x"; then
53201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
53202$as_echo "yes (default)" >&6; }
53203    WARNINGS_AS_ERRORS=true
53204  else
53205    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
53206  fi
53207
53208
53209
53210  case "${TOOLCHAIN_TYPE}" in
53211    microsoft)
53212      DISABLE_WARNING_PREFIX="-wd"
53213      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
53214      ;;
53215    solstudio)
53216      DISABLE_WARNING_PREFIX="-erroff="
53217      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
53218      ;;
53219    gcc)
53220      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
53221
53222
53223
53224
53225
53226
53227
53228
53229
53230
53231
53232
53233
53234
53235
53236
53237
53238
53239
53240
53241
53242
53243
53244
53245
53246
53247
53248
53249
53250
53251
53252
53253
53254
53255
53256
53257
53258
53259
53260
53261
53262
53263
53264
53265
53266
53267
53268    # Execute function body
53269
53270
53271
53272
53273
53274
53275
53276
53277
53278
53279
53280
53281
53282
53283
53284
53285
53286
53287
53288
53289
53290
53291
53292
53293
53294
53295
53296
53297
53298
53299
53300
53301
53302
53303
53304
53305
53306
53307
53308
53309
53310
53311
53312
53313
53314
53315
53316
53317    # Execute function body
53318
53319  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53320$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53321  supports=yes
53322
53323  saved_cflags="$CFLAGS"
53324  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53325  ac_ext=c
53326ac_cpp='$CPP $CPPFLAGS'
53327ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53328ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53329ac_compiler_gnu=$ac_cv_c_compiler_gnu
53330
53331  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53332/* end confdefs.h.  */
53333int i;
53334_ACEOF
53335if ac_fn_c_try_compile "$LINENO"; then :
53336
53337else
53338  supports=no
53339fi
53340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53341  ac_ext=cpp
53342ac_cpp='$CXXCPP $CPPFLAGS'
53343ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53344ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53345ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53346
53347  CFLAGS="$saved_cflags"
53348
53349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53350$as_echo "$supports" >&6; }
53351  if test "x$supports" = "xyes" ; then
53352    :
53353    C_COMP_SUPPORTS="yes"
53354  else
53355    :
53356    C_COMP_SUPPORTS="no"
53357  fi
53358
53359
53360
53361
53362
53363
53364
53365
53366
53367
53368
53369
53370
53371
53372
53373
53374
53375
53376
53377
53378
53379
53380
53381
53382
53383
53384
53385
53386
53387
53388
53389
53390
53391
53392
53393
53394
53395
53396
53397
53398
53399
53400
53401
53402
53403
53404
53405
53406
53407
53408
53409
53410
53411
53412
53413
53414
53415
53416
53417    # Execute function body
53418
53419  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53420$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53421  supports=yes
53422
53423  saved_cxxflags="$CXXFLAGS"
53424  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53425  ac_ext=cpp
53426ac_cpp='$CXXCPP $CPPFLAGS'
53427ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53428ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53429ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53430
53431  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53432/* end confdefs.h.  */
53433int i;
53434_ACEOF
53435if ac_fn_cxx_try_compile "$LINENO"; then :
53436
53437else
53438  supports=no
53439fi
53440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53441  ac_ext=cpp
53442ac_cpp='$CXXCPP $CPPFLAGS'
53443ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53444ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53445ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53446
53447  CXXFLAGS="$saved_cxxflags"
53448
53449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53450$as_echo "$supports" >&6; }
53451  if test "x$supports" = "xyes" ; then
53452    :
53453    CXX_COMP_SUPPORTS="yes"
53454  else
53455    :
53456    CXX_COMP_SUPPORTS="no"
53457  fi
53458
53459
53460
53461
53462
53463
53464
53465
53466
53467
53468
53469
53470
53471  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53472$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53473  supports=no
53474  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53475
53476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53477$as_echo "$supports" >&6; }
53478  if test "x$supports" = "xyes" ; then
53479    :
53480    GCC_CAN_DISABLE_WARNINGS=true
53481  else
53482    :
53483    GCC_CAN_DISABLE_WARNINGS=false
53484
53485  fi
53486
53487
53488
53489
53490
53491
53492      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53493        DISABLE_WARNING_PREFIX="-Wno-"
53494      else
53495        DISABLE_WARNING_PREFIX=
53496      fi
53497      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53498      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
53499      # CFLAGS since any target specific flags will likely not work with the
53500      # build compiler
53501      CC_OLD="$CC"
53502      CXX_OLD="$CXX"
53503      CC="$BUILD_CC"
53504      CXX="$BUILD_CXX"
53505      CFLAGS_OLD="$CFLAGS"
53506      CFLAGS=""
53507
53508
53509
53510
53511
53512
53513
53514
53515
53516
53517
53518
53519
53520
53521
53522
53523
53524
53525
53526
53527
53528
53529
53530
53531
53532
53533
53534
53535
53536
53537
53538
53539
53540
53541
53542
53543
53544
53545
53546
53547
53548
53549
53550
53551
53552
53553
53554    # Execute function body
53555
53556
53557
53558
53559
53560
53561
53562
53563
53564
53565
53566
53567
53568
53569
53570
53571
53572
53573
53574
53575
53576
53577
53578
53579
53580
53581
53582
53583
53584
53585
53586
53587
53588
53589
53590
53591
53592
53593
53594
53595
53596
53597
53598
53599
53600
53601
53602
53603    # Execute function body
53604
53605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53606$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53607  supports=yes
53608
53609  saved_cflags="$CFLAGS"
53610  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53611  ac_ext=c
53612ac_cpp='$CPP $CPPFLAGS'
53613ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53614ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53615ac_compiler_gnu=$ac_cv_c_compiler_gnu
53616
53617  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53618/* end confdefs.h.  */
53619int i;
53620_ACEOF
53621if ac_fn_c_try_compile "$LINENO"; then :
53622
53623else
53624  supports=no
53625fi
53626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53627  ac_ext=cpp
53628ac_cpp='$CXXCPP $CPPFLAGS'
53629ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53630ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53631ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53632
53633  CFLAGS="$saved_cflags"
53634
53635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53636$as_echo "$supports" >&6; }
53637  if test "x$supports" = "xyes" ; then
53638    :
53639    C_COMP_SUPPORTS="yes"
53640  else
53641    :
53642    C_COMP_SUPPORTS="no"
53643  fi
53644
53645
53646
53647
53648
53649
53650
53651
53652
53653
53654
53655
53656
53657
53658
53659
53660
53661
53662
53663
53664
53665
53666
53667
53668
53669
53670
53671
53672
53673
53674
53675
53676
53677
53678
53679
53680
53681
53682
53683
53684
53685
53686
53687
53688
53689
53690
53691
53692
53693
53694
53695
53696
53697
53698
53699
53700
53701
53702
53703    # Execute function body
53704
53705  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53706$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53707  supports=yes
53708
53709  saved_cxxflags="$CXXFLAGS"
53710  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53711  ac_ext=cpp
53712ac_cpp='$CXXCPP $CPPFLAGS'
53713ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53714ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53715ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53716
53717  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53718/* end confdefs.h.  */
53719int i;
53720_ACEOF
53721if ac_fn_cxx_try_compile "$LINENO"; then :
53722
53723else
53724  supports=no
53725fi
53726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53727  ac_ext=cpp
53728ac_cpp='$CXXCPP $CPPFLAGS'
53729ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53730ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53731ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53732
53733  CXXFLAGS="$saved_cxxflags"
53734
53735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53736$as_echo "$supports" >&6; }
53737  if test "x$supports" = "xyes" ; then
53738    :
53739    CXX_COMP_SUPPORTS="yes"
53740  else
53741    :
53742    CXX_COMP_SUPPORTS="no"
53743  fi
53744
53745
53746
53747
53748
53749
53750
53751
53752
53753
53754
53755
53756
53757  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53758$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53759  supports=no
53760  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53761
53762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53763$as_echo "$supports" >&6; }
53764  if test "x$supports" = "xyes" ; then
53765    :
53766    BUILD_CC_CAN_DISABLE_WARNINGS=true
53767  else
53768    :
53769    BUILD_CC_CAN_DISABLE_WARNINGS=false
53770
53771  fi
53772
53773
53774
53775
53776
53777
53778      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53779        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53780      else
53781        BUILD_CC_DISABLE_WARNING_PREFIX=
53782      fi
53783      CC="$CC_OLD"
53784      CXX="$CXX_OLD"
53785      CFLAGS="$CFLAGS_OLD"
53786      ;;
53787    clang)
53788      DISABLE_WARNING_PREFIX="-Wno-"
53789      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53790      ;;
53791    xlc)
53792      DISABLE_WARNING_PREFIX="-qsuppress="
53793      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53794      ;;
53795  esac
53796
53797
53798
53799
53800
53801# Setup debug symbols (need objcopy from the toolchain for that)
53802
53803  #
53804  # NATIVE_DEBUG_SYMBOLS
53805  # This must be done after the toolchain is setup, since we're looking at objcopy.
53806  #
53807  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53808$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53809
53810# Check whether --with-native-debug-symbols was given.
53811if test "${with_native_debug_symbols+set}" = set; then :
53812  withval=$with_native_debug_symbols;
53813        if test "x$OPENJDK_TARGET_OS" = xaix; then
53814          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53815            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53816          fi
53817        fi
53818
53819else
53820
53821        if test "x$OPENJDK_TARGET_OS" = xaix; then
53822          # AIX doesn't support 'zipped' so use 'internal' as default
53823          with_native_debug_symbols="internal"
53824        else
53825          if test "x$STATIC_BUILD" = xtrue; then
53826            with_native_debug_symbols="none"
53827          else
53828            with_native_debug_symbols="zipped"
53829          fi
53830        fi
53831
53832fi
53833
53834  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53836$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53837
53838  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53839
53840    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53841      if test "x$OBJCOPY" = x; then
53842        # enabling of enable-debug-symbols and can't find objcopy
53843        # this is an error
53844        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53845      fi
53846    fi
53847
53848    COMPILE_WITH_DEBUG_SYMBOLS=true
53849    COPY_DEBUG_SYMBOLS=true
53850    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53851  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53852    COMPILE_WITH_DEBUG_SYMBOLS=false
53853    COPY_DEBUG_SYMBOLS=false
53854    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53855  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53856    COMPILE_WITH_DEBUG_SYMBOLS=true
53857    COPY_DEBUG_SYMBOLS=false
53858    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53859  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53860
53861    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53862      if test "x$OBJCOPY" = x; then
53863        # enabling of enable-debug-symbols and can't find objcopy
53864        # this is an error
53865        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53866      fi
53867    fi
53868
53869    COMPILE_WITH_DEBUG_SYMBOLS=true
53870    COPY_DEBUG_SYMBOLS=true
53871    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53872  else
53873    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53874  fi
53875
53876  # --enable-debug-symbols is deprecated.
53877  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53878
53879  # Check whether --enable-debug-symbols was given.
53880if test "${enable_debug_symbols+set}" = set; then :
53881  enableval=$enable_debug_symbols;
53882fi
53883
53884  if test "x$enable_debug_symbols" != x; then
53885    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53886$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53887
53888    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53889      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53890$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53891    fi
53892
53893  fi
53894
53895
53896  # --enable-zip-debug-info is deprecated.
53897  # Please use --with-native-debug-symbols=zipped .
53898
53899  # Check whether --enable-zip-debug-info was given.
53900if test "${enable_zip_debug_info+set}" = set; then :
53901  enableval=$enable_zip_debug_info;
53902fi
53903
53904  if test "x$enable_zip_debug_info" != x; then
53905    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53906$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53907
53908    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53909      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53910$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53911    fi
53912
53913  fi
53914
53915
53916
53917
53918
53919
53920
53921  # Check whether --enable-native-coverage was given.
53922if test "${enable_native_coverage+set}" = set; then :
53923  enableval=$enable_native_coverage;
53924fi
53925
53926  GCOV_ENABLED="false"
53927  if test "x$enable_native_coverage" = "xyes"; then
53928    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53929      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53930$as_echo_n "checking if native coverage is enabled... " >&6; }
53931      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53932$as_echo "yes" >&6; }
53933      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53934      GCOV_LDFLAGS="-fprofile-arcs"
53935      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53936      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53937      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53938      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53939      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53940      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53941      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53942      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53943      GCOV_ENABLED="true"
53944    else
53945      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53946    fi
53947  elif test "x$enable_native_coverage" = "xno"; then
53948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53949$as_echo_n "checking if native coverage is enabled... " >&6; }
53950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53951$as_echo "no" >&6; }
53952  elif test "x$enable_native_coverage" != "x"; then
53953    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53954  fi
53955
53956
53957
53958
53959# Need toolchain to setup dtrace
53960
53961  # Test for dtrace dependencies
53962  # Check whether --enable-dtrace was given.
53963if test "${enable_dtrace+set}" = set; then :
53964  enableval=$enable_dtrace;
53965fi
53966
53967
53968  DTRACE_DEP_MISSING=false
53969
53970  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53971$as_echo_n "checking for dtrace tool... " >&6; }
53972  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53974$as_echo "$DTRACE" >&6; }
53975  else
53976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53977$as_echo "not found, cannot build dtrace" >&6; }
53978    DTRACE_DEP_MISSING=true
53979  fi
53980
53981  for ac_header in sys/sdt.h
53982do :
53983  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53984if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53985  cat >>confdefs.h <<_ACEOF
53986#define HAVE_SYS_SDT_H 1
53987_ACEOF
53988 DTRACE_HEADERS_OK=yes
53989else
53990  DTRACE_HEADERS_OK=no
53991fi
53992
53993done
53994
53995  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53996    DTRACE_DEP_MISSING=true
53997  fi
53998
53999  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
54000$as_echo_n "checking if dtrace should be built... " >&6; }
54001  if test "x$enable_dtrace" = "xyes"; then
54002    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54003      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54004$as_echo "no, missing dependencies" >&6; }
54005
54006  # Print a helpful message on how to acquire the necessary build dependency.
54007  # dtrace is the help tag: freetype, cups, alsa etc
54008  MISSING_DEPENDENCY=dtrace
54009
54010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54011    cygwin_help $MISSING_DEPENDENCY
54012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54013    msys_help $MISSING_DEPENDENCY
54014  else
54015    PKGHANDLER_COMMAND=
54016
54017    case $PKGHANDLER in
54018      apt-get)
54019        apt_help     $MISSING_DEPENDENCY ;;
54020      yum)
54021        yum_help     $MISSING_DEPENDENCY ;;
54022      brew)
54023        brew_help    $MISSING_DEPENDENCY ;;
54024      port)
54025        port_help    $MISSING_DEPENDENCY ;;
54026      pkgutil)
54027        pkgutil_help $MISSING_DEPENDENCY ;;
54028      pkgadd)
54029        pkgadd_help  $MISSING_DEPENDENCY ;;
54030    esac
54031
54032    if test "x$PKGHANDLER_COMMAND" != x; then
54033      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
54034    fi
54035  fi
54036
54037      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
54038    else
54039      INCLUDE_DTRACE=true
54040      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54041$as_echo "yes, forced" >&6; }
54042    fi
54043  elif test "x$enable_dtrace" = "xno"; then
54044    INCLUDE_DTRACE=false
54045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54046$as_echo "no, forced" >&6; }
54047  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
54048    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
54049      INCLUDE_DTRACE=false
54050      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
54051$as_echo "no, missing dependencies" >&6; }
54052    else
54053      INCLUDE_DTRACE=true
54054      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
54055$as_echo "yes, dependencies present" >&6; }
54056    fi
54057  else
54058    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
54059  fi
54060
54061
54062  # Check whether --enable-aot was given.
54063if test "${enable_aot+set}" = set; then :
54064  enableval=$enable_aot;
54065fi
54066
54067
54068  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
54069    ENABLE_AOT="true"
54070  elif test "x$enable_aot" = "xyes"; then
54071    ENABLE_AOT="true"
54072  elif test "x$enable_aot" = "xno"; then
54073    ENABLE_AOT="false"
54074    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
54075$as_echo_n "checking if aot should be enabled... " >&6; }
54076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54077$as_echo "no, forced" >&6; }
54078  else
54079    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
54080  fi
54081
54082  if test "x$ENABLE_AOT" = "xtrue"; then
54083    # Only enable AOT on X64 platforms.
54084    if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
54085      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
54086        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
54087          ENABLE_AOT="true"
54088        else
54089          ENABLE_AOT="false"
54090          if test "x$enable_aot" = "xyes"; then
54091            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
54092          fi
54093        fi
54094      else
54095        ENABLE_AOT="false"
54096        if test "x$enable_aot" = "xyes"; then
54097          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
54098        fi
54099      fi
54100    else
54101      ENABLE_AOT="false"
54102      if test "x$enable_aot" = "xyes"; then
54103        as_fn_error $? "AOT is currently only supported on x86_64. Remove --enable-aot." "$LINENO" 5
54104      fi
54105    fi
54106  fi
54107
54108
54109
54110
54111  # Check whether --enable-hotspot-gtest was given.
54112if test "${enable_hotspot_gtest+set}" = set; then :
54113  enableval=$enable_hotspot_gtest;
54114fi
54115
54116
54117  if test -e "$HOTSPOT_TOPDIR/test/native"; then
54118    GTEST_DIR_EXISTS="true"
54119  else
54120    GTEST_DIR_EXISTS="false"
54121  fi
54122
54123  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
54124$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
54125  if test "x$enable_hotspot_gtest" = "xyes"; then
54126    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54127      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
54128$as_echo "yes, forced" >&6; }
54129      BUILD_GTEST="true"
54130    else
54131      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
54132    fi
54133  elif test "x$enable_hotspot_gtest" = "xno"; then
54134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
54135$as_echo "no, forced" >&6; }
54136    BUILD_GTEST="false"
54137  elif test "x$enable_hotspot_gtest" = "x"; then
54138    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
54139      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54140$as_echo "yes" >&6; }
54141      BUILD_GTEST="true"
54142    else
54143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54144$as_echo "no" >&6; }
54145      BUILD_GTEST="false"
54146    fi
54147  else
54148    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
54149  fi
54150
54151
54152
54153
54154###############################################################################
54155#
54156# Check dependencies for external and internal libraries.
54157#
54158###############################################################################
54159
54160# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
54161
54162  # When using cygwin or msys, we need a wrapper binary that renames
54163  # /cygdrive/c/ arguments into c:/ arguments and peeks into
54164  # @files and rewrites these too! This wrapper binary is
54165  # called fixpath.
54166  FIXPATH=
54167  if test "x$OPENJDK_BUILD_OS" = xwindows; then
54168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
54169$as_echo_n "checking if fixpath can be created... " >&6; }
54170    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
54171    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
54172    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
54173    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
54174      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
54175      FIXPATH="$FIXPATH_BIN -c"
54176    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
54177      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
54178      # @ was chosen as separator to minimize risk of other tools messing around with it
54179      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
54180          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
54181      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
54182      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
54183    fi
54184    FIXPATH_SRC_W="$FIXPATH_SRC"
54185    FIXPATH_BIN_W="$FIXPATH_BIN"
54186
54187  unix_path="$FIXPATH_SRC_W"
54188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54189    windows_path=`$CYGPATH -m "$unix_path"`
54190    FIXPATH_SRC_W="$windows_path"
54191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54192    windows_path=`cmd //c echo $unix_path`
54193    FIXPATH_SRC_W="$windows_path"
54194  fi
54195
54196
54197  unix_path="$FIXPATH_BIN_W"
54198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54199    windows_path=`$CYGPATH -m "$unix_path"`
54200    FIXPATH_BIN_W="$windows_path"
54201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54202    windows_path=`cmd //c echo $unix_path`
54203    FIXPATH_BIN_W="$windows_path"
54204  fi
54205
54206    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
54207    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
54208    cd $FIXPATH_DIR
54209    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
54210    cd $CURDIR
54211
54212    if test ! -x $FIXPATH_BIN; then
54213      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54214$as_echo "no" >&6; }
54215      cat $FIXPATH_DIR/fixpath1.log
54216      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
54217    fi
54218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54219$as_echo "yes" >&6; }
54220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
54221$as_echo_n "checking if fixpath.exe works... " >&6; }
54222    cd $FIXPATH_DIR
54223    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
54224        > $FIXPATH_DIR/fixpath2.log 2>&1
54225    cd $CURDIR
54226    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
54227      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54228$as_echo "no" >&6; }
54229      cat $FIXPATH_DIR/fixpath2.log
54230      as_fn_error $? "fixpath did not work!" "$LINENO" 5
54231    fi
54232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54233$as_echo "yes" >&6; }
54234
54235    FIXPATH_DETACH_FLAG="--detach"
54236  fi
54237
54238
54239
54240
54241
54242
54243  # Check if X11 is needed
54244  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
54245    # No X11 support on windows or macosx
54246    NEEDS_LIB_X11=false
54247  else
54248    # All other instances need X11, even if building headless only, libawt still
54249    # needs X11 headers.
54250    NEEDS_LIB_X11=true
54251  fi
54252
54253  # Check if cups is needed
54254  if test "x$OPENJDK_TARGET_OS" = xwindows; then
54255    # Windows have a separate print system
54256    NEEDS_LIB_CUPS=false
54257  else
54258    NEEDS_LIB_CUPS=true
54259  fi
54260
54261  # A custom hook may have set this already
54262  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
54263    NEEDS_LIB_FREETYPE=true
54264  fi
54265
54266  # Check if alsa is needed
54267  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54268    NEEDS_LIB_ALSA=true
54269  else
54270    NEEDS_LIB_ALSA=false
54271  fi
54272
54273  # Check if ffi is needed
54274  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54275    NEEDS_LIB_FFI=true
54276  else
54277    NEEDS_LIB_FFI=false
54278  fi
54279
54280
54281  # statically link libstdc++ before C++ ABI is stablized on Linux unless
54282  # dynamic build is configured on command line.
54283
54284# Check whether --with-stdc++lib was given.
54285if test "${with_stdc__lib+set}" = set; then :
54286  withval=$with_stdc__lib;
54287        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
54288                && test "x$with_stdc__lib" != xdefault; then
54289          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
54290        fi
54291
54292else
54293  with_stdc__lib=default
54294
54295fi
54296
54297
54298  if test "x$OPENJDK_TARGET_OS" = xlinux; then
54299    # Test if stdc++ can be linked statically.
54300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
54301$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
54302    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
54303    ac_ext=cpp
54304ac_cpp='$CXXCPP $CPPFLAGS'
54305ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54306ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54307ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54308
54309    OLD_LIBS="$LIBS"
54310    LIBS="$STATIC_STDCXX_FLAGS"
54311    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54312/* end confdefs.h.  */
54313
54314int
54315main ()
54316{
54317return 0;
54318  ;
54319  return 0;
54320}
54321_ACEOF
54322if ac_fn_cxx_try_link "$LINENO"; then :
54323  has_static_libstdcxx=yes
54324else
54325  has_static_libstdcxx=no
54326fi
54327rm -f core conftest.err conftest.$ac_objext \
54328    conftest$ac_exeext conftest.$ac_ext
54329    LIBS="$OLD_LIBS"
54330    ac_ext=cpp
54331ac_cpp='$CXXCPP $CPPFLAGS'
54332ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54333ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54334ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54335
54336    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
54337$as_echo "$has_static_libstdcxx" >&6; }
54338
54339    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
54340      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
54341    fi
54342
54343    # If dynamic was requested, it's available since it would fail above otherwise.
54344    # If dynamic wasn't requested, go with static unless it isn't available.
54345    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
54346$as_echo_n "checking how to link with libstdc++... " >&6; }
54347    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
54348        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54349      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
54350$as_echo "dynamic" >&6; }
54351    else
54352      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
54353      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54354      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
54355      # just use the same setting as for the TARGET toolchain.
54356      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
54358$as_echo "static" >&6; }
54359    fi
54360  fi
54361
54362  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
54363  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
54364    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
54365  fi
54366
54367
54368
54369  # Setup Windows runtime dlls
54370  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54371
54372
54373# Check whether --with-msvcr-dll was given.
54374if test "${with_msvcr_dll+set}" = set; then :
54375  withval=$with_msvcr_dll;
54376fi
54377
54378
54379  if test "x$with_msvcr_dll" != x; then
54380    # If given explicitly by user, do not probe. If not present, fail directly.
54381
54382  DLL_NAME="$MSVCR_NAME"
54383  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
54384  METHOD="--with-msvcr-dll"
54385  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54386    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54387$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54388
54389    # Need to check if the found msvcr is correct architecture
54390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54391$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54392    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54394      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54395      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54396      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54397        CORRECT_MSVCR_ARCH="PE32 executable"
54398      else
54399        CORRECT_MSVCR_ARCH="PE32+ executable"
54400      fi
54401    else
54402      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54403        CORRECT_MSVCR_ARCH=386
54404      else
54405        CORRECT_MSVCR_ARCH=x86-64
54406      fi
54407    fi
54408    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54409      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54410$as_echo "ok" >&6; }
54411      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54412
54413  # Only process if variable expands to non-empty
54414
54415  if test "x$MSVC_DLL" != x; then
54416    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54417
54418  # Input might be given as Windows format, start by converting to
54419  # unix format.
54420  path="$MSVC_DLL"
54421  new_path=`$CYGPATH -u "$path"`
54422
54423  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54424  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54425  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54426  # "foo.exe" is OK but "foo" is an error.
54427  #
54428  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54429  # It is also a way to make sure we got the proper file name for the real test later on.
54430  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54431  if test "x$test_shortpath" = x; then
54432    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54433$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54434    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54435  fi
54436
54437  # Call helper function which possibly converts this using DOS-style short mode.
54438  # If so, the updated path is stored in $new_path.
54439
54440  input_path="$new_path"
54441  # Check if we need to convert this using DOS-style short mode. If the path
54442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54443  # take no chances and rewrite it.
54444  # Note: m4 eats our [], so we need to use [ and ] instead.
54445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54446  if test "x$has_forbidden_chars" != x; then
54447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54448    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54449    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54450    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54451      # Going to short mode and back again did indeed matter. Since short mode is
54452      # case insensitive, let's make it lowercase to improve readability.
54453      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54454      # Now convert it back to Unix-style (cygpath)
54455      input_path=`$CYGPATH -u "$shortmode_path"`
54456      new_path="$input_path"
54457    fi
54458  fi
54459
54460  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54461  if test "x$test_cygdrive_prefix" = x; then
54462    # As a simple fix, exclude /usr/bin since it's not a real path.
54463    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54464      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54465      # a path prefixed by /cygdrive for fixpath to work.
54466      new_path="$CYGWIN_ROOT_PATH$input_path"
54467    fi
54468  fi
54469
54470
54471  if test "x$path" != "x$new_path"; then
54472    MSVC_DLL="$new_path"
54473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54474$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54475  fi
54476
54477    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54478
54479  path="$MSVC_DLL"
54480  has_colon=`$ECHO $path | $GREP ^.:`
54481  new_path="$path"
54482  if test "x$has_colon" = x; then
54483    # Not in mixed or Windows style, start by that.
54484    new_path=`cmd //c echo $path`
54485  fi
54486
54487
54488  input_path="$new_path"
54489  # Check if we need to convert this using DOS-style short mode. If the path
54490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54491  # take no chances and rewrite it.
54492  # Note: m4 eats our [], so we need to use [ and ] instead.
54493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54494  if test "x$has_forbidden_chars" != x; then
54495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54496    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54497  fi
54498
54499
54500  windows_path="$new_path"
54501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54502    unix_path=`$CYGPATH -u "$windows_path"`
54503    new_path="$unix_path"
54504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54506    new_path="$unix_path"
54507  fi
54508
54509  if test "x$path" != "x$new_path"; then
54510    MSVC_DLL="$new_path"
54511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54512$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54513  fi
54514
54515  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54516  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54517
54518    else
54519      # We're on a unix platform. Hooray! :)
54520      path="$MSVC_DLL"
54521      has_space=`$ECHO "$path" | $GREP " "`
54522      if test "x$has_space" != x; then
54523        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54524$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54525        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54526      fi
54527
54528      # Use eval to expand a potential ~
54529      eval path="$path"
54530      if test ! -f "$path" && test ! -d "$path"; then
54531        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54532      fi
54533
54534      if test -d "$path"; then
54535        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54536      else
54537        dir="`$DIRNAME "$path"`"
54538        base="`$BASENAME "$path"`"
54539        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54540      fi
54541    fi
54542  fi
54543
54544      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54545$as_echo_n "checking for $DLL_NAME... " >&6; }
54546      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54547$as_echo "$MSVC_DLL" >&6; }
54548    else
54549      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54550$as_echo "incorrect, ignoring" >&6; }
54551      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54552$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54553    fi
54554  fi
54555
54556    if test "x$MSVC_DLL" = x; then
54557      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54558    fi
54559    MSVCR_DLL="$MSVC_DLL"
54560  elif test "x$DEVKIT_MSVCR_DLL" != x; then
54561
54562  DLL_NAME="$MSVCR_NAME"
54563  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54564  METHOD="devkit"
54565  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54566    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54567$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54568
54569    # Need to check if the found msvcr is correct architecture
54570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54571$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54572    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54573    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54574      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54575      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54576      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54577        CORRECT_MSVCR_ARCH="PE32 executable"
54578      else
54579        CORRECT_MSVCR_ARCH="PE32+ executable"
54580      fi
54581    else
54582      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54583        CORRECT_MSVCR_ARCH=386
54584      else
54585        CORRECT_MSVCR_ARCH=x86-64
54586      fi
54587    fi
54588    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54589      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54590$as_echo "ok" >&6; }
54591      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54592
54593  # Only process if variable expands to non-empty
54594
54595  if test "x$MSVC_DLL" != x; then
54596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54597
54598  # Input might be given as Windows format, start by converting to
54599  # unix format.
54600  path="$MSVC_DLL"
54601  new_path=`$CYGPATH -u "$path"`
54602
54603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54606  # "foo.exe" is OK but "foo" is an error.
54607  #
54608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54609  # It is also a way to make sure we got the proper file name for the real test later on.
54610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54611  if test "x$test_shortpath" = x; then
54612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54613$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54614    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54615  fi
54616
54617  # Call helper function which possibly converts this using DOS-style short mode.
54618  # If so, the updated path is stored in $new_path.
54619
54620  input_path="$new_path"
54621  # Check if we need to convert this using DOS-style short mode. If the path
54622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54623  # take no chances and rewrite it.
54624  # Note: m4 eats our [], so we need to use [ and ] instead.
54625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54626  if test "x$has_forbidden_chars" != x; then
54627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54631      # Going to short mode and back again did indeed matter. Since short mode is
54632      # case insensitive, let's make it lowercase to improve readability.
54633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54634      # Now convert it back to Unix-style (cygpath)
54635      input_path=`$CYGPATH -u "$shortmode_path"`
54636      new_path="$input_path"
54637    fi
54638  fi
54639
54640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54641  if test "x$test_cygdrive_prefix" = x; then
54642    # As a simple fix, exclude /usr/bin since it's not a real path.
54643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54645      # a path prefixed by /cygdrive for fixpath to work.
54646      new_path="$CYGWIN_ROOT_PATH$input_path"
54647    fi
54648  fi
54649
54650
54651  if test "x$path" != "x$new_path"; then
54652    MSVC_DLL="$new_path"
54653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54654$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54655  fi
54656
54657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54658
54659  path="$MSVC_DLL"
54660  has_colon=`$ECHO $path | $GREP ^.:`
54661  new_path="$path"
54662  if test "x$has_colon" = x; then
54663    # Not in mixed or Windows style, start by that.
54664    new_path=`cmd //c echo $path`
54665  fi
54666
54667
54668  input_path="$new_path"
54669  # Check if we need to convert this using DOS-style short mode. If the path
54670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54671  # take no chances and rewrite it.
54672  # Note: m4 eats our [], so we need to use [ and ] instead.
54673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54674  if test "x$has_forbidden_chars" != x; then
54675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54677  fi
54678
54679
54680  windows_path="$new_path"
54681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54682    unix_path=`$CYGPATH -u "$windows_path"`
54683    new_path="$unix_path"
54684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54686    new_path="$unix_path"
54687  fi
54688
54689  if test "x$path" != "x$new_path"; then
54690    MSVC_DLL="$new_path"
54691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54692$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54693  fi
54694
54695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54697
54698    else
54699      # We're on a unix platform. Hooray! :)
54700      path="$MSVC_DLL"
54701      has_space=`$ECHO "$path" | $GREP " "`
54702      if test "x$has_space" != x; then
54703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54704$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54705        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54706      fi
54707
54708      # Use eval to expand a potential ~
54709      eval path="$path"
54710      if test ! -f "$path" && test ! -d "$path"; then
54711        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54712      fi
54713
54714      if test -d "$path"; then
54715        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54716      else
54717        dir="`$DIRNAME "$path"`"
54718        base="`$BASENAME "$path"`"
54719        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54720      fi
54721    fi
54722  fi
54723
54724      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54725$as_echo_n "checking for $DLL_NAME... " >&6; }
54726      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54727$as_echo "$MSVC_DLL" >&6; }
54728    else
54729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54730$as_echo "incorrect, ignoring" >&6; }
54731      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54732$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54733    fi
54734  fi
54735
54736    if test "x$MSVC_DLL" = x; then
54737      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54738    fi
54739    MSVCR_DLL="$MSVC_DLL"
54740  else
54741
54742  DLL_NAME="${MSVCR_NAME}"
54743  MSVC_DLL=
54744
54745  if test "x$MSVC_DLL" = x; then
54746    # Probe: Using well-known location from Visual Studio 10.0
54747    if test "x$VCINSTALLDIR" != x; then
54748      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54749
54750  windows_path="$CYGWIN_VC_INSTALL_DIR"
54751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54752    unix_path=`$CYGPATH -u "$windows_path"`
54753    CYGWIN_VC_INSTALL_DIR="$unix_path"
54754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54756    CYGWIN_VC_INSTALL_DIR="$unix_path"
54757  fi
54758
54759      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54760        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54761      else
54762        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54763      fi
54764      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54765
54766  DLL_NAME="$DLL_NAME"
54767  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54768  METHOD="well-known location in VCINSTALLDIR"
54769  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54770    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54771$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54772
54773    # Need to check if the found msvcr is correct architecture
54774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54775$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54776    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54778      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54779      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54780      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54781        CORRECT_MSVCR_ARCH="PE32 executable"
54782      else
54783        CORRECT_MSVCR_ARCH="PE32+ executable"
54784      fi
54785    else
54786      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54787        CORRECT_MSVCR_ARCH=386
54788      else
54789        CORRECT_MSVCR_ARCH=x86-64
54790      fi
54791    fi
54792    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54794$as_echo "ok" >&6; }
54795      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54796
54797  # Only process if variable expands to non-empty
54798
54799  if test "x$MSVC_DLL" != x; then
54800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54801
54802  # Input might be given as Windows format, start by converting to
54803  # unix format.
54804  path="$MSVC_DLL"
54805  new_path=`$CYGPATH -u "$path"`
54806
54807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54810  # "foo.exe" is OK but "foo" is an error.
54811  #
54812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54813  # It is also a way to make sure we got the proper file name for the real test later on.
54814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54815  if test "x$test_shortpath" = x; then
54816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54817$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54818    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54819  fi
54820
54821  # Call helper function which possibly converts this using DOS-style short mode.
54822  # If so, the updated path is stored in $new_path.
54823
54824  input_path="$new_path"
54825  # Check if we need to convert this using DOS-style short mode. If the path
54826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54827  # take no chances and rewrite it.
54828  # Note: m4 eats our [], so we need to use [ and ] instead.
54829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54830  if test "x$has_forbidden_chars" != x; then
54831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54835      # Going to short mode and back again did indeed matter. Since short mode is
54836      # case insensitive, let's make it lowercase to improve readability.
54837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54838      # Now convert it back to Unix-style (cygpath)
54839      input_path=`$CYGPATH -u "$shortmode_path"`
54840      new_path="$input_path"
54841    fi
54842  fi
54843
54844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54845  if test "x$test_cygdrive_prefix" = x; then
54846    # As a simple fix, exclude /usr/bin since it's not a real path.
54847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54849      # a path prefixed by /cygdrive for fixpath to work.
54850      new_path="$CYGWIN_ROOT_PATH$input_path"
54851    fi
54852  fi
54853
54854
54855  if test "x$path" != "x$new_path"; then
54856    MSVC_DLL="$new_path"
54857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54858$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54859  fi
54860
54861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54862
54863  path="$MSVC_DLL"
54864  has_colon=`$ECHO $path | $GREP ^.:`
54865  new_path="$path"
54866  if test "x$has_colon" = x; then
54867    # Not in mixed or Windows style, start by that.
54868    new_path=`cmd //c echo $path`
54869  fi
54870
54871
54872  input_path="$new_path"
54873  # Check if we need to convert this using DOS-style short mode. If the path
54874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54875  # take no chances and rewrite it.
54876  # Note: m4 eats our [], so we need to use [ and ] instead.
54877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54878  if test "x$has_forbidden_chars" != x; then
54879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54881  fi
54882
54883
54884  windows_path="$new_path"
54885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54886    unix_path=`$CYGPATH -u "$windows_path"`
54887    new_path="$unix_path"
54888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54890    new_path="$unix_path"
54891  fi
54892
54893  if test "x$path" != "x$new_path"; then
54894    MSVC_DLL="$new_path"
54895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54896$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54897  fi
54898
54899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54901
54902    else
54903      # We're on a unix platform. Hooray! :)
54904      path="$MSVC_DLL"
54905      has_space=`$ECHO "$path" | $GREP " "`
54906      if test "x$has_space" != x; then
54907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54908$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54909        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54910      fi
54911
54912      # Use eval to expand a potential ~
54913      eval path="$path"
54914      if test ! -f "$path" && test ! -d "$path"; then
54915        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54916      fi
54917
54918      if test -d "$path"; then
54919        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54920      else
54921        dir="`$DIRNAME "$path"`"
54922        base="`$BASENAME "$path"`"
54923        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54924      fi
54925    fi
54926  fi
54927
54928      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54929$as_echo_n "checking for $DLL_NAME... " >&6; }
54930      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54931$as_echo "$MSVC_DLL" >&6; }
54932    else
54933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54934$as_echo "incorrect, ignoring" >&6; }
54935      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54936$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54937    fi
54938  fi
54939
54940    fi
54941  fi
54942
54943  if test "x$MSVC_DLL" = x; then
54944    # Probe: Check in the Boot JDK directory.
54945    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54946
54947  DLL_NAME="$DLL_NAME"
54948  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54949  METHOD="well-known location in Boot JDK"
54950  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54951    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54952$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54953
54954    # Need to check if the found msvcr is correct architecture
54955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54956$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54957    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54958    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54959      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54960      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54961      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54962        CORRECT_MSVCR_ARCH="PE32 executable"
54963      else
54964        CORRECT_MSVCR_ARCH="PE32+ executable"
54965      fi
54966    else
54967      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54968        CORRECT_MSVCR_ARCH=386
54969      else
54970        CORRECT_MSVCR_ARCH=x86-64
54971      fi
54972    fi
54973    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54974      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54975$as_echo "ok" >&6; }
54976      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54977
54978  # Only process if variable expands to non-empty
54979
54980  if test "x$MSVC_DLL" != x; then
54981    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54982
54983  # Input might be given as Windows format, start by converting to
54984  # unix format.
54985  path="$MSVC_DLL"
54986  new_path=`$CYGPATH -u "$path"`
54987
54988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54991  # "foo.exe" is OK but "foo" is an error.
54992  #
54993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54994  # It is also a way to make sure we got the proper file name for the real test later on.
54995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54996  if test "x$test_shortpath" = x; then
54997    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54998$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54999    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55000  fi
55001
55002  # Call helper function which possibly converts this using DOS-style short mode.
55003  # If so, the updated path is stored in $new_path.
55004
55005  input_path="$new_path"
55006  # Check if we need to convert this using DOS-style short mode. If the path
55007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55008  # take no chances and rewrite it.
55009  # Note: m4 eats our [], so we need to use [ and ] instead.
55010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55011  if test "x$has_forbidden_chars" != x; then
55012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55013    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55014    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55015    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55016      # Going to short mode and back again did indeed matter. Since short mode is
55017      # case insensitive, let's make it lowercase to improve readability.
55018      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55019      # Now convert it back to Unix-style (cygpath)
55020      input_path=`$CYGPATH -u "$shortmode_path"`
55021      new_path="$input_path"
55022    fi
55023  fi
55024
55025  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55026  if test "x$test_cygdrive_prefix" = x; then
55027    # As a simple fix, exclude /usr/bin since it's not a real path.
55028    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55029      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55030      # a path prefixed by /cygdrive for fixpath to work.
55031      new_path="$CYGWIN_ROOT_PATH$input_path"
55032    fi
55033  fi
55034
55035
55036  if test "x$path" != "x$new_path"; then
55037    MSVC_DLL="$new_path"
55038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55039$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55040  fi
55041
55042    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55043
55044  path="$MSVC_DLL"
55045  has_colon=`$ECHO $path | $GREP ^.:`
55046  new_path="$path"
55047  if test "x$has_colon" = x; then
55048    # Not in mixed or Windows style, start by that.
55049    new_path=`cmd //c echo $path`
55050  fi
55051
55052
55053  input_path="$new_path"
55054  # Check if we need to convert this using DOS-style short mode. If the path
55055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55056  # take no chances and rewrite it.
55057  # Note: m4 eats our [], so we need to use [ and ] instead.
55058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55059  if test "x$has_forbidden_chars" != x; then
55060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55062  fi
55063
55064
55065  windows_path="$new_path"
55066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55067    unix_path=`$CYGPATH -u "$windows_path"`
55068    new_path="$unix_path"
55069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55071    new_path="$unix_path"
55072  fi
55073
55074  if test "x$path" != "x$new_path"; then
55075    MSVC_DLL="$new_path"
55076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55077$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55078  fi
55079
55080  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55081  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55082
55083    else
55084      # We're on a unix platform. Hooray! :)
55085      path="$MSVC_DLL"
55086      has_space=`$ECHO "$path" | $GREP " "`
55087      if test "x$has_space" != x; then
55088        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55089$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55090        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55091      fi
55092
55093      # Use eval to expand a potential ~
55094      eval path="$path"
55095      if test ! -f "$path" && test ! -d "$path"; then
55096        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55097      fi
55098
55099      if test -d "$path"; then
55100        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55101      else
55102        dir="`$DIRNAME "$path"`"
55103        base="`$BASENAME "$path"`"
55104        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55105      fi
55106    fi
55107  fi
55108
55109      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55110$as_echo_n "checking for $DLL_NAME... " >&6; }
55111      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55112$as_echo "$MSVC_DLL" >&6; }
55113    else
55114      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55115$as_echo "incorrect, ignoring" >&6; }
55116      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55117$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55118    fi
55119  fi
55120
55121  fi
55122
55123  if test "x$MSVC_DLL" = x; then
55124    # Probe: Look in the Windows system32 directory
55125    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55126
55127  windows_path="$CYGWIN_SYSTEMROOT"
55128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55129    unix_path=`$CYGPATH -u "$windows_path"`
55130    CYGWIN_SYSTEMROOT="$unix_path"
55131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55133    CYGWIN_SYSTEMROOT="$unix_path"
55134  fi
55135
55136    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55137
55138  DLL_NAME="$DLL_NAME"
55139  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55140  METHOD="well-known location in SYSTEMROOT"
55141  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55142    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55143$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55144
55145    # Need to check if the found msvcr is correct architecture
55146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55147$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55148    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55150      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55151      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55152      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55153        CORRECT_MSVCR_ARCH="PE32 executable"
55154      else
55155        CORRECT_MSVCR_ARCH="PE32+ executable"
55156      fi
55157    else
55158      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55159        CORRECT_MSVCR_ARCH=386
55160      else
55161        CORRECT_MSVCR_ARCH=x86-64
55162      fi
55163    fi
55164    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55165      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55166$as_echo "ok" >&6; }
55167      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55168
55169  # Only process if variable expands to non-empty
55170
55171  if test "x$MSVC_DLL" != x; then
55172    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55173
55174  # Input might be given as Windows format, start by converting to
55175  # unix format.
55176  path="$MSVC_DLL"
55177  new_path=`$CYGPATH -u "$path"`
55178
55179  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55180  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55181  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55182  # "foo.exe" is OK but "foo" is an error.
55183  #
55184  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55185  # It is also a way to make sure we got the proper file name for the real test later on.
55186  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55187  if test "x$test_shortpath" = x; then
55188    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55189$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55190    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55191  fi
55192
55193  # Call helper function which possibly converts this using DOS-style short mode.
55194  # If so, the updated path is stored in $new_path.
55195
55196  input_path="$new_path"
55197  # Check if we need to convert this using DOS-style short mode. If the path
55198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55199  # take no chances and rewrite it.
55200  # Note: m4 eats our [], so we need to use [ and ] instead.
55201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55202  if test "x$has_forbidden_chars" != x; then
55203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55207      # Going to short mode and back again did indeed matter. Since short mode is
55208      # case insensitive, let's make it lowercase to improve readability.
55209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55210      # Now convert it back to Unix-style (cygpath)
55211      input_path=`$CYGPATH -u "$shortmode_path"`
55212      new_path="$input_path"
55213    fi
55214  fi
55215
55216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55217  if test "x$test_cygdrive_prefix" = x; then
55218    # As a simple fix, exclude /usr/bin since it's not a real path.
55219    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55221      # a path prefixed by /cygdrive for fixpath to work.
55222      new_path="$CYGWIN_ROOT_PATH$input_path"
55223    fi
55224  fi
55225
55226
55227  if test "x$path" != "x$new_path"; then
55228    MSVC_DLL="$new_path"
55229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55230$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55231  fi
55232
55233    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55234
55235  path="$MSVC_DLL"
55236  has_colon=`$ECHO $path | $GREP ^.:`
55237  new_path="$path"
55238  if test "x$has_colon" = x; then
55239    # Not in mixed or Windows style, start by that.
55240    new_path=`cmd //c echo $path`
55241  fi
55242
55243
55244  input_path="$new_path"
55245  # Check if we need to convert this using DOS-style short mode. If the path
55246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55247  # take no chances and rewrite it.
55248  # Note: m4 eats our [], so we need to use [ and ] instead.
55249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55250  if test "x$has_forbidden_chars" != x; then
55251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55252    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55253  fi
55254
55255
55256  windows_path="$new_path"
55257  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55258    unix_path=`$CYGPATH -u "$windows_path"`
55259    new_path="$unix_path"
55260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55261    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55262    new_path="$unix_path"
55263  fi
55264
55265  if test "x$path" != "x$new_path"; then
55266    MSVC_DLL="$new_path"
55267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55268$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55269  fi
55270
55271  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55272  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55273
55274    else
55275      # We're on a unix platform. Hooray! :)
55276      path="$MSVC_DLL"
55277      has_space=`$ECHO "$path" | $GREP " "`
55278      if test "x$has_space" != x; then
55279        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55280$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55281        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55282      fi
55283
55284      # Use eval to expand a potential ~
55285      eval path="$path"
55286      if test ! -f "$path" && test ! -d "$path"; then
55287        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55288      fi
55289
55290      if test -d "$path"; then
55291        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55292      else
55293        dir="`$DIRNAME "$path"`"
55294        base="`$BASENAME "$path"`"
55295        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55296      fi
55297    fi
55298  fi
55299
55300      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55301$as_echo_n "checking for $DLL_NAME... " >&6; }
55302      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55303$as_echo "$MSVC_DLL" >&6; }
55304    else
55305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55306$as_echo "incorrect, ignoring" >&6; }
55307      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55308$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55309    fi
55310  fi
55311
55312  fi
55313
55314  if test "x$MSVC_DLL" = x; then
55315    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55316    if test "x$VS100COMNTOOLS" != x; then
55317      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55318
55319  windows_path="$CYGWIN_VS_TOOLS_DIR"
55320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55321    unix_path=`$CYGPATH -u "$windows_path"`
55322    CYGWIN_VS_TOOLS_DIR="$unix_path"
55323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55325    CYGWIN_VS_TOOLS_DIR="$unix_path"
55326  fi
55327
55328      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55329        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55330	    | $GREP -i /x64/ | $HEAD --lines 1`
55331      else
55332        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55333	    | $GREP -i /x86/ | $HEAD --lines 1`
55334      fi
55335
55336  DLL_NAME="$DLL_NAME"
55337  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55338  METHOD="search of VS100COMNTOOLS"
55339  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55340    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55341$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55342
55343    # Need to check if the found msvcr is correct architecture
55344    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55345$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55346    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55347    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55348      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55349      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55350      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55351        CORRECT_MSVCR_ARCH="PE32 executable"
55352      else
55353        CORRECT_MSVCR_ARCH="PE32+ executable"
55354      fi
55355    else
55356      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55357        CORRECT_MSVCR_ARCH=386
55358      else
55359        CORRECT_MSVCR_ARCH=x86-64
55360      fi
55361    fi
55362    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55363      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55364$as_echo "ok" >&6; }
55365      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55366
55367  # Only process if variable expands to non-empty
55368
55369  if test "x$MSVC_DLL" != x; then
55370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55371
55372  # Input might be given as Windows format, start by converting to
55373  # unix format.
55374  path="$MSVC_DLL"
55375  new_path=`$CYGPATH -u "$path"`
55376
55377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55380  # "foo.exe" is OK but "foo" is an error.
55381  #
55382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55383  # It is also a way to make sure we got the proper file name for the real test later on.
55384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55385  if test "x$test_shortpath" = x; then
55386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55387$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55388    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55389  fi
55390
55391  # Call helper function which possibly converts this using DOS-style short mode.
55392  # If so, the updated path is stored in $new_path.
55393
55394  input_path="$new_path"
55395  # Check if we need to convert this using DOS-style short mode. If the path
55396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55397  # take no chances and rewrite it.
55398  # Note: m4 eats our [], so we need to use [ and ] instead.
55399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55400  if test "x$has_forbidden_chars" != x; then
55401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55405      # Going to short mode and back again did indeed matter. Since short mode is
55406      # case insensitive, let's make it lowercase to improve readability.
55407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55408      # Now convert it back to Unix-style (cygpath)
55409      input_path=`$CYGPATH -u "$shortmode_path"`
55410      new_path="$input_path"
55411    fi
55412  fi
55413
55414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55415  if test "x$test_cygdrive_prefix" = x; then
55416    # As a simple fix, exclude /usr/bin since it's not a real path.
55417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55419      # a path prefixed by /cygdrive for fixpath to work.
55420      new_path="$CYGWIN_ROOT_PATH$input_path"
55421    fi
55422  fi
55423
55424
55425  if test "x$path" != "x$new_path"; then
55426    MSVC_DLL="$new_path"
55427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55428$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55429  fi
55430
55431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55432
55433  path="$MSVC_DLL"
55434  has_colon=`$ECHO $path | $GREP ^.:`
55435  new_path="$path"
55436  if test "x$has_colon" = x; then
55437    # Not in mixed or Windows style, start by that.
55438    new_path=`cmd //c echo $path`
55439  fi
55440
55441
55442  input_path="$new_path"
55443  # Check if we need to convert this using DOS-style short mode. If the path
55444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55445  # take no chances and rewrite it.
55446  # Note: m4 eats our [], so we need to use [ and ] instead.
55447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55448  if test "x$has_forbidden_chars" != x; then
55449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55451  fi
55452
55453
55454  windows_path="$new_path"
55455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55456    unix_path=`$CYGPATH -u "$windows_path"`
55457    new_path="$unix_path"
55458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55460    new_path="$unix_path"
55461  fi
55462
55463  if test "x$path" != "x$new_path"; then
55464    MSVC_DLL="$new_path"
55465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55466$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55467  fi
55468
55469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55471
55472    else
55473      # We're on a unix platform. Hooray! :)
55474      path="$MSVC_DLL"
55475      has_space=`$ECHO "$path" | $GREP " "`
55476      if test "x$has_space" != x; then
55477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55478$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55480      fi
55481
55482      # Use eval to expand a potential ~
55483      eval path="$path"
55484      if test ! -f "$path" && test ! -d "$path"; then
55485        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55486      fi
55487
55488      if test -d "$path"; then
55489        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55490      else
55491        dir="`$DIRNAME "$path"`"
55492        base="`$BASENAME "$path"`"
55493        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55494      fi
55495    fi
55496  fi
55497
55498      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55499$as_echo_n "checking for $DLL_NAME... " >&6; }
55500      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55501$as_echo "$MSVC_DLL" >&6; }
55502    else
55503      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55504$as_echo "incorrect, ignoring" >&6; }
55505      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55506$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55507    fi
55508  fi
55509
55510    fi
55511  fi
55512
55513  if test "x$MSVC_DLL" = x; then
55514    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55515    # (This was the original behaviour; kept since it might turn something up)
55516    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55517      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55518        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55519	    | $GREP x64 | $HEAD --lines 1`
55520      else
55521        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55522	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55523        if test "x$POSSIBLE_MSVC_DLL" = x; then
55524          # We're grasping at straws now...
55525          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55526	      | $HEAD --lines 1`
55527        fi
55528      fi
55529
55530
55531  DLL_NAME="$DLL_NAME"
55532  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55533  METHOD="search of VCINSTALLDIR"
55534  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55535    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55536$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55537
55538    # Need to check if the found msvcr is correct architecture
55539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55540$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55541    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55543      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55544      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55545      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55546        CORRECT_MSVCR_ARCH="PE32 executable"
55547      else
55548        CORRECT_MSVCR_ARCH="PE32+ executable"
55549      fi
55550    else
55551      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55552        CORRECT_MSVCR_ARCH=386
55553      else
55554        CORRECT_MSVCR_ARCH=x86-64
55555      fi
55556    fi
55557    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55558      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55559$as_echo "ok" >&6; }
55560      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55561
55562  # Only process if variable expands to non-empty
55563
55564  if test "x$MSVC_DLL" != x; then
55565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55566
55567  # Input might be given as Windows format, start by converting to
55568  # unix format.
55569  path="$MSVC_DLL"
55570  new_path=`$CYGPATH -u "$path"`
55571
55572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55575  # "foo.exe" is OK but "foo" is an error.
55576  #
55577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55578  # It is also a way to make sure we got the proper file name for the real test later on.
55579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55580  if test "x$test_shortpath" = x; then
55581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55582$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55583    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55584  fi
55585
55586  # Call helper function which possibly converts this using DOS-style short mode.
55587  # If so, the updated path is stored in $new_path.
55588
55589  input_path="$new_path"
55590  # Check if we need to convert this using DOS-style short mode. If the path
55591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55592  # take no chances and rewrite it.
55593  # Note: m4 eats our [], so we need to use [ and ] instead.
55594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55595  if test "x$has_forbidden_chars" != x; then
55596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55600      # Going to short mode and back again did indeed matter. Since short mode is
55601      # case insensitive, let's make it lowercase to improve readability.
55602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55603      # Now convert it back to Unix-style (cygpath)
55604      input_path=`$CYGPATH -u "$shortmode_path"`
55605      new_path="$input_path"
55606    fi
55607  fi
55608
55609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55610  if test "x$test_cygdrive_prefix" = x; then
55611    # As a simple fix, exclude /usr/bin since it's not a real path.
55612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55614      # a path prefixed by /cygdrive for fixpath to work.
55615      new_path="$CYGWIN_ROOT_PATH$input_path"
55616    fi
55617  fi
55618
55619
55620  if test "x$path" != "x$new_path"; then
55621    MSVC_DLL="$new_path"
55622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55623$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55624  fi
55625
55626    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55627
55628  path="$MSVC_DLL"
55629  has_colon=`$ECHO $path | $GREP ^.:`
55630  new_path="$path"
55631  if test "x$has_colon" = x; then
55632    # Not in mixed or Windows style, start by that.
55633    new_path=`cmd //c echo $path`
55634  fi
55635
55636
55637  input_path="$new_path"
55638  # Check if we need to convert this using DOS-style short mode. If the path
55639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55640  # take no chances and rewrite it.
55641  # Note: m4 eats our [], so we need to use [ and ] instead.
55642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55643  if test "x$has_forbidden_chars" != x; then
55644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55646  fi
55647
55648
55649  windows_path="$new_path"
55650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55651    unix_path=`$CYGPATH -u "$windows_path"`
55652    new_path="$unix_path"
55653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55655    new_path="$unix_path"
55656  fi
55657
55658  if test "x$path" != "x$new_path"; then
55659    MSVC_DLL="$new_path"
55660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55661$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55662  fi
55663
55664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55666
55667    else
55668      # We're on a unix platform. Hooray! :)
55669      path="$MSVC_DLL"
55670      has_space=`$ECHO "$path" | $GREP " "`
55671      if test "x$has_space" != x; then
55672        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55673$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55674        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55675      fi
55676
55677      # Use eval to expand a potential ~
55678      eval path="$path"
55679      if test ! -f "$path" && test ! -d "$path"; then
55680        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55681      fi
55682
55683      if test -d "$path"; then
55684        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55685      else
55686        dir="`$DIRNAME "$path"`"
55687        base="`$BASENAME "$path"`"
55688        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55689      fi
55690    fi
55691  fi
55692
55693      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55694$as_echo_n "checking for $DLL_NAME... " >&6; }
55695      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55696$as_echo "$MSVC_DLL" >&6; }
55697    else
55698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55699$as_echo "incorrect, ignoring" >&6; }
55700      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55701$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55702    fi
55703  fi
55704
55705    fi
55706  fi
55707
55708  if test "x$MSVC_DLL" = x; then
55709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55710$as_echo_n "checking for $DLL_NAME... " >&6; }
55711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55712$as_echo "no" >&6; }
55713    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55714  fi
55715
55716    MSVCR_DLL="$MSVC_DLL"
55717  fi
55718
55719
55720
55721# Check whether --with-msvcp-dll was given.
55722if test "${with_msvcp_dll+set}" = set; then :
55723  withval=$with_msvcp_dll;
55724fi
55725
55726
55727  if test "x$MSVCP_NAME" != "x"; then
55728    if test "x$with_msvcp_dll" != x; then
55729      # If given explicitly by user, do not probe. If not present, fail directly.
55730
55731  DLL_NAME="$MSVCP_NAME"
55732  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55733  METHOD="--with-msvcp-dll"
55734  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55735    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55736$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55737
55738    # Need to check if the found msvcr is correct architecture
55739    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55740$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55741    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55743      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55744      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55745      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55746        CORRECT_MSVCR_ARCH="PE32 executable"
55747      else
55748        CORRECT_MSVCR_ARCH="PE32+ executable"
55749      fi
55750    else
55751      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55752        CORRECT_MSVCR_ARCH=386
55753      else
55754        CORRECT_MSVCR_ARCH=x86-64
55755      fi
55756    fi
55757    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55759$as_echo "ok" >&6; }
55760      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55761
55762  # Only process if variable expands to non-empty
55763
55764  if test "x$MSVC_DLL" != x; then
55765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55766
55767  # Input might be given as Windows format, start by converting to
55768  # unix format.
55769  path="$MSVC_DLL"
55770  new_path=`$CYGPATH -u "$path"`
55771
55772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55775  # "foo.exe" is OK but "foo" is an error.
55776  #
55777  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55778  # It is also a way to make sure we got the proper file name for the real test later on.
55779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55780  if test "x$test_shortpath" = x; then
55781    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55782$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55783    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55784  fi
55785
55786  # Call helper function which possibly converts this using DOS-style short mode.
55787  # If so, the updated path is stored in $new_path.
55788
55789  input_path="$new_path"
55790  # Check if we need to convert this using DOS-style short mode. If the path
55791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55792  # take no chances and rewrite it.
55793  # Note: m4 eats our [], so we need to use [ and ] instead.
55794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55795  if test "x$has_forbidden_chars" != x; then
55796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55800      # Going to short mode and back again did indeed matter. Since short mode is
55801      # case insensitive, let's make it lowercase to improve readability.
55802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55803      # Now convert it back to Unix-style (cygpath)
55804      input_path=`$CYGPATH -u "$shortmode_path"`
55805      new_path="$input_path"
55806    fi
55807  fi
55808
55809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55810  if test "x$test_cygdrive_prefix" = x; then
55811    # As a simple fix, exclude /usr/bin since it's not a real path.
55812    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55814      # a path prefixed by /cygdrive for fixpath to work.
55815      new_path="$CYGWIN_ROOT_PATH$input_path"
55816    fi
55817  fi
55818
55819
55820  if test "x$path" != "x$new_path"; then
55821    MSVC_DLL="$new_path"
55822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55823$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55824  fi
55825
55826    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55827
55828  path="$MSVC_DLL"
55829  has_colon=`$ECHO $path | $GREP ^.:`
55830  new_path="$path"
55831  if test "x$has_colon" = x; then
55832    # Not in mixed or Windows style, start by that.
55833    new_path=`cmd //c echo $path`
55834  fi
55835
55836
55837  input_path="$new_path"
55838  # Check if we need to convert this using DOS-style short mode. If the path
55839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55840  # take no chances and rewrite it.
55841  # Note: m4 eats our [], so we need to use [ and ] instead.
55842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55843  if test "x$has_forbidden_chars" != x; then
55844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55845    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55846  fi
55847
55848
55849  windows_path="$new_path"
55850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55851    unix_path=`$CYGPATH -u "$windows_path"`
55852    new_path="$unix_path"
55853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55855    new_path="$unix_path"
55856  fi
55857
55858  if test "x$path" != "x$new_path"; then
55859    MSVC_DLL="$new_path"
55860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55861$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55862  fi
55863
55864  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55865  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55866
55867    else
55868      # We're on a unix platform. Hooray! :)
55869      path="$MSVC_DLL"
55870      has_space=`$ECHO "$path" | $GREP " "`
55871      if test "x$has_space" != x; then
55872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55873$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55874        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55875      fi
55876
55877      # Use eval to expand a potential ~
55878      eval path="$path"
55879      if test ! -f "$path" && test ! -d "$path"; then
55880        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55881      fi
55882
55883      if test -d "$path"; then
55884        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55885      else
55886        dir="`$DIRNAME "$path"`"
55887        base="`$BASENAME "$path"`"
55888        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55889      fi
55890    fi
55891  fi
55892
55893      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55894$as_echo_n "checking for $DLL_NAME... " >&6; }
55895      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55896$as_echo "$MSVC_DLL" >&6; }
55897    else
55898      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55899$as_echo "incorrect, ignoring" >&6; }
55900      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55901$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55902    fi
55903  fi
55904
55905      if test "x$MSVC_DLL" = x; then
55906        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55907      fi
55908      MSVCP_DLL="$MSVC_DLL"
55909    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55910
55911  DLL_NAME="$MSVCP_NAME"
55912  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55913  METHOD="devkit"
55914  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55915    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55916$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55917
55918    # Need to check if the found msvcr is correct architecture
55919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55920$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55921    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55922    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55923      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55924      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55925      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55926        CORRECT_MSVCR_ARCH="PE32 executable"
55927      else
55928        CORRECT_MSVCR_ARCH="PE32+ executable"
55929      fi
55930    else
55931      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55932        CORRECT_MSVCR_ARCH=386
55933      else
55934        CORRECT_MSVCR_ARCH=x86-64
55935      fi
55936    fi
55937    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55938      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55939$as_echo "ok" >&6; }
55940      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55941
55942  # Only process if variable expands to non-empty
55943
55944  if test "x$MSVC_DLL" != x; then
55945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55946
55947  # Input might be given as Windows format, start by converting to
55948  # unix format.
55949  path="$MSVC_DLL"
55950  new_path=`$CYGPATH -u "$path"`
55951
55952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55955  # "foo.exe" is OK but "foo" is an error.
55956  #
55957  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55958  # It is also a way to make sure we got the proper file name for the real test later on.
55959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55960  if test "x$test_shortpath" = x; then
55961    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55962$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55963    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55964  fi
55965
55966  # Call helper function which possibly converts this using DOS-style short mode.
55967  # If so, the updated path is stored in $new_path.
55968
55969  input_path="$new_path"
55970  # Check if we need to convert this using DOS-style short mode. If the path
55971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55972  # take no chances and rewrite it.
55973  # Note: m4 eats our [], so we need to use [ and ] instead.
55974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55975  if test "x$has_forbidden_chars" != x; then
55976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55980      # Going to short mode and back again did indeed matter. Since short mode is
55981      # case insensitive, let's make it lowercase to improve readability.
55982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55983      # Now convert it back to Unix-style (cygpath)
55984      input_path=`$CYGPATH -u "$shortmode_path"`
55985      new_path="$input_path"
55986    fi
55987  fi
55988
55989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55990  if test "x$test_cygdrive_prefix" = x; then
55991    # As a simple fix, exclude /usr/bin since it's not a real path.
55992    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55994      # a path prefixed by /cygdrive for fixpath to work.
55995      new_path="$CYGWIN_ROOT_PATH$input_path"
55996    fi
55997  fi
55998
55999
56000  if test "x$path" != "x$new_path"; then
56001    MSVC_DLL="$new_path"
56002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56003$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56004  fi
56005
56006    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56007
56008  path="$MSVC_DLL"
56009  has_colon=`$ECHO $path | $GREP ^.:`
56010  new_path="$path"
56011  if test "x$has_colon" = x; then
56012    # Not in mixed or Windows style, start by that.
56013    new_path=`cmd //c echo $path`
56014  fi
56015
56016
56017  input_path="$new_path"
56018  # Check if we need to convert this using DOS-style short mode. If the path
56019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56020  # take no chances and rewrite it.
56021  # Note: m4 eats our [], so we need to use [ and ] instead.
56022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56023  if test "x$has_forbidden_chars" != x; then
56024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56026  fi
56027
56028
56029  windows_path="$new_path"
56030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56031    unix_path=`$CYGPATH -u "$windows_path"`
56032    new_path="$unix_path"
56033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56035    new_path="$unix_path"
56036  fi
56037
56038  if test "x$path" != "x$new_path"; then
56039    MSVC_DLL="$new_path"
56040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56041$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56042  fi
56043
56044  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56045  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56046
56047    else
56048      # We're on a unix platform. Hooray! :)
56049      path="$MSVC_DLL"
56050      has_space=`$ECHO "$path" | $GREP " "`
56051      if test "x$has_space" != x; then
56052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56053$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56054        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56055      fi
56056
56057      # Use eval to expand a potential ~
56058      eval path="$path"
56059      if test ! -f "$path" && test ! -d "$path"; then
56060        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56061      fi
56062
56063      if test -d "$path"; then
56064        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56065      else
56066        dir="`$DIRNAME "$path"`"
56067        base="`$BASENAME "$path"`"
56068        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56069      fi
56070    fi
56071  fi
56072
56073      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56074$as_echo_n "checking for $DLL_NAME... " >&6; }
56075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56076$as_echo "$MSVC_DLL" >&6; }
56077    else
56078      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56079$as_echo "incorrect, ignoring" >&6; }
56080      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56081$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56082    fi
56083  fi
56084
56085      if test "x$MSVC_DLL" = x; then
56086        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
56087      fi
56088      MSVCP_DLL="$MSVC_DLL"
56089    else
56090
56091  DLL_NAME="${MSVCP_NAME}"
56092  MSVC_DLL=
56093
56094  if test "x$MSVC_DLL" = x; then
56095    # Probe: Using well-known location from Visual Studio 10.0
56096    if test "x$VCINSTALLDIR" != x; then
56097      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
56098
56099  windows_path="$CYGWIN_VC_INSTALL_DIR"
56100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56101    unix_path=`$CYGPATH -u "$windows_path"`
56102    CYGWIN_VC_INSTALL_DIR="$unix_path"
56103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56105    CYGWIN_VC_INSTALL_DIR="$unix_path"
56106  fi
56107
56108      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56109        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56110      else
56111        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56112      fi
56113      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
56114
56115  DLL_NAME="$DLL_NAME"
56116  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56117  METHOD="well-known location in VCINSTALLDIR"
56118  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56119    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56120$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56121
56122    # Need to check if the found msvcr is correct architecture
56123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56124$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56125    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56126    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56127      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56128      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56129      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56130        CORRECT_MSVCR_ARCH="PE32 executable"
56131      else
56132        CORRECT_MSVCR_ARCH="PE32+ executable"
56133      fi
56134    else
56135      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56136        CORRECT_MSVCR_ARCH=386
56137      else
56138        CORRECT_MSVCR_ARCH=x86-64
56139      fi
56140    fi
56141    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56142      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56143$as_echo "ok" >&6; }
56144      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56145
56146  # Only process if variable expands to non-empty
56147
56148  if test "x$MSVC_DLL" != x; then
56149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56150
56151  # Input might be given as Windows format, start by converting to
56152  # unix format.
56153  path="$MSVC_DLL"
56154  new_path=`$CYGPATH -u "$path"`
56155
56156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56159  # "foo.exe" is OK but "foo" is an error.
56160  #
56161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56162  # It is also a way to make sure we got the proper file name for the real test later on.
56163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56164  if test "x$test_shortpath" = x; then
56165    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56166$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56167    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56168  fi
56169
56170  # Call helper function which possibly converts this using DOS-style short mode.
56171  # If so, the updated path is stored in $new_path.
56172
56173  input_path="$new_path"
56174  # Check if we need to convert this using DOS-style short mode. If the path
56175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56176  # take no chances and rewrite it.
56177  # Note: m4 eats our [], so we need to use [ and ] instead.
56178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56179  if test "x$has_forbidden_chars" != x; then
56180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56184      # Going to short mode and back again did indeed matter. Since short mode is
56185      # case insensitive, let's make it lowercase to improve readability.
56186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56187      # Now convert it back to Unix-style (cygpath)
56188      input_path=`$CYGPATH -u "$shortmode_path"`
56189      new_path="$input_path"
56190    fi
56191  fi
56192
56193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56194  if test "x$test_cygdrive_prefix" = x; then
56195    # As a simple fix, exclude /usr/bin since it's not a real path.
56196    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56198      # a path prefixed by /cygdrive for fixpath to work.
56199      new_path="$CYGWIN_ROOT_PATH$input_path"
56200    fi
56201  fi
56202
56203
56204  if test "x$path" != "x$new_path"; then
56205    MSVC_DLL="$new_path"
56206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56207$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56208  fi
56209
56210    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56211
56212  path="$MSVC_DLL"
56213  has_colon=`$ECHO $path | $GREP ^.:`
56214  new_path="$path"
56215  if test "x$has_colon" = x; then
56216    # Not in mixed or Windows style, start by that.
56217    new_path=`cmd //c echo $path`
56218  fi
56219
56220
56221  input_path="$new_path"
56222  # Check if we need to convert this using DOS-style short mode. If the path
56223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56224  # take no chances and rewrite it.
56225  # Note: m4 eats our [], so we need to use [ and ] instead.
56226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56227  if test "x$has_forbidden_chars" != x; then
56228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56230  fi
56231
56232
56233  windows_path="$new_path"
56234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56235    unix_path=`$CYGPATH -u "$windows_path"`
56236    new_path="$unix_path"
56237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56239    new_path="$unix_path"
56240  fi
56241
56242  if test "x$path" != "x$new_path"; then
56243    MSVC_DLL="$new_path"
56244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56245$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56246  fi
56247
56248  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56249  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56250
56251    else
56252      # We're on a unix platform. Hooray! :)
56253      path="$MSVC_DLL"
56254      has_space=`$ECHO "$path" | $GREP " "`
56255      if test "x$has_space" != x; then
56256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56257$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56258        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56259      fi
56260
56261      # Use eval to expand a potential ~
56262      eval path="$path"
56263      if test ! -f "$path" && test ! -d "$path"; then
56264        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56265      fi
56266
56267      if test -d "$path"; then
56268        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56269      else
56270        dir="`$DIRNAME "$path"`"
56271        base="`$BASENAME "$path"`"
56272        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56273      fi
56274    fi
56275  fi
56276
56277      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56278$as_echo_n "checking for $DLL_NAME... " >&6; }
56279      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56280$as_echo "$MSVC_DLL" >&6; }
56281    else
56282      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56283$as_echo "incorrect, ignoring" >&6; }
56284      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56285$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56286    fi
56287  fi
56288
56289    fi
56290  fi
56291
56292  if test "x$MSVC_DLL" = x; then
56293    # Probe: Check in the Boot JDK directory.
56294    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
56295
56296  DLL_NAME="$DLL_NAME"
56297  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56298  METHOD="well-known location in Boot JDK"
56299  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56300    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56301$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56302
56303    # Need to check if the found msvcr is correct architecture
56304    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56305$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56306    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56308      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56309      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56310      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56311        CORRECT_MSVCR_ARCH="PE32 executable"
56312      else
56313        CORRECT_MSVCR_ARCH="PE32+ executable"
56314      fi
56315    else
56316      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56317        CORRECT_MSVCR_ARCH=386
56318      else
56319        CORRECT_MSVCR_ARCH=x86-64
56320      fi
56321    fi
56322    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56324$as_echo "ok" >&6; }
56325      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56326
56327  # Only process if variable expands to non-empty
56328
56329  if test "x$MSVC_DLL" != x; then
56330    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56331
56332  # Input might be given as Windows format, start by converting to
56333  # unix format.
56334  path="$MSVC_DLL"
56335  new_path=`$CYGPATH -u "$path"`
56336
56337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56340  # "foo.exe" is OK but "foo" is an error.
56341  #
56342  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56343  # It is also a way to make sure we got the proper file name for the real test later on.
56344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56345  if test "x$test_shortpath" = x; then
56346    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56347$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56348    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56349  fi
56350
56351  # Call helper function which possibly converts this using DOS-style short mode.
56352  # If so, the updated path is stored in $new_path.
56353
56354  input_path="$new_path"
56355  # Check if we need to convert this using DOS-style short mode. If the path
56356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56357  # take no chances and rewrite it.
56358  # Note: m4 eats our [], so we need to use [ and ] instead.
56359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56360  if test "x$has_forbidden_chars" != x; then
56361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56365      # Going to short mode and back again did indeed matter. Since short mode is
56366      # case insensitive, let's make it lowercase to improve readability.
56367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56368      # Now convert it back to Unix-style (cygpath)
56369      input_path=`$CYGPATH -u "$shortmode_path"`
56370      new_path="$input_path"
56371    fi
56372  fi
56373
56374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56375  if test "x$test_cygdrive_prefix" = x; then
56376    # As a simple fix, exclude /usr/bin since it's not a real path.
56377    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56379      # a path prefixed by /cygdrive for fixpath to work.
56380      new_path="$CYGWIN_ROOT_PATH$input_path"
56381    fi
56382  fi
56383
56384
56385  if test "x$path" != "x$new_path"; then
56386    MSVC_DLL="$new_path"
56387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56388$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56389  fi
56390
56391    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56392
56393  path="$MSVC_DLL"
56394  has_colon=`$ECHO $path | $GREP ^.:`
56395  new_path="$path"
56396  if test "x$has_colon" = x; then
56397    # Not in mixed or Windows style, start by that.
56398    new_path=`cmd //c echo $path`
56399  fi
56400
56401
56402  input_path="$new_path"
56403  # Check if we need to convert this using DOS-style short mode. If the path
56404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56405  # take no chances and rewrite it.
56406  # Note: m4 eats our [], so we need to use [ and ] instead.
56407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56408  if test "x$has_forbidden_chars" != x; then
56409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56411  fi
56412
56413
56414  windows_path="$new_path"
56415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56416    unix_path=`$CYGPATH -u "$windows_path"`
56417    new_path="$unix_path"
56418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56420    new_path="$unix_path"
56421  fi
56422
56423  if test "x$path" != "x$new_path"; then
56424    MSVC_DLL="$new_path"
56425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56426$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56427  fi
56428
56429  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56430  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56431
56432    else
56433      # We're on a unix platform. Hooray! :)
56434      path="$MSVC_DLL"
56435      has_space=`$ECHO "$path" | $GREP " "`
56436      if test "x$has_space" != x; then
56437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56438$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56439        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56440      fi
56441
56442      # Use eval to expand a potential ~
56443      eval path="$path"
56444      if test ! -f "$path" && test ! -d "$path"; then
56445        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56446      fi
56447
56448      if test -d "$path"; then
56449        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56450      else
56451        dir="`$DIRNAME "$path"`"
56452        base="`$BASENAME "$path"`"
56453        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56454      fi
56455    fi
56456  fi
56457
56458      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56459$as_echo_n "checking for $DLL_NAME... " >&6; }
56460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56461$as_echo "$MSVC_DLL" >&6; }
56462    else
56463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56464$as_echo "incorrect, ignoring" >&6; }
56465      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56466$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56467    fi
56468  fi
56469
56470  fi
56471
56472  if test "x$MSVC_DLL" = x; then
56473    # Probe: Look in the Windows system32 directory
56474    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56475
56476  windows_path="$CYGWIN_SYSTEMROOT"
56477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56478    unix_path=`$CYGPATH -u "$windows_path"`
56479    CYGWIN_SYSTEMROOT="$unix_path"
56480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56482    CYGWIN_SYSTEMROOT="$unix_path"
56483  fi
56484
56485    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56486
56487  DLL_NAME="$DLL_NAME"
56488  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56489  METHOD="well-known location in SYSTEMROOT"
56490  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56491    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56492$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56493
56494    # Need to check if the found msvcr is correct architecture
56495    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56496$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56497    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56498    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56499      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56500      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56501      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56502        CORRECT_MSVCR_ARCH="PE32 executable"
56503      else
56504        CORRECT_MSVCR_ARCH="PE32+ executable"
56505      fi
56506    else
56507      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56508        CORRECT_MSVCR_ARCH=386
56509      else
56510        CORRECT_MSVCR_ARCH=x86-64
56511      fi
56512    fi
56513    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56514      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56515$as_echo "ok" >&6; }
56516      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56517
56518  # Only process if variable expands to non-empty
56519
56520  if test "x$MSVC_DLL" != x; then
56521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56522
56523  # Input might be given as Windows format, start by converting to
56524  # unix format.
56525  path="$MSVC_DLL"
56526  new_path=`$CYGPATH -u "$path"`
56527
56528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56531  # "foo.exe" is OK but "foo" is an error.
56532  #
56533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56534  # It is also a way to make sure we got the proper file name for the real test later on.
56535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56536  if test "x$test_shortpath" = x; then
56537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56538$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56539    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56540  fi
56541
56542  # Call helper function which possibly converts this using DOS-style short mode.
56543  # If so, the updated path is stored in $new_path.
56544
56545  input_path="$new_path"
56546  # Check if we need to convert this using DOS-style short mode. If the path
56547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56548  # take no chances and rewrite it.
56549  # Note: m4 eats our [], so we need to use [ and ] instead.
56550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56551  if test "x$has_forbidden_chars" != x; then
56552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56556      # Going to short mode and back again did indeed matter. Since short mode is
56557      # case insensitive, let's make it lowercase to improve readability.
56558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56559      # Now convert it back to Unix-style (cygpath)
56560      input_path=`$CYGPATH -u "$shortmode_path"`
56561      new_path="$input_path"
56562    fi
56563  fi
56564
56565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56566  if test "x$test_cygdrive_prefix" = x; then
56567    # As a simple fix, exclude /usr/bin since it's not a real path.
56568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56570      # a path prefixed by /cygdrive for fixpath to work.
56571      new_path="$CYGWIN_ROOT_PATH$input_path"
56572    fi
56573  fi
56574
56575
56576  if test "x$path" != "x$new_path"; then
56577    MSVC_DLL="$new_path"
56578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56579$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56580  fi
56581
56582    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56583
56584  path="$MSVC_DLL"
56585  has_colon=`$ECHO $path | $GREP ^.:`
56586  new_path="$path"
56587  if test "x$has_colon" = x; then
56588    # Not in mixed or Windows style, start by that.
56589    new_path=`cmd //c echo $path`
56590  fi
56591
56592
56593  input_path="$new_path"
56594  # Check if we need to convert this using DOS-style short mode. If the path
56595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56596  # take no chances and rewrite it.
56597  # Note: m4 eats our [], so we need to use [ and ] instead.
56598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56599  if test "x$has_forbidden_chars" != x; then
56600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56602  fi
56603
56604
56605  windows_path="$new_path"
56606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56607    unix_path=`$CYGPATH -u "$windows_path"`
56608    new_path="$unix_path"
56609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56611    new_path="$unix_path"
56612  fi
56613
56614  if test "x$path" != "x$new_path"; then
56615    MSVC_DLL="$new_path"
56616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56617$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56618  fi
56619
56620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56622
56623    else
56624      # We're on a unix platform. Hooray! :)
56625      path="$MSVC_DLL"
56626      has_space=`$ECHO "$path" | $GREP " "`
56627      if test "x$has_space" != x; then
56628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56629$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56630        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56631      fi
56632
56633      # Use eval to expand a potential ~
56634      eval path="$path"
56635      if test ! -f "$path" && test ! -d "$path"; then
56636        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56637      fi
56638
56639      if test -d "$path"; then
56640        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56641      else
56642        dir="`$DIRNAME "$path"`"
56643        base="`$BASENAME "$path"`"
56644        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56645      fi
56646    fi
56647  fi
56648
56649      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56650$as_echo_n "checking for $DLL_NAME... " >&6; }
56651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56652$as_echo "$MSVC_DLL" >&6; }
56653    else
56654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56655$as_echo "incorrect, ignoring" >&6; }
56656      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56657$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56658    fi
56659  fi
56660
56661  fi
56662
56663  if test "x$MSVC_DLL" = x; then
56664    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56665    if test "x$VS100COMNTOOLS" != x; then
56666      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56667
56668  windows_path="$CYGWIN_VS_TOOLS_DIR"
56669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56670    unix_path=`$CYGPATH -u "$windows_path"`
56671    CYGWIN_VS_TOOLS_DIR="$unix_path"
56672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56674    CYGWIN_VS_TOOLS_DIR="$unix_path"
56675  fi
56676
56677      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56678        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56679	    | $GREP -i /x64/ | $HEAD --lines 1`
56680      else
56681        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56682	    | $GREP -i /x86/ | $HEAD --lines 1`
56683      fi
56684
56685  DLL_NAME="$DLL_NAME"
56686  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56687  METHOD="search of VS100COMNTOOLS"
56688  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56689    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56690$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56691
56692    # Need to check if the found msvcr is correct architecture
56693    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56694$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56695    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56696    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56697      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56698      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56699      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56700        CORRECT_MSVCR_ARCH="PE32 executable"
56701      else
56702        CORRECT_MSVCR_ARCH="PE32+ executable"
56703      fi
56704    else
56705      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56706        CORRECT_MSVCR_ARCH=386
56707      else
56708        CORRECT_MSVCR_ARCH=x86-64
56709      fi
56710    fi
56711    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56712      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56713$as_echo "ok" >&6; }
56714      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56715
56716  # Only process if variable expands to non-empty
56717
56718  if test "x$MSVC_DLL" != x; then
56719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56720
56721  # Input might be given as Windows format, start by converting to
56722  # unix format.
56723  path="$MSVC_DLL"
56724  new_path=`$CYGPATH -u "$path"`
56725
56726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56729  # "foo.exe" is OK but "foo" is an error.
56730  #
56731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56732  # It is also a way to make sure we got the proper file name for the real test later on.
56733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56734  if test "x$test_shortpath" = x; then
56735    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56736$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56737    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56738  fi
56739
56740  # Call helper function which possibly converts this using DOS-style short mode.
56741  # If so, the updated path is stored in $new_path.
56742
56743  input_path="$new_path"
56744  # Check if we need to convert this using DOS-style short mode. If the path
56745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56746  # take no chances and rewrite it.
56747  # Note: m4 eats our [], so we need to use [ and ] instead.
56748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56749  if test "x$has_forbidden_chars" != x; then
56750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56754      # Going to short mode and back again did indeed matter. Since short mode is
56755      # case insensitive, let's make it lowercase to improve readability.
56756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56757      # Now convert it back to Unix-style (cygpath)
56758      input_path=`$CYGPATH -u "$shortmode_path"`
56759      new_path="$input_path"
56760    fi
56761  fi
56762
56763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56764  if test "x$test_cygdrive_prefix" = x; then
56765    # As a simple fix, exclude /usr/bin since it's not a real path.
56766    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56768      # a path prefixed by /cygdrive for fixpath to work.
56769      new_path="$CYGWIN_ROOT_PATH$input_path"
56770    fi
56771  fi
56772
56773
56774  if test "x$path" != "x$new_path"; then
56775    MSVC_DLL="$new_path"
56776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56777$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56778  fi
56779
56780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56781
56782  path="$MSVC_DLL"
56783  has_colon=`$ECHO $path | $GREP ^.:`
56784  new_path="$path"
56785  if test "x$has_colon" = x; then
56786    # Not in mixed or Windows style, start by that.
56787    new_path=`cmd //c echo $path`
56788  fi
56789
56790
56791  input_path="$new_path"
56792  # Check if we need to convert this using DOS-style short mode. If the path
56793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56794  # take no chances and rewrite it.
56795  # Note: m4 eats our [], so we need to use [ and ] instead.
56796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56797  if test "x$has_forbidden_chars" != x; then
56798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56800  fi
56801
56802
56803  windows_path="$new_path"
56804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56805    unix_path=`$CYGPATH -u "$windows_path"`
56806    new_path="$unix_path"
56807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56809    new_path="$unix_path"
56810  fi
56811
56812  if test "x$path" != "x$new_path"; then
56813    MSVC_DLL="$new_path"
56814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56815$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56816  fi
56817
56818  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56819  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56820
56821    else
56822      # We're on a unix platform. Hooray! :)
56823      path="$MSVC_DLL"
56824      has_space=`$ECHO "$path" | $GREP " "`
56825      if test "x$has_space" != x; then
56826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56827$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56828        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56829      fi
56830
56831      # Use eval to expand a potential ~
56832      eval path="$path"
56833      if test ! -f "$path" && test ! -d "$path"; then
56834        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56835      fi
56836
56837      if test -d "$path"; then
56838        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56839      else
56840        dir="`$DIRNAME "$path"`"
56841        base="`$BASENAME "$path"`"
56842        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56843      fi
56844    fi
56845  fi
56846
56847      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56848$as_echo_n "checking for $DLL_NAME... " >&6; }
56849      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56850$as_echo "$MSVC_DLL" >&6; }
56851    else
56852      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56853$as_echo "incorrect, ignoring" >&6; }
56854      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56855$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56856    fi
56857  fi
56858
56859    fi
56860  fi
56861
56862  if test "x$MSVC_DLL" = x; then
56863    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56864    # (This was the original behaviour; kept since it might turn something up)
56865    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56866      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56867        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56868	    | $GREP x64 | $HEAD --lines 1`
56869      else
56870        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56871	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56872        if test "x$POSSIBLE_MSVC_DLL" = x; then
56873          # We're grasping at straws now...
56874          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56875	      | $HEAD --lines 1`
56876        fi
56877      fi
56878
56879
56880  DLL_NAME="$DLL_NAME"
56881  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56882  METHOD="search of VCINSTALLDIR"
56883  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56884    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56885$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56886
56887    # Need to check if the found msvcr is correct architecture
56888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56889$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56890    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56891    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56892      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56893      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56894      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56895        CORRECT_MSVCR_ARCH="PE32 executable"
56896      else
56897        CORRECT_MSVCR_ARCH="PE32+ executable"
56898      fi
56899    else
56900      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56901        CORRECT_MSVCR_ARCH=386
56902      else
56903        CORRECT_MSVCR_ARCH=x86-64
56904      fi
56905    fi
56906    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56907      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56908$as_echo "ok" >&6; }
56909      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56910
56911  # Only process if variable expands to non-empty
56912
56913  if test "x$MSVC_DLL" != x; then
56914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56915
56916  # Input might be given as Windows format, start by converting to
56917  # unix format.
56918  path="$MSVC_DLL"
56919  new_path=`$CYGPATH -u "$path"`
56920
56921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56924  # "foo.exe" is OK but "foo" is an error.
56925  #
56926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56927  # It is also a way to make sure we got the proper file name for the real test later on.
56928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56929  if test "x$test_shortpath" = x; then
56930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56931$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56932    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56933  fi
56934
56935  # Call helper function which possibly converts this using DOS-style short mode.
56936  # If so, the updated path is stored in $new_path.
56937
56938  input_path="$new_path"
56939  # Check if we need to convert this using DOS-style short mode. If the path
56940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56941  # take no chances and rewrite it.
56942  # Note: m4 eats our [], so we need to use [ and ] instead.
56943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56944  if test "x$has_forbidden_chars" != x; then
56945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56949      # Going to short mode and back again did indeed matter. Since short mode is
56950      # case insensitive, let's make it lowercase to improve readability.
56951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56952      # Now convert it back to Unix-style (cygpath)
56953      input_path=`$CYGPATH -u "$shortmode_path"`
56954      new_path="$input_path"
56955    fi
56956  fi
56957
56958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56959  if test "x$test_cygdrive_prefix" = x; then
56960    # As a simple fix, exclude /usr/bin since it's not a real path.
56961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56963      # a path prefixed by /cygdrive for fixpath to work.
56964      new_path="$CYGWIN_ROOT_PATH$input_path"
56965    fi
56966  fi
56967
56968
56969  if test "x$path" != "x$new_path"; then
56970    MSVC_DLL="$new_path"
56971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56972$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56973  fi
56974
56975    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56976
56977  path="$MSVC_DLL"
56978  has_colon=`$ECHO $path | $GREP ^.:`
56979  new_path="$path"
56980  if test "x$has_colon" = x; then
56981    # Not in mixed or Windows style, start by that.
56982    new_path=`cmd //c echo $path`
56983  fi
56984
56985
56986  input_path="$new_path"
56987  # Check if we need to convert this using DOS-style short mode. If the path
56988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56989  # take no chances and rewrite it.
56990  # Note: m4 eats our [], so we need to use [ and ] instead.
56991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56992  if test "x$has_forbidden_chars" != x; then
56993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56995  fi
56996
56997
56998  windows_path="$new_path"
56999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57000    unix_path=`$CYGPATH -u "$windows_path"`
57001    new_path="$unix_path"
57002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57004    new_path="$unix_path"
57005  fi
57006
57007  if test "x$path" != "x$new_path"; then
57008    MSVC_DLL="$new_path"
57009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57010$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57011  fi
57012
57013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57015
57016    else
57017      # We're on a unix platform. Hooray! :)
57018      path="$MSVC_DLL"
57019      has_space=`$ECHO "$path" | $GREP " "`
57020      if test "x$has_space" != x; then
57021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57022$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57023        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57024      fi
57025
57026      # Use eval to expand a potential ~
57027      eval path="$path"
57028      if test ! -f "$path" && test ! -d "$path"; then
57029        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57030      fi
57031
57032      if test -d "$path"; then
57033        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57034      else
57035        dir="`$DIRNAME "$path"`"
57036        base="`$BASENAME "$path"`"
57037        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57038      fi
57039    fi
57040  fi
57041
57042      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57043$as_echo_n "checking for $DLL_NAME... " >&6; }
57044      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57045$as_echo "$MSVC_DLL" >&6; }
57046    else
57047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57048$as_echo "incorrect, ignoring" >&6; }
57049      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57050$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57051    fi
57052  fi
57053
57054    fi
57055  fi
57056
57057  if test "x$MSVC_DLL" = x; then
57058    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57059$as_echo_n "checking for $DLL_NAME... " >&6; }
57060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57061$as_echo "no" >&6; }
57062    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
57063  fi
57064
57065      MSVCP_DLL="$MSVC_DLL"
57066    fi
57067
57068  fi
57069
57070  fi
57071
57072
57073  if test "x$NEEDS_LIB_X11" = xfalse; then
57074    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
57075      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
57076$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
57077    fi
57078    X_CFLAGS=
57079    X_LIBS=
57080  else
57081
57082    if test "x${with_x}" = xno; then
57083      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
57084    fi
57085
57086    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
57087      # The user has specified a X11 base directory. Use it for includes and
57088      # libraries, unless explicitly overridden.
57089      if test "x$x_includes" = xNONE; then
57090        x_includes="${with_x}/include"
57091      fi
57092      if test "x$x_libraries" = xNONE; then
57093        x_libraries="${with_x}/lib"
57094      fi
57095    else
57096      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
57097      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
57098      # --x-libraries for the sysroot, if that seems to be correct.
57099      if test "x$SYSROOT" != "x"; then
57100        if test "x$x_includes" = xNONE; then
57101          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
57102            x_includes="$SYSROOT/usr/X11R6/include"
57103          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
57104            x_includes="$SYSROOT/usr/include"
57105          fi
57106        fi
57107        if test "x$x_libraries" = xNONE; then
57108          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
57109            x_libraries="$SYSROOT/usr/X11R6/lib"
57110          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57111            x_libraries="$SYSROOT/usr/lib64"
57112          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
57113            x_libraries="$SYSROOT/usr/lib"
57114          fi
57115        fi
57116      fi
57117    fi
57118
57119    # Now let autoconf do it's magic
57120    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
57121$as_echo_n "checking for X... " >&6; }
57122
57123
57124# Check whether --with-x was given.
57125if test "${with_x+set}" = set; then :
57126  withval=$with_x;
57127fi
57128
57129# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
57130if test "x$with_x" = xno; then
57131  # The user explicitly disabled X.
57132  have_x=disabled
57133else
57134  case $x_includes,$x_libraries in #(
57135    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
57136    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
57137  $as_echo_n "(cached) " >&6
57138else
57139  # One or both of the vars are not set, and there is no cached value.
57140ac_x_includes=no ac_x_libraries=no
57141rm -f -r conftest.dir
57142if mkdir conftest.dir; then
57143  cd conftest.dir
57144  cat >Imakefile <<'_ACEOF'
57145incroot:
57146	@echo incroot='${INCROOT}'
57147usrlibdir:
57148	@echo usrlibdir='${USRLIBDIR}'
57149libdir:
57150	@echo libdir='${LIBDIR}'
57151_ACEOF
57152  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
57153    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
57154    for ac_var in incroot usrlibdir libdir; do
57155      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
57156    done
57157    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
57158    for ac_extension in a so sl dylib la dll; do
57159      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
57160	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
57161	ac_im_usrlibdir=$ac_im_libdir; break
57162      fi
57163    done
57164    # Screen out bogus values from the imake configuration.  They are
57165    # bogus both because they are the default anyway, and because
57166    # using them would break gcc on systems where it needs fixed includes.
57167    case $ac_im_incroot in
57168	/usr/include) ac_x_includes= ;;
57169	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
57170    esac
57171    case $ac_im_usrlibdir in
57172	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
57173	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
57174    esac
57175  fi
57176  cd ..
57177  rm -f -r conftest.dir
57178fi
57179
57180# Standard set of common directories for X headers.
57181# Check X11 before X11Rn because it is often a symlink to the current release.
57182ac_x_header_dirs='
57183/usr/X11/include
57184/usr/X11R7/include
57185/usr/X11R6/include
57186/usr/X11R5/include
57187/usr/X11R4/include
57188
57189/usr/include/X11
57190/usr/include/X11R7
57191/usr/include/X11R6
57192/usr/include/X11R5
57193/usr/include/X11R4
57194
57195/usr/local/X11/include
57196/usr/local/X11R7/include
57197/usr/local/X11R6/include
57198/usr/local/X11R5/include
57199/usr/local/X11R4/include
57200
57201/usr/local/include/X11
57202/usr/local/include/X11R7
57203/usr/local/include/X11R6
57204/usr/local/include/X11R5
57205/usr/local/include/X11R4
57206
57207/usr/X386/include
57208/usr/x386/include
57209/usr/XFree86/include/X11
57210
57211/usr/include
57212/usr/local/include
57213/usr/unsupported/include
57214/usr/athena/include
57215/usr/local/x11r5/include
57216/usr/lpp/Xamples/include
57217
57218/usr/openwin/include
57219/usr/openwin/share/include'
57220
57221if test "$ac_x_includes" = no; then
57222  # Guess where to find include files, by looking for Xlib.h.
57223  # First, try using that file with no special directory specified.
57224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57225/* end confdefs.h.  */
57226#include <X11/Xlib.h>
57227_ACEOF
57228if ac_fn_cxx_try_cpp "$LINENO"; then :
57229  # We can compile using X headers with no special include directory.
57230ac_x_includes=
57231else
57232  for ac_dir in $ac_x_header_dirs; do
57233  if test -r "$ac_dir/X11/Xlib.h"; then
57234    ac_x_includes=$ac_dir
57235    break
57236  fi
57237done
57238fi
57239rm -f conftest.err conftest.i conftest.$ac_ext
57240fi # $ac_x_includes = no
57241
57242if test "$ac_x_libraries" = no; then
57243  # Check for the libraries.
57244  # See if we find them without any special options.
57245  # Don't add to $LIBS permanently.
57246  ac_save_LIBS=$LIBS
57247  LIBS="-lX11 $LIBS"
57248  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57249/* end confdefs.h.  */
57250#include <X11/Xlib.h>
57251int
57252main ()
57253{
57254XrmInitialize ()
57255  ;
57256  return 0;
57257}
57258_ACEOF
57259if ac_fn_cxx_try_link "$LINENO"; then :
57260  LIBS=$ac_save_LIBS
57261# We can link X programs with no special library path.
57262ac_x_libraries=
57263else
57264  LIBS=$ac_save_LIBS
57265for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
57266do
57267  # Don't even attempt the hair of trying to link an X program!
57268  for ac_extension in a so sl dylib la dll; do
57269    if test -r "$ac_dir/libX11.$ac_extension"; then
57270      ac_x_libraries=$ac_dir
57271      break 2
57272    fi
57273  done
57274done
57275fi
57276rm -f core conftest.err conftest.$ac_objext \
57277    conftest$ac_exeext conftest.$ac_ext
57278fi # $ac_x_libraries = no
57279
57280case $ac_x_includes,$ac_x_libraries in #(
57281  no,* | *,no | *\'*)
57282    # Didn't find X, or a directory has "'" in its name.
57283    ac_cv_have_x="have_x=no";; #(
57284  *)
57285    # Record where we found X for the cache.
57286    ac_cv_have_x="have_x=yes\
57287	ac_x_includes='$ac_x_includes'\
57288	ac_x_libraries='$ac_x_libraries'"
57289esac
57290fi
57291;; #(
57292    *) have_x=yes;;
57293  esac
57294  eval "$ac_cv_have_x"
57295fi # $with_x != no
57296
57297if test "$have_x" != yes; then
57298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
57299$as_echo "$have_x" >&6; }
57300  no_x=yes
57301else
57302  # If each of the values was on the command line, it overrides each guess.
57303  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
57304  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
57305  # Update the cache value to reflect the command line values.
57306  ac_cv_have_x="have_x=yes\
57307	ac_x_includes='$x_includes'\
57308	ac_x_libraries='$x_libraries'"
57309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
57310$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
57311fi
57312
57313    if test "$no_x" = yes; then
57314  # Not all programs may use this symbol, but it does not hurt to define it.
57315
57316$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
57317
57318  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
57319else
57320  if test -n "$x_includes"; then
57321    X_CFLAGS="$X_CFLAGS -I$x_includes"
57322  fi
57323
57324  # It would also be nice to do this for all -L options, not just this one.
57325  if test -n "$x_libraries"; then
57326    X_LIBS="$X_LIBS -L$x_libraries"
57327    # For Solaris; some versions of Sun CC require a space after -R and
57328    # others require no space.  Words are not sufficient . . . .
57329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
57330$as_echo_n "checking whether -R must be followed by a space... " >&6; }
57331    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
57332    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
57333    ac_cxx_werror_flag=yes
57334    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57335/* end confdefs.h.  */
57336
57337int
57338main ()
57339{
57340
57341  ;
57342  return 0;
57343}
57344_ACEOF
57345if ac_fn_cxx_try_link "$LINENO"; then :
57346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57347$as_echo "no" >&6; }
57348       X_LIBS="$X_LIBS -R$x_libraries"
57349else
57350  LIBS="$ac_xsave_LIBS -R $x_libraries"
57351       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57352/* end confdefs.h.  */
57353
57354int
57355main ()
57356{
57357
57358  ;
57359  return 0;
57360}
57361_ACEOF
57362if ac_fn_cxx_try_link "$LINENO"; then :
57363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57364$as_echo "yes" >&6; }
57365	  X_LIBS="$X_LIBS -R $x_libraries"
57366else
57367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
57368$as_echo "neither works" >&6; }
57369fi
57370rm -f core conftest.err conftest.$ac_objext \
57371    conftest$ac_exeext conftest.$ac_ext
57372fi
57373rm -f core conftest.err conftest.$ac_objext \
57374    conftest$ac_exeext conftest.$ac_ext
57375    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
57376    LIBS=$ac_xsave_LIBS
57377  fi
57378
57379  # Check for system-dependent libraries X programs must link with.
57380  # Do this before checking for the system-independent R6 libraries
57381  # (-lICE), since we may need -lsocket or whatever for X linking.
57382
57383  if test "$ISC" = yes; then
57384    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
57385  else
57386    # Martyn Johnson says this is needed for Ultrix, if the X
57387    # libraries were built with DECnet support.  And Karl Berry says
57388    # the Alpha needs dnet_stub (dnet does not exist).
57389    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
57390    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57391/* end confdefs.h.  */
57392
57393/* Override any GCC internal prototype to avoid an error.
57394   Use char because int might match the return type of a GCC
57395   builtin and then its argument prototype would still apply.  */
57396#ifdef __cplusplus
57397extern "C"
57398#endif
57399char XOpenDisplay ();
57400int
57401main ()
57402{
57403return XOpenDisplay ();
57404  ;
57405  return 0;
57406}
57407_ACEOF
57408if ac_fn_cxx_try_link "$LINENO"; then :
57409
57410else
57411  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
57412$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
57413if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
57414  $as_echo_n "(cached) " >&6
57415else
57416  ac_check_lib_save_LIBS=$LIBS
57417LIBS="-ldnet  $LIBS"
57418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57419/* end confdefs.h.  */
57420
57421/* Override any GCC internal prototype to avoid an error.
57422   Use char because int might match the return type of a GCC
57423   builtin and then its argument prototype would still apply.  */
57424#ifdef __cplusplus
57425extern "C"
57426#endif
57427char dnet_ntoa ();
57428int
57429main ()
57430{
57431return dnet_ntoa ();
57432  ;
57433  return 0;
57434}
57435_ACEOF
57436if ac_fn_cxx_try_link "$LINENO"; then :
57437  ac_cv_lib_dnet_dnet_ntoa=yes
57438else
57439  ac_cv_lib_dnet_dnet_ntoa=no
57440fi
57441rm -f core conftest.err conftest.$ac_objext \
57442    conftest$ac_exeext conftest.$ac_ext
57443LIBS=$ac_check_lib_save_LIBS
57444fi
57445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
57446$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
57447if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
57448  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
57449fi
57450
57451    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
57452      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
57453$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
57454if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
57455  $as_echo_n "(cached) " >&6
57456else
57457  ac_check_lib_save_LIBS=$LIBS
57458LIBS="-ldnet_stub  $LIBS"
57459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57460/* end confdefs.h.  */
57461
57462/* Override any GCC internal prototype to avoid an error.
57463   Use char because int might match the return type of a GCC
57464   builtin and then its argument prototype would still apply.  */
57465#ifdef __cplusplus
57466extern "C"
57467#endif
57468char dnet_ntoa ();
57469int
57470main ()
57471{
57472return dnet_ntoa ();
57473  ;
57474  return 0;
57475}
57476_ACEOF
57477if ac_fn_cxx_try_link "$LINENO"; then :
57478  ac_cv_lib_dnet_stub_dnet_ntoa=yes
57479else
57480  ac_cv_lib_dnet_stub_dnet_ntoa=no
57481fi
57482rm -f core conftest.err conftest.$ac_objext \
57483    conftest$ac_exeext conftest.$ac_ext
57484LIBS=$ac_check_lib_save_LIBS
57485fi
57486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
57487$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
57488if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
57489  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
57490fi
57491
57492    fi
57493fi
57494rm -f core conftest.err conftest.$ac_objext \
57495    conftest$ac_exeext conftest.$ac_ext
57496    LIBS="$ac_xsave_LIBS"
57497
57498    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
57499    # to get the SysV transport functions.
57500    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
57501    # needs -lnsl.
57502    # The nsl library prevents programs from opening the X display
57503    # on Irix 5.2, according to T.E. Dickey.
57504    # The functions gethostbyname, getservbyname, and inet_addr are
57505    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
57506    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
57507if test "x$ac_cv_func_gethostbyname" = xyes; then :
57508
57509fi
57510
57511    if test $ac_cv_func_gethostbyname = no; then
57512      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
57513$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
57514if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
57515  $as_echo_n "(cached) " >&6
57516else
57517  ac_check_lib_save_LIBS=$LIBS
57518LIBS="-lnsl  $LIBS"
57519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57520/* end confdefs.h.  */
57521
57522/* Override any GCC internal prototype to avoid an error.
57523   Use char because int might match the return type of a GCC
57524   builtin and then its argument prototype would still apply.  */
57525#ifdef __cplusplus
57526extern "C"
57527#endif
57528char gethostbyname ();
57529int
57530main ()
57531{
57532return gethostbyname ();
57533  ;
57534  return 0;
57535}
57536_ACEOF
57537if ac_fn_cxx_try_link "$LINENO"; then :
57538  ac_cv_lib_nsl_gethostbyname=yes
57539else
57540  ac_cv_lib_nsl_gethostbyname=no
57541fi
57542rm -f core conftest.err conftest.$ac_objext \
57543    conftest$ac_exeext conftest.$ac_ext
57544LIBS=$ac_check_lib_save_LIBS
57545fi
57546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57547$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57548if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57549  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57550fi
57551
57552      if test $ac_cv_lib_nsl_gethostbyname = no; then
57553	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57554$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57555if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57556  $as_echo_n "(cached) " >&6
57557else
57558  ac_check_lib_save_LIBS=$LIBS
57559LIBS="-lbsd  $LIBS"
57560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57561/* end confdefs.h.  */
57562
57563/* Override any GCC internal prototype to avoid an error.
57564   Use char because int might match the return type of a GCC
57565   builtin and then its argument prototype would still apply.  */
57566#ifdef __cplusplus
57567extern "C"
57568#endif
57569char gethostbyname ();
57570int
57571main ()
57572{
57573return gethostbyname ();
57574  ;
57575  return 0;
57576}
57577_ACEOF
57578if ac_fn_cxx_try_link "$LINENO"; then :
57579  ac_cv_lib_bsd_gethostbyname=yes
57580else
57581  ac_cv_lib_bsd_gethostbyname=no
57582fi
57583rm -f core conftest.err conftest.$ac_objext \
57584    conftest$ac_exeext conftest.$ac_ext
57585LIBS=$ac_check_lib_save_LIBS
57586fi
57587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57588$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57589if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57590  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57591fi
57592
57593      fi
57594    fi
57595
57596    # lieder@skyler.mavd.honeywell.com says without -lsocket,
57597    # socket/setsockopt and other routines are undefined under SCO ODT
57598    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57599    # on later versions), says Simon Leinen: it contains gethostby*
57600    # variants that don't use the name server (or something).  -lsocket
57601    # must be given before -lnsl if both are needed.  We assume that
57602    # if connect needs -lnsl, so does gethostbyname.
57603    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57604if test "x$ac_cv_func_connect" = xyes; then :
57605
57606fi
57607
57608    if test $ac_cv_func_connect = no; then
57609      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57610$as_echo_n "checking for connect in -lsocket... " >&6; }
57611if ${ac_cv_lib_socket_connect+:} false; then :
57612  $as_echo_n "(cached) " >&6
57613else
57614  ac_check_lib_save_LIBS=$LIBS
57615LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57617/* end confdefs.h.  */
57618
57619/* Override any GCC internal prototype to avoid an error.
57620   Use char because int might match the return type of a GCC
57621   builtin and then its argument prototype would still apply.  */
57622#ifdef __cplusplus
57623extern "C"
57624#endif
57625char connect ();
57626int
57627main ()
57628{
57629return connect ();
57630  ;
57631  return 0;
57632}
57633_ACEOF
57634if ac_fn_cxx_try_link "$LINENO"; then :
57635  ac_cv_lib_socket_connect=yes
57636else
57637  ac_cv_lib_socket_connect=no
57638fi
57639rm -f core conftest.err conftest.$ac_objext \
57640    conftest$ac_exeext conftest.$ac_ext
57641LIBS=$ac_check_lib_save_LIBS
57642fi
57643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57644$as_echo "$ac_cv_lib_socket_connect" >&6; }
57645if test "x$ac_cv_lib_socket_connect" = xyes; then :
57646  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57647fi
57648
57649    fi
57650
57651    # Guillermo Gomez says -lposix is necessary on A/UX.
57652    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57653if test "x$ac_cv_func_remove" = xyes; then :
57654
57655fi
57656
57657    if test $ac_cv_func_remove = no; then
57658      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57659$as_echo_n "checking for remove in -lposix... " >&6; }
57660if ${ac_cv_lib_posix_remove+:} false; then :
57661  $as_echo_n "(cached) " >&6
57662else
57663  ac_check_lib_save_LIBS=$LIBS
57664LIBS="-lposix  $LIBS"
57665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57666/* end confdefs.h.  */
57667
57668/* Override any GCC internal prototype to avoid an error.
57669   Use char because int might match the return type of a GCC
57670   builtin and then its argument prototype would still apply.  */
57671#ifdef __cplusplus
57672extern "C"
57673#endif
57674char remove ();
57675int
57676main ()
57677{
57678return remove ();
57679  ;
57680  return 0;
57681}
57682_ACEOF
57683if ac_fn_cxx_try_link "$LINENO"; then :
57684  ac_cv_lib_posix_remove=yes
57685else
57686  ac_cv_lib_posix_remove=no
57687fi
57688rm -f core conftest.err conftest.$ac_objext \
57689    conftest$ac_exeext conftest.$ac_ext
57690LIBS=$ac_check_lib_save_LIBS
57691fi
57692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57693$as_echo "$ac_cv_lib_posix_remove" >&6; }
57694if test "x$ac_cv_lib_posix_remove" = xyes; then :
57695  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57696fi
57697
57698    fi
57699
57700    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57701    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57702if test "x$ac_cv_func_shmat" = xyes; then :
57703
57704fi
57705
57706    if test $ac_cv_func_shmat = no; then
57707      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57708$as_echo_n "checking for shmat in -lipc... " >&6; }
57709if ${ac_cv_lib_ipc_shmat+:} false; then :
57710  $as_echo_n "(cached) " >&6
57711else
57712  ac_check_lib_save_LIBS=$LIBS
57713LIBS="-lipc  $LIBS"
57714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57715/* end confdefs.h.  */
57716
57717/* Override any GCC internal prototype to avoid an error.
57718   Use char because int might match the return type of a GCC
57719   builtin and then its argument prototype would still apply.  */
57720#ifdef __cplusplus
57721extern "C"
57722#endif
57723char shmat ();
57724int
57725main ()
57726{
57727return shmat ();
57728  ;
57729  return 0;
57730}
57731_ACEOF
57732if ac_fn_cxx_try_link "$LINENO"; then :
57733  ac_cv_lib_ipc_shmat=yes
57734else
57735  ac_cv_lib_ipc_shmat=no
57736fi
57737rm -f core conftest.err conftest.$ac_objext \
57738    conftest$ac_exeext conftest.$ac_ext
57739LIBS=$ac_check_lib_save_LIBS
57740fi
57741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57742$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57743if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57744  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57745fi
57746
57747    fi
57748  fi
57749
57750  # Check for libraries that X11R6 Xt/Xaw programs need.
57751  ac_save_LDFLAGS=$LDFLAGS
57752  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57753  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57754  # check for ICE first), but we must link in the order -lSM -lICE or
57755  # we get undefined symbols.  So assume we have SM if we have ICE.
57756  # These have to be linked with before -lX11, unlike the other
57757  # libraries we check for below, so use a different variable.
57758  # John Interrante, Karl Berry
57759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57760$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57761if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57762  $as_echo_n "(cached) " >&6
57763else
57764  ac_check_lib_save_LIBS=$LIBS
57765LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57767/* end confdefs.h.  */
57768
57769/* Override any GCC internal prototype to avoid an error.
57770   Use char because int might match the return type of a GCC
57771   builtin and then its argument prototype would still apply.  */
57772#ifdef __cplusplus
57773extern "C"
57774#endif
57775char IceConnectionNumber ();
57776int
57777main ()
57778{
57779return IceConnectionNumber ();
57780  ;
57781  return 0;
57782}
57783_ACEOF
57784if ac_fn_cxx_try_link "$LINENO"; then :
57785  ac_cv_lib_ICE_IceConnectionNumber=yes
57786else
57787  ac_cv_lib_ICE_IceConnectionNumber=no
57788fi
57789rm -f core conftest.err conftest.$ac_objext \
57790    conftest$ac_exeext conftest.$ac_ext
57791LIBS=$ac_check_lib_save_LIBS
57792fi
57793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57794$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57795if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57796  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57797fi
57798
57799  LDFLAGS=$ac_save_LDFLAGS
57800
57801fi
57802
57803
57804    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57805    # this doesn't make sense so we remove it.
57806    if test "x$COMPILE_TYPE" = xcross; then
57807      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57808    fi
57809
57810    if test "x$no_x" = xyes; then
57811
57812  # Print a helpful message on how to acquire the necessary build dependency.
57813  # x11 is the help tag: freetype, cups, alsa etc
57814  MISSING_DEPENDENCY=x11
57815
57816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57817    cygwin_help $MISSING_DEPENDENCY
57818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57819    msys_help $MISSING_DEPENDENCY
57820  else
57821    PKGHANDLER_COMMAND=
57822
57823    case $PKGHANDLER in
57824      apt-get)
57825        apt_help     $MISSING_DEPENDENCY ;;
57826      yum)
57827        yum_help     $MISSING_DEPENDENCY ;;
57828      brew)
57829        brew_help    $MISSING_DEPENDENCY ;;
57830      port)
57831        port_help    $MISSING_DEPENDENCY ;;
57832      pkgutil)
57833        pkgutil_help $MISSING_DEPENDENCY ;;
57834      pkgadd)
57835        pkgadd_help  $MISSING_DEPENDENCY ;;
57836    esac
57837
57838    if test "x$PKGHANDLER_COMMAND" != x; then
57839      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57840    fi
57841  fi
57842
57843      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57844    fi
57845
57846    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57847      OPENWIN_HOME="/usr/openwin"
57848      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57849      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57850          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57851    fi
57852
57853    ac_ext=c
57854ac_cpp='$CPP $CPPFLAGS'
57855ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57856ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57857ac_compiler_gnu=$ac_cv_c_compiler_gnu
57858
57859    OLD_CFLAGS="$CFLAGS"
57860    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57861
57862    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57863    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57864do :
57865  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57866ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57867          # include <X11/Xlib.h>
57868          # include <X11/Xutil.h>
57869
57870
57871"
57872if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57873  cat >>confdefs.h <<_ACEOF
57874#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57875_ACEOF
57876 X11_HEADERS_OK=yes
57877else
57878  X11_HEADERS_OK=no; break
57879fi
57880
57881done
57882
57883
57884    if test "x$X11_HEADERS_OK" = xno; then
57885
57886  # Print a helpful message on how to acquire the necessary build dependency.
57887  # x11 is the help tag: freetype, cups, alsa etc
57888  MISSING_DEPENDENCY=x11
57889
57890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57891    cygwin_help $MISSING_DEPENDENCY
57892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57893    msys_help $MISSING_DEPENDENCY
57894  else
57895    PKGHANDLER_COMMAND=
57896
57897    case $PKGHANDLER in
57898      apt-get)
57899        apt_help     $MISSING_DEPENDENCY ;;
57900      yum)
57901        yum_help     $MISSING_DEPENDENCY ;;
57902      brew)
57903        brew_help    $MISSING_DEPENDENCY ;;
57904      port)
57905        port_help    $MISSING_DEPENDENCY ;;
57906      pkgutil)
57907        pkgutil_help $MISSING_DEPENDENCY ;;
57908      pkgadd)
57909        pkgadd_help  $MISSING_DEPENDENCY ;;
57910    esac
57911
57912    if test "x$PKGHANDLER_COMMAND" != x; then
57913      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57914    fi
57915  fi
57916
57917      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57918    fi
57919
57920    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57921    # defined in libawt_xawt.
57922    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57923$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57924    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57925/* end confdefs.h.  */
57926#include <X11/extensions/Xrender.h>
57927int
57928main ()
57929{
57930XLinearGradient x;
57931  ;
57932  return 0;
57933}
57934_ACEOF
57935if ac_fn_c_try_compile "$LINENO"; then :
57936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57937$as_echo "yes" >&6; }
57938else
57939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57940$as_echo "no" >&6; }
57941         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57942fi
57943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57944
57945    CFLAGS="$OLD_CFLAGS"
57946    ac_ext=cpp
57947ac_cpp='$CXXCPP $CPPFLAGS'
57948ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57949ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57950ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57951
57952  fi # NEEDS_LIB_X11
57953
57954
57955
57956
57957
57958
57959# Check whether --with-cups was given.
57960if test "${with_cups+set}" = set; then :
57961  withval=$with_cups;
57962fi
57963
57964
57965# Check whether --with-cups-include was given.
57966if test "${with_cups_include+set}" = set; then :
57967  withval=$with_cups_include;
57968fi
57969
57970
57971  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57972    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57973        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57974      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57975$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57976    fi
57977    CUPS_CFLAGS=
57978  else
57979    CUPS_FOUND=no
57980
57981    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57982      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57983    fi
57984
57985    if test "x${with_cups}" != x; then
57986      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57987$as_echo_n "checking for cups headers... " >&6; }
57988      if test -s "${with_cups}/include/cups/cups.h"; then
57989        CUPS_CFLAGS="-I${with_cups}/include"
57990        CUPS_FOUND=yes
57991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57992$as_echo "$CUPS_FOUND" >&6; }
57993      else
57994        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57995      fi
57996    fi
57997    if test "x${with_cups_include}" != x; then
57998      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57999$as_echo_n "checking for cups headers... " >&6; }
58000      if test -s "${with_cups_include}/cups/cups.h"; then
58001        CUPS_CFLAGS="-I${with_cups_include}"
58002        CUPS_FOUND=yes
58003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
58004$as_echo "$CUPS_FOUND" >&6; }
58005      else
58006        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
58007      fi
58008    fi
58009    if test "x$CUPS_FOUND" = xno; then
58010      # Are the cups headers installed in the default /usr/include location?
58011      for ac_header in cups/cups.h cups/ppd.h
58012do :
58013  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
58014ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
58015if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
58016  cat >>confdefs.h <<_ACEOF
58017#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
58018_ACEOF
58019
58020          CUPS_FOUND=yes
58021          CUPS_CFLAGS=
58022          DEFAULT_CUPS=yes
58023
58024fi
58025
58026done
58027
58028    fi
58029    if test "x$CUPS_FOUND" = xno; then
58030
58031  # Print a helpful message on how to acquire the necessary build dependency.
58032  # cups is the help tag: freetype, cups, alsa etc
58033  MISSING_DEPENDENCY=cups
58034
58035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58036    cygwin_help $MISSING_DEPENDENCY
58037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58038    msys_help $MISSING_DEPENDENCY
58039  else
58040    PKGHANDLER_COMMAND=
58041
58042    case $PKGHANDLER in
58043      apt-get)
58044        apt_help     $MISSING_DEPENDENCY ;;
58045      yum)
58046        yum_help     $MISSING_DEPENDENCY ;;
58047      brew)
58048        brew_help    $MISSING_DEPENDENCY ;;
58049      port)
58050        port_help    $MISSING_DEPENDENCY ;;
58051      pkgutil)
58052        pkgutil_help $MISSING_DEPENDENCY ;;
58053      pkgadd)
58054        pkgadd_help  $MISSING_DEPENDENCY ;;
58055    esac
58056
58057    if test "x$PKGHANDLER_COMMAND" != x; then
58058      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58059    fi
58060  fi
58061
58062      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
58063    fi
58064  fi
58065
58066
58067
58068
58069
58070# Check whether --with-freetype was given.
58071if test "${with_freetype+set}" = set; then :
58072  withval=$with_freetype;
58073fi
58074
58075
58076# Check whether --with-freetype-include was given.
58077if test "${with_freetype_include+set}" = set; then :
58078  withval=$with_freetype_include;
58079fi
58080
58081
58082# Check whether --with-freetype-lib was given.
58083if test "${with_freetype_lib+set}" = set; then :
58084  withval=$with_freetype_lib;
58085fi
58086
58087
58088# Check whether --with-freetype-src was given.
58089if test "${with_freetype_src+set}" = set; then :
58090  withval=$with_freetype_src;
58091fi
58092
58093  # Check whether --enable-freetype-bundling was given.
58094if test "${enable_freetype_bundling+set}" = set; then :
58095  enableval=$enable_freetype_bundling;
58096fi
58097
58098
58099# Check whether --with-freetype-license was given.
58100if test "${with_freetype_license+set}" = set; then :
58101  withval=$with_freetype_license;
58102fi
58103
58104
58105  # Need to specify explicitly since it needs to be overridden on some versions of macosx
58106  FREETYPE_BASE_NAME=freetype
58107  FREETYPE_CFLAGS=
58108  FREETYPE_LIBS=
58109  FREETYPE_BUNDLE_LIB_PATH=
58110
58111  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
58112    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
58113        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
58114        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
58115        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
58116      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
58117$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
58118    fi
58119    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
58120      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
58121$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
58122    fi
58123  else
58124    # freetype is needed to build; go get it!
58125
58126    BUNDLE_FREETYPE="$enable_freetype_bundling"
58127
58128    if  test "x$with_freetype_src" != x; then
58129      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58130        # Try to build freetype if --with-freetype-src was given on Windows
58131
58132  FREETYPE_SRC_PATH="$with_freetype_src"
58133  BUILD_FREETYPE=yes
58134
58135  # Check if the freetype sources are acessible..
58136  if ! test -d $FREETYPE_SRC_PATH; then
58137    { $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
58138$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58139    BUILD_FREETYPE=no
58140  fi
58141  # ..and contain a vc2010 project file
58142  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
58143  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
58144    { $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
58145$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
58146    BUILD_FREETYPE=no
58147  fi
58148  # Now check if configure found a version of 'msbuild.exe'
58149  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
58150    { $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
58151$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;}
58152    BUILD_FREETYPE=no
58153  fi
58154
58155  # Ready to go..
58156  if test "x$BUILD_FREETYPE" = xyes; then
58157    # msbuild requires trailing slashes for output directories
58158    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
58159    freetype_lib_path_unix="$freetype_lib_path"
58160    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
58161
58162  unix_path="$vcxproj_path"
58163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58164    windows_path=`$CYGPATH -m "$unix_path"`
58165    vcxproj_path="$windows_path"
58166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58167    windows_path=`cmd //c echo $unix_path`
58168    vcxproj_path="$windows_path"
58169  fi
58170
58171
58172  unix_path="$freetype_lib_path"
58173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58174    windows_path=`$CYGPATH -m "$unix_path"`
58175    freetype_lib_path="$windows_path"
58176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58177    windows_path=`cmd //c echo $unix_path`
58178    freetype_lib_path="$windows_path"
58179  fi
58180
58181
58182  unix_path="$freetype_obj_path"
58183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58184    windows_path=`$CYGPATH -m "$unix_path"`
58185    freetype_obj_path="$windows_path"
58186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58187    windows_path=`cmd //c echo $unix_path`
58188    freetype_obj_path="$windows_path"
58189  fi
58190
58191    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58192      freetype_platform=x64
58193    else
58194      freetype_platform=win32
58195    fi
58196
58197    # The original freetype project file is for VS 2010 (i.e. 'v100'),
58198    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
58199    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
58200    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
58201    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
58202$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
58203
58204    # First we try to build the freetype.dll
58205    $ECHO -e "@echo off\n"\
58206        "$MSBUILD $vcxproj_path "\
58207        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58208        "/p:Configuration=\"Release Multithreaded\" "\
58209        "/p:Platform=$freetype_platform "\
58210        "/p:ConfigurationType=DynamicLibrary "\
58211        "/p:TargetName=freetype "\
58212        "/p:OutDir=\"$freetype_lib_path\" "\
58213        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
58214    cmd /c freetype.bat
58215
58216    if test -s "$freetype_lib_path_unix/freetype.dll"; then
58217      # If that succeeds we also build freetype.lib
58218      $ECHO -e "@echo off\n"\
58219          "$MSBUILD $vcxproj_path "\
58220          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58221          "/p:Configuration=\"Release Multithreaded\" "\
58222          "/p:Platform=$freetype_platform "\
58223          "/p:ConfigurationType=StaticLibrary "\
58224          "/p:TargetName=freetype "\
58225          "/p:OutDir=\"$freetype_lib_path\" "\
58226          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
58227      cmd /c freetype.bat
58228
58229      if test -s "$freetype_lib_path_unix/freetype.lib"; then
58230        # Once we build both, lib and dll, set freetype lib and include path appropriately
58231        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
58232        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
58233        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
58234$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
58235      else
58236        BUILD_FREETYPE=no
58237      fi
58238    else
58239      BUILD_FREETYPE=no
58240    fi
58241  fi
58242
58243        if test "x$BUILD_FREETYPE" = xyes; then
58244          # Okay, we built it. Check that it works.
58245
58246  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58247  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58248  METHOD="--with-freetype-src"
58249
58250  # Let's start with an optimistic view of the world :-)
58251  FOUND_FREETYPE=yes
58252
58253  # First look for the canonical freetype main include file ft2build.h.
58254  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58255    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58256    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58257    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58258      # Fail.
58259      FOUND_FREETYPE=no
58260    fi
58261  fi
58262
58263  if test "x$FOUND_FREETYPE" = xyes; then
58264    # Include file found, let's continue the sanity check.
58265    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58266$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58267
58268    # Reset to default value
58269    FREETYPE_BASE_NAME=freetype
58270    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58271    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58272      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58273          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58274        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58275        # for the .6 version explicitly.
58276        FREETYPE_BASE_NAME=freetype.6
58277        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58278        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58279$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58280      else
58281        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58282$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58283        FOUND_FREETYPE=no
58284      fi
58285    else
58286      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58287        # On Windows, we will need both .lib and .dll file.
58288        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58289          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58290$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58291          FOUND_FREETYPE=no
58292        fi
58293      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58294          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58295        # Found lib in isa dir, use that instead.
58296        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58297        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58298$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58299      fi
58300    fi
58301  fi
58302
58303  if test "x$FOUND_FREETYPE" = xyes; then
58304
58305  # Only process if variable expands to non-empty
58306
58307  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58309
58310  # Input might be given as Windows format, start by converting to
58311  # unix format.
58312  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58313  new_path=`$CYGPATH -u "$path"`
58314
58315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58318  # "foo.exe" is OK but "foo" is an error.
58319  #
58320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58321  # It is also a way to make sure we got the proper file name for the real test later on.
58322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58323  if test "x$test_shortpath" = x; then
58324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58325$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58326    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58327  fi
58328
58329  # Call helper function which possibly converts this using DOS-style short mode.
58330  # If so, the updated path is stored in $new_path.
58331
58332  input_path="$new_path"
58333  # Check if we need to convert this using DOS-style short mode. If the path
58334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58335  # take no chances and rewrite it.
58336  # Note: m4 eats our [], so we need to use [ and ] instead.
58337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58338  if test "x$has_forbidden_chars" != x; then
58339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58343      # Going to short mode and back again did indeed matter. Since short mode is
58344      # case insensitive, let's make it lowercase to improve readability.
58345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58346      # Now convert it back to Unix-style (cygpath)
58347      input_path=`$CYGPATH -u "$shortmode_path"`
58348      new_path="$input_path"
58349    fi
58350  fi
58351
58352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58353  if test "x$test_cygdrive_prefix" = x; then
58354    # As a simple fix, exclude /usr/bin since it's not a real path.
58355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58357      # a path prefixed by /cygdrive for fixpath to work.
58358      new_path="$CYGWIN_ROOT_PATH$input_path"
58359    fi
58360  fi
58361
58362
58363  if test "x$path" != "x$new_path"; then
58364    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58366$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58367  fi
58368
58369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58370
58371  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58372  has_colon=`$ECHO $path | $GREP ^.:`
58373  new_path="$path"
58374  if test "x$has_colon" = x; then
58375    # Not in mixed or Windows style, start by that.
58376    new_path=`cmd //c echo $path`
58377  fi
58378
58379
58380  input_path="$new_path"
58381  # Check if we need to convert this using DOS-style short mode. If the path
58382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58383  # take no chances and rewrite it.
58384  # Note: m4 eats our [], so we need to use [ and ] instead.
58385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58386  if test "x$has_forbidden_chars" != x; then
58387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58389  fi
58390
58391
58392  windows_path="$new_path"
58393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58394    unix_path=`$CYGPATH -u "$windows_path"`
58395    new_path="$unix_path"
58396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58398    new_path="$unix_path"
58399  fi
58400
58401  if test "x$path" != "x$new_path"; then
58402    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58404$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58405  fi
58406
58407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58409
58410    else
58411      # We're on a unix platform. Hooray! :)
58412      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58413      has_space=`$ECHO "$path" | $GREP " "`
58414      if test "x$has_space" != x; then
58415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58416$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58418      fi
58419
58420      # Use eval to expand a potential ~
58421      eval path="$path"
58422      if test ! -f "$path" && test ! -d "$path"; then
58423        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58424      fi
58425
58426      if test -d "$path"; then
58427        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58428      else
58429        dir="`$DIRNAME "$path"`"
58430        base="`$BASENAME "$path"`"
58431        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58432      fi
58433    fi
58434  fi
58435
58436
58437  # Only process if variable expands to non-empty
58438
58439  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58440    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58441
58442  # Input might be given as Windows format, start by converting to
58443  # unix format.
58444  path="$POTENTIAL_FREETYPE_LIB_PATH"
58445  new_path=`$CYGPATH -u "$path"`
58446
58447  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58448  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58449  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58450  # "foo.exe" is OK but "foo" is an error.
58451  #
58452  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58453  # It is also a way to make sure we got the proper file name for the real test later on.
58454  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58455  if test "x$test_shortpath" = x; then
58456    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58457$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58458    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58459  fi
58460
58461  # Call helper function which possibly converts this using DOS-style short mode.
58462  # If so, the updated path is stored in $new_path.
58463
58464  input_path="$new_path"
58465  # Check if we need to convert this using DOS-style short mode. If the path
58466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58467  # take no chances and rewrite it.
58468  # Note: m4 eats our [], so we need to use [ and ] instead.
58469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58470  if test "x$has_forbidden_chars" != x; then
58471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58472    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58473    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58474    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58475      # Going to short mode and back again did indeed matter. Since short mode is
58476      # case insensitive, let's make it lowercase to improve readability.
58477      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58478      # Now convert it back to Unix-style (cygpath)
58479      input_path=`$CYGPATH -u "$shortmode_path"`
58480      new_path="$input_path"
58481    fi
58482  fi
58483
58484  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58485  if test "x$test_cygdrive_prefix" = x; then
58486    # As a simple fix, exclude /usr/bin since it's not a real path.
58487    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58488      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58489      # a path prefixed by /cygdrive for fixpath to work.
58490      new_path="$CYGWIN_ROOT_PATH$input_path"
58491    fi
58492  fi
58493
58494
58495  if test "x$path" != "x$new_path"; then
58496    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58498$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58499  fi
58500
58501    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58502
58503  path="$POTENTIAL_FREETYPE_LIB_PATH"
58504  has_colon=`$ECHO $path | $GREP ^.:`
58505  new_path="$path"
58506  if test "x$has_colon" = x; then
58507    # Not in mixed or Windows style, start by that.
58508    new_path=`cmd //c echo $path`
58509  fi
58510
58511
58512  input_path="$new_path"
58513  # Check if we need to convert this using DOS-style short mode. If the path
58514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58515  # take no chances and rewrite it.
58516  # Note: m4 eats our [], so we need to use [ and ] instead.
58517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58518  if test "x$has_forbidden_chars" != x; then
58519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58521  fi
58522
58523
58524  windows_path="$new_path"
58525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58526    unix_path=`$CYGPATH -u "$windows_path"`
58527    new_path="$unix_path"
58528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58530    new_path="$unix_path"
58531  fi
58532
58533  if test "x$path" != "x$new_path"; then
58534    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58536$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58537  fi
58538
58539  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58540  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58541
58542    else
58543      # We're on a unix platform. Hooray! :)
58544      path="$POTENTIAL_FREETYPE_LIB_PATH"
58545      has_space=`$ECHO "$path" | $GREP " "`
58546      if test "x$has_space" != x; then
58547        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58548$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58549        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58550      fi
58551
58552      # Use eval to expand a potential ~
58553      eval path="$path"
58554      if test ! -f "$path" && test ! -d "$path"; then
58555        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58556      fi
58557
58558      if test -d "$path"; then
58559        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58560      else
58561        dir="`$DIRNAME "$path"`"
58562        base="`$BASENAME "$path"`"
58563        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58564      fi
58565    fi
58566  fi
58567
58568
58569    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58571$as_echo_n "checking for freetype includes... " >&6; }
58572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58573$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58574    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58576$as_echo_n "checking for freetype libraries... " >&6; }
58577    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58578$as_echo "$FREETYPE_LIB_PATH" >&6; }
58579  fi
58580
58581          if test "x$FOUND_FREETYPE" != xyes; then
58582            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58583          fi
58584        else
58585          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58586$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58587          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58588        fi
58589      else
58590        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58591$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58592      fi
58593    fi
58594
58595    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58596      # User has specified settings
58597
58598      if test "x$BUNDLE_FREETYPE" = x; then
58599        # If not specified, default is to bundle freetype
58600        BUNDLE_FREETYPE=yes
58601      fi
58602
58603      if test "x$with_freetype" != x; then
58604        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58605        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58606      fi
58607
58608      # Allow --with-freetype-lib and --with-freetype-include to override
58609      if test "x$with_freetype_include" != x; then
58610        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58611      fi
58612      if test "x$with_freetype_lib" != x; then
58613        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58614      fi
58615
58616      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58617        # Okay, we got it. Check that it works.
58618
58619  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58620  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58621  METHOD="--with-freetype"
58622
58623  # Let's start with an optimistic view of the world :-)
58624  FOUND_FREETYPE=yes
58625
58626  # First look for the canonical freetype main include file ft2build.h.
58627  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58628    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58629    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58630    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58631      # Fail.
58632      FOUND_FREETYPE=no
58633    fi
58634  fi
58635
58636  if test "x$FOUND_FREETYPE" = xyes; then
58637    # Include file found, let's continue the sanity check.
58638    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58639$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58640
58641    # Reset to default value
58642    FREETYPE_BASE_NAME=freetype
58643    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58644    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58645      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58646          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58647        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58648        # for the .6 version explicitly.
58649        FREETYPE_BASE_NAME=freetype.6
58650        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58651        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58652$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58653      else
58654        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58655$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58656        FOUND_FREETYPE=no
58657      fi
58658    else
58659      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58660        # On Windows, we will need both .lib and .dll file.
58661        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58662          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58663$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58664          FOUND_FREETYPE=no
58665        fi
58666      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58667          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58668        # Found lib in isa dir, use that instead.
58669        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58670        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58671$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58672      fi
58673    fi
58674  fi
58675
58676  if test "x$FOUND_FREETYPE" = xyes; then
58677
58678  # Only process if variable expands to non-empty
58679
58680  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58682
58683  # Input might be given as Windows format, start by converting to
58684  # unix format.
58685  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58686  new_path=`$CYGPATH -u "$path"`
58687
58688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58691  # "foo.exe" is OK but "foo" is an error.
58692  #
58693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58694  # It is also a way to make sure we got the proper file name for the real test later on.
58695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58696  if test "x$test_shortpath" = x; then
58697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58698$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58699    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58700  fi
58701
58702  # Call helper function which possibly converts this using DOS-style short mode.
58703  # If so, the updated path is stored in $new_path.
58704
58705  input_path="$new_path"
58706  # Check if we need to convert this using DOS-style short mode. If the path
58707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58708  # take no chances and rewrite it.
58709  # Note: m4 eats our [], so we need to use [ and ] instead.
58710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58711  if test "x$has_forbidden_chars" != x; then
58712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58716      # Going to short mode and back again did indeed matter. Since short mode is
58717      # case insensitive, let's make it lowercase to improve readability.
58718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58719      # Now convert it back to Unix-style (cygpath)
58720      input_path=`$CYGPATH -u "$shortmode_path"`
58721      new_path="$input_path"
58722    fi
58723  fi
58724
58725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58726  if test "x$test_cygdrive_prefix" = x; then
58727    # As a simple fix, exclude /usr/bin since it's not a real path.
58728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58730      # a path prefixed by /cygdrive for fixpath to work.
58731      new_path="$CYGWIN_ROOT_PATH$input_path"
58732    fi
58733  fi
58734
58735
58736  if test "x$path" != "x$new_path"; then
58737    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58739$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58740  fi
58741
58742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58743
58744  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58745  has_colon=`$ECHO $path | $GREP ^.:`
58746  new_path="$path"
58747  if test "x$has_colon" = x; then
58748    # Not in mixed or Windows style, start by that.
58749    new_path=`cmd //c echo $path`
58750  fi
58751
58752
58753  input_path="$new_path"
58754  # Check if we need to convert this using DOS-style short mode. If the path
58755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58756  # take no chances and rewrite it.
58757  # Note: m4 eats our [], so we need to use [ and ] instead.
58758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58759  if test "x$has_forbidden_chars" != x; then
58760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58762  fi
58763
58764
58765  windows_path="$new_path"
58766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58767    unix_path=`$CYGPATH -u "$windows_path"`
58768    new_path="$unix_path"
58769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58771    new_path="$unix_path"
58772  fi
58773
58774  if test "x$path" != "x$new_path"; then
58775    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58777$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58778  fi
58779
58780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58782
58783    else
58784      # We're on a unix platform. Hooray! :)
58785      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58786      has_space=`$ECHO "$path" | $GREP " "`
58787      if test "x$has_space" != x; then
58788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58789$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58790        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58791      fi
58792
58793      # Use eval to expand a potential ~
58794      eval path="$path"
58795      if test ! -f "$path" && test ! -d "$path"; then
58796        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58797      fi
58798
58799      if test -d "$path"; then
58800        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58801      else
58802        dir="`$DIRNAME "$path"`"
58803        base="`$BASENAME "$path"`"
58804        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58805      fi
58806    fi
58807  fi
58808
58809
58810  # Only process if variable expands to non-empty
58811
58812  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58814
58815  # Input might be given as Windows format, start by converting to
58816  # unix format.
58817  path="$POTENTIAL_FREETYPE_LIB_PATH"
58818  new_path=`$CYGPATH -u "$path"`
58819
58820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58823  # "foo.exe" is OK but "foo" is an error.
58824  #
58825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58826  # It is also a way to make sure we got the proper file name for the real test later on.
58827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58828  if test "x$test_shortpath" = x; then
58829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58830$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58831    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58832  fi
58833
58834  # Call helper function which possibly converts this using DOS-style short mode.
58835  # If so, the updated path is stored in $new_path.
58836
58837  input_path="$new_path"
58838  # Check if we need to convert this using DOS-style short mode. If the path
58839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58840  # take no chances and rewrite it.
58841  # Note: m4 eats our [], so we need to use [ and ] instead.
58842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58843  if test "x$has_forbidden_chars" != x; then
58844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58848      # Going to short mode and back again did indeed matter. Since short mode is
58849      # case insensitive, let's make it lowercase to improve readability.
58850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58851      # Now convert it back to Unix-style (cygpath)
58852      input_path=`$CYGPATH -u "$shortmode_path"`
58853      new_path="$input_path"
58854    fi
58855  fi
58856
58857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58858  if test "x$test_cygdrive_prefix" = x; then
58859    # As a simple fix, exclude /usr/bin since it's not a real path.
58860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58862      # a path prefixed by /cygdrive for fixpath to work.
58863      new_path="$CYGWIN_ROOT_PATH$input_path"
58864    fi
58865  fi
58866
58867
58868  if test "x$path" != "x$new_path"; then
58869    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58871$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58872  fi
58873
58874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58875
58876  path="$POTENTIAL_FREETYPE_LIB_PATH"
58877  has_colon=`$ECHO $path | $GREP ^.:`
58878  new_path="$path"
58879  if test "x$has_colon" = x; then
58880    # Not in mixed or Windows style, start by that.
58881    new_path=`cmd //c echo $path`
58882  fi
58883
58884
58885  input_path="$new_path"
58886  # Check if we need to convert this using DOS-style short mode. If the path
58887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58888  # take no chances and rewrite it.
58889  # Note: m4 eats our [], so we need to use [ and ] instead.
58890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58891  if test "x$has_forbidden_chars" != x; then
58892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58894  fi
58895
58896
58897  windows_path="$new_path"
58898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58899    unix_path=`$CYGPATH -u "$windows_path"`
58900    new_path="$unix_path"
58901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58903    new_path="$unix_path"
58904  fi
58905
58906  if test "x$path" != "x$new_path"; then
58907    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58909$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58910  fi
58911
58912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58914
58915    else
58916      # We're on a unix platform. Hooray! :)
58917      path="$POTENTIAL_FREETYPE_LIB_PATH"
58918      has_space=`$ECHO "$path" | $GREP " "`
58919      if test "x$has_space" != x; then
58920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58921$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58922        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58923      fi
58924
58925      # Use eval to expand a potential ~
58926      eval path="$path"
58927      if test ! -f "$path" && test ! -d "$path"; then
58928        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58929      fi
58930
58931      if test -d "$path"; then
58932        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58933      else
58934        dir="`$DIRNAME "$path"`"
58935        base="`$BASENAME "$path"`"
58936        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58937      fi
58938    fi
58939  fi
58940
58941
58942    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58944$as_echo_n "checking for freetype includes... " >&6; }
58945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58946$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58947    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58949$as_echo_n "checking for freetype libraries... " >&6; }
58950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58951$as_echo "$FREETYPE_LIB_PATH" >&6; }
58952  fi
58953
58954        if test "x$FOUND_FREETYPE" != xyes; then
58955          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58956        fi
58957      else
58958        # User specified only one of lib or include. This is an error.
58959        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58960          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58961$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58962          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58963        else
58964          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58965$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58966          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58967        fi
58968      fi
58969    else
58970      # User did not specify settings, but we need freetype. Try to locate it.
58971
58972      if test "x$BUNDLE_FREETYPE" = x; then
58973        # If not specified, default is to bundle freetype only on windows
58974        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58975          BUNDLE_FREETYPE=yes
58976        else
58977          BUNDLE_FREETYPE=no
58978        fi
58979      fi
58980
58981      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58982      if test "x$SYSROOT" = x; then
58983        if test "x$FOUND_FREETYPE" != xyes; then
58984          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58985          if test "x$PKG_CONFIG" != x; then
58986
58987pkg_failed=no
58988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58989$as_echo_n "checking for FREETYPE... " >&6; }
58990
58991if test -n "$FREETYPE_CFLAGS"; then
58992    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58993 elif test -n "$PKG_CONFIG"; then
58994    if test -n "$PKG_CONFIG" && \
58995    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58996  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58997  ac_status=$?
58998  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58999  test $ac_status = 0; }; then
59000  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
59001else
59002  pkg_failed=yes
59003fi
59004 else
59005    pkg_failed=untried
59006fi
59007if test -n "$FREETYPE_LIBS"; then
59008    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
59009 elif test -n "$PKG_CONFIG"; then
59010    if test -n "$PKG_CONFIG" && \
59011    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
59012  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
59013  ac_status=$?
59014  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
59015  test $ac_status = 0; }; then
59016  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
59017else
59018  pkg_failed=yes
59019fi
59020 else
59021    pkg_failed=untried
59022fi
59023
59024
59025
59026if test $pkg_failed = yes; then
59027
59028if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
59029        _pkg_short_errors_supported=yes
59030else
59031        _pkg_short_errors_supported=no
59032fi
59033        if test $_pkg_short_errors_supported = yes; then
59034	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
59035        else
59036	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
59037        fi
59038	# Put the nasty error message in config.log where it belongs
59039	echo "$FREETYPE_PKG_ERRORS" >&5
59040
59041	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59042$as_echo "no" >&6; }
59043                FOUND_FREETYPE=no
59044elif test $pkg_failed = untried; then
59045	FOUND_FREETYPE=no
59046else
59047	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
59048	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
59049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59050$as_echo "yes" >&6; }
59051	FOUND_FREETYPE=yes
59052fi
59053            if test "x$FOUND_FREETYPE" = xyes; then
59054              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
59055              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
59056              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
59057              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
59058                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
59059              fi
59060              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
59061              if test "x$BUNDLE_FREETYPE" = xyes; then
59062                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
59063$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
59064                FOUND_FREETYPE=no
59065              else
59066                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
59067$as_echo_n "checking for freetype... " >&6; }
59068                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
59069$as_echo "yes (using pkg-config)" >&6; }
59070              fi
59071            fi
59072          fi
59073        fi
59074      fi
59075
59076      if test "x$FOUND_FREETYPE" != xyes; then
59077        # Check in well-known locations
59078        if test "x$OPENJDK_TARGET_OS" = xwindows; then
59079          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
59080
59081  windows_path="$FREETYPE_BASE_DIR"
59082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59083    unix_path=`$CYGPATH -u "$windows_path"`
59084    FREETYPE_BASE_DIR="$unix_path"
59085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59087    FREETYPE_BASE_DIR="$unix_path"
59088  fi
59089
59090
59091  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59092  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59093  METHOD="well-known location"
59094
59095  # Let's start with an optimistic view of the world :-)
59096  FOUND_FREETYPE=yes
59097
59098  # First look for the canonical freetype main include file ft2build.h.
59099  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59100    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59101    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59102    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59103      # Fail.
59104      FOUND_FREETYPE=no
59105    fi
59106  fi
59107
59108  if test "x$FOUND_FREETYPE" = xyes; then
59109    # Include file found, let's continue the sanity check.
59110    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59111$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59112
59113    # Reset to default value
59114    FREETYPE_BASE_NAME=freetype
59115    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59116    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59117      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59118          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59119        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59120        # for the .6 version explicitly.
59121        FREETYPE_BASE_NAME=freetype.6
59122        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59123        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59124$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59125      else
59126        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59127$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59128        FOUND_FREETYPE=no
59129      fi
59130    else
59131      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59132        # On Windows, we will need both .lib and .dll file.
59133        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59134          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59135$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59136          FOUND_FREETYPE=no
59137        fi
59138      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59139          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59140        # Found lib in isa dir, use that instead.
59141        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59142        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59143$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59144      fi
59145    fi
59146  fi
59147
59148  if test "x$FOUND_FREETYPE" = xyes; then
59149
59150  # Only process if variable expands to non-empty
59151
59152  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59154
59155  # Input might be given as Windows format, start by converting to
59156  # unix format.
59157  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59158  new_path=`$CYGPATH -u "$path"`
59159
59160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59163  # "foo.exe" is OK but "foo" is an error.
59164  #
59165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59166  # It is also a way to make sure we got the proper file name for the real test later on.
59167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59168  if test "x$test_shortpath" = x; then
59169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59170$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59171    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59172  fi
59173
59174  # Call helper function which possibly converts this using DOS-style short mode.
59175  # If so, the updated path is stored in $new_path.
59176
59177  input_path="$new_path"
59178  # Check if we need to convert this using DOS-style short mode. If the path
59179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59180  # take no chances and rewrite it.
59181  # Note: m4 eats our [], so we need to use [ and ] instead.
59182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59183  if test "x$has_forbidden_chars" != x; then
59184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59188      # Going to short mode and back again did indeed matter. Since short mode is
59189      # case insensitive, let's make it lowercase to improve readability.
59190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59191      # Now convert it back to Unix-style (cygpath)
59192      input_path=`$CYGPATH -u "$shortmode_path"`
59193      new_path="$input_path"
59194    fi
59195  fi
59196
59197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59198  if test "x$test_cygdrive_prefix" = x; then
59199    # As a simple fix, exclude /usr/bin since it's not a real path.
59200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59202      # a path prefixed by /cygdrive for fixpath to work.
59203      new_path="$CYGWIN_ROOT_PATH$input_path"
59204    fi
59205  fi
59206
59207
59208  if test "x$path" != "x$new_path"; then
59209    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59211$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59212  fi
59213
59214    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59215
59216  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59217  has_colon=`$ECHO $path | $GREP ^.:`
59218  new_path="$path"
59219  if test "x$has_colon" = x; then
59220    # Not in mixed or Windows style, start by that.
59221    new_path=`cmd //c echo $path`
59222  fi
59223
59224
59225  input_path="$new_path"
59226  # Check if we need to convert this using DOS-style short mode. If the path
59227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59228  # take no chances and rewrite it.
59229  # Note: m4 eats our [], so we need to use [ and ] instead.
59230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59231  if test "x$has_forbidden_chars" != x; then
59232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59234  fi
59235
59236
59237  windows_path="$new_path"
59238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59239    unix_path=`$CYGPATH -u "$windows_path"`
59240    new_path="$unix_path"
59241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59243    new_path="$unix_path"
59244  fi
59245
59246  if test "x$path" != "x$new_path"; then
59247    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59249$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59250  fi
59251
59252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59254
59255    else
59256      # We're on a unix platform. Hooray! :)
59257      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59258      has_space=`$ECHO "$path" | $GREP " "`
59259      if test "x$has_space" != x; then
59260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59261$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59262        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59263      fi
59264
59265      # Use eval to expand a potential ~
59266      eval path="$path"
59267      if test ! -f "$path" && test ! -d "$path"; then
59268        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59269      fi
59270
59271      if test -d "$path"; then
59272        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59273      else
59274        dir="`$DIRNAME "$path"`"
59275        base="`$BASENAME "$path"`"
59276        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59277      fi
59278    fi
59279  fi
59280
59281
59282  # Only process if variable expands to non-empty
59283
59284  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59285    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59286
59287  # Input might be given as Windows format, start by converting to
59288  # unix format.
59289  path="$POTENTIAL_FREETYPE_LIB_PATH"
59290  new_path=`$CYGPATH -u "$path"`
59291
59292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59295  # "foo.exe" is OK but "foo" is an error.
59296  #
59297  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59298  # It is also a way to make sure we got the proper file name for the real test later on.
59299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59300  if test "x$test_shortpath" = x; then
59301    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59302$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59303    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59304  fi
59305
59306  # Call helper function which possibly converts this using DOS-style short mode.
59307  # If so, the updated path is stored in $new_path.
59308
59309  input_path="$new_path"
59310  # Check if we need to convert this using DOS-style short mode. If the path
59311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59312  # take no chances and rewrite it.
59313  # Note: m4 eats our [], so we need to use [ and ] instead.
59314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59315  if test "x$has_forbidden_chars" != x; then
59316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59320      # Going to short mode and back again did indeed matter. Since short mode is
59321      # case insensitive, let's make it lowercase to improve readability.
59322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59323      # Now convert it back to Unix-style (cygpath)
59324      input_path=`$CYGPATH -u "$shortmode_path"`
59325      new_path="$input_path"
59326    fi
59327  fi
59328
59329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59330  if test "x$test_cygdrive_prefix" = x; then
59331    # As a simple fix, exclude /usr/bin since it's not a real path.
59332    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59334      # a path prefixed by /cygdrive for fixpath to work.
59335      new_path="$CYGWIN_ROOT_PATH$input_path"
59336    fi
59337  fi
59338
59339
59340  if test "x$path" != "x$new_path"; then
59341    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59343$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59344  fi
59345
59346    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59347
59348  path="$POTENTIAL_FREETYPE_LIB_PATH"
59349  has_colon=`$ECHO $path | $GREP ^.:`
59350  new_path="$path"
59351  if test "x$has_colon" = x; then
59352    # Not in mixed or Windows style, start by that.
59353    new_path=`cmd //c echo $path`
59354  fi
59355
59356
59357  input_path="$new_path"
59358  # Check if we need to convert this using DOS-style short mode. If the path
59359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59360  # take no chances and rewrite it.
59361  # Note: m4 eats our [], so we need to use [ and ] instead.
59362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59363  if test "x$has_forbidden_chars" != x; then
59364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59365    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59366  fi
59367
59368
59369  windows_path="$new_path"
59370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59371    unix_path=`$CYGPATH -u "$windows_path"`
59372    new_path="$unix_path"
59373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59375    new_path="$unix_path"
59376  fi
59377
59378  if test "x$path" != "x$new_path"; then
59379    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59380    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59381$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59382  fi
59383
59384  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59385  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59386
59387    else
59388      # We're on a unix platform. Hooray! :)
59389      path="$POTENTIAL_FREETYPE_LIB_PATH"
59390      has_space=`$ECHO "$path" | $GREP " "`
59391      if test "x$has_space" != x; then
59392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59393$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59394        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59395      fi
59396
59397      # Use eval to expand a potential ~
59398      eval path="$path"
59399      if test ! -f "$path" && test ! -d "$path"; then
59400        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59401      fi
59402
59403      if test -d "$path"; then
59404        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59405      else
59406        dir="`$DIRNAME "$path"`"
59407        base="`$BASENAME "$path"`"
59408        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59409      fi
59410    fi
59411  fi
59412
59413
59414    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59415    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59416$as_echo_n "checking for freetype includes... " >&6; }
59417    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59418$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59419    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59420    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59421$as_echo_n "checking for freetype libraries... " >&6; }
59422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59423$as_echo "$FREETYPE_LIB_PATH" >&6; }
59424  fi
59425
59426          if test "x$FOUND_FREETYPE" != xyes; then
59427            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
59428
59429  windows_path="$FREETYPE_BASE_DIR"
59430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59431    unix_path=`$CYGPATH -u "$windows_path"`
59432    FREETYPE_BASE_DIR="$unix_path"
59433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59435    FREETYPE_BASE_DIR="$unix_path"
59436  fi
59437
59438
59439  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59440  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59441  METHOD="well-known location"
59442
59443  # Let's start with an optimistic view of the world :-)
59444  FOUND_FREETYPE=yes
59445
59446  # First look for the canonical freetype main include file ft2build.h.
59447  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59448    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59449    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59450    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59451      # Fail.
59452      FOUND_FREETYPE=no
59453    fi
59454  fi
59455
59456  if test "x$FOUND_FREETYPE" = xyes; then
59457    # Include file found, let's continue the sanity check.
59458    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59459$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59460
59461    # Reset to default value
59462    FREETYPE_BASE_NAME=freetype
59463    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59464    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59465      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59466          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59467        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59468        # for the .6 version explicitly.
59469        FREETYPE_BASE_NAME=freetype.6
59470        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59471        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59472$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59473      else
59474        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59475$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59476        FOUND_FREETYPE=no
59477      fi
59478    else
59479      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59480        # On Windows, we will need both .lib and .dll file.
59481        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59482          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59483$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59484          FOUND_FREETYPE=no
59485        fi
59486      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59487          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59488        # Found lib in isa dir, use that instead.
59489        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59490        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59491$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59492      fi
59493    fi
59494  fi
59495
59496  if test "x$FOUND_FREETYPE" = xyes; then
59497
59498  # Only process if variable expands to non-empty
59499
59500  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59502
59503  # Input might be given as Windows format, start by converting to
59504  # unix format.
59505  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59506  new_path=`$CYGPATH -u "$path"`
59507
59508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59511  # "foo.exe" is OK but "foo" is an error.
59512  #
59513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59514  # It is also a way to make sure we got the proper file name for the real test later on.
59515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59516  if test "x$test_shortpath" = x; then
59517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59518$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59519    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59520  fi
59521
59522  # Call helper function which possibly converts this using DOS-style short mode.
59523  # If so, the updated path is stored in $new_path.
59524
59525  input_path="$new_path"
59526  # Check if we need to convert this using DOS-style short mode. If the path
59527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59528  # take no chances and rewrite it.
59529  # Note: m4 eats our [], so we need to use [ and ] instead.
59530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59531  if test "x$has_forbidden_chars" != x; then
59532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59536      # Going to short mode and back again did indeed matter. Since short mode is
59537      # case insensitive, let's make it lowercase to improve readability.
59538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59539      # Now convert it back to Unix-style (cygpath)
59540      input_path=`$CYGPATH -u "$shortmode_path"`
59541      new_path="$input_path"
59542    fi
59543  fi
59544
59545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59546  if test "x$test_cygdrive_prefix" = x; then
59547    # As a simple fix, exclude /usr/bin since it's not a real path.
59548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59550      # a path prefixed by /cygdrive for fixpath to work.
59551      new_path="$CYGWIN_ROOT_PATH$input_path"
59552    fi
59553  fi
59554
59555
59556  if test "x$path" != "x$new_path"; then
59557    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59559$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59560  fi
59561
59562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59563
59564  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59565  has_colon=`$ECHO $path | $GREP ^.:`
59566  new_path="$path"
59567  if test "x$has_colon" = x; then
59568    # Not in mixed or Windows style, start by that.
59569    new_path=`cmd //c echo $path`
59570  fi
59571
59572
59573  input_path="$new_path"
59574  # Check if we need to convert this using DOS-style short mode. If the path
59575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59576  # take no chances and rewrite it.
59577  # Note: m4 eats our [], so we need to use [ and ] instead.
59578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59579  if test "x$has_forbidden_chars" != x; then
59580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59582  fi
59583
59584
59585  windows_path="$new_path"
59586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59587    unix_path=`$CYGPATH -u "$windows_path"`
59588    new_path="$unix_path"
59589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59591    new_path="$unix_path"
59592  fi
59593
59594  if test "x$path" != "x$new_path"; then
59595    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59597$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59598  fi
59599
59600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59602
59603    else
59604      # We're on a unix platform. Hooray! :)
59605      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59606      has_space=`$ECHO "$path" | $GREP " "`
59607      if test "x$has_space" != x; then
59608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59609$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59610        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59611      fi
59612
59613      # Use eval to expand a potential ~
59614      eval path="$path"
59615      if test ! -f "$path" && test ! -d "$path"; then
59616        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59617      fi
59618
59619      if test -d "$path"; then
59620        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59621      else
59622        dir="`$DIRNAME "$path"`"
59623        base="`$BASENAME "$path"`"
59624        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59625      fi
59626    fi
59627  fi
59628
59629
59630  # Only process if variable expands to non-empty
59631
59632  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59634
59635  # Input might be given as Windows format, start by converting to
59636  # unix format.
59637  path="$POTENTIAL_FREETYPE_LIB_PATH"
59638  new_path=`$CYGPATH -u "$path"`
59639
59640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59643  # "foo.exe" is OK but "foo" is an error.
59644  #
59645  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59646  # It is also a way to make sure we got the proper file name for the real test later on.
59647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59648  if test "x$test_shortpath" = x; then
59649    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59650$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59651    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59652  fi
59653
59654  # Call helper function which possibly converts this using DOS-style short mode.
59655  # If so, the updated path is stored in $new_path.
59656
59657  input_path="$new_path"
59658  # Check if we need to convert this using DOS-style short mode. If the path
59659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59660  # take no chances and rewrite it.
59661  # Note: m4 eats our [], so we need to use [ and ] instead.
59662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59663  if test "x$has_forbidden_chars" != x; then
59664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59668      # Going to short mode and back again did indeed matter. Since short mode is
59669      # case insensitive, let's make it lowercase to improve readability.
59670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59671      # Now convert it back to Unix-style (cygpath)
59672      input_path=`$CYGPATH -u "$shortmode_path"`
59673      new_path="$input_path"
59674    fi
59675  fi
59676
59677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59678  if test "x$test_cygdrive_prefix" = x; then
59679    # As a simple fix, exclude /usr/bin since it's not a real path.
59680    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59682      # a path prefixed by /cygdrive for fixpath to work.
59683      new_path="$CYGWIN_ROOT_PATH$input_path"
59684    fi
59685  fi
59686
59687
59688  if test "x$path" != "x$new_path"; then
59689    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59691$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59692  fi
59693
59694    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59695
59696  path="$POTENTIAL_FREETYPE_LIB_PATH"
59697  has_colon=`$ECHO $path | $GREP ^.:`
59698  new_path="$path"
59699  if test "x$has_colon" = x; then
59700    # Not in mixed or Windows style, start by that.
59701    new_path=`cmd //c echo $path`
59702  fi
59703
59704
59705  input_path="$new_path"
59706  # Check if we need to convert this using DOS-style short mode. If the path
59707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59708  # take no chances and rewrite it.
59709  # Note: m4 eats our [], so we need to use [ and ] instead.
59710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59711  if test "x$has_forbidden_chars" != x; then
59712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59714  fi
59715
59716
59717  windows_path="$new_path"
59718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59719    unix_path=`$CYGPATH -u "$windows_path"`
59720    new_path="$unix_path"
59721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59723    new_path="$unix_path"
59724  fi
59725
59726  if test "x$path" != "x$new_path"; then
59727    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59729$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59730  fi
59731
59732  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59733  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59734
59735    else
59736      # We're on a unix platform. Hooray! :)
59737      path="$POTENTIAL_FREETYPE_LIB_PATH"
59738      has_space=`$ECHO "$path" | $GREP " "`
59739      if test "x$has_space" != x; then
59740        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59741$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59742        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59743      fi
59744
59745      # Use eval to expand a potential ~
59746      eval path="$path"
59747      if test ! -f "$path" && test ! -d "$path"; then
59748        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59749      fi
59750
59751      if test -d "$path"; then
59752        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59753      else
59754        dir="`$DIRNAME "$path"`"
59755        base="`$BASENAME "$path"`"
59756        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59757      fi
59758    fi
59759  fi
59760
59761
59762    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59764$as_echo_n "checking for freetype includes... " >&6; }
59765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59766$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59767    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59769$as_echo_n "checking for freetype libraries... " >&6; }
59770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59771$as_echo "$FREETYPE_LIB_PATH" >&6; }
59772  fi
59773
59774          fi
59775          if test "x$FOUND_FREETYPE" != xyes; then
59776            FREETYPE_BASE_DIR="$HOME/freetype"
59777
59778  windows_path="$FREETYPE_BASE_DIR"
59779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59780    unix_path=`$CYGPATH -u "$windows_path"`
59781    FREETYPE_BASE_DIR="$unix_path"
59782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59784    FREETYPE_BASE_DIR="$unix_path"
59785  fi
59786
59787            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59788
59789  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59790  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59791  METHOD="well-known location"
59792
59793  # Let's start with an optimistic view of the world :-)
59794  FOUND_FREETYPE=yes
59795
59796  # First look for the canonical freetype main include file ft2build.h.
59797  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59798    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59799    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59800    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59801      # Fail.
59802      FOUND_FREETYPE=no
59803    fi
59804  fi
59805
59806  if test "x$FOUND_FREETYPE" = xyes; then
59807    # Include file found, let's continue the sanity check.
59808    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59809$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59810
59811    # Reset to default value
59812    FREETYPE_BASE_NAME=freetype
59813    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59814    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59815      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59816          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59817        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59818        # for the .6 version explicitly.
59819        FREETYPE_BASE_NAME=freetype.6
59820        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59821        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59822$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59823      else
59824        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59825$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59826        FOUND_FREETYPE=no
59827      fi
59828    else
59829      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59830        # On Windows, we will need both .lib and .dll file.
59831        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59832          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59833$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59834          FOUND_FREETYPE=no
59835        fi
59836      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59837          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59838        # Found lib in isa dir, use that instead.
59839        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59840        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59841$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59842      fi
59843    fi
59844  fi
59845
59846  if test "x$FOUND_FREETYPE" = xyes; then
59847
59848  # Only process if variable expands to non-empty
59849
59850  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59852
59853  # Input might be given as Windows format, start by converting to
59854  # unix format.
59855  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59856  new_path=`$CYGPATH -u "$path"`
59857
59858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59861  # "foo.exe" is OK but "foo" is an error.
59862  #
59863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59864  # It is also a way to make sure we got the proper file name for the real test later on.
59865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59866  if test "x$test_shortpath" = x; then
59867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59868$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59869    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59870  fi
59871
59872  # Call helper function which possibly converts this using DOS-style short mode.
59873  # If so, the updated path is stored in $new_path.
59874
59875  input_path="$new_path"
59876  # Check if we need to convert this using DOS-style short mode. If the path
59877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59878  # take no chances and rewrite it.
59879  # Note: m4 eats our [], so we need to use [ and ] instead.
59880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59881  if test "x$has_forbidden_chars" != x; then
59882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59886      # Going to short mode and back again did indeed matter. Since short mode is
59887      # case insensitive, let's make it lowercase to improve readability.
59888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59889      # Now convert it back to Unix-style (cygpath)
59890      input_path=`$CYGPATH -u "$shortmode_path"`
59891      new_path="$input_path"
59892    fi
59893  fi
59894
59895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59896  if test "x$test_cygdrive_prefix" = x; then
59897    # As a simple fix, exclude /usr/bin since it's not a real path.
59898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59900      # a path prefixed by /cygdrive for fixpath to work.
59901      new_path="$CYGWIN_ROOT_PATH$input_path"
59902    fi
59903  fi
59904
59905
59906  if test "x$path" != "x$new_path"; then
59907    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59909$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59910  fi
59911
59912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59913
59914  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59915  has_colon=`$ECHO $path | $GREP ^.:`
59916  new_path="$path"
59917  if test "x$has_colon" = x; then
59918    # Not in mixed or Windows style, start by that.
59919    new_path=`cmd //c echo $path`
59920  fi
59921
59922
59923  input_path="$new_path"
59924  # Check if we need to convert this using DOS-style short mode. If the path
59925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59926  # take no chances and rewrite it.
59927  # Note: m4 eats our [], so we need to use [ and ] instead.
59928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59929  if test "x$has_forbidden_chars" != x; then
59930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59932  fi
59933
59934
59935  windows_path="$new_path"
59936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59937    unix_path=`$CYGPATH -u "$windows_path"`
59938    new_path="$unix_path"
59939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59941    new_path="$unix_path"
59942  fi
59943
59944  if test "x$path" != "x$new_path"; then
59945    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59947$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59948  fi
59949
59950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59952
59953    else
59954      # We're on a unix platform. Hooray! :)
59955      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59956      has_space=`$ECHO "$path" | $GREP " "`
59957      if test "x$has_space" != x; then
59958        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59959$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59960        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59961      fi
59962
59963      # Use eval to expand a potential ~
59964      eval path="$path"
59965      if test ! -f "$path" && test ! -d "$path"; then
59966        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59967      fi
59968
59969      if test -d "$path"; then
59970        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59971      else
59972        dir="`$DIRNAME "$path"`"
59973        base="`$BASENAME "$path"`"
59974        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59975      fi
59976    fi
59977  fi
59978
59979
59980  # Only process if variable expands to non-empty
59981
59982  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59984
59985  # Input might be given as Windows format, start by converting to
59986  # unix format.
59987  path="$POTENTIAL_FREETYPE_LIB_PATH"
59988  new_path=`$CYGPATH -u "$path"`
59989
59990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59993  # "foo.exe" is OK but "foo" is an error.
59994  #
59995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59996  # It is also a way to make sure we got the proper file name for the real test later on.
59997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59998  if test "x$test_shortpath" = x; then
59999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60000$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60001    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60002  fi
60003
60004  # Call helper function which possibly converts this using DOS-style short mode.
60005  # If so, the updated path is stored in $new_path.
60006
60007  input_path="$new_path"
60008  # Check if we need to convert this using DOS-style short mode. If the path
60009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60010  # take no chances and rewrite it.
60011  # Note: m4 eats our [], so we need to use [ and ] instead.
60012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60013  if test "x$has_forbidden_chars" != x; then
60014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60018      # Going to short mode and back again did indeed matter. Since short mode is
60019      # case insensitive, let's make it lowercase to improve readability.
60020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60021      # Now convert it back to Unix-style (cygpath)
60022      input_path=`$CYGPATH -u "$shortmode_path"`
60023      new_path="$input_path"
60024    fi
60025  fi
60026
60027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60028  if test "x$test_cygdrive_prefix" = x; then
60029    # As a simple fix, exclude /usr/bin since it's not a real path.
60030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60032      # a path prefixed by /cygdrive for fixpath to work.
60033      new_path="$CYGWIN_ROOT_PATH$input_path"
60034    fi
60035  fi
60036
60037
60038  if test "x$path" != "x$new_path"; then
60039    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60041$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60042  fi
60043
60044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60045
60046  path="$POTENTIAL_FREETYPE_LIB_PATH"
60047  has_colon=`$ECHO $path | $GREP ^.:`
60048  new_path="$path"
60049  if test "x$has_colon" = x; then
60050    # Not in mixed or Windows style, start by that.
60051    new_path=`cmd //c echo $path`
60052  fi
60053
60054
60055  input_path="$new_path"
60056  # Check if we need to convert this using DOS-style short mode. If the path
60057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60058  # take no chances and rewrite it.
60059  # Note: m4 eats our [], so we need to use [ and ] instead.
60060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60061  if test "x$has_forbidden_chars" != x; then
60062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60064  fi
60065
60066
60067  windows_path="$new_path"
60068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60069    unix_path=`$CYGPATH -u "$windows_path"`
60070    new_path="$unix_path"
60071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60073    new_path="$unix_path"
60074  fi
60075
60076  if test "x$path" != "x$new_path"; then
60077    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60079$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60080  fi
60081
60082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60084
60085    else
60086      # We're on a unix platform. Hooray! :)
60087      path="$POTENTIAL_FREETYPE_LIB_PATH"
60088      has_space=`$ECHO "$path" | $GREP " "`
60089      if test "x$has_space" != x; then
60090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60091$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60093      fi
60094
60095      # Use eval to expand a potential ~
60096      eval path="$path"
60097      if test ! -f "$path" && test ! -d "$path"; then
60098        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60099      fi
60100
60101      if test -d "$path"; then
60102        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60103      else
60104        dir="`$DIRNAME "$path"`"
60105        base="`$BASENAME "$path"`"
60106        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60107      fi
60108    fi
60109  fi
60110
60111
60112    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60113    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60114$as_echo_n "checking for freetype includes... " >&6; }
60115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60116$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60117    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60118    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60119$as_echo_n "checking for freetype libraries... " >&6; }
60120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60121$as_echo "$FREETYPE_LIB_PATH" >&6; }
60122  fi
60123
60124            else
60125
60126  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60127  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60128  METHOD="well-known location"
60129
60130  # Let's start with an optimistic view of the world :-)
60131  FOUND_FREETYPE=yes
60132
60133  # First look for the canonical freetype main include file ft2build.h.
60134  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60135    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60136    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60137    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60138      # Fail.
60139      FOUND_FREETYPE=no
60140    fi
60141  fi
60142
60143  if test "x$FOUND_FREETYPE" = xyes; then
60144    # Include file found, let's continue the sanity check.
60145    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60146$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60147
60148    # Reset to default value
60149    FREETYPE_BASE_NAME=freetype
60150    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60151    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60152      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60153          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60154        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60155        # for the .6 version explicitly.
60156        FREETYPE_BASE_NAME=freetype.6
60157        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60158        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60159$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60160      else
60161        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60162$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60163        FOUND_FREETYPE=no
60164      fi
60165    else
60166      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60167        # On Windows, we will need both .lib and .dll file.
60168        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60169          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60170$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60171          FOUND_FREETYPE=no
60172        fi
60173      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60174          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60175        # Found lib in isa dir, use that instead.
60176        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60177        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60178$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60179      fi
60180    fi
60181  fi
60182
60183  if test "x$FOUND_FREETYPE" = xyes; then
60184
60185  # Only process if variable expands to non-empty
60186
60187  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60189
60190  # Input might be given as Windows format, start by converting to
60191  # unix format.
60192  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60193  new_path=`$CYGPATH -u "$path"`
60194
60195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60198  # "foo.exe" is OK but "foo" is an error.
60199  #
60200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60201  # It is also a way to make sure we got the proper file name for the real test later on.
60202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60203  if test "x$test_shortpath" = x; then
60204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60205$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60206    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60207  fi
60208
60209  # Call helper function which possibly converts this using DOS-style short mode.
60210  # If so, the updated path is stored in $new_path.
60211
60212  input_path="$new_path"
60213  # Check if we need to convert this using DOS-style short mode. If the path
60214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60215  # take no chances and rewrite it.
60216  # Note: m4 eats our [], so we need to use [ and ] instead.
60217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60218  if test "x$has_forbidden_chars" != x; then
60219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60223      # Going to short mode and back again did indeed matter. Since short mode is
60224      # case insensitive, let's make it lowercase to improve readability.
60225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60226      # Now convert it back to Unix-style (cygpath)
60227      input_path=`$CYGPATH -u "$shortmode_path"`
60228      new_path="$input_path"
60229    fi
60230  fi
60231
60232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60233  if test "x$test_cygdrive_prefix" = x; then
60234    # As a simple fix, exclude /usr/bin since it's not a real path.
60235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60237      # a path prefixed by /cygdrive for fixpath to work.
60238      new_path="$CYGWIN_ROOT_PATH$input_path"
60239    fi
60240  fi
60241
60242
60243  if test "x$path" != "x$new_path"; then
60244    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60246$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60247  fi
60248
60249    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60250
60251  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60252  has_colon=`$ECHO $path | $GREP ^.:`
60253  new_path="$path"
60254  if test "x$has_colon" = x; then
60255    # Not in mixed or Windows style, start by that.
60256    new_path=`cmd //c echo $path`
60257  fi
60258
60259
60260  input_path="$new_path"
60261  # Check if we need to convert this using DOS-style short mode. If the path
60262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60263  # take no chances and rewrite it.
60264  # Note: m4 eats our [], so we need to use [ and ] instead.
60265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60266  if test "x$has_forbidden_chars" != x; then
60267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60269  fi
60270
60271
60272  windows_path="$new_path"
60273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60274    unix_path=`$CYGPATH -u "$windows_path"`
60275    new_path="$unix_path"
60276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60278    new_path="$unix_path"
60279  fi
60280
60281  if test "x$path" != "x$new_path"; then
60282    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60284$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60285  fi
60286
60287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60289
60290    else
60291      # We're on a unix platform. Hooray! :)
60292      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60293      has_space=`$ECHO "$path" | $GREP " "`
60294      if test "x$has_space" != x; then
60295        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60296$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60297        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60298      fi
60299
60300      # Use eval to expand a potential ~
60301      eval path="$path"
60302      if test ! -f "$path" && test ! -d "$path"; then
60303        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60304      fi
60305
60306      if test -d "$path"; then
60307        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60308      else
60309        dir="`$DIRNAME "$path"`"
60310        base="`$BASENAME "$path"`"
60311        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60312      fi
60313    fi
60314  fi
60315
60316
60317  # Only process if variable expands to non-empty
60318
60319  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60320    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60321
60322  # Input might be given as Windows format, start by converting to
60323  # unix format.
60324  path="$POTENTIAL_FREETYPE_LIB_PATH"
60325  new_path=`$CYGPATH -u "$path"`
60326
60327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60330  # "foo.exe" is OK but "foo" is an error.
60331  #
60332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60333  # It is also a way to make sure we got the proper file name for the real test later on.
60334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60335  if test "x$test_shortpath" = x; then
60336    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60337$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60338    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60339  fi
60340
60341  # Call helper function which possibly converts this using DOS-style short mode.
60342  # If so, the updated path is stored in $new_path.
60343
60344  input_path="$new_path"
60345  # Check if we need to convert this using DOS-style short mode. If the path
60346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60347  # take no chances and rewrite it.
60348  # Note: m4 eats our [], so we need to use [ and ] instead.
60349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60350  if test "x$has_forbidden_chars" != x; then
60351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60355      # Going to short mode and back again did indeed matter. Since short mode is
60356      # case insensitive, let's make it lowercase to improve readability.
60357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60358      # Now convert it back to Unix-style (cygpath)
60359      input_path=`$CYGPATH -u "$shortmode_path"`
60360      new_path="$input_path"
60361    fi
60362  fi
60363
60364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60365  if test "x$test_cygdrive_prefix" = x; then
60366    # As a simple fix, exclude /usr/bin since it's not a real path.
60367    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60369      # a path prefixed by /cygdrive for fixpath to work.
60370      new_path="$CYGWIN_ROOT_PATH$input_path"
60371    fi
60372  fi
60373
60374
60375  if test "x$path" != "x$new_path"; then
60376    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60378$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60379  fi
60380
60381    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60382
60383  path="$POTENTIAL_FREETYPE_LIB_PATH"
60384  has_colon=`$ECHO $path | $GREP ^.:`
60385  new_path="$path"
60386  if test "x$has_colon" = x; then
60387    # Not in mixed or Windows style, start by that.
60388    new_path=`cmd //c echo $path`
60389  fi
60390
60391
60392  input_path="$new_path"
60393  # Check if we need to convert this using DOS-style short mode. If the path
60394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60395  # take no chances and rewrite it.
60396  # Note: m4 eats our [], so we need to use [ and ] instead.
60397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60398  if test "x$has_forbidden_chars" != x; then
60399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60401  fi
60402
60403
60404  windows_path="$new_path"
60405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60406    unix_path=`$CYGPATH -u "$windows_path"`
60407    new_path="$unix_path"
60408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60410    new_path="$unix_path"
60411  fi
60412
60413  if test "x$path" != "x$new_path"; then
60414    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60416$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60417  fi
60418
60419  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60420  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60421
60422    else
60423      # We're on a unix platform. Hooray! :)
60424      path="$POTENTIAL_FREETYPE_LIB_PATH"
60425      has_space=`$ECHO "$path" | $GREP " "`
60426      if test "x$has_space" != x; then
60427        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60428$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60429        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60430      fi
60431
60432      # Use eval to expand a potential ~
60433      eval path="$path"
60434      if test ! -f "$path" && test ! -d "$path"; then
60435        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60436      fi
60437
60438      if test -d "$path"; then
60439        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60440      else
60441        dir="`$DIRNAME "$path"`"
60442        base="`$BASENAME "$path"`"
60443        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60444      fi
60445    fi
60446  fi
60447
60448
60449    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60450    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60451$as_echo_n "checking for freetype includes... " >&6; }
60452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60453$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60454    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60455    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60456$as_echo_n "checking for freetype libraries... " >&6; }
60457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60458$as_echo "$FREETYPE_LIB_PATH" >&6; }
60459  fi
60460
60461            fi
60462            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
60463                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
60464              # Source is available, as a last resort try to build freetype in default location
60465
60466  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
60467  BUILD_FREETYPE=yes
60468
60469  # Check if the freetype sources are acessible..
60470  if ! test -d $FREETYPE_SRC_PATH; then
60471    { $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
60472$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
60473    BUILD_FREETYPE=no
60474  fi
60475  # ..and contain a vc2010 project file
60476  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
60477  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
60478    { $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
60479$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
60480    BUILD_FREETYPE=no
60481  fi
60482  # Now check if configure found a version of 'msbuild.exe'
60483  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
60484    { $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
60485$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;}
60486    BUILD_FREETYPE=no
60487  fi
60488
60489  # Ready to go..
60490  if test "x$BUILD_FREETYPE" = xyes; then
60491    # msbuild requires trailing slashes for output directories
60492    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
60493    freetype_lib_path_unix="$freetype_lib_path"
60494    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
60495
60496  unix_path="$vcxproj_path"
60497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60498    windows_path=`$CYGPATH -m "$unix_path"`
60499    vcxproj_path="$windows_path"
60500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60501    windows_path=`cmd //c echo $unix_path`
60502    vcxproj_path="$windows_path"
60503  fi
60504
60505
60506  unix_path="$freetype_lib_path"
60507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60508    windows_path=`$CYGPATH -m "$unix_path"`
60509    freetype_lib_path="$windows_path"
60510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60511    windows_path=`cmd //c echo $unix_path`
60512    freetype_lib_path="$windows_path"
60513  fi
60514
60515
60516  unix_path="$freetype_obj_path"
60517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60518    windows_path=`$CYGPATH -m "$unix_path"`
60519    freetype_obj_path="$windows_path"
60520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60521    windows_path=`cmd //c echo $unix_path`
60522    freetype_obj_path="$windows_path"
60523  fi
60524
60525    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60526      freetype_platform=x64
60527    else
60528      freetype_platform=win32
60529    fi
60530
60531    # The original freetype project file is for VS 2010 (i.e. 'v100'),
60532    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60533    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60534    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60535    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60536$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60537
60538    # First we try to build the freetype.dll
60539    $ECHO -e "@echo off\n"\
60540        "$MSBUILD $vcxproj_path "\
60541        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60542        "/p:Configuration=\"Release Multithreaded\" "\
60543        "/p:Platform=$freetype_platform "\
60544        "/p:ConfigurationType=DynamicLibrary "\
60545        "/p:TargetName=freetype "\
60546        "/p:OutDir=\"$freetype_lib_path\" "\
60547        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60548    cmd /c freetype.bat
60549
60550    if test -s "$freetype_lib_path_unix/freetype.dll"; then
60551      # If that succeeds we also build freetype.lib
60552      $ECHO -e "@echo off\n"\
60553          "$MSBUILD $vcxproj_path "\
60554          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60555          "/p:Configuration=\"Release Multithreaded\" "\
60556          "/p:Platform=$freetype_platform "\
60557          "/p:ConfigurationType=StaticLibrary "\
60558          "/p:TargetName=freetype "\
60559          "/p:OutDir=\"$freetype_lib_path\" "\
60560          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60561      cmd /c freetype.bat
60562
60563      if test -s "$freetype_lib_path_unix/freetype.lib"; then
60564        # Once we build both, lib and dll, set freetype lib and include path appropriately
60565        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60566        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60567        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60568$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60569      else
60570        BUILD_FREETYPE=no
60571      fi
60572    else
60573      BUILD_FREETYPE=no
60574    fi
60575  fi
60576
60577              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60578
60579  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60580  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60581  METHOD="well-known location"
60582
60583  # Let's start with an optimistic view of the world :-)
60584  FOUND_FREETYPE=yes
60585
60586  # First look for the canonical freetype main include file ft2build.h.
60587  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60588    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60589    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60590    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60591      # Fail.
60592      FOUND_FREETYPE=no
60593    fi
60594  fi
60595
60596  if test "x$FOUND_FREETYPE" = xyes; then
60597    # Include file found, let's continue the sanity check.
60598    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60599$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60600
60601    # Reset to default value
60602    FREETYPE_BASE_NAME=freetype
60603    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60604    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60605      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60606          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60607        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60608        # for the .6 version explicitly.
60609        FREETYPE_BASE_NAME=freetype.6
60610        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60611        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60612$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60613      else
60614        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60615$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60616        FOUND_FREETYPE=no
60617      fi
60618    else
60619      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60620        # On Windows, we will need both .lib and .dll file.
60621        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60622          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60623$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60624          FOUND_FREETYPE=no
60625        fi
60626      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60627          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60628        # Found lib in isa dir, use that instead.
60629        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60630        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60631$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60632      fi
60633    fi
60634  fi
60635
60636  if test "x$FOUND_FREETYPE" = xyes; then
60637
60638  # Only process if variable expands to non-empty
60639
60640  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60641    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60642
60643  # Input might be given as Windows format, start by converting to
60644  # unix format.
60645  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60646  new_path=`$CYGPATH -u "$path"`
60647
60648  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60649  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60650  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60651  # "foo.exe" is OK but "foo" is an error.
60652  #
60653  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60654  # It is also a way to make sure we got the proper file name for the real test later on.
60655  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60656  if test "x$test_shortpath" = x; then
60657    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60658$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60659    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60660  fi
60661
60662  # Call helper function which possibly converts this using DOS-style short mode.
60663  # If so, the updated path is stored in $new_path.
60664
60665  input_path="$new_path"
60666  # Check if we need to convert this using DOS-style short mode. If the path
60667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60668  # take no chances and rewrite it.
60669  # Note: m4 eats our [], so we need to use [ and ] instead.
60670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60671  if test "x$has_forbidden_chars" != x; then
60672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60676      # Going to short mode and back again did indeed matter. Since short mode is
60677      # case insensitive, let's make it lowercase to improve readability.
60678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60679      # Now convert it back to Unix-style (cygpath)
60680      input_path=`$CYGPATH -u "$shortmode_path"`
60681      new_path="$input_path"
60682    fi
60683  fi
60684
60685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60686  if test "x$test_cygdrive_prefix" = x; then
60687    # As a simple fix, exclude /usr/bin since it's not a real path.
60688    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60690      # a path prefixed by /cygdrive for fixpath to work.
60691      new_path="$CYGWIN_ROOT_PATH$input_path"
60692    fi
60693  fi
60694
60695
60696  if test "x$path" != "x$new_path"; then
60697    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60699$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60700  fi
60701
60702    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60703
60704  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60705  has_colon=`$ECHO $path | $GREP ^.:`
60706  new_path="$path"
60707  if test "x$has_colon" = x; then
60708    # Not in mixed or Windows style, start by that.
60709    new_path=`cmd //c echo $path`
60710  fi
60711
60712
60713  input_path="$new_path"
60714  # Check if we need to convert this using DOS-style short mode. If the path
60715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60716  # take no chances and rewrite it.
60717  # Note: m4 eats our [], so we need to use [ and ] instead.
60718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60719  if test "x$has_forbidden_chars" != x; then
60720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60722  fi
60723
60724
60725  windows_path="$new_path"
60726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60727    unix_path=`$CYGPATH -u "$windows_path"`
60728    new_path="$unix_path"
60729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60731    new_path="$unix_path"
60732  fi
60733
60734  if test "x$path" != "x$new_path"; then
60735    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60737$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60738  fi
60739
60740  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60741  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60742
60743    else
60744      # We're on a unix platform. Hooray! :)
60745      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60746      has_space=`$ECHO "$path" | $GREP " "`
60747      if test "x$has_space" != x; then
60748        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60749$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60750        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60751      fi
60752
60753      # Use eval to expand a potential ~
60754      eval path="$path"
60755      if test ! -f "$path" && test ! -d "$path"; then
60756        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60757      fi
60758
60759      if test -d "$path"; then
60760        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60761      else
60762        dir="`$DIRNAME "$path"`"
60763        base="`$BASENAME "$path"`"
60764        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60765      fi
60766    fi
60767  fi
60768
60769
60770  # Only process if variable expands to non-empty
60771
60772  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60774
60775  # Input might be given as Windows format, start by converting to
60776  # unix format.
60777  path="$POTENTIAL_FREETYPE_LIB_PATH"
60778  new_path=`$CYGPATH -u "$path"`
60779
60780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60783  # "foo.exe" is OK but "foo" is an error.
60784  #
60785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60786  # It is also a way to make sure we got the proper file name for the real test later on.
60787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60788  if test "x$test_shortpath" = x; then
60789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60790$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60791    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60792  fi
60793
60794  # Call helper function which possibly converts this using DOS-style short mode.
60795  # If so, the updated path is stored in $new_path.
60796
60797  input_path="$new_path"
60798  # Check if we need to convert this using DOS-style short mode. If the path
60799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60800  # take no chances and rewrite it.
60801  # Note: m4 eats our [], so we need to use [ and ] instead.
60802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60803  if test "x$has_forbidden_chars" != x; then
60804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60808      # Going to short mode and back again did indeed matter. Since short mode is
60809      # case insensitive, let's make it lowercase to improve readability.
60810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60811      # Now convert it back to Unix-style (cygpath)
60812      input_path=`$CYGPATH -u "$shortmode_path"`
60813      new_path="$input_path"
60814    fi
60815  fi
60816
60817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60818  if test "x$test_cygdrive_prefix" = x; then
60819    # As a simple fix, exclude /usr/bin since it's not a real path.
60820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60822      # a path prefixed by /cygdrive for fixpath to work.
60823      new_path="$CYGWIN_ROOT_PATH$input_path"
60824    fi
60825  fi
60826
60827
60828  if test "x$path" != "x$new_path"; then
60829    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60831$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60832  fi
60833
60834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60835
60836  path="$POTENTIAL_FREETYPE_LIB_PATH"
60837  has_colon=`$ECHO $path | $GREP ^.:`
60838  new_path="$path"
60839  if test "x$has_colon" = x; then
60840    # Not in mixed or Windows style, start by that.
60841    new_path=`cmd //c echo $path`
60842  fi
60843
60844
60845  input_path="$new_path"
60846  # Check if we need to convert this using DOS-style short mode. If the path
60847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60848  # take no chances and rewrite it.
60849  # Note: m4 eats our [], so we need to use [ and ] instead.
60850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60851  if test "x$has_forbidden_chars" != x; then
60852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60854  fi
60855
60856
60857  windows_path="$new_path"
60858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60859    unix_path=`$CYGPATH -u "$windows_path"`
60860    new_path="$unix_path"
60861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60863    new_path="$unix_path"
60864  fi
60865
60866  if test "x$path" != "x$new_path"; then
60867    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60869$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60870  fi
60871
60872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60874
60875    else
60876      # We're on a unix platform. Hooray! :)
60877      path="$POTENTIAL_FREETYPE_LIB_PATH"
60878      has_space=`$ECHO "$path" | $GREP " "`
60879      if test "x$has_space" != x; then
60880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60881$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60882        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60883      fi
60884
60885      # Use eval to expand a potential ~
60886      eval path="$path"
60887      if test ! -f "$path" && test ! -d "$path"; then
60888        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60889      fi
60890
60891      if test -d "$path"; then
60892        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60893      else
60894        dir="`$DIRNAME "$path"`"
60895        base="`$BASENAME "$path"`"
60896        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60897      fi
60898    fi
60899  fi
60900
60901
60902    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60903    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60904$as_echo_n "checking for freetype includes... " >&6; }
60905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60906$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60907    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60909$as_echo_n "checking for freetype libraries... " >&6; }
60910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60911$as_echo "$FREETYPE_LIB_PATH" >&6; }
60912  fi
60913
60914              else
60915
60916  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60917  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60918  METHOD="well-known location"
60919
60920  # Let's start with an optimistic view of the world :-)
60921  FOUND_FREETYPE=yes
60922
60923  # First look for the canonical freetype main include file ft2build.h.
60924  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60925    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60926    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60927    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60928      # Fail.
60929      FOUND_FREETYPE=no
60930    fi
60931  fi
60932
60933  if test "x$FOUND_FREETYPE" = xyes; then
60934    # Include file found, let's continue the sanity check.
60935    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60936$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60937
60938    # Reset to default value
60939    FREETYPE_BASE_NAME=freetype
60940    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60941    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60942      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60943          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60944        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60945        # for the .6 version explicitly.
60946        FREETYPE_BASE_NAME=freetype.6
60947        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60948        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60949$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60950      else
60951        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60952$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60953        FOUND_FREETYPE=no
60954      fi
60955    else
60956      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60957        # On Windows, we will need both .lib and .dll file.
60958        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60959          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60960$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60961          FOUND_FREETYPE=no
60962        fi
60963      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60964          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60965        # Found lib in isa dir, use that instead.
60966        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60967        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60968$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60969      fi
60970    fi
60971  fi
60972
60973  if test "x$FOUND_FREETYPE" = xyes; then
60974
60975  # Only process if variable expands to non-empty
60976
60977  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60978    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60979
60980  # Input might be given as Windows format, start by converting to
60981  # unix format.
60982  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60983  new_path=`$CYGPATH -u "$path"`
60984
60985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60988  # "foo.exe" is OK but "foo" is an error.
60989  #
60990  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60991  # It is also a way to make sure we got the proper file name for the real test later on.
60992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60993  if test "x$test_shortpath" = x; then
60994    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60995$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60996    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60997  fi
60998
60999  # Call helper function which possibly converts this using DOS-style short mode.
61000  # If so, the updated path is stored in $new_path.
61001
61002  input_path="$new_path"
61003  # Check if we need to convert this using DOS-style short mode. If the path
61004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61005  # take no chances and rewrite it.
61006  # Note: m4 eats our [], so we need to use [ and ] instead.
61007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61008  if test "x$has_forbidden_chars" != x; then
61009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61013      # Going to short mode and back again did indeed matter. Since short mode is
61014      # case insensitive, let's make it lowercase to improve readability.
61015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61016      # Now convert it back to Unix-style (cygpath)
61017      input_path=`$CYGPATH -u "$shortmode_path"`
61018      new_path="$input_path"
61019    fi
61020  fi
61021
61022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61023  if test "x$test_cygdrive_prefix" = x; then
61024    # As a simple fix, exclude /usr/bin since it's not a real path.
61025    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61027      # a path prefixed by /cygdrive for fixpath to work.
61028      new_path="$CYGWIN_ROOT_PATH$input_path"
61029    fi
61030  fi
61031
61032
61033  if test "x$path" != "x$new_path"; then
61034    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61036$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61037  fi
61038
61039    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61040
61041  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61042  has_colon=`$ECHO $path | $GREP ^.:`
61043  new_path="$path"
61044  if test "x$has_colon" = x; then
61045    # Not in mixed or Windows style, start by that.
61046    new_path=`cmd //c echo $path`
61047  fi
61048
61049
61050  input_path="$new_path"
61051  # Check if we need to convert this using DOS-style short mode. If the path
61052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61053  # take no chances and rewrite it.
61054  # Note: m4 eats our [], so we need to use [ and ] instead.
61055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61056  if test "x$has_forbidden_chars" != x; then
61057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61059  fi
61060
61061
61062  windows_path="$new_path"
61063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61064    unix_path=`$CYGPATH -u "$windows_path"`
61065    new_path="$unix_path"
61066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61068    new_path="$unix_path"
61069  fi
61070
61071  if test "x$path" != "x$new_path"; then
61072    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61074$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61075  fi
61076
61077  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61078  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61079
61080    else
61081      # We're on a unix platform. Hooray! :)
61082      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61083      has_space=`$ECHO "$path" | $GREP " "`
61084      if test "x$has_space" != x; then
61085        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61086$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61087        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61088      fi
61089
61090      # Use eval to expand a potential ~
61091      eval path="$path"
61092      if test ! -f "$path" && test ! -d "$path"; then
61093        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61094      fi
61095
61096      if test -d "$path"; then
61097        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61098      else
61099        dir="`$DIRNAME "$path"`"
61100        base="`$BASENAME "$path"`"
61101        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61102      fi
61103    fi
61104  fi
61105
61106
61107  # Only process if variable expands to non-empty
61108
61109  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61110    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61111
61112  # Input might be given as Windows format, start by converting to
61113  # unix format.
61114  path="$POTENTIAL_FREETYPE_LIB_PATH"
61115  new_path=`$CYGPATH -u "$path"`
61116
61117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61120  # "foo.exe" is OK but "foo" is an error.
61121  #
61122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61123  # It is also a way to make sure we got the proper file name for the real test later on.
61124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61125  if test "x$test_shortpath" = x; then
61126    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61127$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61128    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61129  fi
61130
61131  # Call helper function which possibly converts this using DOS-style short mode.
61132  # If so, the updated path is stored in $new_path.
61133
61134  input_path="$new_path"
61135  # Check if we need to convert this using DOS-style short mode. If the path
61136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61137  # take no chances and rewrite it.
61138  # Note: m4 eats our [], so we need to use [ and ] instead.
61139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61140  if test "x$has_forbidden_chars" != x; then
61141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61145      # Going to short mode and back again did indeed matter. Since short mode is
61146      # case insensitive, let's make it lowercase to improve readability.
61147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61148      # Now convert it back to Unix-style (cygpath)
61149      input_path=`$CYGPATH -u "$shortmode_path"`
61150      new_path="$input_path"
61151    fi
61152  fi
61153
61154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61155  if test "x$test_cygdrive_prefix" = x; then
61156    # As a simple fix, exclude /usr/bin since it's not a real path.
61157    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61159      # a path prefixed by /cygdrive for fixpath to work.
61160      new_path="$CYGWIN_ROOT_PATH$input_path"
61161    fi
61162  fi
61163
61164
61165  if test "x$path" != "x$new_path"; then
61166    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61168$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61169  fi
61170
61171    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61172
61173  path="$POTENTIAL_FREETYPE_LIB_PATH"
61174  has_colon=`$ECHO $path | $GREP ^.:`
61175  new_path="$path"
61176  if test "x$has_colon" = x; then
61177    # Not in mixed or Windows style, start by that.
61178    new_path=`cmd //c echo $path`
61179  fi
61180
61181
61182  input_path="$new_path"
61183  # Check if we need to convert this using DOS-style short mode. If the path
61184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61185  # take no chances and rewrite it.
61186  # Note: m4 eats our [], so we need to use [ and ] instead.
61187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61188  if test "x$has_forbidden_chars" != x; then
61189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61191  fi
61192
61193
61194  windows_path="$new_path"
61195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61196    unix_path=`$CYGPATH -u "$windows_path"`
61197    new_path="$unix_path"
61198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61200    new_path="$unix_path"
61201  fi
61202
61203  if test "x$path" != "x$new_path"; then
61204    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61206$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61207  fi
61208
61209  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61210  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61211
61212    else
61213      # We're on a unix platform. Hooray! :)
61214      path="$POTENTIAL_FREETYPE_LIB_PATH"
61215      has_space=`$ECHO "$path" | $GREP " "`
61216      if test "x$has_space" != x; then
61217        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61218$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61219        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61220      fi
61221
61222      # Use eval to expand a potential ~
61223      eval path="$path"
61224      if test ! -f "$path" && test ! -d "$path"; then
61225        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61226      fi
61227
61228      if test -d "$path"; then
61229        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61230      else
61231        dir="`$DIRNAME "$path"`"
61232        base="`$BASENAME "$path"`"
61233        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61234      fi
61235    fi
61236  fi
61237
61238
61239    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61241$as_echo_n "checking for freetype includes... " >&6; }
61242    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61243$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61244    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61246$as_echo_n "checking for freetype libraries... " >&6; }
61247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61248$as_echo "$FREETYPE_LIB_PATH" >&6; }
61249  fi
61250
61251              fi
61252            fi
61253          fi
61254        else
61255          FREETYPE_BASE_DIR="$SYSROOT/usr"
61256
61257  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61258  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61259  METHOD="well-known location"
61260
61261  # Let's start with an optimistic view of the world :-)
61262  FOUND_FREETYPE=yes
61263
61264  # First look for the canonical freetype main include file ft2build.h.
61265  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61266    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61267    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61268    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61269      # Fail.
61270      FOUND_FREETYPE=no
61271    fi
61272  fi
61273
61274  if test "x$FOUND_FREETYPE" = xyes; then
61275    # Include file found, let's continue the sanity check.
61276    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61277$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61278
61279    # Reset to default value
61280    FREETYPE_BASE_NAME=freetype
61281    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61282    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61283      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61284          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61285        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61286        # for the .6 version explicitly.
61287        FREETYPE_BASE_NAME=freetype.6
61288        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61289        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61290$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61291      else
61292        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61293$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61294        FOUND_FREETYPE=no
61295      fi
61296    else
61297      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61298        # On Windows, we will need both .lib and .dll file.
61299        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61300          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61301$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61302          FOUND_FREETYPE=no
61303        fi
61304      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61305          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61306        # Found lib in isa dir, use that instead.
61307        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61308        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61309$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61310      fi
61311    fi
61312  fi
61313
61314  if test "x$FOUND_FREETYPE" = xyes; then
61315
61316  # Only process if variable expands to non-empty
61317
61318  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61319    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61320
61321  # Input might be given as Windows format, start by converting to
61322  # unix format.
61323  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61324  new_path=`$CYGPATH -u "$path"`
61325
61326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61329  # "foo.exe" is OK but "foo" is an error.
61330  #
61331  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61332  # It is also a way to make sure we got the proper file name for the real test later on.
61333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61334  if test "x$test_shortpath" = x; then
61335    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61336$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61337    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61338  fi
61339
61340  # Call helper function which possibly converts this using DOS-style short mode.
61341  # If so, the updated path is stored in $new_path.
61342
61343  input_path="$new_path"
61344  # Check if we need to convert this using DOS-style short mode. If the path
61345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61346  # take no chances and rewrite it.
61347  # Note: m4 eats our [], so we need to use [ and ] instead.
61348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61349  if test "x$has_forbidden_chars" != x; then
61350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61354      # Going to short mode and back again did indeed matter. Since short mode is
61355      # case insensitive, let's make it lowercase to improve readability.
61356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61357      # Now convert it back to Unix-style (cygpath)
61358      input_path=`$CYGPATH -u "$shortmode_path"`
61359      new_path="$input_path"
61360    fi
61361  fi
61362
61363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61364  if test "x$test_cygdrive_prefix" = x; then
61365    # As a simple fix, exclude /usr/bin since it's not a real path.
61366    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61368      # a path prefixed by /cygdrive for fixpath to work.
61369      new_path="$CYGWIN_ROOT_PATH$input_path"
61370    fi
61371  fi
61372
61373
61374  if test "x$path" != "x$new_path"; then
61375    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61376    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61377$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61378  fi
61379
61380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61381
61382  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61383  has_colon=`$ECHO $path | $GREP ^.:`
61384  new_path="$path"
61385  if test "x$has_colon" = x; then
61386    # Not in mixed or Windows style, start by that.
61387    new_path=`cmd //c echo $path`
61388  fi
61389
61390
61391  input_path="$new_path"
61392  # Check if we need to convert this using DOS-style short mode. If the path
61393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61394  # take no chances and rewrite it.
61395  # Note: m4 eats our [], so we need to use [ and ] instead.
61396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61397  if test "x$has_forbidden_chars" != x; then
61398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61400  fi
61401
61402
61403  windows_path="$new_path"
61404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61405    unix_path=`$CYGPATH -u "$windows_path"`
61406    new_path="$unix_path"
61407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61409    new_path="$unix_path"
61410  fi
61411
61412  if test "x$path" != "x$new_path"; then
61413    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61415$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61416  fi
61417
61418  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61419  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61420
61421    else
61422      # We're on a unix platform. Hooray! :)
61423      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61424      has_space=`$ECHO "$path" | $GREP " "`
61425      if test "x$has_space" != x; then
61426        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61427$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61428        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61429      fi
61430
61431      # Use eval to expand a potential ~
61432      eval path="$path"
61433      if test ! -f "$path" && test ! -d "$path"; then
61434        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61435      fi
61436
61437      if test -d "$path"; then
61438        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61439      else
61440        dir="`$DIRNAME "$path"`"
61441        base="`$BASENAME "$path"`"
61442        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61443      fi
61444    fi
61445  fi
61446
61447
61448  # Only process if variable expands to non-empty
61449
61450  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61451    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61452
61453  # Input might be given as Windows format, start by converting to
61454  # unix format.
61455  path="$POTENTIAL_FREETYPE_LIB_PATH"
61456  new_path=`$CYGPATH -u "$path"`
61457
61458  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61459  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61460  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61461  # "foo.exe" is OK but "foo" is an error.
61462  #
61463  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61464  # It is also a way to make sure we got the proper file name for the real test later on.
61465  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61466  if test "x$test_shortpath" = x; then
61467    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61468$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61469    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61470  fi
61471
61472  # Call helper function which possibly converts this using DOS-style short mode.
61473  # If so, the updated path is stored in $new_path.
61474
61475  input_path="$new_path"
61476  # Check if we need to convert this using DOS-style short mode. If the path
61477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61478  # take no chances and rewrite it.
61479  # Note: m4 eats our [], so we need to use [ and ] instead.
61480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61481  if test "x$has_forbidden_chars" != x; then
61482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61486      # Going to short mode and back again did indeed matter. Since short mode is
61487      # case insensitive, let's make it lowercase to improve readability.
61488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61489      # Now convert it back to Unix-style (cygpath)
61490      input_path=`$CYGPATH -u "$shortmode_path"`
61491      new_path="$input_path"
61492    fi
61493  fi
61494
61495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61496  if test "x$test_cygdrive_prefix" = x; then
61497    # As a simple fix, exclude /usr/bin since it's not a real path.
61498    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61500      # a path prefixed by /cygdrive for fixpath to work.
61501      new_path="$CYGWIN_ROOT_PATH$input_path"
61502    fi
61503  fi
61504
61505
61506  if test "x$path" != "x$new_path"; then
61507    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61509$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61510  fi
61511
61512    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61513
61514  path="$POTENTIAL_FREETYPE_LIB_PATH"
61515  has_colon=`$ECHO $path | $GREP ^.:`
61516  new_path="$path"
61517  if test "x$has_colon" = x; then
61518    # Not in mixed or Windows style, start by that.
61519    new_path=`cmd //c echo $path`
61520  fi
61521
61522
61523  input_path="$new_path"
61524  # Check if we need to convert this using DOS-style short mode. If the path
61525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61526  # take no chances and rewrite it.
61527  # Note: m4 eats our [], so we need to use [ and ] instead.
61528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61529  if test "x$has_forbidden_chars" != x; then
61530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61531    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61532  fi
61533
61534
61535  windows_path="$new_path"
61536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61537    unix_path=`$CYGPATH -u "$windows_path"`
61538    new_path="$unix_path"
61539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61541    new_path="$unix_path"
61542  fi
61543
61544  if test "x$path" != "x$new_path"; then
61545    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61548  fi
61549
61550  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61551  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61552
61553    else
61554      # We're on a unix platform. Hooray! :)
61555      path="$POTENTIAL_FREETYPE_LIB_PATH"
61556      has_space=`$ECHO "$path" | $GREP " "`
61557      if test "x$has_space" != x; then
61558        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61559$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61560        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61561      fi
61562
61563      # Use eval to expand a potential ~
61564      eval path="$path"
61565      if test ! -f "$path" && test ! -d "$path"; then
61566        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61567      fi
61568
61569      if test -d "$path"; then
61570        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61571      else
61572        dir="`$DIRNAME "$path"`"
61573        base="`$BASENAME "$path"`"
61574        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61575      fi
61576    fi
61577  fi
61578
61579
61580    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61582$as_echo_n "checking for freetype includes... " >&6; }
61583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61584$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61585    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61586    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61587$as_echo_n "checking for freetype libraries... " >&6; }
61588    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61589$as_echo "$FREETYPE_LIB_PATH" >&6; }
61590  fi
61591
61592
61593          if test "x$FOUND_FREETYPE" != xyes; then
61594            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61595
61596  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61597  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61598  METHOD="well-known location"
61599
61600  # Let's start with an optimistic view of the world :-)
61601  FOUND_FREETYPE=yes
61602
61603  # First look for the canonical freetype main include file ft2build.h.
61604  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61605    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61606    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61607    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61608      # Fail.
61609      FOUND_FREETYPE=no
61610    fi
61611  fi
61612
61613  if test "x$FOUND_FREETYPE" = xyes; then
61614    # Include file found, let's continue the sanity check.
61615    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61616$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61617
61618    # Reset to default value
61619    FREETYPE_BASE_NAME=freetype
61620    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61621    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61622      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61623          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61624        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61625        # for the .6 version explicitly.
61626        FREETYPE_BASE_NAME=freetype.6
61627        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61628        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61629$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61630      else
61631        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61632$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61633        FOUND_FREETYPE=no
61634      fi
61635    else
61636      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61637        # On Windows, we will need both .lib and .dll file.
61638        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61639          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61640$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61641          FOUND_FREETYPE=no
61642        fi
61643      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61644          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61645        # Found lib in isa dir, use that instead.
61646        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61647        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61648$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61649      fi
61650    fi
61651  fi
61652
61653  if test "x$FOUND_FREETYPE" = xyes; then
61654
61655  # Only process if variable expands to non-empty
61656
61657  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61659
61660  # Input might be given as Windows format, start by converting to
61661  # unix format.
61662  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61663  new_path=`$CYGPATH -u "$path"`
61664
61665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61668  # "foo.exe" is OK but "foo" is an error.
61669  #
61670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61671  # It is also a way to make sure we got the proper file name for the real test later on.
61672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61673  if test "x$test_shortpath" = x; then
61674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61675$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61676    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61677  fi
61678
61679  # Call helper function which possibly converts this using DOS-style short mode.
61680  # If so, the updated path is stored in $new_path.
61681
61682  input_path="$new_path"
61683  # Check if we need to convert this using DOS-style short mode. If the path
61684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61685  # take no chances and rewrite it.
61686  # Note: m4 eats our [], so we need to use [ and ] instead.
61687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61688  if test "x$has_forbidden_chars" != x; then
61689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61693      # Going to short mode and back again did indeed matter. Since short mode is
61694      # case insensitive, let's make it lowercase to improve readability.
61695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61696      # Now convert it back to Unix-style (cygpath)
61697      input_path=`$CYGPATH -u "$shortmode_path"`
61698      new_path="$input_path"
61699    fi
61700  fi
61701
61702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61703  if test "x$test_cygdrive_prefix" = x; then
61704    # As a simple fix, exclude /usr/bin since it's not a real path.
61705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61707      # a path prefixed by /cygdrive for fixpath to work.
61708      new_path="$CYGWIN_ROOT_PATH$input_path"
61709    fi
61710  fi
61711
61712
61713  if test "x$path" != "x$new_path"; then
61714    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61716$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61717  fi
61718
61719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61720
61721  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61722  has_colon=`$ECHO $path | $GREP ^.:`
61723  new_path="$path"
61724  if test "x$has_colon" = x; then
61725    # Not in mixed or Windows style, start by that.
61726    new_path=`cmd //c echo $path`
61727  fi
61728
61729
61730  input_path="$new_path"
61731  # Check if we need to convert this using DOS-style short mode. If the path
61732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61733  # take no chances and rewrite it.
61734  # Note: m4 eats our [], so we need to use [ and ] instead.
61735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61736  if test "x$has_forbidden_chars" != x; then
61737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61739  fi
61740
61741
61742  windows_path="$new_path"
61743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61744    unix_path=`$CYGPATH -u "$windows_path"`
61745    new_path="$unix_path"
61746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61748    new_path="$unix_path"
61749  fi
61750
61751  if test "x$path" != "x$new_path"; then
61752    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61754$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61755  fi
61756
61757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61759
61760    else
61761      # We're on a unix platform. Hooray! :)
61762      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61763      has_space=`$ECHO "$path" | $GREP " "`
61764      if test "x$has_space" != x; then
61765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61766$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61767        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61768      fi
61769
61770      # Use eval to expand a potential ~
61771      eval path="$path"
61772      if test ! -f "$path" && test ! -d "$path"; then
61773        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61774      fi
61775
61776      if test -d "$path"; then
61777        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61778      else
61779        dir="`$DIRNAME "$path"`"
61780        base="`$BASENAME "$path"`"
61781        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61782      fi
61783    fi
61784  fi
61785
61786
61787  # Only process if variable expands to non-empty
61788
61789  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61791
61792  # Input might be given as Windows format, start by converting to
61793  # unix format.
61794  path="$POTENTIAL_FREETYPE_LIB_PATH"
61795  new_path=`$CYGPATH -u "$path"`
61796
61797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61800  # "foo.exe" is OK but "foo" is an error.
61801  #
61802  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61803  # It is also a way to make sure we got the proper file name for the real test later on.
61804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61805  if test "x$test_shortpath" = x; then
61806    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61807$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61808    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61809  fi
61810
61811  # Call helper function which possibly converts this using DOS-style short mode.
61812  # If so, the updated path is stored in $new_path.
61813
61814  input_path="$new_path"
61815  # Check if we need to convert this using DOS-style short mode. If the path
61816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61817  # take no chances and rewrite it.
61818  # Note: m4 eats our [], so we need to use [ and ] instead.
61819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61820  if test "x$has_forbidden_chars" != x; then
61821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61825      # Going to short mode and back again did indeed matter. Since short mode is
61826      # case insensitive, let's make it lowercase to improve readability.
61827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61828      # Now convert it back to Unix-style (cygpath)
61829      input_path=`$CYGPATH -u "$shortmode_path"`
61830      new_path="$input_path"
61831    fi
61832  fi
61833
61834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61835  if test "x$test_cygdrive_prefix" = x; then
61836    # As a simple fix, exclude /usr/bin since it's not a real path.
61837    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61839      # a path prefixed by /cygdrive for fixpath to work.
61840      new_path="$CYGWIN_ROOT_PATH$input_path"
61841    fi
61842  fi
61843
61844
61845  if test "x$path" != "x$new_path"; then
61846    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61848$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61849  fi
61850
61851    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61852
61853  path="$POTENTIAL_FREETYPE_LIB_PATH"
61854  has_colon=`$ECHO $path | $GREP ^.:`
61855  new_path="$path"
61856  if test "x$has_colon" = x; then
61857    # Not in mixed or Windows style, start by that.
61858    new_path=`cmd //c echo $path`
61859  fi
61860
61861
61862  input_path="$new_path"
61863  # Check if we need to convert this using DOS-style short mode. If the path
61864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61865  # take no chances and rewrite it.
61866  # Note: m4 eats our [], so we need to use [ and ] instead.
61867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61868  if test "x$has_forbidden_chars" != x; then
61869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61871  fi
61872
61873
61874  windows_path="$new_path"
61875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61876    unix_path=`$CYGPATH -u "$windows_path"`
61877    new_path="$unix_path"
61878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61880    new_path="$unix_path"
61881  fi
61882
61883  if test "x$path" != "x$new_path"; then
61884    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61886$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61887  fi
61888
61889  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61890  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61891
61892    else
61893      # We're on a unix platform. Hooray! :)
61894      path="$POTENTIAL_FREETYPE_LIB_PATH"
61895      has_space=`$ECHO "$path" | $GREP " "`
61896      if test "x$has_space" != x; then
61897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61898$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61899        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61900      fi
61901
61902      # Use eval to expand a potential ~
61903      eval path="$path"
61904      if test ! -f "$path" && test ! -d "$path"; then
61905        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61906      fi
61907
61908      if test -d "$path"; then
61909        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61910      else
61911        dir="`$DIRNAME "$path"`"
61912        base="`$BASENAME "$path"`"
61913        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61914      fi
61915    fi
61916  fi
61917
61918
61919    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61921$as_echo_n "checking for freetype includes... " >&6; }
61922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61923$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61924    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61926$as_echo_n "checking for freetype libraries... " >&6; }
61927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61928$as_echo "$FREETYPE_LIB_PATH" >&6; }
61929  fi
61930
61931          fi
61932          if test "x$FOUND_FREETYPE" != xyes; then
61933            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61934
61935  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61936  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61937  METHOD="well-known location"
61938
61939  # Let's start with an optimistic view of the world :-)
61940  FOUND_FREETYPE=yes
61941
61942  # First look for the canonical freetype main include file ft2build.h.
61943  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61944    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61945    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61946    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61947      # Fail.
61948      FOUND_FREETYPE=no
61949    fi
61950  fi
61951
61952  if test "x$FOUND_FREETYPE" = xyes; then
61953    # Include file found, let's continue the sanity check.
61954    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61955$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61956
61957    # Reset to default value
61958    FREETYPE_BASE_NAME=freetype
61959    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61960    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61961      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61962          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61963        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61964        # for the .6 version explicitly.
61965        FREETYPE_BASE_NAME=freetype.6
61966        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61967        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61968$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61969      else
61970        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61971$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61972        FOUND_FREETYPE=no
61973      fi
61974    else
61975      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61976        # On Windows, we will need both .lib and .dll file.
61977        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61978          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61979$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61980          FOUND_FREETYPE=no
61981        fi
61982      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61983          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61984        # Found lib in isa dir, use that instead.
61985        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61986        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61987$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61988      fi
61989    fi
61990  fi
61991
61992  if test "x$FOUND_FREETYPE" = xyes; then
61993
61994  # Only process if variable expands to non-empty
61995
61996  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61998
61999  # Input might be given as Windows format, start by converting to
62000  # unix format.
62001  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62002  new_path=`$CYGPATH -u "$path"`
62003
62004  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62005  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62006  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62007  # "foo.exe" is OK but "foo" is an error.
62008  #
62009  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62010  # It is also a way to make sure we got the proper file name for the real test later on.
62011  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62012  if test "x$test_shortpath" = x; then
62013    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62014$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62015    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62016  fi
62017
62018  # Call helper function which possibly converts this using DOS-style short mode.
62019  # If so, the updated path is stored in $new_path.
62020
62021  input_path="$new_path"
62022  # Check if we need to convert this using DOS-style short mode. If the path
62023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62024  # take no chances and rewrite it.
62025  # Note: m4 eats our [], so we need to use [ and ] instead.
62026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62027  if test "x$has_forbidden_chars" != x; then
62028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62032      # Going to short mode and back again did indeed matter. Since short mode is
62033      # case insensitive, let's make it lowercase to improve readability.
62034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62035      # Now convert it back to Unix-style (cygpath)
62036      input_path=`$CYGPATH -u "$shortmode_path"`
62037      new_path="$input_path"
62038    fi
62039  fi
62040
62041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62042  if test "x$test_cygdrive_prefix" = x; then
62043    # As a simple fix, exclude /usr/bin since it's not a real path.
62044    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62046      # a path prefixed by /cygdrive for fixpath to work.
62047      new_path="$CYGWIN_ROOT_PATH$input_path"
62048    fi
62049  fi
62050
62051
62052  if test "x$path" != "x$new_path"; then
62053    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62055$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62056  fi
62057
62058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62059
62060  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62061  has_colon=`$ECHO $path | $GREP ^.:`
62062  new_path="$path"
62063  if test "x$has_colon" = x; then
62064    # Not in mixed or Windows style, start by that.
62065    new_path=`cmd //c echo $path`
62066  fi
62067
62068
62069  input_path="$new_path"
62070  # Check if we need to convert this using DOS-style short mode. If the path
62071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62072  # take no chances and rewrite it.
62073  # Note: m4 eats our [], so we need to use [ and ] instead.
62074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62075  if test "x$has_forbidden_chars" != x; then
62076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62078  fi
62079
62080
62081  windows_path="$new_path"
62082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62083    unix_path=`$CYGPATH -u "$windows_path"`
62084    new_path="$unix_path"
62085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62087    new_path="$unix_path"
62088  fi
62089
62090  if test "x$path" != "x$new_path"; then
62091    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62093$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62094  fi
62095
62096  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62097  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62098
62099    else
62100      # We're on a unix platform. Hooray! :)
62101      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62102      has_space=`$ECHO "$path" | $GREP " "`
62103      if test "x$has_space" != x; then
62104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62105$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62106        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62107      fi
62108
62109      # Use eval to expand a potential ~
62110      eval path="$path"
62111      if test ! -f "$path" && test ! -d "$path"; then
62112        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62113      fi
62114
62115      if test -d "$path"; then
62116        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62117      else
62118        dir="`$DIRNAME "$path"`"
62119        base="`$BASENAME "$path"`"
62120        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62121      fi
62122    fi
62123  fi
62124
62125
62126  # Only process if variable expands to non-empty
62127
62128  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62129    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62130
62131  # Input might be given as Windows format, start by converting to
62132  # unix format.
62133  path="$POTENTIAL_FREETYPE_LIB_PATH"
62134  new_path=`$CYGPATH -u "$path"`
62135
62136  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62137  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62138  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62139  # "foo.exe" is OK but "foo" is an error.
62140  #
62141  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62142  # It is also a way to make sure we got the proper file name for the real test later on.
62143  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62144  if test "x$test_shortpath" = x; then
62145    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62146$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62147    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62148  fi
62149
62150  # Call helper function which possibly converts this using DOS-style short mode.
62151  # If so, the updated path is stored in $new_path.
62152
62153  input_path="$new_path"
62154  # Check if we need to convert this using DOS-style short mode. If the path
62155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62156  # take no chances and rewrite it.
62157  # Note: m4 eats our [], so we need to use [ and ] instead.
62158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62159  if test "x$has_forbidden_chars" != x; then
62160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62164      # Going to short mode and back again did indeed matter. Since short mode is
62165      # case insensitive, let's make it lowercase to improve readability.
62166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62167      # Now convert it back to Unix-style (cygpath)
62168      input_path=`$CYGPATH -u "$shortmode_path"`
62169      new_path="$input_path"
62170    fi
62171  fi
62172
62173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62174  if test "x$test_cygdrive_prefix" = x; then
62175    # As a simple fix, exclude /usr/bin since it's not a real path.
62176    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62178      # a path prefixed by /cygdrive for fixpath to work.
62179      new_path="$CYGWIN_ROOT_PATH$input_path"
62180    fi
62181  fi
62182
62183
62184  if test "x$path" != "x$new_path"; then
62185    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62186    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62187$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62188  fi
62189
62190    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62191
62192  path="$POTENTIAL_FREETYPE_LIB_PATH"
62193  has_colon=`$ECHO $path | $GREP ^.:`
62194  new_path="$path"
62195  if test "x$has_colon" = x; then
62196    # Not in mixed or Windows style, start by that.
62197    new_path=`cmd //c echo $path`
62198  fi
62199
62200
62201  input_path="$new_path"
62202  # Check if we need to convert this using DOS-style short mode. If the path
62203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62204  # take no chances and rewrite it.
62205  # Note: m4 eats our [], so we need to use [ and ] instead.
62206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62207  if test "x$has_forbidden_chars" != x; then
62208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62209    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62210  fi
62211
62212
62213  windows_path="$new_path"
62214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62215    unix_path=`$CYGPATH -u "$windows_path"`
62216    new_path="$unix_path"
62217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62219    new_path="$unix_path"
62220  fi
62221
62222  if test "x$path" != "x$new_path"; then
62223    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62224    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62225$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62226  fi
62227
62228  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62229  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62230
62231    else
62232      # We're on a unix platform. Hooray! :)
62233      path="$POTENTIAL_FREETYPE_LIB_PATH"
62234      has_space=`$ECHO "$path" | $GREP " "`
62235      if test "x$has_space" != x; then
62236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62237$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62238        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62239      fi
62240
62241      # Use eval to expand a potential ~
62242      eval path="$path"
62243      if test ! -f "$path" && test ! -d "$path"; then
62244        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62245      fi
62246
62247      if test -d "$path"; then
62248        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62249      else
62250        dir="`$DIRNAME "$path"`"
62251        base="`$BASENAME "$path"`"
62252        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62253      fi
62254    fi
62255  fi
62256
62257
62258    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62259    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62260$as_echo_n "checking for freetype includes... " >&6; }
62261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62262$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62263    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62264    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62265$as_echo_n "checking for freetype libraries... " >&6; }
62266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62267$as_echo "$FREETYPE_LIB_PATH" >&6; }
62268  fi
62269
62270          fi
62271
62272          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
62273            if test "x$FOUND_FREETYPE" != xyes; then
62274              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
62275              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
62276
62277  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62278  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62279  METHOD="well-known location"
62280
62281  # Let's start with an optimistic view of the world :-)
62282  FOUND_FREETYPE=yes
62283
62284  # First look for the canonical freetype main include file ft2build.h.
62285  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62286    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62287    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62288    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62289      # Fail.
62290      FOUND_FREETYPE=no
62291    fi
62292  fi
62293
62294  if test "x$FOUND_FREETYPE" = xyes; then
62295    # Include file found, let's continue the sanity check.
62296    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62297$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62298
62299    # Reset to default value
62300    FREETYPE_BASE_NAME=freetype
62301    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62302    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62303      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62304          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62305        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62306        # for the .6 version explicitly.
62307        FREETYPE_BASE_NAME=freetype.6
62308        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62309        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62310$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62311      else
62312        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62313$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62314        FOUND_FREETYPE=no
62315      fi
62316    else
62317      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62318        # On Windows, we will need both .lib and .dll file.
62319        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62320          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62321$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62322          FOUND_FREETYPE=no
62323        fi
62324      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62325          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62326        # Found lib in isa dir, use that instead.
62327        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62328        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62329$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62330      fi
62331    fi
62332  fi
62333
62334  if test "x$FOUND_FREETYPE" = xyes; then
62335
62336  # Only process if variable expands to non-empty
62337
62338  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62340
62341  # Input might be given as Windows format, start by converting to
62342  # unix format.
62343  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62344  new_path=`$CYGPATH -u "$path"`
62345
62346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62349  # "foo.exe" is OK but "foo" is an error.
62350  #
62351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62352  # It is also a way to make sure we got the proper file name for the real test later on.
62353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62354  if test "x$test_shortpath" = x; then
62355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62356$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62357    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62358  fi
62359
62360  # Call helper function which possibly converts this using DOS-style short mode.
62361  # If so, the updated path is stored in $new_path.
62362
62363  input_path="$new_path"
62364  # Check if we need to convert this using DOS-style short mode. If the path
62365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62366  # take no chances and rewrite it.
62367  # Note: m4 eats our [], so we need to use [ and ] instead.
62368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62369  if test "x$has_forbidden_chars" != x; then
62370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62374      # Going to short mode and back again did indeed matter. Since short mode is
62375      # case insensitive, let's make it lowercase to improve readability.
62376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62377      # Now convert it back to Unix-style (cygpath)
62378      input_path=`$CYGPATH -u "$shortmode_path"`
62379      new_path="$input_path"
62380    fi
62381  fi
62382
62383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62384  if test "x$test_cygdrive_prefix" = x; then
62385    # As a simple fix, exclude /usr/bin since it's not a real path.
62386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62388      # a path prefixed by /cygdrive for fixpath to work.
62389      new_path="$CYGWIN_ROOT_PATH$input_path"
62390    fi
62391  fi
62392
62393
62394  if test "x$path" != "x$new_path"; then
62395    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62397$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62398  fi
62399
62400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62401
62402  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62403  has_colon=`$ECHO $path | $GREP ^.:`
62404  new_path="$path"
62405  if test "x$has_colon" = x; then
62406    # Not in mixed or Windows style, start by that.
62407    new_path=`cmd //c echo $path`
62408  fi
62409
62410
62411  input_path="$new_path"
62412  # Check if we need to convert this using DOS-style short mode. If the path
62413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62414  # take no chances and rewrite it.
62415  # Note: m4 eats our [], so we need to use [ and ] instead.
62416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62417  if test "x$has_forbidden_chars" != x; then
62418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62420  fi
62421
62422
62423  windows_path="$new_path"
62424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62425    unix_path=`$CYGPATH -u "$windows_path"`
62426    new_path="$unix_path"
62427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62429    new_path="$unix_path"
62430  fi
62431
62432  if test "x$path" != "x$new_path"; then
62433    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62435$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62436  fi
62437
62438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62440
62441    else
62442      # We're on a unix platform. Hooray! :)
62443      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62444      has_space=`$ECHO "$path" | $GREP " "`
62445      if test "x$has_space" != x; then
62446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62447$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62449      fi
62450
62451      # Use eval to expand a potential ~
62452      eval path="$path"
62453      if test ! -f "$path" && test ! -d "$path"; then
62454        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62455      fi
62456
62457      if test -d "$path"; then
62458        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62459      else
62460        dir="`$DIRNAME "$path"`"
62461        base="`$BASENAME "$path"`"
62462        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62463      fi
62464    fi
62465  fi
62466
62467
62468  # Only process if variable expands to non-empty
62469
62470  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62472
62473  # Input might be given as Windows format, start by converting to
62474  # unix format.
62475  path="$POTENTIAL_FREETYPE_LIB_PATH"
62476  new_path=`$CYGPATH -u "$path"`
62477
62478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62481  # "foo.exe" is OK but "foo" is an error.
62482  #
62483  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62484  # It is also a way to make sure we got the proper file name for the real test later on.
62485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62486  if test "x$test_shortpath" = x; then
62487    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62488$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62489    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62490  fi
62491
62492  # Call helper function which possibly converts this using DOS-style short mode.
62493  # If so, the updated path is stored in $new_path.
62494
62495  input_path="$new_path"
62496  # Check if we need to convert this using DOS-style short mode. If the path
62497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62498  # take no chances and rewrite it.
62499  # Note: m4 eats our [], so we need to use [ and ] instead.
62500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62501  if test "x$has_forbidden_chars" != x; then
62502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62503    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62504    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62505    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62506      # Going to short mode and back again did indeed matter. Since short mode is
62507      # case insensitive, let's make it lowercase to improve readability.
62508      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62509      # Now convert it back to Unix-style (cygpath)
62510      input_path=`$CYGPATH -u "$shortmode_path"`
62511      new_path="$input_path"
62512    fi
62513  fi
62514
62515  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62516  if test "x$test_cygdrive_prefix" = x; then
62517    # As a simple fix, exclude /usr/bin since it's not a real path.
62518    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62519      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62520      # a path prefixed by /cygdrive for fixpath to work.
62521      new_path="$CYGWIN_ROOT_PATH$input_path"
62522    fi
62523  fi
62524
62525
62526  if test "x$path" != "x$new_path"; then
62527    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62529$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62530  fi
62531
62532    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62533
62534  path="$POTENTIAL_FREETYPE_LIB_PATH"
62535  has_colon=`$ECHO $path | $GREP ^.:`
62536  new_path="$path"
62537  if test "x$has_colon" = x; then
62538    # Not in mixed or Windows style, start by that.
62539    new_path=`cmd //c echo $path`
62540  fi
62541
62542
62543  input_path="$new_path"
62544  # Check if we need to convert this using DOS-style short mode. If the path
62545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62546  # take no chances and rewrite it.
62547  # Note: m4 eats our [], so we need to use [ and ] instead.
62548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62549  if test "x$has_forbidden_chars" != x; then
62550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62551    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62552  fi
62553
62554
62555  windows_path="$new_path"
62556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62557    unix_path=`$CYGPATH -u "$windows_path"`
62558    new_path="$unix_path"
62559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62561    new_path="$unix_path"
62562  fi
62563
62564  if test "x$path" != "x$new_path"; then
62565    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62567$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62568  fi
62569
62570  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62571  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62572
62573    else
62574      # We're on a unix platform. Hooray! :)
62575      path="$POTENTIAL_FREETYPE_LIB_PATH"
62576      has_space=`$ECHO "$path" | $GREP " "`
62577      if test "x$has_space" != x; then
62578        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62579$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62580        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62581      fi
62582
62583      # Use eval to expand a potential ~
62584      eval path="$path"
62585      if test ! -f "$path" && test ! -d "$path"; then
62586        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62587      fi
62588
62589      if test -d "$path"; then
62590        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62591      else
62592        dir="`$DIRNAME "$path"`"
62593        base="`$BASENAME "$path"`"
62594        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62595      fi
62596    fi
62597  fi
62598
62599
62600    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62602$as_echo_n "checking for freetype includes... " >&6; }
62603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62604$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62605    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62607$as_echo_n "checking for freetype libraries... " >&6; }
62608    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62609$as_echo "$FREETYPE_LIB_PATH" >&6; }
62610  fi
62611
62612            fi
62613          fi
62614
62615          if test "x$FOUND_FREETYPE" != xyes; then
62616            FREETYPE_BASE_DIR="$SYSROOT/usr"
62617            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62618
62619  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62620  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu"
62621  METHOD="well-known location"
62622
62623  # Let's start with an optimistic view of the world :-)
62624  FOUND_FREETYPE=yes
62625
62626  # First look for the canonical freetype main include file ft2build.h.
62627  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62628    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62629    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62630    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62631      # Fail.
62632      FOUND_FREETYPE=no
62633    fi
62634  fi
62635
62636  if test "x$FOUND_FREETYPE" = xyes; then
62637    # Include file found, let's continue the sanity check.
62638    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62639$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62640
62641    # Reset to default value
62642    FREETYPE_BASE_NAME=freetype
62643    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62644    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62645      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62646          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62647        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62648        # for the .6 version explicitly.
62649        FREETYPE_BASE_NAME=freetype.6
62650        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62651        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62652$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62653      else
62654        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62655$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62656        FOUND_FREETYPE=no
62657      fi
62658    else
62659      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62660        # On Windows, we will need both .lib and .dll file.
62661        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62662          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62663$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62664          FOUND_FREETYPE=no
62665        fi
62666      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62667          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62668        # Found lib in isa dir, use that instead.
62669        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62670        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62671$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62672      fi
62673    fi
62674  fi
62675
62676  if test "x$FOUND_FREETYPE" = xyes; then
62677
62678  # Only process if variable expands to non-empty
62679
62680  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62682
62683  # Input might be given as Windows format, start by converting to
62684  # unix format.
62685  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62686  new_path=`$CYGPATH -u "$path"`
62687
62688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62691  # "foo.exe" is OK but "foo" is an error.
62692  #
62693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62694  # It is also a way to make sure we got the proper file name for the real test later on.
62695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62696  if test "x$test_shortpath" = x; then
62697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62698$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62699    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62700  fi
62701
62702  # Call helper function which possibly converts this using DOS-style short mode.
62703  # If so, the updated path is stored in $new_path.
62704
62705  input_path="$new_path"
62706  # Check if we need to convert this using DOS-style short mode. If the path
62707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62708  # take no chances and rewrite it.
62709  # Note: m4 eats our [], so we need to use [ and ] instead.
62710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62711  if test "x$has_forbidden_chars" != x; then
62712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62716      # Going to short mode and back again did indeed matter. Since short mode is
62717      # case insensitive, let's make it lowercase to improve readability.
62718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62719      # Now convert it back to Unix-style (cygpath)
62720      input_path=`$CYGPATH -u "$shortmode_path"`
62721      new_path="$input_path"
62722    fi
62723  fi
62724
62725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62726  if test "x$test_cygdrive_prefix" = x; then
62727    # As a simple fix, exclude /usr/bin since it's not a real path.
62728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62730      # a path prefixed by /cygdrive for fixpath to work.
62731      new_path="$CYGWIN_ROOT_PATH$input_path"
62732    fi
62733  fi
62734
62735
62736  if test "x$path" != "x$new_path"; then
62737    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62739$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62740  fi
62741
62742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62743
62744  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62745  has_colon=`$ECHO $path | $GREP ^.:`
62746  new_path="$path"
62747  if test "x$has_colon" = x; then
62748    # Not in mixed or Windows style, start by that.
62749    new_path=`cmd //c echo $path`
62750  fi
62751
62752
62753  input_path="$new_path"
62754  # Check if we need to convert this using DOS-style short mode. If the path
62755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62756  # take no chances and rewrite it.
62757  # Note: m4 eats our [], so we need to use [ and ] instead.
62758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62759  if test "x$has_forbidden_chars" != x; then
62760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62762  fi
62763
62764
62765  windows_path="$new_path"
62766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62767    unix_path=`$CYGPATH -u "$windows_path"`
62768    new_path="$unix_path"
62769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62771    new_path="$unix_path"
62772  fi
62773
62774  if test "x$path" != "x$new_path"; then
62775    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62777$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62778  fi
62779
62780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62782
62783    else
62784      # We're on a unix platform. Hooray! :)
62785      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62786      has_space=`$ECHO "$path" | $GREP " "`
62787      if test "x$has_space" != x; then
62788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62789$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62790        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62791      fi
62792
62793      # Use eval to expand a potential ~
62794      eval path="$path"
62795      if test ! -f "$path" && test ! -d "$path"; then
62796        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62797      fi
62798
62799      if test -d "$path"; then
62800        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62801      else
62802        dir="`$DIRNAME "$path"`"
62803        base="`$BASENAME "$path"`"
62804        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62805      fi
62806    fi
62807  fi
62808
62809
62810  # Only process if variable expands to non-empty
62811
62812  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62814
62815  # Input might be given as Windows format, start by converting to
62816  # unix format.
62817  path="$POTENTIAL_FREETYPE_LIB_PATH"
62818  new_path=`$CYGPATH -u "$path"`
62819
62820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62823  # "foo.exe" is OK but "foo" is an error.
62824  #
62825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62826  # It is also a way to make sure we got the proper file name for the real test later on.
62827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62828  if test "x$test_shortpath" = x; then
62829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62830$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62831    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62832  fi
62833
62834  # Call helper function which possibly converts this using DOS-style short mode.
62835  # If so, the updated path is stored in $new_path.
62836
62837  input_path="$new_path"
62838  # Check if we need to convert this using DOS-style short mode. If the path
62839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62840  # take no chances and rewrite it.
62841  # Note: m4 eats our [], so we need to use [ and ] instead.
62842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62843  if test "x$has_forbidden_chars" != x; then
62844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62848      # Going to short mode and back again did indeed matter. Since short mode is
62849      # case insensitive, let's make it lowercase to improve readability.
62850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62851      # Now convert it back to Unix-style (cygpath)
62852      input_path=`$CYGPATH -u "$shortmode_path"`
62853      new_path="$input_path"
62854    fi
62855  fi
62856
62857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62858  if test "x$test_cygdrive_prefix" = x; then
62859    # As a simple fix, exclude /usr/bin since it's not a real path.
62860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62862      # a path prefixed by /cygdrive for fixpath to work.
62863      new_path="$CYGWIN_ROOT_PATH$input_path"
62864    fi
62865  fi
62866
62867
62868  if test "x$path" != "x$new_path"; then
62869    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62871$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62872  fi
62873
62874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62875
62876  path="$POTENTIAL_FREETYPE_LIB_PATH"
62877  has_colon=`$ECHO $path | $GREP ^.:`
62878  new_path="$path"
62879  if test "x$has_colon" = x; then
62880    # Not in mixed or Windows style, start by that.
62881    new_path=`cmd //c echo $path`
62882  fi
62883
62884
62885  input_path="$new_path"
62886  # Check if we need to convert this using DOS-style short mode. If the path
62887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62888  # take no chances and rewrite it.
62889  # Note: m4 eats our [], so we need to use [ and ] instead.
62890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62891  if test "x$has_forbidden_chars" != x; then
62892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62894  fi
62895
62896
62897  windows_path="$new_path"
62898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62899    unix_path=`$CYGPATH -u "$windows_path"`
62900    new_path="$unix_path"
62901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62903    new_path="$unix_path"
62904  fi
62905
62906  if test "x$path" != "x$new_path"; then
62907    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62909$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62910  fi
62911
62912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62914
62915    else
62916      # We're on a unix platform. Hooray! :)
62917      path="$POTENTIAL_FREETYPE_LIB_PATH"
62918      has_space=`$ECHO "$path" | $GREP " "`
62919      if test "x$has_space" != x; then
62920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62921$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62922        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62923      fi
62924
62925      # Use eval to expand a potential ~
62926      eval path="$path"
62927      if test ! -f "$path" && test ! -d "$path"; then
62928        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62929      fi
62930
62931      if test -d "$path"; then
62932        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62933      else
62934        dir="`$DIRNAME "$path"`"
62935        base="`$BASENAME "$path"`"
62936        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62937      fi
62938    fi
62939  fi
62940
62941
62942    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62944$as_echo_n "checking for freetype includes... " >&6; }
62945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62946$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62947    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62949$as_echo_n "checking for freetype libraries... " >&6; }
62950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62951$as_echo "$FREETYPE_LIB_PATH" >&6; }
62952  fi
62953
62954            else
62955
62956  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62957  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62958  METHOD="well-known location"
62959
62960  # Let's start with an optimistic view of the world :-)
62961  FOUND_FREETYPE=yes
62962
62963  # First look for the canonical freetype main include file ft2build.h.
62964  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62965    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62966    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62967    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62968      # Fail.
62969      FOUND_FREETYPE=no
62970    fi
62971  fi
62972
62973  if test "x$FOUND_FREETYPE" = xyes; then
62974    # Include file found, let's continue the sanity check.
62975    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62976$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62977
62978    # Reset to default value
62979    FREETYPE_BASE_NAME=freetype
62980    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62981    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62982      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62983          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62984        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62985        # for the .6 version explicitly.
62986        FREETYPE_BASE_NAME=freetype.6
62987        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62988        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62989$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62990      else
62991        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62992$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62993        FOUND_FREETYPE=no
62994      fi
62995    else
62996      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62997        # On Windows, we will need both .lib and .dll file.
62998        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62999          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63000$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63001          FOUND_FREETYPE=no
63002        fi
63003      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63004          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63005        # Found lib in isa dir, use that instead.
63006        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63007        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63008$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63009      fi
63010    fi
63011  fi
63012
63013  if test "x$FOUND_FREETYPE" = xyes; then
63014
63015  # Only process if variable expands to non-empty
63016
63017  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63018    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63019
63020  # Input might be given as Windows format, start by converting to
63021  # unix format.
63022  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63023  new_path=`$CYGPATH -u "$path"`
63024
63025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63028  # "foo.exe" is OK but "foo" is an error.
63029  #
63030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63031  # It is also a way to make sure we got the proper file name for the real test later on.
63032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63033  if test "x$test_shortpath" = x; then
63034    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63035$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63036    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63037  fi
63038
63039  # Call helper function which possibly converts this using DOS-style short mode.
63040  # If so, the updated path is stored in $new_path.
63041
63042  input_path="$new_path"
63043  # Check if we need to convert this using DOS-style short mode. If the path
63044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63045  # take no chances and rewrite it.
63046  # Note: m4 eats our [], so we need to use [ and ] instead.
63047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63048  if test "x$has_forbidden_chars" != x; then
63049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63053      # Going to short mode and back again did indeed matter. Since short mode is
63054      # case insensitive, let's make it lowercase to improve readability.
63055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63056      # Now convert it back to Unix-style (cygpath)
63057      input_path=`$CYGPATH -u "$shortmode_path"`
63058      new_path="$input_path"
63059    fi
63060  fi
63061
63062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63063  if test "x$test_cygdrive_prefix" = x; then
63064    # As a simple fix, exclude /usr/bin since it's not a real path.
63065    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63067      # a path prefixed by /cygdrive for fixpath to work.
63068      new_path="$CYGWIN_ROOT_PATH$input_path"
63069    fi
63070  fi
63071
63072
63073  if test "x$path" != "x$new_path"; then
63074    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63076$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63077  fi
63078
63079    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63080
63081  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63082  has_colon=`$ECHO $path | $GREP ^.:`
63083  new_path="$path"
63084  if test "x$has_colon" = x; then
63085    # Not in mixed or Windows style, start by that.
63086    new_path=`cmd //c echo $path`
63087  fi
63088
63089
63090  input_path="$new_path"
63091  # Check if we need to convert this using DOS-style short mode. If the path
63092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63093  # take no chances and rewrite it.
63094  # Note: m4 eats our [], so we need to use [ and ] instead.
63095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63096  if test "x$has_forbidden_chars" != x; then
63097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63099  fi
63100
63101
63102  windows_path="$new_path"
63103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63104    unix_path=`$CYGPATH -u "$windows_path"`
63105    new_path="$unix_path"
63106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63108    new_path="$unix_path"
63109  fi
63110
63111  if test "x$path" != "x$new_path"; then
63112    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63114$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63115  fi
63116
63117  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63118  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63119
63120    else
63121      # We're on a unix platform. Hooray! :)
63122      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63123      has_space=`$ECHO "$path" | $GREP " "`
63124      if test "x$has_space" != x; then
63125        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63126$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63127        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63128      fi
63129
63130      # Use eval to expand a potential ~
63131      eval path="$path"
63132      if test ! -f "$path" && test ! -d "$path"; then
63133        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63134      fi
63135
63136      if test -d "$path"; then
63137        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63138      else
63139        dir="`$DIRNAME "$path"`"
63140        base="`$BASENAME "$path"`"
63141        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63142      fi
63143    fi
63144  fi
63145
63146
63147  # Only process if variable expands to non-empty
63148
63149  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63151
63152  # Input might be given as Windows format, start by converting to
63153  # unix format.
63154  path="$POTENTIAL_FREETYPE_LIB_PATH"
63155  new_path=`$CYGPATH -u "$path"`
63156
63157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63160  # "foo.exe" is OK but "foo" is an error.
63161  #
63162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63163  # It is also a way to make sure we got the proper file name for the real test later on.
63164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63165  if test "x$test_shortpath" = x; then
63166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63167$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63168    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63169  fi
63170
63171  # Call helper function which possibly converts this using DOS-style short mode.
63172  # If so, the updated path is stored in $new_path.
63173
63174  input_path="$new_path"
63175  # Check if we need to convert this using DOS-style short mode. If the path
63176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63177  # take no chances and rewrite it.
63178  # Note: m4 eats our [], so we need to use [ and ] instead.
63179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63180  if test "x$has_forbidden_chars" != x; then
63181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63185      # Going to short mode and back again did indeed matter. Since short mode is
63186      # case insensitive, let's make it lowercase to improve readability.
63187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63188      # Now convert it back to Unix-style (cygpath)
63189      input_path=`$CYGPATH -u "$shortmode_path"`
63190      new_path="$input_path"
63191    fi
63192  fi
63193
63194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63195  if test "x$test_cygdrive_prefix" = x; then
63196    # As a simple fix, exclude /usr/bin since it's not a real path.
63197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63199      # a path prefixed by /cygdrive for fixpath to work.
63200      new_path="$CYGWIN_ROOT_PATH$input_path"
63201    fi
63202  fi
63203
63204
63205  if test "x$path" != "x$new_path"; then
63206    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63208$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63209  fi
63210
63211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63212
63213  path="$POTENTIAL_FREETYPE_LIB_PATH"
63214  has_colon=`$ECHO $path | $GREP ^.:`
63215  new_path="$path"
63216  if test "x$has_colon" = x; then
63217    # Not in mixed or Windows style, start by that.
63218    new_path=`cmd //c echo $path`
63219  fi
63220
63221
63222  input_path="$new_path"
63223  # Check if we need to convert this using DOS-style short mode. If the path
63224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63225  # take no chances and rewrite it.
63226  # Note: m4 eats our [], so we need to use [ and ] instead.
63227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63228  if test "x$has_forbidden_chars" != x; then
63229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63231  fi
63232
63233
63234  windows_path="$new_path"
63235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63236    unix_path=`$CYGPATH -u "$windows_path"`
63237    new_path="$unix_path"
63238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63240    new_path="$unix_path"
63241  fi
63242
63243  if test "x$path" != "x$new_path"; then
63244    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63246$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63247  fi
63248
63249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63251
63252    else
63253      # We're on a unix platform. Hooray! :)
63254      path="$POTENTIAL_FREETYPE_LIB_PATH"
63255      has_space=`$ECHO "$path" | $GREP " "`
63256      if test "x$has_space" != x; then
63257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63258$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63260      fi
63261
63262      # Use eval to expand a potential ~
63263      eval path="$path"
63264      if test ! -f "$path" && test ! -d "$path"; then
63265        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63266      fi
63267
63268      if test -d "$path"; then
63269        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63270      else
63271        dir="`$DIRNAME "$path"`"
63272        base="`$BASENAME "$path"`"
63273        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63274      fi
63275    fi
63276  fi
63277
63278
63279    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63280    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63281$as_echo_n "checking for freetype includes... " >&6; }
63282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63283$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63284    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63285    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63286$as_echo_n "checking for freetype libraries... " >&6; }
63287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63288$as_echo "$FREETYPE_LIB_PATH" >&6; }
63289  fi
63290
63291              if test "x$FOUND_FREETYPE" != xyes; then
63292
63293  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63294  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
63295  METHOD="well-known location"
63296
63297  # Let's start with an optimistic view of the world :-)
63298  FOUND_FREETYPE=yes
63299
63300  # First look for the canonical freetype main include file ft2build.h.
63301  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63302    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63303    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63304    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63305      # Fail.
63306      FOUND_FREETYPE=no
63307    fi
63308  fi
63309
63310  if test "x$FOUND_FREETYPE" = xyes; then
63311    # Include file found, let's continue the sanity check.
63312    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63313$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63314
63315    # Reset to default value
63316    FREETYPE_BASE_NAME=freetype
63317    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63318    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63319      if test "x$OPENJDK_TARGET_OS" = xmacosx \
63320          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63321        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63322        # for the .6 version explicitly.
63323        FREETYPE_BASE_NAME=freetype.6
63324        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63325        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63326$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63327      else
63328        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63329$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63330        FOUND_FREETYPE=no
63331      fi
63332    else
63333      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63334        # On Windows, we will need both .lib and .dll file.
63335        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63336          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63337$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63338          FOUND_FREETYPE=no
63339        fi
63340      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63341          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63342        # Found lib in isa dir, use that instead.
63343        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63344        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63345$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63346      fi
63347    fi
63348  fi
63349
63350  if test "x$FOUND_FREETYPE" = xyes; then
63351
63352  # Only process if variable expands to non-empty
63353
63354  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63355    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63356
63357  # Input might be given as Windows format, start by converting to
63358  # unix format.
63359  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63360  new_path=`$CYGPATH -u "$path"`
63361
63362  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63363  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63364  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63365  # "foo.exe" is OK but "foo" is an error.
63366  #
63367  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63368  # It is also a way to make sure we got the proper file name for the real test later on.
63369  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63370  if test "x$test_shortpath" = x; then
63371    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63372$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63373    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63374  fi
63375
63376  # Call helper function which possibly converts this using DOS-style short mode.
63377  # If so, the updated path is stored in $new_path.
63378
63379  input_path="$new_path"
63380  # Check if we need to convert this using DOS-style short mode. If the path
63381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63382  # take no chances and rewrite it.
63383  # Note: m4 eats our [], so we need to use [ and ] instead.
63384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63385  if test "x$has_forbidden_chars" != x; then
63386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63387    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63388    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63389    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63390      # Going to short mode and back again did indeed matter. Since short mode is
63391      # case insensitive, let's make it lowercase to improve readability.
63392      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63393      # Now convert it back to Unix-style (cygpath)
63394      input_path=`$CYGPATH -u "$shortmode_path"`
63395      new_path="$input_path"
63396    fi
63397  fi
63398
63399  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63400  if test "x$test_cygdrive_prefix" = x; then
63401    # As a simple fix, exclude /usr/bin since it's not a real path.
63402    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63403      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63404      # a path prefixed by /cygdrive for fixpath to work.
63405      new_path="$CYGWIN_ROOT_PATH$input_path"
63406    fi
63407  fi
63408
63409
63410  if test "x$path" != "x$new_path"; then
63411    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63413$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63414  fi
63415
63416    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63417
63418  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63419  has_colon=`$ECHO $path | $GREP ^.:`
63420  new_path="$path"
63421  if test "x$has_colon" = x; then
63422    # Not in mixed or Windows style, start by that.
63423    new_path=`cmd //c echo $path`
63424  fi
63425
63426
63427  input_path="$new_path"
63428  # Check if we need to convert this using DOS-style short mode. If the path
63429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63430  # take no chances and rewrite it.
63431  # Note: m4 eats our [], so we need to use [ and ] instead.
63432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63433  if test "x$has_forbidden_chars" != x; then
63434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63435    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63436  fi
63437
63438
63439  windows_path="$new_path"
63440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63441    unix_path=`$CYGPATH -u "$windows_path"`
63442    new_path="$unix_path"
63443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63445    new_path="$unix_path"
63446  fi
63447
63448  if test "x$path" != "x$new_path"; then
63449    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63451$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63452  fi
63453
63454  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63455  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63456
63457    else
63458      # We're on a unix platform. Hooray! :)
63459      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63460      has_space=`$ECHO "$path" | $GREP " "`
63461      if test "x$has_space" != x; then
63462        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63463$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63464        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63465      fi
63466
63467      # Use eval to expand a potential ~
63468      eval path="$path"
63469      if test ! -f "$path" && test ! -d "$path"; then
63470        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63471      fi
63472
63473      if test -d "$path"; then
63474        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63475      else
63476        dir="`$DIRNAME "$path"`"
63477        base="`$BASENAME "$path"`"
63478        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63479      fi
63480    fi
63481  fi
63482
63483
63484  # Only process if variable expands to non-empty
63485
63486  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63487    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63488
63489  # Input might be given as Windows format, start by converting to
63490  # unix format.
63491  path="$POTENTIAL_FREETYPE_LIB_PATH"
63492  new_path=`$CYGPATH -u "$path"`
63493
63494  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63495  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63496  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63497  # "foo.exe" is OK but "foo" is an error.
63498  #
63499  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63500  # It is also a way to make sure we got the proper file name for the real test later on.
63501  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63502  if test "x$test_shortpath" = x; then
63503    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63504$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63505    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63506  fi
63507
63508  # Call helper function which possibly converts this using DOS-style short mode.
63509  # If so, the updated path is stored in $new_path.
63510
63511  input_path="$new_path"
63512  # Check if we need to convert this using DOS-style short mode. If the path
63513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63514  # take no chances and rewrite it.
63515  # Note: m4 eats our [], so we need to use [ and ] instead.
63516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63517  if test "x$has_forbidden_chars" != x; then
63518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63519    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63520    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63521    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63522      # Going to short mode and back again did indeed matter. Since short mode is
63523      # case insensitive, let's make it lowercase to improve readability.
63524      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63525      # Now convert it back to Unix-style (cygpath)
63526      input_path=`$CYGPATH -u "$shortmode_path"`
63527      new_path="$input_path"
63528    fi
63529  fi
63530
63531  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63532  if test "x$test_cygdrive_prefix" = x; then
63533    # As a simple fix, exclude /usr/bin since it's not a real path.
63534    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63535      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63536      # a path prefixed by /cygdrive for fixpath to work.
63537      new_path="$CYGWIN_ROOT_PATH$input_path"
63538    fi
63539  fi
63540
63541
63542  if test "x$path" != "x$new_path"; then
63543    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63545$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63546  fi
63547
63548    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63549
63550  path="$POTENTIAL_FREETYPE_LIB_PATH"
63551  has_colon=`$ECHO $path | $GREP ^.:`
63552  new_path="$path"
63553  if test "x$has_colon" = x; then
63554    # Not in mixed or Windows style, start by that.
63555    new_path=`cmd //c echo $path`
63556  fi
63557
63558
63559  input_path="$new_path"
63560  # Check if we need to convert this using DOS-style short mode. If the path
63561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63562  # take no chances and rewrite it.
63563  # Note: m4 eats our [], so we need to use [ and ] instead.
63564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63565  if test "x$has_forbidden_chars" != x; then
63566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63567    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63568  fi
63569
63570
63571  windows_path="$new_path"
63572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63573    unix_path=`$CYGPATH -u "$windows_path"`
63574    new_path="$unix_path"
63575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63577    new_path="$unix_path"
63578  fi
63579
63580  if test "x$path" != "x$new_path"; then
63581    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63582    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63583$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63584  fi
63585
63586  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63587  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63588
63589    else
63590      # We're on a unix platform. Hooray! :)
63591      path="$POTENTIAL_FREETYPE_LIB_PATH"
63592      has_space=`$ECHO "$path" | $GREP " "`
63593      if test "x$has_space" != x; then
63594        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63595$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63596        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63597      fi
63598
63599      # Use eval to expand a potential ~
63600      eval path="$path"
63601      if test ! -f "$path" && test ! -d "$path"; then
63602        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63603      fi
63604
63605      if test -d "$path"; then
63606        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63607      else
63608        dir="`$DIRNAME "$path"`"
63609        base="`$BASENAME "$path"`"
63610        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63611      fi
63612    fi
63613  fi
63614
63615
63616    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63618$as_echo_n "checking for freetype includes... " >&6; }
63619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63620$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63621    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63623$as_echo_n "checking for freetype libraries... " >&6; }
63624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63625$as_echo "$FREETYPE_LIB_PATH" >&6; }
63626  fi
63627
63628              fi
63629            fi
63630          fi
63631        fi
63632      fi # end check in well-known locations
63633
63634      if test "x$FOUND_FREETYPE" != xyes; then
63635
63636  # Print a helpful message on how to acquire the necessary build dependency.
63637  # freetype is the help tag: freetype, cups, alsa etc
63638  MISSING_DEPENDENCY=freetype
63639
63640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63641    cygwin_help $MISSING_DEPENDENCY
63642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63643    msys_help $MISSING_DEPENDENCY
63644  else
63645    PKGHANDLER_COMMAND=
63646
63647    case $PKGHANDLER in
63648      apt-get)
63649        apt_help     $MISSING_DEPENDENCY ;;
63650      yum)
63651        yum_help     $MISSING_DEPENDENCY ;;
63652      brew)
63653        brew_help    $MISSING_DEPENDENCY ;;
63654      port)
63655        port_help    $MISSING_DEPENDENCY ;;
63656      pkgutil)
63657        pkgutil_help $MISSING_DEPENDENCY ;;
63658      pkgadd)
63659        pkgadd_help  $MISSING_DEPENDENCY ;;
63660    esac
63661
63662    if test "x$PKGHANDLER_COMMAND" != x; then
63663      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63664    fi
63665  fi
63666
63667        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63668      fi
63669    fi # end user specified settings
63670
63671    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63672    if test "x$FREETYPE_CFLAGS" = x; then
63673
63674  # Only process if variable expands to non-empty
63675
63676  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63677    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63678
63679  # Input might be given as Windows format, start by converting to
63680  # unix format.
63681  path="$FREETYPE_INCLUDE_PATH"
63682  new_path=`$CYGPATH -u "$path"`
63683
63684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63687  # "foo.exe" is OK but "foo" is an error.
63688  #
63689  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63690  # It is also a way to make sure we got the proper file name for the real test later on.
63691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63692  if test "x$test_shortpath" = x; then
63693    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63694$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63695    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63696  fi
63697
63698  # Call helper function which possibly converts this using DOS-style short mode.
63699  # If so, the updated path is stored in $new_path.
63700
63701  input_path="$new_path"
63702  # Check if we need to convert this using DOS-style short mode. If the path
63703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63704  # take no chances and rewrite it.
63705  # Note: m4 eats our [], so we need to use [ and ] instead.
63706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63707  if test "x$has_forbidden_chars" != x; then
63708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63712      # Going to short mode and back again did indeed matter. Since short mode is
63713      # case insensitive, let's make it lowercase to improve readability.
63714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63715      # Now convert it back to Unix-style (cygpath)
63716      input_path=`$CYGPATH -u "$shortmode_path"`
63717      new_path="$input_path"
63718    fi
63719  fi
63720
63721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63722  if test "x$test_cygdrive_prefix" = x; then
63723    # As a simple fix, exclude /usr/bin since it's not a real path.
63724    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63726      # a path prefixed by /cygdrive for fixpath to work.
63727      new_path="$CYGWIN_ROOT_PATH$input_path"
63728    fi
63729  fi
63730
63731
63732  if test "x$path" != "x$new_path"; then
63733    FREETYPE_INCLUDE_PATH="$new_path"
63734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63735$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63736  fi
63737
63738    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63739
63740  path="$FREETYPE_INCLUDE_PATH"
63741  has_colon=`$ECHO $path | $GREP ^.:`
63742  new_path="$path"
63743  if test "x$has_colon" = x; then
63744    # Not in mixed or Windows style, start by that.
63745    new_path=`cmd //c echo $path`
63746  fi
63747
63748
63749  input_path="$new_path"
63750  # Check if we need to convert this using DOS-style short mode. If the path
63751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63752  # take no chances and rewrite it.
63753  # Note: m4 eats our [], so we need to use [ and ] instead.
63754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63755  if test "x$has_forbidden_chars" != x; then
63756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63757    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63758  fi
63759
63760
63761  windows_path="$new_path"
63762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63763    unix_path=`$CYGPATH -u "$windows_path"`
63764    new_path="$unix_path"
63765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63767    new_path="$unix_path"
63768  fi
63769
63770  if test "x$path" != "x$new_path"; then
63771    FREETYPE_INCLUDE_PATH="$new_path"
63772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63773$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63774  fi
63775
63776  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63777  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63778
63779    else
63780      # We're on a unix platform. Hooray! :)
63781      path="$FREETYPE_INCLUDE_PATH"
63782      has_space=`$ECHO "$path" | $GREP " "`
63783      if test "x$has_space" != x; then
63784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63785$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63786        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63787      fi
63788
63789      # Use eval to expand a potential ~
63790      eval path="$path"
63791      if test ! -f "$path" && test ! -d "$path"; then
63792        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63793      fi
63794
63795      if test -d "$path"; then
63796        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63797      else
63798        dir="`$DIRNAME "$path"`"
63799        base="`$BASENAME "$path"`"
63800        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63801      fi
63802    fi
63803  fi
63804
63805      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63806        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63807      else
63808        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63809      fi
63810    fi
63811
63812    if test "x$FREETYPE_LIBS" = x; then
63813
63814  # Only process if variable expands to non-empty
63815
63816  if test "x$FREETYPE_LIB_PATH" != x; then
63817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63818
63819  # Input might be given as Windows format, start by converting to
63820  # unix format.
63821  path="$FREETYPE_LIB_PATH"
63822  new_path=`$CYGPATH -u "$path"`
63823
63824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63827  # "foo.exe" is OK but "foo" is an error.
63828  #
63829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63830  # It is also a way to make sure we got the proper file name for the real test later on.
63831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63832  if test "x$test_shortpath" = x; then
63833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63834$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63835    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63836  fi
63837
63838  # Call helper function which possibly converts this using DOS-style short mode.
63839  # If so, the updated path is stored in $new_path.
63840
63841  input_path="$new_path"
63842  # Check if we need to convert this using DOS-style short mode. If the path
63843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63844  # take no chances and rewrite it.
63845  # Note: m4 eats our [], so we need to use [ and ] instead.
63846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63847  if test "x$has_forbidden_chars" != x; then
63848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63852      # Going to short mode and back again did indeed matter. Since short mode is
63853      # case insensitive, let's make it lowercase to improve readability.
63854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63855      # Now convert it back to Unix-style (cygpath)
63856      input_path=`$CYGPATH -u "$shortmode_path"`
63857      new_path="$input_path"
63858    fi
63859  fi
63860
63861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63862  if test "x$test_cygdrive_prefix" = x; then
63863    # As a simple fix, exclude /usr/bin since it's not a real path.
63864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63866      # a path prefixed by /cygdrive for fixpath to work.
63867      new_path="$CYGWIN_ROOT_PATH$input_path"
63868    fi
63869  fi
63870
63871
63872  if test "x$path" != "x$new_path"; then
63873    FREETYPE_LIB_PATH="$new_path"
63874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63875$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63876  fi
63877
63878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63879
63880  path="$FREETYPE_LIB_PATH"
63881  has_colon=`$ECHO $path | $GREP ^.:`
63882  new_path="$path"
63883  if test "x$has_colon" = x; then
63884    # Not in mixed or Windows style, start by that.
63885    new_path=`cmd //c echo $path`
63886  fi
63887
63888
63889  input_path="$new_path"
63890  # Check if we need to convert this using DOS-style short mode. If the path
63891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63892  # take no chances and rewrite it.
63893  # Note: m4 eats our [], so we need to use [ and ] instead.
63894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63895  if test "x$has_forbidden_chars" != x; then
63896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63898  fi
63899
63900
63901  windows_path="$new_path"
63902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63903    unix_path=`$CYGPATH -u "$windows_path"`
63904    new_path="$unix_path"
63905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63907    new_path="$unix_path"
63908  fi
63909
63910  if test "x$path" != "x$new_path"; then
63911    FREETYPE_LIB_PATH="$new_path"
63912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63913$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63914  fi
63915
63916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63918
63919    else
63920      # We're on a unix platform. Hooray! :)
63921      path="$FREETYPE_LIB_PATH"
63922      has_space=`$ECHO "$path" | $GREP " "`
63923      if test "x$has_space" != x; then
63924        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63925$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63926        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63927      fi
63928
63929      # Use eval to expand a potential ~
63930      eval path="$path"
63931      if test ! -f "$path" && test ! -d "$path"; then
63932        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63933      fi
63934
63935      if test -d "$path"; then
63936        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63937      else
63938        dir="`$DIRNAME "$path"`"
63939        base="`$BASENAME "$path"`"
63940        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63941      fi
63942    fi
63943  fi
63944
63945      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63946        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63947      else
63948        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63949      fi
63950    fi
63951
63952    # Try to compile it
63953    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63954$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63955    ac_ext=cpp
63956ac_cpp='$CXXCPP $CPPFLAGS'
63957ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63958ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63959ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63960
63961    PREV_CXXCFLAGS="$CXXFLAGS"
63962    PREV_LIBS="$LIBS"
63963    PREV_CXX="$CXX"
63964    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63965    LIBS="$LIBS $FREETYPE_LIBS"
63966    CXX="$FIXPATH $CXX"
63967    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63968/* end confdefs.h.  */
63969
63970          #include<ft2build.h>
63971          #include FT_FREETYPE_H
63972          int main () {
63973            FT_Init_FreeType(NULL);
63974            return 0;
63975          }
63976
63977_ACEOF
63978if ac_fn_cxx_try_link "$LINENO"; then :
63979
63980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63981$as_echo "yes" >&6; }
63982
63983else
63984
63985          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63986$as_echo "no" >&6; }
63987          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63988$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63989          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63990$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63991
63992
63993  # Print a helpful message on how to acquire the necessary build dependency.
63994  # freetype is the help tag: freetype, cups, alsa etc
63995  MISSING_DEPENDENCY=freetype
63996
63997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63998    cygwin_help $MISSING_DEPENDENCY
63999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64000    msys_help $MISSING_DEPENDENCY
64001  else
64002    PKGHANDLER_COMMAND=
64003
64004    case $PKGHANDLER in
64005      apt-get)
64006        apt_help     $MISSING_DEPENDENCY ;;
64007      yum)
64008        yum_help     $MISSING_DEPENDENCY ;;
64009      brew)
64010        brew_help    $MISSING_DEPENDENCY ;;
64011      port)
64012        port_help    $MISSING_DEPENDENCY ;;
64013      pkgutil)
64014        pkgutil_help $MISSING_DEPENDENCY ;;
64015      pkgadd)
64016        pkgadd_help  $MISSING_DEPENDENCY ;;
64017    esac
64018
64019    if test "x$PKGHANDLER_COMMAND" != x; then
64020      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64021    fi
64022  fi
64023
64024
64025          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
64026
64027
64028fi
64029rm -f core conftest.err conftest.$ac_objext \
64030    conftest$ac_exeext conftest.$ac_ext
64031    CXXCFLAGS="$PREV_CXXFLAGS"
64032    LIBS="$PREV_LIBS"
64033    CXX="$PREV_CXX"
64034    ac_ext=cpp
64035ac_cpp='$CXXCPP $CPPFLAGS'
64036ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64037ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64038ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64039
64040
64041    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
64042$as_echo_n "checking if we should bundle freetype... " >&6; }
64043    if test "x$BUNDLE_FREETYPE" = xyes; then
64044      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
64045    fi
64046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
64047$as_echo "$BUNDLE_FREETYPE" >&6; }
64048
64049  fi # end freetype needed
64050
64051  FREETYPE_LICENSE=""
64052  if test "x$with_freetype_license" = "xyes"; then
64053    as_fn_error $? "--with-freetype-license must have a value" "$LINENO" 5
64054  elif test "x$with_freetype_license" != "x"; then
64055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype license" >&5
64056$as_echo_n "checking for freetype license... " >&6; }
64057    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freetype_license" >&5
64058$as_echo "$with_freetype_license" >&6; }
64059    FREETYPE_LICENSE="$with_freetype_license"
64060
64061  # Only process if variable expands to non-empty
64062
64063  if test "x$FREETYPE_LICENSE" != x; then
64064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64065
64066  # Input might be given as Windows format, start by converting to
64067  # unix format.
64068  path="$FREETYPE_LICENSE"
64069  new_path=`$CYGPATH -u "$path"`
64070
64071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64074  # "foo.exe" is OK but "foo" is an error.
64075  #
64076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64077  # It is also a way to make sure we got the proper file name for the real test later on.
64078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64079  if test "x$test_shortpath" = x; then
64080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64081$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64082    as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
64083  fi
64084
64085  # Call helper function which possibly converts this using DOS-style short mode.
64086  # If so, the updated path is stored in $new_path.
64087
64088  input_path="$new_path"
64089  # Check if we need to convert this using DOS-style short mode. If the path
64090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64091  # take no chances and rewrite it.
64092  # Note: m4 eats our [], so we need to use [ and ] instead.
64093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64094  if test "x$has_forbidden_chars" != x; then
64095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64099      # Going to short mode and back again did indeed matter. Since short mode is
64100      # case insensitive, let's make it lowercase to improve readability.
64101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64102      # Now convert it back to Unix-style (cygpath)
64103      input_path=`$CYGPATH -u "$shortmode_path"`
64104      new_path="$input_path"
64105    fi
64106  fi
64107
64108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64109  if test "x$test_cygdrive_prefix" = x; then
64110    # As a simple fix, exclude /usr/bin since it's not a real path.
64111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64113      # a path prefixed by /cygdrive for fixpath to work.
64114      new_path="$CYGWIN_ROOT_PATH$input_path"
64115    fi
64116  fi
64117
64118
64119  if test "x$path" != "x$new_path"; then
64120    FREETYPE_LICENSE="$new_path"
64121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64122$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64123  fi
64124
64125    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64126
64127  path="$FREETYPE_LICENSE"
64128  has_colon=`$ECHO $path | $GREP ^.:`
64129  new_path="$path"
64130  if test "x$has_colon" = x; then
64131    # Not in mixed or Windows style, start by that.
64132    new_path=`cmd //c echo $path`
64133  fi
64134
64135
64136  input_path="$new_path"
64137  # Check if we need to convert this using DOS-style short mode. If the path
64138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64139  # take no chances and rewrite it.
64140  # Note: m4 eats our [], so we need to use [ and ] instead.
64141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64142  if test "x$has_forbidden_chars" != x; then
64143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64145  fi
64146
64147
64148  windows_path="$new_path"
64149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64150    unix_path=`$CYGPATH -u "$windows_path"`
64151    new_path="$unix_path"
64152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64154    new_path="$unix_path"
64155  fi
64156
64157  if test "x$path" != "x$new_path"; then
64158    FREETYPE_LICENSE="$new_path"
64159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
64160$as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
64161  fi
64162
64163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64165
64166    else
64167      # We're on a unix platform. Hooray! :)
64168      path="$FREETYPE_LICENSE"
64169      has_space=`$ECHO "$path" | $GREP " "`
64170      if test "x$has_space" != x; then
64171        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
64172$as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
64173        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64174      fi
64175
64176      # Use eval to expand a potential ~
64177      eval path="$path"
64178      if test ! -f "$path" && test ! -d "$path"; then
64179        as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
64180      fi
64181
64182      if test -d "$path"; then
64183        FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
64184      else
64185        dir="`$DIRNAME "$path"`"
64186        base="`$BASENAME "$path"`"
64187        FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
64188      fi
64189    fi
64190  fi
64191
64192    if test ! -f "$FREETYPE_LICENSE"; then
64193      as_fn_error $? "$FREETYPE_LICENSE cannot be found" "$LINENO" 5
64194    fi
64195  fi
64196
64197
64198
64199
64200
64201
64202
64203
64204# Check whether --with-alsa was given.
64205if test "${with_alsa+set}" = set; then :
64206  withval=$with_alsa;
64207fi
64208
64209
64210# Check whether --with-alsa-include was given.
64211if test "${with_alsa_include+set}" = set; then :
64212  withval=$with_alsa_include;
64213fi
64214
64215
64216# Check whether --with-alsa-lib was given.
64217if test "${with_alsa_lib+set}" = set; then :
64218  withval=$with_alsa_lib;
64219fi
64220
64221
64222  if test "x$NEEDS_LIB_ALSA" = xfalse; then
64223    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
64224        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
64225        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
64226      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
64227$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
64228    fi
64229    ALSA_CFLAGS=
64230    ALSA_LIBS=
64231  else
64232    ALSA_FOUND=no
64233
64234    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
64235      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
64236    fi
64237
64238    if test "x${with_alsa}" != x; then
64239      ALSA_LIBS="-L${with_alsa}/lib -lasound"
64240      ALSA_CFLAGS="-I${with_alsa}/include"
64241      ALSA_FOUND=yes
64242    fi
64243    if test "x${with_alsa_include}" != x; then
64244      ALSA_CFLAGS="-I${with_alsa_include}"
64245      ALSA_FOUND=yes
64246    fi
64247    if test "x${with_alsa_lib}" != x; then
64248      ALSA_LIBS="-L${with_alsa_lib} -lasound"
64249      ALSA_FOUND=yes
64250    fi
64251    # Do not try pkg-config if we have a sysroot set.
64252    if test "x$SYSROOT" = x; then
64253      if test "x$ALSA_FOUND" = xno; then
64254
64255pkg_failed=no
64256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
64257$as_echo_n "checking for ALSA... " >&6; }
64258
64259if test -n "$ALSA_CFLAGS"; then
64260    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
64261 elif test -n "$PKG_CONFIG"; then
64262    if test -n "$PKG_CONFIG" && \
64263    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64264  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64265  ac_status=$?
64266  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64267  test $ac_status = 0; }; then
64268  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
64269else
64270  pkg_failed=yes
64271fi
64272 else
64273    pkg_failed=untried
64274fi
64275if test -n "$ALSA_LIBS"; then
64276    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
64277 elif test -n "$PKG_CONFIG"; then
64278    if test -n "$PKG_CONFIG" && \
64279    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64280  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64281  ac_status=$?
64282  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64283  test $ac_status = 0; }; then
64284  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
64285else
64286  pkg_failed=yes
64287fi
64288 else
64289    pkg_failed=untried
64290fi
64291
64292
64293
64294if test $pkg_failed = yes; then
64295
64296if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64297        _pkg_short_errors_supported=yes
64298else
64299        _pkg_short_errors_supported=no
64300fi
64301        if test $_pkg_short_errors_supported = yes; then
64302	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
64303        else
64304	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
64305        fi
64306	# Put the nasty error message in config.log where it belongs
64307	echo "$ALSA_PKG_ERRORS" >&5
64308
64309	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64310$as_echo "no" >&6; }
64311                ALSA_FOUND=no
64312elif test $pkg_failed = untried; then
64313	ALSA_FOUND=no
64314else
64315	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
64316	ALSA_LIBS=$pkg_cv_ALSA_LIBS
64317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64318$as_echo "yes" >&6; }
64319	ALSA_FOUND=yes
64320fi
64321      fi
64322    fi
64323    if test "x$ALSA_FOUND" = xno; then
64324      for ac_header in alsa/asoundlib.h
64325do :
64326  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
64327if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
64328  cat >>confdefs.h <<_ACEOF
64329#define HAVE_ALSA_ASOUNDLIB_H 1
64330_ACEOF
64331
64332            ALSA_FOUND=yes
64333            ALSA_CFLAGS=-Iignoreme
64334            ALSA_LIBS=-lasound
64335            DEFAULT_ALSA=yes
64336
64337else
64338  ALSA_FOUND=no
64339
64340fi
64341
64342done
64343
64344    fi
64345    if test "x$ALSA_FOUND" = xno; then
64346
64347  # Print a helpful message on how to acquire the necessary build dependency.
64348  # alsa is the help tag: freetype, cups, alsa etc
64349  MISSING_DEPENDENCY=alsa
64350
64351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64352    cygwin_help $MISSING_DEPENDENCY
64353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64354    msys_help $MISSING_DEPENDENCY
64355  else
64356    PKGHANDLER_COMMAND=
64357
64358    case $PKGHANDLER in
64359      apt-get)
64360        apt_help     $MISSING_DEPENDENCY ;;
64361      yum)
64362        yum_help     $MISSING_DEPENDENCY ;;
64363      brew)
64364        brew_help    $MISSING_DEPENDENCY ;;
64365      port)
64366        port_help    $MISSING_DEPENDENCY ;;
64367      pkgutil)
64368        pkgutil_help $MISSING_DEPENDENCY ;;
64369      pkgadd)
64370        pkgadd_help  $MISSING_DEPENDENCY ;;
64371    esac
64372
64373    if test "x$PKGHANDLER_COMMAND" != x; then
64374      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64375    fi
64376  fi
64377
64378      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
64379    fi
64380  fi
64381
64382
64383
64384
64385
64386
64387# Check whether --with-libffi was given.
64388if test "${with_libffi+set}" = set; then :
64389  withval=$with_libffi;
64390fi
64391
64392
64393# Check whether --with-libffi-include was given.
64394if test "${with_libffi_include+set}" = set; then :
64395  withval=$with_libffi_include;
64396fi
64397
64398
64399# Check whether --with-libffi-lib was given.
64400if test "${with_libffi_lib+set}" = set; then :
64401  withval=$with_libffi_lib;
64402fi
64403
64404  # Check whether --enable-libffi-bundling was given.
64405if test "${enable_libffi_bundling+set}" = set; then :
64406  enableval=$enable_libffi_bundling;
64407fi
64408
64409
64410  if test "x$NEEDS_LIB_FFI" = xfalse; then
64411    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
64412        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
64413        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
64414      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
64415$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
64416    fi
64417    LIBFFI_CFLAGS=
64418    LIBFFI_LIBS=
64419  else
64420    LIBFFI_FOUND=no
64421
64422    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
64423      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
64424    fi
64425
64426    if test "x${with_libffi}" != x; then
64427      LIBFFI_LIB_PATH="${with_libffi}/lib"
64428      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
64429      LIBFFI_CFLAGS="-I${with_libffi}/include"
64430      LIBFFI_FOUND=yes
64431    fi
64432    if test "x${with_libffi_include}" != x; then
64433      LIBFFI_CFLAGS="-I${with_libffi_include}"
64434      LIBFFI_FOUND=yes
64435    fi
64436    if test "x${with_libffi_lib}" != x; then
64437      LIBFFI_LIB_PATH="${with_libffi_lib}"
64438      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
64439      LIBFFI_FOUND=yes
64440    fi
64441    # Do not try pkg-config if we have a sysroot set.
64442    if test "x$SYSROOT" = x; then
64443      if test "x$LIBFFI_FOUND" = xno; then
64444        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
64445
64446pkg_failed=no
64447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
64448$as_echo_n "checking for LIBFFI... " >&6; }
64449
64450if test -n "$LIBFFI_CFLAGS"; then
64451    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
64452 elif test -n "$PKG_CONFIG"; then
64453    if test -n "$PKG_CONFIG" && \
64454    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64455  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64456  ac_status=$?
64457  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64458  test $ac_status = 0; }; then
64459  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
64460else
64461  pkg_failed=yes
64462fi
64463 else
64464    pkg_failed=untried
64465fi
64466if test -n "$LIBFFI_LIBS"; then
64467    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
64468 elif test -n "$PKG_CONFIG"; then
64469    if test -n "$PKG_CONFIG" && \
64470    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64471  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64472  ac_status=$?
64473  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64474  test $ac_status = 0; }; then
64475  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
64476else
64477  pkg_failed=yes
64478fi
64479 else
64480    pkg_failed=untried
64481fi
64482
64483
64484
64485if test $pkg_failed = yes; then
64486
64487if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64488        _pkg_short_errors_supported=yes
64489else
64490        _pkg_short_errors_supported=no
64491fi
64492        if test $_pkg_short_errors_supported = yes; then
64493	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
64494        else
64495	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
64496        fi
64497	# Put the nasty error message in config.log where it belongs
64498	echo "$LIBFFI_PKG_ERRORS" >&5
64499
64500	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64501$as_echo "no" >&6; }
64502                LIBFFI_FOUND=no
64503elif test $pkg_failed = untried; then
64504	LIBFFI_FOUND=no
64505else
64506	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
64507	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
64508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64509$as_echo "yes" >&6; }
64510	LIBFFI_FOUND=yes
64511fi
64512      fi
64513    fi
64514    if test "x$LIBFFI_FOUND" = xno; then
64515      for ac_header in ffi.h
64516do :
64517  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
64518if test "x$ac_cv_header_ffi_h" = xyes; then :
64519  cat >>confdefs.h <<_ACEOF
64520#define HAVE_FFI_H 1
64521_ACEOF
64522
64523            LIBFFI_FOUND=yes
64524            LIBFFI_CFLAGS=
64525            LIBFFI_LIBS=-lffi
64526
64527else
64528  LIBFFI_FOUND=no
64529
64530fi
64531
64532done
64533
64534    fi
64535    if test "x$LIBFFI_FOUND" = xno; then
64536
64537  # Print a helpful message on how to acquire the necessary build dependency.
64538  # ffi is the help tag: freetype, cups, alsa etc
64539  MISSING_DEPENDENCY=ffi
64540
64541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64542    cygwin_help $MISSING_DEPENDENCY
64543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64544    msys_help $MISSING_DEPENDENCY
64545  else
64546    PKGHANDLER_COMMAND=
64547
64548    case $PKGHANDLER in
64549      apt-get)
64550        apt_help     $MISSING_DEPENDENCY ;;
64551      yum)
64552        yum_help     $MISSING_DEPENDENCY ;;
64553      brew)
64554        brew_help    $MISSING_DEPENDENCY ;;
64555      port)
64556        port_help    $MISSING_DEPENDENCY ;;
64557      pkgutil)
64558        pkgutil_help $MISSING_DEPENDENCY ;;
64559      pkgadd)
64560        pkgadd_help  $MISSING_DEPENDENCY ;;
64561    esac
64562
64563    if test "x$PKGHANDLER_COMMAND" != x; then
64564      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64565    fi
64566  fi
64567
64568      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
64569    fi
64570
64571    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
64572$as_echo_n "checking if libffi works... " >&6; }
64573    ac_ext=c
64574ac_cpp='$CPP $CPPFLAGS'
64575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64577ac_compiler_gnu=$ac_cv_c_compiler_gnu
64578
64579    OLD_CFLAGS="$CFLAGS"
64580    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
64581    OLD_LIBS="$LIBS"
64582    LIBS="$LIBS $LIBFFI_LIBS"
64583    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64584/* end confdefs.h.  */
64585#include <ffi.h>
64586int
64587main ()
64588{
64589
64590          ffi_call(NULL, NULL, NULL, NULL);
64591          return 0;
64592
64593  ;
64594  return 0;
64595}
64596_ACEOF
64597if ac_fn_c_try_link "$LINENO"; then :
64598  LIBFFI_WORKS=yes
64599else
64600  LIBFFI_WORKS=no
64601
64602fi
64603rm -f core conftest.err conftest.$ac_objext \
64604    conftest$ac_exeext conftest.$ac_ext
64605    CFLAGS="$OLD_CFLAGS"
64606    LIBS="$OLD_LIBS"
64607    ac_ext=cpp
64608ac_cpp='$CXXCPP $CPPFLAGS'
64609ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64610ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64611ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64612
64613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
64614$as_echo "$LIBFFI_WORKS" >&6; }
64615
64616    if test "x$LIBFFI_WORKS" = xno; then
64617
64618  # Print a helpful message on how to acquire the necessary build dependency.
64619  # ffi is the help tag: freetype, cups, alsa etc
64620  MISSING_DEPENDENCY=ffi
64621
64622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64623    cygwin_help $MISSING_DEPENDENCY
64624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64625    msys_help $MISSING_DEPENDENCY
64626  else
64627    PKGHANDLER_COMMAND=
64628
64629    case $PKGHANDLER in
64630      apt-get)
64631        apt_help     $MISSING_DEPENDENCY ;;
64632      yum)
64633        yum_help     $MISSING_DEPENDENCY ;;
64634      brew)
64635        brew_help    $MISSING_DEPENDENCY ;;
64636      port)
64637        port_help    $MISSING_DEPENDENCY ;;
64638      pkgutil)
64639        pkgutil_help $MISSING_DEPENDENCY ;;
64640      pkgadd)
64641        pkgadd_help  $MISSING_DEPENDENCY ;;
64642    esac
64643
64644    if test "x$PKGHANDLER_COMMAND" != x; then
64645      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64646    fi
64647  fi
64648
64649      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
64650    fi
64651
64652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
64653$as_echo_n "checking if libffi should be bundled... " >&6; }
64654    if test "x$enable_libffi_bundling" = "x"; then
64655      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64656$as_echo "no" >&6; }
64657      ENABLE_LIBFFI_BUNDLING=false
64658    elif  test "x$enable_libffi_bundling" = "xno"; then
64659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64660$as_echo "no, forced" >&6; }
64661      ENABLE_LIBFFI_BUNDLING=false
64662    elif  test "x$enable_libffi_bundling" = "xyes"; then
64663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64664$as_echo "yes, forced" >&6; }
64665      ENABLE_LIBFFI_BUNDLING=true
64666    else
64667      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
64668    fi
64669
64670    # Find the libffi.so.X to bundle
64671    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
64672      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
64673$as_echo_n "checking for libffi lib file location... " >&6; }
64674      if test "x${LIBFFI_LIB_PATH}" != x; then
64675        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64676          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64677        else
64678          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64679        fi
64680      else
64681        # If we don't have an explicit path, look in a few obvious places
64682        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64683          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64684            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64685          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64686            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64687          else
64688            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64689          fi
64690        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64691          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64692            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64693          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64694            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64695          else
64696            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64697          fi
64698        else
64699          # Fallback on the default /usr/lib dir
64700          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64701            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64702          else
64703            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64704          fi
64705        fi
64706      fi
64707      # Make sure the wildcard is evaluated
64708      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64709      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64710$as_echo "${LIBFFI_LIB_FILE}" >&6; }
64711    fi
64712  fi
64713
64714
64715
64716
64717
64718
64719
64720  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64721    # Extract the first word of "llvm-config", so it can be a program name with args.
64722set dummy llvm-config; ac_word=$2
64723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64724$as_echo_n "checking for $ac_word... " >&6; }
64725if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64726  $as_echo_n "(cached) " >&6
64727else
64728  if test -n "$LLVM_CONFIG"; then
64729  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64730else
64731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64732for as_dir in $PATH
64733do
64734  IFS=$as_save_IFS
64735  test -z "$as_dir" && as_dir=.
64736    for ac_exec_ext in '' $ac_executable_extensions; do
64737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64738    ac_cv_prog_LLVM_CONFIG="llvm-config"
64739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64740    break 2
64741  fi
64742done
64743  done
64744IFS=$as_save_IFS
64745
64746fi
64747fi
64748LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64749if test -n "$LLVM_CONFIG"; then
64750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64751$as_echo "$LLVM_CONFIG" >&6; }
64752else
64753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64754$as_echo "no" >&6; }
64755fi
64756
64757
64758
64759    if test "x$LLVM_CONFIG" != xllvm-config; then
64760      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64761    fi
64762
64763    llvm_components="jit mcjit engine nativecodegen native"
64764    unset LLVM_CFLAGS
64765    for flag in $("$LLVM_CONFIG" --cxxflags); do
64766      if echo "${flag}" | grep -q '^-[ID]'; then
64767        if test "${flag}" != "-D_DEBUG" ; then
64768          if test "${LLVM_CFLAGS}" != "" ; then
64769            LLVM_CFLAGS="${LLVM_CFLAGS} "
64770          fi
64771          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64772        fi
64773      fi
64774    done
64775    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64776    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64777
64778    unset LLVM_LDFLAGS
64779    for flag in $("${LLVM_CONFIG}" --ldflags); do
64780      if echo "${flag}" | grep -q '^-L'; then
64781        if test "${LLVM_LDFLAGS}" != ""; then
64782          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64783        fi
64784        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64785      fi
64786    done
64787
64788    unset LLVM_LIBS
64789    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64790      if echo "${flag}" | grep -q '^-l'; then
64791        if test "${LLVM_LIBS}" != ""; then
64792          LLVM_LIBS="${LLVM_LIBS} "
64793        fi
64794        LLVM_LIBS="${LLVM_LIBS}${flag}"
64795      fi
64796    done
64797
64798    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64799    # always properly detect -ltinfo
64800    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64801
64802
64803
64804
64805  fi
64806
64807
64808
64809# Check whether --with-libjpeg was given.
64810if test "${with_libjpeg+set}" = set; then :
64811  withval=$with_libjpeg;
64812fi
64813
64814
64815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64816$as_echo_n "checking for which libjpeg to use... " >&6; }
64817  # default is bundled
64818  DEFAULT_LIBJPEG=bundled
64819  # if user didn't specify, use DEFAULT_LIBJPEG
64820  if test "x${with_libjpeg}" = "x"; then
64821    with_libjpeg=${DEFAULT_LIBJPEG}
64822  fi
64823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64824$as_echo "${with_libjpeg}" >&6; }
64825
64826  if test "x${with_libjpeg}" = "xbundled"; then
64827    USE_EXTERNAL_LIBJPEG=false
64828  elif test "x${with_libjpeg}" = "xsystem"; then
64829    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64830if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64831
64832else
64833   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64834fi
64835
64836
64837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64838$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64839if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64840  $as_echo_n "(cached) " >&6
64841else
64842  ac_check_lib_save_LIBS=$LIBS
64843LIBS="-ljpeg  $LIBS"
64844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64845/* end confdefs.h.  */
64846
64847/* Override any GCC internal prototype to avoid an error.
64848   Use char because int might match the return type of a GCC
64849   builtin and then its argument prototype would still apply.  */
64850#ifdef __cplusplus
64851extern "C"
64852#endif
64853char jpeg_CreateDecompress ();
64854int
64855main ()
64856{
64857return jpeg_CreateDecompress ();
64858  ;
64859  return 0;
64860}
64861_ACEOF
64862if ac_fn_cxx_try_link "$LINENO"; then :
64863  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64864else
64865  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64866fi
64867rm -f core conftest.err conftest.$ac_objext \
64868    conftest$ac_exeext conftest.$ac_ext
64869LIBS=$ac_check_lib_save_LIBS
64870fi
64871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64872$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64873if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64874  cat >>confdefs.h <<_ACEOF
64875#define HAVE_LIBJPEG 1
64876_ACEOF
64877
64878  LIBS="-ljpeg $LIBS"
64879
64880else
64881   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64882fi
64883
64884
64885    USE_EXTERNAL_LIBJPEG=true
64886  else
64887    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64888  fi
64889
64890
64891
64892
64893
64894# Check whether --with-giflib was given.
64895if test "${with_giflib+set}" = set; then :
64896  withval=$with_giflib;
64897fi
64898
64899
64900  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64901$as_echo_n "checking for which giflib to use... " >&6; }
64902  # default is bundled
64903  DEFAULT_GIFLIB=bundled
64904  # if user didn't specify, use DEFAULT_GIFLIB
64905  if test "x${with_giflib}" = "x"; then
64906    with_giflib=${DEFAULT_GIFLIB}
64907  fi
64908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64909$as_echo "${with_giflib}" >&6; }
64910
64911  if test "x${with_giflib}" = "xbundled"; then
64912    USE_EXTERNAL_LIBGIF=false
64913  elif test "x${with_giflib}" = "xsystem"; then
64914    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64915if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64916
64917else
64918   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64919fi
64920
64921
64922    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64923$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64924if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64925  $as_echo_n "(cached) " >&6
64926else
64927  ac_check_lib_save_LIBS=$LIBS
64928LIBS="-lgif  $LIBS"
64929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64930/* end confdefs.h.  */
64931
64932/* Override any GCC internal prototype to avoid an error.
64933   Use char because int might match the return type of a GCC
64934   builtin and then its argument prototype would still apply.  */
64935#ifdef __cplusplus
64936extern "C"
64937#endif
64938char DGifGetCode ();
64939int
64940main ()
64941{
64942return DGifGetCode ();
64943  ;
64944  return 0;
64945}
64946_ACEOF
64947if ac_fn_cxx_try_link "$LINENO"; then :
64948  ac_cv_lib_gif_DGifGetCode=yes
64949else
64950  ac_cv_lib_gif_DGifGetCode=no
64951fi
64952rm -f core conftest.err conftest.$ac_objext \
64953    conftest$ac_exeext conftest.$ac_ext
64954LIBS=$ac_check_lib_save_LIBS
64955fi
64956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64957$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64958if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64959  cat >>confdefs.h <<_ACEOF
64960#define HAVE_LIBGIF 1
64961_ACEOF
64962
64963  LIBS="-lgif $LIBS"
64964
64965else
64966   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64967fi
64968
64969
64970    USE_EXTERNAL_LIBGIF=true
64971  else
64972    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64973  fi
64974
64975
64976
64977
64978
64979# Check whether --with-libpng was given.
64980if test "${with_libpng+set}" = set; then :
64981  withval=$with_libpng;
64982fi
64983
64984
64985  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64986$as_echo_n "checking for which libpng to use... " >&6; }
64987
64988  # default is bundled
64989  DEFAULT_LIBPNG=bundled
64990  # if user didn't specify, use DEFAULT_LIBPNG
64991  if test "x${with_libpng}" = "x"; then
64992    with_libpng=${DEFAULT_LIBPNG}
64993  fi
64994
64995  if test "x${with_libpng}" = "xbundled"; then
64996    USE_EXTERNAL_LIBPNG=false
64997    PNG_CFLAGS=""
64998    PNG_LIBS=""
64999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65000$as_echo "bundled" >&6; }
65001  elif test "x${with_libpng}" = "xsystem"; then
65002
65003pkg_failed=no
65004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
65005$as_echo_n "checking for PNG... " >&6; }
65006
65007if test -n "$PNG_CFLAGS"; then
65008    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
65009 elif test -n "$PKG_CONFIG"; then
65010    if test -n "$PKG_CONFIG" && \
65011    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65012  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65013  ac_status=$?
65014  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65015  test $ac_status = 0; }; then
65016  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
65017else
65018  pkg_failed=yes
65019fi
65020 else
65021    pkg_failed=untried
65022fi
65023if test -n "$PNG_LIBS"; then
65024    pkg_cv_PNG_LIBS="$PNG_LIBS"
65025 elif test -n "$PKG_CONFIG"; then
65026    if test -n "$PKG_CONFIG" && \
65027    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
65028  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
65029  ac_status=$?
65030  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65031  test $ac_status = 0; }; then
65032  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
65033else
65034  pkg_failed=yes
65035fi
65036 else
65037    pkg_failed=untried
65038fi
65039
65040
65041
65042if test $pkg_failed = yes; then
65043
65044if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65045        _pkg_short_errors_supported=yes
65046else
65047        _pkg_short_errors_supported=no
65048fi
65049        if test $_pkg_short_errors_supported = yes; then
65050	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
65051        else
65052	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
65053        fi
65054	# Put the nasty error message in config.log where it belongs
65055	echo "$PNG_PKG_ERRORS" >&5
65056
65057	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65058$as_echo "no" >&6; }
65059                LIBPNG_FOUND=no
65060elif test $pkg_failed = untried; then
65061	LIBPNG_FOUND=no
65062else
65063	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
65064	PNG_LIBS=$pkg_cv_PNG_LIBS
65065        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65066$as_echo "yes" >&6; }
65067	LIBPNG_FOUND=yes
65068fi
65069    if test "x${LIBPNG_FOUND}" = "xyes"; then
65070      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
65071      USE_EXTERNAL_LIBPNG=true
65072      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65073$as_echo "system" >&6; }
65074    else
65075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65076$as_echo "system not found" >&6; }
65077      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
65078    fi
65079  else
65080    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
65081  fi
65082
65083
65084
65085
65086
65087
65088
65089# Check whether --with-zlib was given.
65090if test "${with_zlib+set}" = set; then :
65091  withval=$with_zlib;
65092fi
65093
65094
65095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
65096$as_echo_n "checking for compress in -lz... " >&6; }
65097if ${ac_cv_lib_z_compress+:} false; then :
65098  $as_echo_n "(cached) " >&6
65099else
65100  ac_check_lib_save_LIBS=$LIBS
65101LIBS="-lz  $LIBS"
65102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65103/* end confdefs.h.  */
65104
65105/* Override any GCC internal prototype to avoid an error.
65106   Use char because int might match the return type of a GCC
65107   builtin and then its argument prototype would still apply.  */
65108#ifdef __cplusplus
65109extern "C"
65110#endif
65111char compress ();
65112int
65113main ()
65114{
65115return compress ();
65116  ;
65117  return 0;
65118}
65119_ACEOF
65120if ac_fn_cxx_try_link "$LINENO"; then :
65121  ac_cv_lib_z_compress=yes
65122else
65123  ac_cv_lib_z_compress=no
65124fi
65125rm -f core conftest.err conftest.$ac_objext \
65126    conftest$ac_exeext conftest.$ac_ext
65127LIBS=$ac_check_lib_save_LIBS
65128fi
65129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
65130$as_echo "$ac_cv_lib_z_compress" >&6; }
65131if test "x$ac_cv_lib_z_compress" = xyes; then :
65132   ZLIB_FOUND=yes
65133else
65134   ZLIB_FOUND=no
65135fi
65136
65137
65138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
65139$as_echo_n "checking for which zlib to use... " >&6; }
65140
65141  DEFAULT_ZLIB=system
65142  if test "x$OPENJDK_TARGET_OS" = xwindows; then
65143    # On windows default is bundled...on others default is system
65144    DEFAULT_ZLIB=bundled
65145  fi
65146
65147  if test "x${ZLIB_FOUND}" != "xyes"; then
65148    # If we don't find any system...set default to bundled
65149    DEFAULT_ZLIB=bundled
65150  fi
65151
65152  # If user didn't specify, use DEFAULT_ZLIB
65153  if test "x${with_zlib}" = "x"; then
65154    with_zlib=${DEFAULT_ZLIB}
65155  fi
65156
65157  if test "x${with_zlib}" = "xbundled"; then
65158    USE_EXTERNAL_LIBZ=false
65159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65160$as_echo "bundled" >&6; }
65161  elif test "x${with_zlib}" = "xsystem"; then
65162    if test "x${ZLIB_FOUND}" = "xyes"; then
65163      USE_EXTERNAL_LIBZ=true
65164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65165$as_echo "system" >&6; }
65166    else
65167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
65168$as_echo "system not found" >&6; }
65169      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
65170    fi
65171  else
65172    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
65173  fi
65174
65175
65176
65177
65178
65179# Check whether --with-lcms was given.
65180if test "${with_lcms+set}" = set; then :
65181  withval=$with_lcms;
65182fi
65183
65184
65185  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
65186$as_echo_n "checking for which lcms to use... " >&6; }
65187
65188  DEFAULT_LCMS=bundled
65189  # If user didn't specify, use DEFAULT_LCMS
65190  if test "x${with_lcms}" = "x"; then
65191    with_lcms=${DEFAULT_LCMS}
65192  fi
65193
65194  if test "x${with_lcms}" = "xbundled"; then
65195    USE_EXTERNAL_LCMS=false
65196    LCMS_CFLAGS=""
65197    LCMS_LIBS=""
65198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65199$as_echo "bundled" >&6; }
65200  elif test "x${with_lcms}" = "xsystem"; then
65201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65202$as_echo "system" >&6; }
65203
65204pkg_failed=no
65205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
65206$as_echo_n "checking for LCMS... " >&6; }
65207
65208if test -n "$LCMS_CFLAGS"; then
65209    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
65210 elif test -n "$PKG_CONFIG"; then
65211    if test -n "$PKG_CONFIG" && \
65212    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65213  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65214  ac_status=$?
65215  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65216  test $ac_status = 0; }; then
65217  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
65218else
65219  pkg_failed=yes
65220fi
65221 else
65222    pkg_failed=untried
65223fi
65224if test -n "$LCMS_LIBS"; then
65225    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
65226 elif test -n "$PKG_CONFIG"; then
65227    if test -n "$PKG_CONFIG" && \
65228    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65229  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65230  ac_status=$?
65231  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65232  test $ac_status = 0; }; then
65233  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
65234else
65235  pkg_failed=yes
65236fi
65237 else
65238    pkg_failed=untried
65239fi
65240
65241
65242
65243if test $pkg_failed = yes; then
65244
65245if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65246        _pkg_short_errors_supported=yes
65247else
65248        _pkg_short_errors_supported=no
65249fi
65250        if test $_pkg_short_errors_supported = yes; then
65251	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
65252        else
65253	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
65254        fi
65255	# Put the nasty error message in config.log where it belongs
65256	echo "$LCMS_PKG_ERRORS" >&5
65257
65258	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65259$as_echo "no" >&6; }
65260                LCMS_FOUND=no
65261elif test $pkg_failed = untried; then
65262	LCMS_FOUND=no
65263else
65264	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
65265	LCMS_LIBS=$pkg_cv_LCMS_LIBS
65266        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65267$as_echo "yes" >&6; }
65268	LCMS_FOUND=yes
65269fi
65270    if test "x${LCMS_FOUND}" = "xyes"; then
65271      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
65272      USE_EXTERNAL_LCMS=true
65273    else
65274      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
65275    fi
65276  else
65277    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
65278  fi
65279
65280
65281
65282
65283
65284
65285
65286
65287
65288
65289
65290
65291
65292  # Setup libm (the maths library)
65293  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
65294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
65295$as_echo_n "checking for cos in -lm... " >&6; }
65296if ${ac_cv_lib_m_cos+:} false; then :
65297  $as_echo_n "(cached) " >&6
65298else
65299  ac_check_lib_save_LIBS=$LIBS
65300LIBS="-lm  $LIBS"
65301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65302/* end confdefs.h.  */
65303
65304/* Override any GCC internal prototype to avoid an error.
65305   Use char because int might match the return type of a GCC
65306   builtin and then its argument prototype would still apply.  */
65307#ifdef __cplusplus
65308extern "C"
65309#endif
65310char cos ();
65311int
65312main ()
65313{
65314return cos ();
65315  ;
65316  return 0;
65317}
65318_ACEOF
65319if ac_fn_cxx_try_link "$LINENO"; then :
65320  ac_cv_lib_m_cos=yes
65321else
65322  ac_cv_lib_m_cos=no
65323fi
65324rm -f core conftest.err conftest.$ac_objext \
65325    conftest$ac_exeext conftest.$ac_ext
65326LIBS=$ac_check_lib_save_LIBS
65327fi
65328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
65329$as_echo "$ac_cv_lib_m_cos" >&6; }
65330if test "x$ac_cv_lib_m_cos" = xyes; then :
65331  cat >>confdefs.h <<_ACEOF
65332#define HAVE_LIBM 1
65333_ACEOF
65334
65335  LIBS="-lm $LIBS"
65336
65337else
65338
65339        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
65340$as_echo "$as_me: Maths library was not found" >&6;}
65341
65342fi
65343
65344    LIBM="-lm"
65345  else
65346    LIBM=""
65347  fi
65348
65349
65350  # Setup libdl (for dynamic library loading)
65351  save_LIBS="$LIBS"
65352  LIBS=""
65353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
65354$as_echo_n "checking for dlopen in -ldl... " >&6; }
65355if ${ac_cv_lib_dl_dlopen+:} false; then :
65356  $as_echo_n "(cached) " >&6
65357else
65358  ac_check_lib_save_LIBS=$LIBS
65359LIBS="-ldl  $LIBS"
65360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65361/* end confdefs.h.  */
65362
65363/* Override any GCC internal prototype to avoid an error.
65364   Use char because int might match the return type of a GCC
65365   builtin and then its argument prototype would still apply.  */
65366#ifdef __cplusplus
65367extern "C"
65368#endif
65369char dlopen ();
65370int
65371main ()
65372{
65373return dlopen ();
65374  ;
65375  return 0;
65376}
65377_ACEOF
65378if ac_fn_cxx_try_link "$LINENO"; then :
65379  ac_cv_lib_dl_dlopen=yes
65380else
65381  ac_cv_lib_dl_dlopen=no
65382fi
65383rm -f core conftest.err conftest.$ac_objext \
65384    conftest$ac_exeext conftest.$ac_ext
65385LIBS=$ac_check_lib_save_LIBS
65386fi
65387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
65388$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
65389if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
65390  cat >>confdefs.h <<_ACEOF
65391#define HAVE_LIBDL 1
65392_ACEOF
65393
65394  LIBS="-ldl $LIBS"
65395
65396fi
65397
65398  LIBDL="$LIBS"
65399
65400  LIBS="$save_LIBS"
65401
65402  # Deprecated libraries, keep the flags for backwards compatibility
65403  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
65404
65405
65406# Check whether --with-dxsdk was given.
65407if test "${with_dxsdk+set}" = set; then :
65408  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
65409$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
65410fi
65411
65412
65413
65414
65415# Check whether --with-dxsdk-lib was given.
65416if test "${with_dxsdk_lib+set}" = set; then :
65417  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
65418$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
65419fi
65420
65421
65422
65423
65424# Check whether --with-dxsdk-include was given.
65425if test "${with_dxsdk_include+set}" = set; then :
65426  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
65427$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
65428fi
65429
65430
65431  fi
65432
65433  # Control if libzip can use mmap. Available for purposes of overriding.
65434  LIBZIP_CAN_USE_MMAP=true
65435
65436
65437
65438  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
65439    # Find the root of the Solaris Studio installation from the compiler path
65440    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
65441    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
65442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
65443$as_echo_n "checking for libstlport.so.1... " >&6; }
65444    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
65445      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
65446      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
65447    fi
65448    if test -f "$STLPORT_LIB"; then
65449      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
65450$as_echo "yes, $STLPORT_LIB" >&6; }
65451
65452  # Only process if variable expands to non-empty
65453
65454  if test "x$STLPORT_LIB" != x; then
65455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65456
65457  # Input might be given as Windows format, start by converting to
65458  # unix format.
65459  path="$STLPORT_LIB"
65460  new_path=`$CYGPATH -u "$path"`
65461
65462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65465  # "foo.exe" is OK but "foo" is an error.
65466  #
65467  # This test is therefore slightly more accurate than "test -f" to check for file precense.
65468  # It is also a way to make sure we got the proper file name for the real test later on.
65469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65470  if test "x$test_shortpath" = x; then
65471    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65472$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65473    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
65474  fi
65475
65476  # Call helper function which possibly converts this using DOS-style short mode.
65477  # If so, the updated path is stored in $new_path.
65478
65479  input_path="$new_path"
65480  # Check if we need to convert this using DOS-style short mode. If the path
65481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65482  # take no chances and rewrite it.
65483  # Note: m4 eats our [], so we need to use [ and ] instead.
65484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65485  if test "x$has_forbidden_chars" != x; then
65486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65490      # Going to short mode and back again did indeed matter. Since short mode is
65491      # case insensitive, let's make it lowercase to improve readability.
65492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65493      # Now convert it back to Unix-style (cygpath)
65494      input_path=`$CYGPATH -u "$shortmode_path"`
65495      new_path="$input_path"
65496    fi
65497  fi
65498
65499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65500  if test "x$test_cygdrive_prefix" = x; then
65501    # As a simple fix, exclude /usr/bin since it's not a real path.
65502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65504      # a path prefixed by /cygdrive for fixpath to work.
65505      new_path="$CYGWIN_ROOT_PATH$input_path"
65506    fi
65507  fi
65508
65509
65510  if test "x$path" != "x$new_path"; then
65511    STLPORT_LIB="$new_path"
65512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65513$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65514  fi
65515
65516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65517
65518  path="$STLPORT_LIB"
65519  has_colon=`$ECHO $path | $GREP ^.:`
65520  new_path="$path"
65521  if test "x$has_colon" = x; then
65522    # Not in mixed or Windows style, start by that.
65523    new_path=`cmd //c echo $path`
65524  fi
65525
65526
65527  input_path="$new_path"
65528  # Check if we need to convert this using DOS-style short mode. If the path
65529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
65530  # take no chances and rewrite it.
65531  # Note: m4 eats our [], so we need to use [ and ] instead.
65532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65533  if test "x$has_forbidden_chars" != x; then
65534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65536  fi
65537
65538
65539  windows_path="$new_path"
65540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65541    unix_path=`$CYGPATH -u "$windows_path"`
65542    new_path="$unix_path"
65543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65545    new_path="$unix_path"
65546  fi
65547
65548  if test "x$path" != "x$new_path"; then
65549    STLPORT_LIB="$new_path"
65550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65551$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65552  fi
65553
65554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
65555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65556
65557    else
65558      # We're on a unix platform. Hooray! :)
65559      path="$STLPORT_LIB"
65560      has_space=`$ECHO "$path" | $GREP " "`
65561      if test "x$has_space" != x; then
65562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65563$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65564        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65565      fi
65566
65567      # Use eval to expand a potential ~
65568      eval path="$path"
65569      if test ! -f "$path" && test ! -d "$path"; then
65570        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
65571      fi
65572
65573      if test -d "$path"; then
65574        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
65575      else
65576        dir="`$DIRNAME "$path"`"
65577        base="`$BASENAME "$path"`"
65578        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
65579      fi
65580    fi
65581  fi
65582
65583    else
65584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65585$as_echo "no, not found at $STLPORT_LIB" >&6; }
65586      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65587    fi
65588
65589  fi
65590
65591
65592
65593
65594
65595
65596
65597
65598
65599
65600
65601
65602
65603
65604# Hotspot setup depends on lib checks.
65605
65606
65607  # The user can in some cases supply additional jvm features. For the custom
65608  # variant, this defines the entire variant.
65609
65610# Check whether --with-jvm-features was given.
65611if test "${with_jvm_features+set}" = set; then :
65612  withval=$with_jvm_features;
65613fi
65614
65615  if test "x$with_jvm_features" != x; then
65616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65617$as_echo_n "checking additional JVM features... " >&6; }
65618    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65620$as_echo "$JVM_FEATURES" >&6; }
65621  fi
65622
65623  # Override hotspot cpu definitions for ARM platforms
65624  if test "x$OPENJDK_TARGET_CPU" = xarm; then
65625    HOTSPOT_TARGET_CPU=arm_32
65626    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65627    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65628    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65629  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65630    HOTSPOT_TARGET_CPU=arm_64
65631    HOTSPOT_TARGET_CPU_ARCH=arm
65632    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65633    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65634  fi
65635
65636  # Verify that dependencies are met for explicitly set features.
65637  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65638    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65639  fi
65640
65641  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65642    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65643  fi
65644
65645  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65646    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65647  fi
65648
65649  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65650    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65651  fi
65652
65653  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65654    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65655  fi
65656
65657  # Turn on additional features based on other parts of configure
65658  if test "x$INCLUDE_DTRACE" = "xtrue"; then
65659    JVM_FEATURES="$JVM_FEATURES dtrace"
65660  else
65661    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65662      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65663    fi
65664  fi
65665
65666  if test "x$STATIC_BUILD" = "xtrue"; then
65667    JVM_FEATURES="$JVM_FEATURES static-build"
65668  else
65669    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65670      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65671    fi
65672  fi
65673
65674  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65675    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65676      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65677    fi
65678  fi
65679
65680  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65681    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65682      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65683    fi
65684  fi
65685
65686  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65687  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65688     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65689     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65690    JVM_FEATURES_jvmci="jvmci"
65691  else
65692    JVM_FEATURES_jvmci=""
65693  fi
65694
65695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65696$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65697  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65698    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65699$as_echo "yes, forced" >&6; }
65700    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65701      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65702    fi
65703    INCLUDE_GRAAL="true"
65704  else
65705    # By default enable graal build where AOT is available
65706    if test "x$ENABLE_AOT" = "xtrue"; then
65707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65708$as_echo "yes" >&6; }
65709      JVM_FEATURES_graal="graal"
65710      INCLUDE_GRAAL="true"
65711    else
65712      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65713$as_echo "no" >&6; }
65714      JVM_FEATURES_graal=""
65715      INCLUDE_GRAAL="false"
65716    fi
65717  fi
65718
65719
65720
65721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65722$as_echo_n "checking if aot should be enabled... " >&6; }
65723  if test "x$ENABLE_AOT" = "xtrue"; then
65724    if test "x$enable_aot" = "xyes"; then
65725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65726$as_echo "yes, forced" >&6; }
65727    else
65728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65729$as_echo "yes" >&6; }
65730    fi
65731    JVM_FEATURES_aot="aot"
65732  else
65733    if test "x$enable_aot" = "xno"; then
65734      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65735$as_echo "no, forced" >&6; }
65736    else
65737      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65738$as_echo "no" >&6; }
65739    fi
65740    JVM_FEATURES_aot=""
65741  fi
65742
65743  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65744    # Default to use link time optimizations on minimal on arm
65745    JVM_FEATURES_link_time_opt="link-time-opt"
65746  else
65747    JVM_FEATURES_link_time_opt=""
65748  fi
65749
65750  # All variants but minimal (and custom) get these features
65751  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65752
65753  # Enable features depending on variant.
65754  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65755  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65756  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65757  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65758  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65759  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65760  JVM_FEATURES_custom="$JVM_FEATURES"
65761
65762
65763
65764
65765
65766
65767
65768
65769
65770  # Used for verification of Makefiles by check-jvm-feature
65771
65772
65773  # We don't support --with-jvm-interpreter anymore, use zero instead.
65774
65775
65776# Check whether --with-jvm-interpreter was given.
65777if test "${with_jvm_interpreter+set}" = set; then :
65778  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65779$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65780fi
65781
65782
65783
65784
65785###############################################################################
65786#
65787# We need to do some final tweaking, when everything else is done.
65788#
65789###############################################################################
65790
65791
65792  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65793$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65794
65795  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65796    ENABLE_INTREE_EC=true
65797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65798$as_echo "yes" >&6; }
65799  else
65800    ENABLE_INTREE_EC=false
65801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65802$as_echo "no" >&6; }
65803  fi
65804
65805
65806
65807
65808  # Check whether --enable-jtreg-failure-handler was given.
65809if test "${enable_jtreg_failure_handler+set}" = set; then :
65810  enableval=$enable_jtreg_failure_handler;
65811fi
65812
65813
65814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65815$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65816
65817  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65818    if test "x$JT_HOME" = "x"; then
65819      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65820    else
65821      BUILD_FAILURE_HANDLER=true
65822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65823$as_echo "yes, forced" >&6; }
65824    fi
65825  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65826    BUILD_FAILURE_HANDLER=false
65827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65828$as_echo "no, forced" >&6; }
65829  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65830      || test "x$enable_jtreg_failure_handler" = "x"; then
65831    if test "x$JT_HOME" = "x"; then
65832      BUILD_FAILURE_HANDLER=false
65833      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65834$as_echo "no, missing jtreg" >&6; }
65835    else
65836      BUILD_FAILURE_HANDLER=true
65837      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65838$as_echo "yes, jtreg present" >&6; }
65839    fi
65840  else
65841    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65842  fi
65843
65844
65845
65846
65847  # Check whether --enable-generate-classlist was given.
65848if test "${enable_generate_classlist+set}" = set; then :
65849  enableval=$enable_generate_classlist;
65850fi
65851
65852
65853  # Check if it's likely that it's possible to generate the classlist. Depending
65854  # on exact jvm configuration it could be possible anyway.
65855  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65856    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65857  else
65858    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65859  fi
65860
65861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65862$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65863  if test "x$enable_generate_classlist" = "xyes"; then
65864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65865$as_echo "yes, forced" >&6; }
65866    ENABLE_GENERATE_CLASSLIST="true"
65867    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65868      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65869$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65870    fi
65871  elif test "x$enable_generate_classlist" = "xno"; then
65872    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65873$as_echo "no, forced" >&6; }
65874    ENABLE_GENERATE_CLASSLIST="false"
65875  elif test "x$enable_generate_classlist" = "x"; then
65876    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65878$as_echo "yes" >&6; }
65879      ENABLE_GENERATE_CLASSLIST="true"
65880    else
65881      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65882$as_echo "no" >&6; }
65883      ENABLE_GENERATE_CLASSLIST="false"
65884    fi
65885  else
65886    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65887  fi
65888
65889
65890
65891
65892###############################################################################
65893#
65894# Configure parts of the build that only affect the build performance,
65895# not the result.
65896#
65897###############################################################################
65898
65899
65900  # How many cores do we have on this build system?
65901
65902# Check whether --with-num-cores was given.
65903if test "${with_num_cores+set}" = set; then :
65904  withval=$with_num_cores;
65905fi
65906
65907  if test "x$with_num_cores" = x; then
65908    # The number of cores were not specified, try to probe them.
65909
65910  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65911$as_echo_n "checking for number of cores... " >&6; }
65912  NUM_CORES=1
65913  FOUND_CORES=no
65914
65915  if test -f /proc/cpuinfo; then
65916    # Looks like a Linux (or cygwin) system
65917    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65918    FOUND_CORES=yes
65919  elif test -x /usr/sbin/psrinfo; then
65920    # Looks like a Solaris system
65921    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65922    FOUND_CORES=yes
65923  elif test -x /usr/sbin/sysctl; then
65924    # Looks like a MacOSX system
65925    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65926    FOUND_CORES=yes
65927  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65928    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65929    FOUND_CORES=yes
65930  elif test -n "$NUMBER_OF_PROCESSORS"; then
65931    # On windows, look in the env
65932    NUM_CORES=$NUMBER_OF_PROCESSORS
65933    FOUND_CORES=yes
65934  fi
65935
65936  if test "x$FOUND_CORES" = xyes; then
65937    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65938$as_echo "$NUM_CORES" >&6; }
65939  else
65940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65941$as_echo "could not detect number of cores, defaulting to 1" >&6; }
65942    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65943$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65944  fi
65945
65946  else
65947    NUM_CORES=$with_num_cores
65948  fi
65949
65950
65951
65952  # How much memory do we have on this build system?
65953
65954# Check whether --with-memory-size was given.
65955if test "${with_memory_size+set}" = set; then :
65956  withval=$with_memory_size;
65957fi
65958
65959  if test "x$with_memory_size" = x; then
65960    # The memory size was not specified, try to probe it.
65961
65962  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65963$as_echo_n "checking for memory size... " >&6; }
65964  # Default to 1024 MB
65965  MEMORY_SIZE=1024
65966  FOUND_MEM=no
65967
65968  if test -f /proc/meminfo; then
65969    # Looks like a Linux (or cygwin) system
65970    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65971    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65972    FOUND_MEM=yes
65973  elif test -x /usr/sbin/prtconf; then
65974    # Looks like a Solaris or AIX system
65975    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65976    FOUND_MEM=yes
65977  elif test -x /usr/sbin/sysctl; then
65978    # Looks like a MacOSX system
65979    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65980    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65981    FOUND_MEM=yes
65982  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65983    # Windows, but without cygwin
65984    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65985    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65986    FOUND_MEM=yes
65987  fi
65988
65989  if test "x$FOUND_MEM" = xyes; then
65990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65991$as_echo "$MEMORY_SIZE MB" >&6; }
65992  else
65993    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65994$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65995    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65996$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65997  fi
65998
65999  else
66000    MEMORY_SIZE=$with_memory_size
66001  fi
66002
66003
66004
66005  # Provide a decent default number of parallel jobs for make depending on
66006  # number of cores, amount of memory and machine architecture.
66007
66008# Check whether --with-jobs was given.
66009if test "${with_jobs+set}" = set; then :
66010  withval=$with_jobs;
66011fi
66012
66013  if test "x$with_jobs" = x; then
66014    # Number of jobs was not specified, calculate.
66015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
66016$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
66017    # Approximate memory in GB.
66018    memory_gb=`expr $MEMORY_SIZE / 1024`
66019    # Pick the lowest of memory in gb and number of cores.
66020    if test "$memory_gb" -lt "$NUM_CORES"; then
66021      JOBS="$memory_gb"
66022    else
66023      JOBS="$NUM_CORES"
66024    fi
66025    if test "$JOBS" -eq "0"; then
66026      JOBS=1
66027    fi
66028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
66029$as_echo "$JOBS" >&6; }
66030  else
66031    JOBS=$with_jobs
66032  fi
66033
66034
66035
66036  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
66037
66038# Check whether --with-test-jobs was given.
66039if test "${with_test_jobs+set}" = set; then :
66040  withval=$with_test_jobs;
66041fi
66042
66043  if test "x$with_test_jobs" = x; then
66044      TEST_JOBS=0
66045  else
66046      TEST_JOBS=$with_test_jobs
66047  fi
66048
66049
66050
66051# Setup arguments for the boot jdk (after cores and memory have been setup)
66052
66053  ##############################################################################
66054  #
66055  # Specify jvm options for anything that is run with the Boot JDK.
66056  # Not all JVM:s accept the same arguments on the command line.
66057  #
66058
66059# Check whether --with-boot-jdk-jvmargs was given.
66060if test "${with_boot_jdk_jvmargs+set}" = set; then :
66061  withval=$with_boot_jdk_jvmargs;
66062fi
66063
66064
66065  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
66066$as_echo_n "checking flags for boot jdk java command ... " >&6; }
66067
66068  # Disable special log output when a debug build is used as Boot JDK...
66069
66070  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
66071  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
66072  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
66073  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66074  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66075  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66076    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
66077    JVM_ARG_OK=true
66078  else
66079    $ECHO "Arg failed:" >&5
66080    $ECHO "$OUTPUT" >&5
66081    JVM_ARG_OK=false
66082  fi
66083
66084
66085  # Force en-US environment
66086
66087  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
66088  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
66089  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
66090  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66091  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66092  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66093    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
66094    JVM_ARG_OK=true
66095  else
66096    $ECHO "Arg failed:" >&5
66097    $ECHO "$OUTPUT" >&5
66098    JVM_ARG_OK=false
66099  fi
66100
66101
66102  # Apply user provided options.
66103
66104  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
66105  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
66106  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
66107  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66108  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66109  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66110    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
66111    JVM_ARG_OK=true
66112  else
66113    $ECHO "Arg failed:" >&5
66114    $ECHO "$OUTPUT" >&5
66115    JVM_ARG_OK=false
66116  fi
66117
66118
66119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
66120$as_echo "$boot_jdk_jvmargs" >&6; }
66121
66122  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
66123  JAVA_FLAGS=$boot_jdk_jvmargs
66124
66125
66126
66127  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
66128$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
66129
66130  # Starting amount of heap memory.
66131
66132  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
66133  $ECHO "Command: $JAVA -Xms64M -version" >&5
66134  OUTPUT=`$JAVA -Xms64M -version 2>&1`
66135  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66136  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66137  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66138    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
66139    JVM_ARG_OK=true
66140  else
66141    $ECHO "Arg failed:" >&5
66142    $ECHO "$OUTPUT" >&5
66143    JVM_ARG_OK=false
66144  fi
66145
66146  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
66147
66148  # Maximum amount of heap memory and stack size.
66149  JVM_HEAP_LIMIT_32="1024"
66150  # Running a 64 bit JVM allows for and requires a bigger heap
66151  JVM_HEAP_LIMIT_64="1600"
66152  STACK_SIZE_32=768
66153  STACK_SIZE_64=1536
66154  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
66155  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
66156    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
66157  fi
66158  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
66159    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
66160  fi
66161  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
66162    JVM_HEAP_LIMIT_32=512
66163    JVM_HEAP_LIMIT_64=512
66164  fi
66165
66166  if test "x$BOOT_JDK_BITS" = "x32"; then
66167    STACK_SIZE=$STACK_SIZE_32
66168    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
66169  else
66170    STACK_SIZE=$STACK_SIZE_64
66171    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
66172  fi
66173
66174  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
66175  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
66176  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
66177  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66178  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66179  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66180    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
66181    JVM_ARG_OK=true
66182  else
66183    $ECHO "Arg failed:" >&5
66184    $ECHO "$OUTPUT" >&5
66185    JVM_ARG_OK=false
66186  fi
66187
66188
66189  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
66190  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
66191  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
66192  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66193  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66194  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66195    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
66196    JVM_ARG_OK=true
66197  else
66198    $ECHO "Arg failed:" >&5
66199    $ECHO "$OUTPUT" >&5
66200    JVM_ARG_OK=false
66201  fi
66202
66203
66204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
66205$as_echo "$boot_jdk_jvmargs_big" >&6; }
66206
66207  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
66208
66209
66210  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
66211    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
66212    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
66213  else
66214    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
66215    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
66216  fi
66217  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
66218  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
66219  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
66220$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
66221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
66222$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
66223
66224
66225  # By default, the main javac compilations use big
66226  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
66227
66228
66229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
66230$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
66231
66232  # Use serial gc for small short lived tools if possible
66233
66234  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
66235  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
66236  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
66237  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66238  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66239  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66240    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
66241    JVM_ARG_OK=true
66242  else
66243    $ECHO "Arg failed:" >&5
66244    $ECHO "$OUTPUT" >&5
66245    JVM_ARG_OK=false
66246  fi
66247
66248
66249  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
66250  $ECHO "Command: $JAVA -Xms32M -version" >&5
66251  OUTPUT=`$JAVA -Xms32M -version 2>&1`
66252  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66253  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66254  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66255    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
66256    JVM_ARG_OK=true
66257  else
66258    $ECHO "Arg failed:" >&5
66259    $ECHO "$OUTPUT" >&5
66260    JVM_ARG_OK=false
66261  fi
66262
66263
66264  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
66265  $ECHO "Command: $JAVA -Xmx512M -version" >&5
66266  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
66267  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66268  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66269  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66270    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
66271    JVM_ARG_OK=true
66272  else
66273    $ECHO "Arg failed:" >&5
66274    $ECHO "$OUTPUT" >&5
66275    JVM_ARG_OK=false
66276  fi
66277
66278
66279  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
66280  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
66281  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
66282  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66283  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66284  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66285    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
66286    JVM_ARG_OK=true
66287  else
66288    $ECHO "Arg failed:" >&5
66289    $ECHO "$OUTPUT" >&5
66290    JVM_ARG_OK=false
66291  fi
66292
66293
66294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
66295$as_echo "$boot_jdk_jvmargs_small" >&6; }
66296
66297  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
66298
66299
66300  JAVA_TOOL_FLAGS_SMALL=""
66301  for f in $JAVA_FLAGS_SMALL; do
66302    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
66303  done
66304
66305
66306
66307# Setup smart javac (after cores and memory have been setup)
66308
66309
66310# Check whether --with-sjavac-server-java was given.
66311if test "${with_sjavac_server_java+set}" = set; then :
66312  withval=$with_sjavac_server_java;
66313fi
66314
66315
66316  if test "x$with_sjavac_server_java" != x; then
66317    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
66318    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
66319    if test "x$FOUND_VERSION" = x; then
66320      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
66321    fi
66322  else
66323    SJAVAC_SERVER_JAVA="$JAVA"
66324  fi
66325
66326
66327  if test "$MEMORY_SIZE" -gt "3000"; then
66328    if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
66329      JVM_64BIT=true
66330    fi
66331  fi
66332
66333  MX_VALUE=`expr $MEMORY_SIZE / 2`
66334  if test "$JVM_64BIT" = true; then
66335    # Set ms lower than mx since more than one instance of the server might
66336    # get launched at the same time before they figure out which instance won.
66337    MS_VALUE=512
66338    if test "$MX_VALUE" -gt "2048"; then
66339      MX_VALUE=2048
66340    fi
66341  else
66342    MS_VALUE=256
66343    if test "$MX_VALUE" -gt "1500"; then
66344      MX_VALUE=1500
66345    fi
66346  fi
66347  if test "$MX_VALUE" -lt "512"; then
66348    MX_VALUE=512
66349  fi
66350
66351  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
66352  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
66353  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
66354  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66355  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66356  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66357    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
66358    JVM_ARG_OK=true
66359  else
66360    $ECHO "Arg failed:" >&5
66361    $ECHO "$OUTPUT" >&5
66362    JVM_ARG_OK=false
66363  fi
66364
66365
66366
66367  # Check whether --enable-sjavac was given.
66368if test "${enable_sjavac+set}" = set; then :
66369  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
66370else
66371  ENABLE_SJAVAC="no"
66372fi
66373
66374  if test "x$JVM_ARG_OK" = "xfalse"; then
66375    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
66376$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
66377    ENABLE_SJAVAC="no"
66378  fi
66379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
66380$as_echo_n "checking whether to use sjavac... " >&6; }
66381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
66382$as_echo "$ENABLE_SJAVAC" >&6; }
66383
66384
66385  # Check whether --enable-javac-server was given.
66386if test "${enable_javac_server+set}" = set; then :
66387  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
66388else
66389  ENABLE_JAVAC_SERVER="yes"
66390fi
66391
66392  if test "x$JVM_ARG_OK" = "xfalse"; then
66393    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
66394$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
66395    ENABLE_JAVAC_SERVER="no"
66396  fi
66397  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
66398$as_echo_n "checking whether to use javac server... " >&6; }
66399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66400$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66401
66402
66403  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66404    # When using a server javac, the small client instances do not need much
66405    # resources.
66406    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66407  fi
66408
66409
66410# Setup use of icecc if requested
66411
66412  # Check whether --enable-icecc was given.
66413if test "${enable_icecc+set}" = set; then :
66414  enableval=$enable_icecc;
66415fi
66416
66417
66418  if test "x${enable_icecc}" = "xyes"; then
66419
66420
66421
66422  # Publish this variable in the help.
66423
66424
66425  if [ -z "${ICECC_CMD+x}" ]; then
66426    # The variable is not set by user, try to locate tool using the code snippet
66427    for ac_prog in icecc
66428do
66429  # Extract the first word of "$ac_prog", so it can be a program name with args.
66430set dummy $ac_prog; ac_word=$2
66431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66432$as_echo_n "checking for $ac_word... " >&6; }
66433if ${ac_cv_path_ICECC_CMD+:} false; then :
66434  $as_echo_n "(cached) " >&6
66435else
66436  case $ICECC_CMD in
66437  [\\/]* | ?:[\\/]*)
66438  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66439  ;;
66440  *)
66441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66442for as_dir in $PATH
66443do
66444  IFS=$as_save_IFS
66445  test -z "$as_dir" && as_dir=.
66446    for ac_exec_ext in '' $ac_executable_extensions; do
66447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66448    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66450    break 2
66451  fi
66452done
66453  done
66454IFS=$as_save_IFS
66455
66456  ;;
66457esac
66458fi
66459ICECC_CMD=$ac_cv_path_ICECC_CMD
66460if test -n "$ICECC_CMD"; then
66461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66462$as_echo "$ICECC_CMD" >&6; }
66463else
66464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66465$as_echo "no" >&6; }
66466fi
66467
66468
66469  test -n "$ICECC_CMD" && break
66470done
66471
66472  else
66473    # The variable is set, but is it from the command line or the environment?
66474
66475    # Try to remove the string !ICECC_CMD! from our list.
66476    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66477    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66478      # If it failed, the variable was not from the command line. Ignore it,
66479      # but warn the user (except for BASH, which is always set by the calling BASH).
66480      if test "xICECC_CMD" != xBASH; then
66481        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66482$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66483      fi
66484      # Try to locate tool using the code snippet
66485      for ac_prog in icecc
66486do
66487  # Extract the first word of "$ac_prog", so it can be a program name with args.
66488set dummy $ac_prog; ac_word=$2
66489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66490$as_echo_n "checking for $ac_word... " >&6; }
66491if ${ac_cv_path_ICECC_CMD+:} false; then :
66492  $as_echo_n "(cached) " >&6
66493else
66494  case $ICECC_CMD in
66495  [\\/]* | ?:[\\/]*)
66496  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66497  ;;
66498  *)
66499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66500for as_dir in $PATH
66501do
66502  IFS=$as_save_IFS
66503  test -z "$as_dir" && as_dir=.
66504    for ac_exec_ext in '' $ac_executable_extensions; do
66505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66506    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66508    break 2
66509  fi
66510done
66511  done
66512IFS=$as_save_IFS
66513
66514  ;;
66515esac
66516fi
66517ICECC_CMD=$ac_cv_path_ICECC_CMD
66518if test -n "$ICECC_CMD"; then
66519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66520$as_echo "$ICECC_CMD" >&6; }
66521else
66522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66523$as_echo "no" >&6; }
66524fi
66525
66526
66527  test -n "$ICECC_CMD" && break
66528done
66529
66530    else
66531      # If it succeeded, then it was overridden by the user. We will use it
66532      # for the tool.
66533
66534      # First remove it from the list of overridden variables, so we can test
66535      # for unknown variables in the end.
66536      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66537
66538      # Check if we try to supply an empty value
66539      if test "x$ICECC_CMD" = x; then
66540        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66541$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66543$as_echo_n "checking for ICECC_CMD... " >&6; }
66544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66545$as_echo "disabled" >&6; }
66546      else
66547        # Check if the provided tool contains a complete path.
66548        tool_specified="$ICECC_CMD"
66549        tool_basename="${tool_specified##*/}"
66550        if test "x$tool_basename" = "x$tool_specified"; then
66551          # A command without a complete path is provided, search $PATH.
66552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66553$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66554          # Extract the first word of "$tool_basename", so it can be a program name with args.
66555set dummy $tool_basename; ac_word=$2
66556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66557$as_echo_n "checking for $ac_word... " >&6; }
66558if ${ac_cv_path_ICECC_CMD+:} false; then :
66559  $as_echo_n "(cached) " >&6
66560else
66561  case $ICECC_CMD in
66562  [\\/]* | ?:[\\/]*)
66563  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66564  ;;
66565  *)
66566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66567for as_dir in $PATH
66568do
66569  IFS=$as_save_IFS
66570  test -z "$as_dir" && as_dir=.
66571    for ac_exec_ext in '' $ac_executable_extensions; do
66572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66573    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66575    break 2
66576  fi
66577done
66578  done
66579IFS=$as_save_IFS
66580
66581  ;;
66582esac
66583fi
66584ICECC_CMD=$ac_cv_path_ICECC_CMD
66585if test -n "$ICECC_CMD"; then
66586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66587$as_echo "$ICECC_CMD" >&6; }
66588else
66589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66590$as_echo "no" >&6; }
66591fi
66592
66593
66594          if test "x$ICECC_CMD" = x; then
66595            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66596          fi
66597        else
66598          # Otherwise we believe it is a complete path. Use it as it is.
66599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66600$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66601          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66602$as_echo_n "checking for ICECC_CMD... " >&6; }
66603          if test ! -x "$tool_specified"; then
66604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66605$as_echo "not found" >&6; }
66606            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66607          fi
66608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66609$as_echo "$tool_specified" >&6; }
66610        fi
66611      fi
66612    fi
66613
66614  fi
66615
66616
66617
66618  if test "x$ICECC_CMD" = x; then
66619    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66620  fi
66621
66622
66623    old_path="$PATH"
66624
66625    # Look for icecc-create-env in some known places
66626    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66627
66628
66629
66630  # Publish this variable in the help.
66631
66632
66633  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66634    # The variable is not set by user, try to locate tool using the code snippet
66635    for ac_prog in icecc-create-env
66636do
66637  # Extract the first word of "$ac_prog", so it can be a program name with args.
66638set dummy $ac_prog; ac_word=$2
66639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66640$as_echo_n "checking for $ac_word... " >&6; }
66641if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66642  $as_echo_n "(cached) " >&6
66643else
66644  case $ICECC_CREATE_ENV in
66645  [\\/]* | ?:[\\/]*)
66646  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66647  ;;
66648  *)
66649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66650for as_dir in $PATH
66651do
66652  IFS=$as_save_IFS
66653  test -z "$as_dir" && as_dir=.
66654    for ac_exec_ext in '' $ac_executable_extensions; do
66655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66656    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66658    break 2
66659  fi
66660done
66661  done
66662IFS=$as_save_IFS
66663
66664  ;;
66665esac
66666fi
66667ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66668if test -n "$ICECC_CREATE_ENV"; then
66669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66670$as_echo "$ICECC_CREATE_ENV" >&6; }
66671else
66672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66673$as_echo "no" >&6; }
66674fi
66675
66676
66677  test -n "$ICECC_CREATE_ENV" && break
66678done
66679
66680  else
66681    # The variable is set, but is it from the command line or the environment?
66682
66683    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66684    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66685    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66686      # If it failed, the variable was not from the command line. Ignore it,
66687      # but warn the user (except for BASH, which is always set by the calling BASH).
66688      if test "xICECC_CREATE_ENV" != xBASH; then
66689        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66690$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66691      fi
66692      # Try to locate tool using the code snippet
66693      for ac_prog in icecc-create-env
66694do
66695  # Extract the first word of "$ac_prog", so it can be a program name with args.
66696set dummy $ac_prog; ac_word=$2
66697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66698$as_echo_n "checking for $ac_word... " >&6; }
66699if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66700  $as_echo_n "(cached) " >&6
66701else
66702  case $ICECC_CREATE_ENV in
66703  [\\/]* | ?:[\\/]*)
66704  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66705  ;;
66706  *)
66707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66708for as_dir in $PATH
66709do
66710  IFS=$as_save_IFS
66711  test -z "$as_dir" && as_dir=.
66712    for ac_exec_ext in '' $ac_executable_extensions; do
66713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66714    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66716    break 2
66717  fi
66718done
66719  done
66720IFS=$as_save_IFS
66721
66722  ;;
66723esac
66724fi
66725ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66726if test -n "$ICECC_CREATE_ENV"; then
66727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66728$as_echo "$ICECC_CREATE_ENV" >&6; }
66729else
66730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66731$as_echo "no" >&6; }
66732fi
66733
66734
66735  test -n "$ICECC_CREATE_ENV" && break
66736done
66737
66738    else
66739      # If it succeeded, then it was overridden by the user. We will use it
66740      # for the tool.
66741
66742      # First remove it from the list of overridden variables, so we can test
66743      # for unknown variables in the end.
66744      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66745
66746      # Check if we try to supply an empty value
66747      if test "x$ICECC_CREATE_ENV" = x; then
66748        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66749$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66750        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66751$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66753$as_echo "disabled" >&6; }
66754      else
66755        # Check if the provided tool contains a complete path.
66756        tool_specified="$ICECC_CREATE_ENV"
66757        tool_basename="${tool_specified##*/}"
66758        if test "x$tool_basename" = "x$tool_specified"; then
66759          # A command without a complete path is provided, search $PATH.
66760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66761$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66762          # Extract the first word of "$tool_basename", so it can be a program name with args.
66763set dummy $tool_basename; ac_word=$2
66764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66765$as_echo_n "checking for $ac_word... " >&6; }
66766if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66767  $as_echo_n "(cached) " >&6
66768else
66769  case $ICECC_CREATE_ENV in
66770  [\\/]* | ?:[\\/]*)
66771  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66772  ;;
66773  *)
66774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66775for as_dir in $PATH
66776do
66777  IFS=$as_save_IFS
66778  test -z "$as_dir" && as_dir=.
66779    for ac_exec_ext in '' $ac_executable_extensions; do
66780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66781    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66783    break 2
66784  fi
66785done
66786  done
66787IFS=$as_save_IFS
66788
66789  ;;
66790esac
66791fi
66792ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66793if test -n "$ICECC_CREATE_ENV"; then
66794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66795$as_echo "$ICECC_CREATE_ENV" >&6; }
66796else
66797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66798$as_echo "no" >&6; }
66799fi
66800
66801
66802          if test "x$ICECC_CREATE_ENV" = x; then
66803            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66804          fi
66805        else
66806          # Otherwise we believe it is a complete path. Use it as it is.
66807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66808$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66809          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66810$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66811          if test ! -x "$tool_specified"; then
66812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66813$as_echo "not found" >&6; }
66814            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66815          fi
66816          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66817$as_echo "$tool_specified" >&6; }
66818        fi
66819      fi
66820    fi
66821
66822  fi
66823
66824
66825
66826  if test "x$ICECC_CREATE_ENV" = x; then
66827    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66828  fi
66829
66830
66831    # Use icecc-create-env to create a minimal compilation environment that can
66832    # be sent to the other hosts in the icecream cluster.
66833    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66834    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66835    # Older versions of icecc does not have the --gcc parameter
66836    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66837      icecc_gcc_arg="--gcc"
66838    fi
66839    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66840
66841  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66842      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66843          ${icecc_create_env_log} 2>&1 )
66844  if test "$?" != "0"; then
66845    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66846$as_echo "$as_me: icecc-create-env output:" >&6;}
66847    cat \
66848          ${icecc_create_env_log}
66849    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66850  fi
66851
66852    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66853      # For clang, the icecc compilerwrapper is needed. It usually resides next
66854      # to icecc-create-env.
66855
66856
66857
66858  # Publish this variable in the help.
66859
66860
66861  if [ -z "${ICECC_WRAPPER+x}" ]; then
66862    # The variable is not set by user, try to locate tool using the code snippet
66863    for ac_prog in compilerwrapper
66864do
66865  # Extract the first word of "$ac_prog", so it can be a program name with args.
66866set dummy $ac_prog; ac_word=$2
66867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66868$as_echo_n "checking for $ac_word... " >&6; }
66869if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66870  $as_echo_n "(cached) " >&6
66871else
66872  case $ICECC_WRAPPER in
66873  [\\/]* | ?:[\\/]*)
66874  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66875  ;;
66876  *)
66877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66878for as_dir in $PATH
66879do
66880  IFS=$as_save_IFS
66881  test -z "$as_dir" && as_dir=.
66882    for ac_exec_ext in '' $ac_executable_extensions; do
66883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66884    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66886    break 2
66887  fi
66888done
66889  done
66890IFS=$as_save_IFS
66891
66892  ;;
66893esac
66894fi
66895ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66896if test -n "$ICECC_WRAPPER"; then
66897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66898$as_echo "$ICECC_WRAPPER" >&6; }
66899else
66900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66901$as_echo "no" >&6; }
66902fi
66903
66904
66905  test -n "$ICECC_WRAPPER" && break
66906done
66907
66908  else
66909    # The variable is set, but is it from the command line or the environment?
66910
66911    # Try to remove the string !ICECC_WRAPPER! from our list.
66912    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66913    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66914      # If it failed, the variable was not from the command line. Ignore it,
66915      # but warn the user (except for BASH, which is always set by the calling BASH).
66916      if test "xICECC_WRAPPER" != xBASH; then
66917        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66918$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66919      fi
66920      # Try to locate tool using the code snippet
66921      for ac_prog in compilerwrapper
66922do
66923  # Extract the first word of "$ac_prog", so it can be a program name with args.
66924set dummy $ac_prog; ac_word=$2
66925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66926$as_echo_n "checking for $ac_word... " >&6; }
66927if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66928  $as_echo_n "(cached) " >&6
66929else
66930  case $ICECC_WRAPPER in
66931  [\\/]* | ?:[\\/]*)
66932  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66933  ;;
66934  *)
66935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66936for as_dir in $PATH
66937do
66938  IFS=$as_save_IFS
66939  test -z "$as_dir" && as_dir=.
66940    for ac_exec_ext in '' $ac_executable_extensions; do
66941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66942    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66944    break 2
66945  fi
66946done
66947  done
66948IFS=$as_save_IFS
66949
66950  ;;
66951esac
66952fi
66953ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66954if test -n "$ICECC_WRAPPER"; then
66955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66956$as_echo "$ICECC_WRAPPER" >&6; }
66957else
66958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66959$as_echo "no" >&6; }
66960fi
66961
66962
66963  test -n "$ICECC_WRAPPER" && break
66964done
66965
66966    else
66967      # If it succeeded, then it was overridden by the user. We will use it
66968      # for the tool.
66969
66970      # First remove it from the list of overridden variables, so we can test
66971      # for unknown variables in the end.
66972      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66973
66974      # Check if we try to supply an empty value
66975      if test "x$ICECC_WRAPPER" = x; then
66976        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66977$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66978        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66979$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66980        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66981$as_echo "disabled" >&6; }
66982      else
66983        # Check if the provided tool contains a complete path.
66984        tool_specified="$ICECC_WRAPPER"
66985        tool_basename="${tool_specified##*/}"
66986        if test "x$tool_basename" = "x$tool_specified"; then
66987          # A command without a complete path is provided, search $PATH.
66988          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66989$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66990          # Extract the first word of "$tool_basename", so it can be a program name with args.
66991set dummy $tool_basename; ac_word=$2
66992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66993$as_echo_n "checking for $ac_word... " >&6; }
66994if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66995  $as_echo_n "(cached) " >&6
66996else
66997  case $ICECC_WRAPPER in
66998  [\\/]* | ?:[\\/]*)
66999  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67000  ;;
67001  *)
67002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67003for as_dir in $PATH
67004do
67005  IFS=$as_save_IFS
67006  test -z "$as_dir" && as_dir=.
67007    for ac_exec_ext in '' $ac_executable_extensions; do
67008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67009    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67011    break 2
67012  fi
67013done
67014  done
67015IFS=$as_save_IFS
67016
67017  ;;
67018esac
67019fi
67020ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67021if test -n "$ICECC_WRAPPER"; then
67022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67023$as_echo "$ICECC_WRAPPER" >&6; }
67024else
67025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67026$as_echo "no" >&6; }
67027fi
67028
67029
67030          if test "x$ICECC_WRAPPER" = x; then
67031            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67032          fi
67033        else
67034          # Otherwise we believe it is a complete path. Use it as it is.
67035          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
67036$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
67037          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67038$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67039          if test ! -x "$tool_specified"; then
67040            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67041$as_echo "not found" >&6; }
67042            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
67043          fi
67044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67045$as_echo "$tool_specified" >&6; }
67046        fi
67047      fi
67048    fi
67049
67050  fi
67051
67052
67053
67054  if test "x$ICECC_WRAPPER" = x; then
67055    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
67056  fi
67057
67058
67059
67060  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67061      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
67062  if test "$?" != "0"; then
67063    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67064$as_echo "$as_me: icecc-create-env output:" >&6;}
67065    cat ${icecc_create_env_log}
67066    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67067  fi
67068
67069    else
67070      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
67071    fi
67072    PATH="$old_path"
67073    # The bundle with the compiler gets a name based on checksums. Parse log file
67074    # to find it.
67075    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
67076    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67077    if test ! -f ${ICECC_ENV_BUNDLE}; then
67078      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67079    fi
67080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
67081$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
67082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67083$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67084    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
67085
67086    if test "x${COMPILE_TYPE}" = "xcross"; then
67087      # If cross compiling, create a separate env package for the build compiler
67088      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
67089      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
67090      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
67091
67092  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67093      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
67094            ${icecc_create_env_log_build} 2>&1 )
67095  if test "$?" != "0"; then
67096    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67097$as_echo "$as_me: icecc-create-env output:" >&6;}
67098    cat \
67099            ${icecc_create_env_log_build}
67100    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67101  fi
67102
67103      elif test "x${BUILD_CC##*/}" = "xclang"; then
67104
67105  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67106      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
67107  if test "$?" != "0"; then
67108    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67109$as_echo "$as_me: icecc-create-env output:" >&6;}
67110    cat ${icecc_create_env_log_build}
67111    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67112  fi
67113
67114      else
67115        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
67116      fi
67117      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
67118      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67119      if test ! -f ${ICECC_ENV_BUNDLE}; then
67120        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67121      fi
67122      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
67123$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
67124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67125$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67126      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
67127          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
67128    else
67129      BUILD_ICECC="${ICECC}"
67130    fi
67131
67132
67133  fi
67134
67135
67136# Can the C/C++ compiler use precompiled headers?
67137
67138
67139  ###############################################################################
67140  #
67141  # Can the C/C++ compiler use precompiled headers?
67142  #
67143  # Check whether --enable-precompiled-headers was given.
67144if test "${enable_precompiled_headers+set}" = set; then :
67145  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
67146else
67147  ENABLE_PRECOMPH=yes
67148fi
67149
67150
67151  USE_PRECOMPILED_HEADER=true
67152  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
67153$as_echo_n "checking If precompiled header is enabled... " >&6; }
67154  if test "x$ENABLE_PRECOMPH" = xno; then
67155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67156$as_echo "no, forced" >&6; }
67157    USE_PRECOMPILED_HEADER=false
67158  elif test "x$ICECC" != "x"; then
67159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
67160$as_echo "no, does not work effectively with icecc" >&6; }
67161    USE_PRECOMPILED_HEADER=false
67162  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
67163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
67164$as_echo "no, does not work with Solaris Studio" >&6; }
67165    USE_PRECOMPILED_HEADER=false
67166  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
67167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
67168$as_echo "no, does not work with xlc" >&6; }
67169    USE_PRECOMPILED_HEADER=false
67170  else
67171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67172$as_echo "yes" >&6; }
67173  fi
67174
67175  if test "x$ENABLE_PRECOMPH" = xyes; then
67176    # Check that the compiler actually supports precomp headers.
67177    if test "x$TOOLCHAIN_TYPE" = xgcc; then
67178      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
67179$as_echo_n "checking that precompiled headers work... " >&6; }
67180      echo "int alfa();" > conftest.h
67181      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
67182      if test ! -f conftest.hpp.gch; then
67183        USE_PRECOMPILED_HEADER=false
67184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67185$as_echo "no" >&6; }
67186      else
67187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67188$as_echo "yes" >&6; }
67189      fi
67190      $RM conftest.h conftest.hpp.gch
67191    fi
67192  fi
67193
67194
67195
67196
67197# Setup use of ccache, if available
67198
67199  # Check whether --enable-ccache was given.
67200if test "${enable_ccache+set}" = set; then :
67201  enableval=$enable_ccache;
67202fi
67203
67204
67205  CCACHE_STATUS=
67206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
67207$as_echo_n "checking is ccache enabled... " >&6; }
67208  if test "x$enable_ccache" = xyes; then
67209    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
67210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67211$as_echo "yes" >&6; }
67212      OLD_PATH="$PATH"
67213      if test "x$TOOLCHAIN_PATH" != x; then
67214        PATH=$TOOLCHAIN_PATH:$PATH
67215      fi
67216
67217
67218
67219  # Publish this variable in the help.
67220
67221
67222  if [ -z "${CCACHE+x}" ]; then
67223    # The variable is not set by user, try to locate tool using the code snippet
67224    for ac_prog in ccache
67225do
67226  # Extract the first word of "$ac_prog", so it can be a program name with args.
67227set dummy $ac_prog; ac_word=$2
67228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67229$as_echo_n "checking for $ac_word... " >&6; }
67230if ${ac_cv_path_CCACHE+:} false; then :
67231  $as_echo_n "(cached) " >&6
67232else
67233  case $CCACHE in
67234  [\\/]* | ?:[\\/]*)
67235  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67236  ;;
67237  *)
67238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67239for as_dir in $PATH
67240do
67241  IFS=$as_save_IFS
67242  test -z "$as_dir" && as_dir=.
67243    for ac_exec_ext in '' $ac_executable_extensions; do
67244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67245    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67247    break 2
67248  fi
67249done
67250  done
67251IFS=$as_save_IFS
67252
67253  ;;
67254esac
67255fi
67256CCACHE=$ac_cv_path_CCACHE
67257if test -n "$CCACHE"; then
67258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67259$as_echo "$CCACHE" >&6; }
67260else
67261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67262$as_echo "no" >&6; }
67263fi
67264
67265
67266  test -n "$CCACHE" && break
67267done
67268
67269  else
67270    # The variable is set, but is it from the command line or the environment?
67271
67272    # Try to remove the string !CCACHE! from our list.
67273    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
67274    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67275      # If it failed, the variable was not from the command line. Ignore it,
67276      # but warn the user (except for BASH, which is always set by the calling BASH).
67277      if test "xCCACHE" != xBASH; then
67278        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
67279$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
67280      fi
67281      # Try to locate tool using the code snippet
67282      for ac_prog in ccache
67283do
67284  # Extract the first word of "$ac_prog", so it can be a program name with args.
67285set dummy $ac_prog; ac_word=$2
67286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67287$as_echo_n "checking for $ac_word... " >&6; }
67288if ${ac_cv_path_CCACHE+:} false; then :
67289  $as_echo_n "(cached) " >&6
67290else
67291  case $CCACHE in
67292  [\\/]* | ?:[\\/]*)
67293  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67294  ;;
67295  *)
67296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67297for as_dir in $PATH
67298do
67299  IFS=$as_save_IFS
67300  test -z "$as_dir" && as_dir=.
67301    for ac_exec_ext in '' $ac_executable_extensions; do
67302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67303    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67305    break 2
67306  fi
67307done
67308  done
67309IFS=$as_save_IFS
67310
67311  ;;
67312esac
67313fi
67314CCACHE=$ac_cv_path_CCACHE
67315if test -n "$CCACHE"; then
67316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67317$as_echo "$CCACHE" >&6; }
67318else
67319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67320$as_echo "no" >&6; }
67321fi
67322
67323
67324  test -n "$CCACHE" && break
67325done
67326
67327    else
67328      # If it succeeded, then it was overridden by the user. We will use it
67329      # for the tool.
67330
67331      # First remove it from the list of overridden variables, so we can test
67332      # for unknown variables in the end.
67333      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67334
67335      # Check if we try to supply an empty value
67336      if test "x$CCACHE" = x; then
67337        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
67338$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
67339        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67340$as_echo_n "checking for CCACHE... " >&6; }
67341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67342$as_echo "disabled" >&6; }
67343      else
67344        # Check if the provided tool contains a complete path.
67345        tool_specified="$CCACHE"
67346        tool_basename="${tool_specified##*/}"
67347        if test "x$tool_basename" = "x$tool_specified"; then
67348          # A command without a complete path is provided, search $PATH.
67349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
67350$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
67351          # Extract the first word of "$tool_basename", so it can be a program name with args.
67352set dummy $tool_basename; ac_word=$2
67353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67354$as_echo_n "checking for $ac_word... " >&6; }
67355if ${ac_cv_path_CCACHE+:} false; then :
67356  $as_echo_n "(cached) " >&6
67357else
67358  case $CCACHE in
67359  [\\/]* | ?:[\\/]*)
67360  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67361  ;;
67362  *)
67363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67364for as_dir in $PATH
67365do
67366  IFS=$as_save_IFS
67367  test -z "$as_dir" && as_dir=.
67368    for ac_exec_ext in '' $ac_executable_extensions; do
67369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67370    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67372    break 2
67373  fi
67374done
67375  done
67376IFS=$as_save_IFS
67377
67378  ;;
67379esac
67380fi
67381CCACHE=$ac_cv_path_CCACHE
67382if test -n "$CCACHE"; then
67383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67384$as_echo "$CCACHE" >&6; }
67385else
67386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67387$as_echo "no" >&6; }
67388fi
67389
67390
67391          if test "x$CCACHE" = x; then
67392            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67393          fi
67394        else
67395          # Otherwise we believe it is a complete path. Use it as it is.
67396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
67397$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
67398          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67399$as_echo_n "checking for CCACHE... " >&6; }
67400          if test ! -x "$tool_specified"; then
67401            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67402$as_echo "not found" >&6; }
67403            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67404          fi
67405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67406$as_echo "$tool_specified" >&6; }
67407        fi
67408      fi
67409    fi
67410
67411  fi
67412
67413
67414
67415  if test "x$CCACHE" = x; then
67416    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67417  fi
67418
67419
67420      PATH="$OLD_PATH"
67421      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67422      CCACHE_STATUS="Active ($CCACHE_VERSION)"
67423    else
67424      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67425$as_echo "no" >&6; }
67426      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67427$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67428    fi
67429  elif test "x$enable_ccache" = xno; then
67430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67431$as_echo "no, explicitly disabled" >&6; }
67432    CCACHE_STATUS="Disabled"
67433  elif test "x$enable_ccache" = x; then
67434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67435$as_echo "no" >&6; }
67436  else
67437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67438$as_echo "unknown" >&6; }
67439    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67440  fi
67441
67442
67443
67444# Check whether --with-ccache-dir was given.
67445if test "${with_ccache_dir+set}" = set; then :
67446  withval=$with_ccache_dir;
67447fi
67448
67449
67450  if test "x$with_ccache_dir" != x; then
67451    # When using a non home ccache directory, assume the use is to share ccache files
67452    # with other users. Thus change the umask.
67453    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67454    if test "x$CCACHE" = x; then
67455      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67456$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67457    fi
67458  fi
67459
67460  if test "x$CCACHE" != x; then
67461
67462  if test "x$CCACHE" != x; then
67463    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67464      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67465          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67466      if test "x$HAS_BAD_CCACHE" != "x"; then
67467        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67468      fi
67469    fi
67470    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67471      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67472          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67473      if test "x$HAS_BAD_CCACHE" != "x"; then
67474        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67475      fi
67476      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67477$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67478      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67479      PUSHED_FLAGS="$CXXFLAGS"
67480      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67481      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67482/* end confdefs.h.  */
67483
67484int
67485main ()
67486{
67487
67488  ;
67489  return 0;
67490}
67491_ACEOF
67492if ac_fn_cxx_try_compile "$LINENO"; then :
67493  CC_KNOWS_CCACHE_TRICK=yes
67494else
67495  CC_KNOWS_CCACHE_TRICK=no
67496fi
67497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67498      CXXFLAGS="$PUSHED_FLAGS"
67499      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67501$as_echo "yes" >&6; }
67502        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67503
67504        CCACHE_SLOPPINESS=pch_defines,time_macros
67505      else
67506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67507$as_echo "no" >&6; }
67508        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67509      fi
67510    fi
67511
67512    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67513        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67514
67515    if test "x$SET_CCACHE_DIR" != x; then
67516      mkdir -p $CCACHE_DIR > /dev/null 2>&1
67517      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67518    fi
67519  fi
67520
67521  fi
67522
67523
67524###############################################################################
67525#
67526# And now the finish...
67527#
67528###############################################################################
67529
67530# Check for some common pitfalls
67531
67532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67533    file_to_test="$SRC_ROOT/LICENSE"
67534    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67535      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
67536    fi
67537  fi
67538
67539
67540  # Did user specify any unknown variables?
67541
67542  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67543    # Replace the separating ! with spaces before presenting for end user.
67544    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67545    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67546$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67547  fi
67548
67549
67550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67551$as_echo_n "checking if build directory is on local disk... " >&6; }
67552
67553  # df -l lists only local disks; if the given directory is not found then
67554  # a non-zero exit code is given
67555  if test "x$DF" = x; then
67556    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67557      # msys does not have df; use Windows "net use" instead.
67558      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67559      if test "x$IS_NETWORK_DISK" = x; then
67560        OUTPUT_DIR_IS_LOCAL="yes"
67561      else
67562        OUTPUT_DIR_IS_LOCAL="no"
67563      fi
67564    else
67565      # No df here, say it's local
67566      OUTPUT_DIR_IS_LOCAL="yes"
67567    fi
67568  else
67569    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
67570      OUTPUT_DIR_IS_LOCAL="yes"
67571    else
67572      OUTPUT_DIR_IS_LOCAL="no"
67573    fi
67574  fi
67575
67576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67577$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67578
67579
67580
67581  # Check if the user has any old-style ALT_ variables set.
67582  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67583
67584  # Before generating output files, test if they exist. If they do, this is a reconfigure.
67585  # Since we can't properly handle the dependencies for this, warn the user about the situation
67586  if test -e $OUTPUT_ROOT/spec.gmk; then
67587    IS_RECONFIGURE=yes
67588  else
67589    IS_RECONFIGURE=no
67590  fi
67591
67592
67593# At the end, call the custom hook. (Dummy macro if no custom sources available)
67594
67595
67596# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67597
67598  # Keep feature lists sorted and free of duplicates
67599  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67600  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67601  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67602  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67603  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67604  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67605  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67606
67607  # Validate features
67608  for variant in $JVM_VARIANTS; do
67609    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67610$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67611    features_var_name=JVM_FEATURES_$variant
67612    JVM_FEATURES_TO_TEST=${!features_var_name}
67613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67614$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67615    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67616    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67617    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67618    if test "x$INVALID_FEATURES" != x; then
67619      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67620    fi
67621  done
67622
67623
67624# We're messing a bit with internal autoconf variables to put the config.status
67625# in the output directory instead of the current directory.
67626CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67627
67628# Create the actual output files. Now the main work of configure is done.
67629cat >confcache <<\_ACEOF
67630# This file is a shell script that caches the results of configure
67631# tests run on this system so they can be shared between configure
67632# scripts and configure runs, see configure's option --config-cache.
67633# It is not useful on other systems.  If it contains results you don't
67634# want to keep, you may remove or edit it.
67635#
67636# config.status only pays attention to the cache file if you give it
67637# the --recheck option to rerun configure.
67638#
67639# `ac_cv_env_foo' variables (set or unset) will be overridden when
67640# loading this file, other *unset* `ac_cv_foo' will be assigned the
67641# following values.
67642
67643_ACEOF
67644
67645# The following way of writing the cache mishandles newlines in values,
67646# but we know of no workaround that is simple, portable, and efficient.
67647# So, we kill variables containing newlines.
67648# Ultrix sh set writes to stderr and can't be redirected directly,
67649# and sets the high bit in the cache file unless we assign to the vars.
67650(
67651  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67652    eval ac_val=\$$ac_var
67653    case $ac_val in #(
67654    *${as_nl}*)
67655      case $ac_var in #(
67656      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67657$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67658      esac
67659      case $ac_var in #(
67660      _ | IFS | as_nl) ;; #(
67661      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67662      *) { eval $ac_var=; unset $ac_var;} ;;
67663      esac ;;
67664    esac
67665  done
67666
67667  (set) 2>&1 |
67668    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67669    *${as_nl}ac_space=\ *)
67670      # `set' does not quote correctly, so add quotes: double-quote
67671      # substitution turns \\\\ into \\, and sed turns \\ into \.
67672      sed -n \
67673	"s/'/'\\\\''/g;
67674	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67675      ;; #(
67676    *)
67677      # `set' quotes correctly as required by POSIX, so do not add quotes.
67678      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67679      ;;
67680    esac |
67681    sort
67682) |
67683  sed '
67684     /^ac_cv_env_/b end
67685     t clear
67686     :clear
67687     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67688     t end
67689     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67690     :end' >>confcache
67691if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67692  if test -w "$cache_file"; then
67693    if test "x$cache_file" != "x/dev/null"; then
67694      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67695$as_echo "$as_me: updating cache $cache_file" >&6;}
67696      if test ! -f "$cache_file" || test -h "$cache_file"; then
67697	cat confcache >"$cache_file"
67698      else
67699        case $cache_file in #(
67700        */* | ?:*)
67701	  mv -f confcache "$cache_file"$$ &&
67702	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67703        *)
67704	  mv -f confcache "$cache_file" ;;
67705	esac
67706      fi
67707    fi
67708  else
67709    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67710$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67711  fi
67712fi
67713rm -f confcache
67714
67715test "x$prefix" = xNONE && prefix=$ac_default_prefix
67716# Let make expand exec_prefix.
67717test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67718
67719# Transform confdefs.h into DEFS.
67720# Protect against shell expansion while executing Makefile rules.
67721# Protect against Makefile macro expansion.
67722#
67723# If the first sed substitution is executed (which looks for macros that
67724# take arguments), then branch to the quote section.  Otherwise,
67725# look for a macro that doesn't take arguments.
67726ac_script='
67727:mline
67728/\\$/{
67729 N
67730 s,\\\n,,
67731 b mline
67732}
67733t clear
67734:clear
67735s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67736t quote
67737s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67738t quote
67739b any
67740:quote
67741s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67742s/\[/\\&/g
67743s/\]/\\&/g
67744s/\$/$$/g
67745H
67746:any
67747${
67748	g
67749	s/^\n//
67750	s/\n/ /g
67751	p
67752}
67753'
67754DEFS=`sed -n "$ac_script" confdefs.h`
67755
67756
67757ac_libobjs=
67758ac_ltlibobjs=
67759U=
67760for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67761  # 1. Remove the extension, and $U if already installed.
67762  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67763  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67764  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67765  #    will be set to the directory where LIBOBJS objects are built.
67766  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67767  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67768done
67769LIBOBJS=$ac_libobjs
67770
67771LTLIBOBJS=$ac_ltlibobjs
67772
67773
67774
67775: "${CONFIG_STATUS=./config.status}"
67776ac_write_fail=0
67777ac_clean_files_save=$ac_clean_files
67778ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67779{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67780$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67781as_write_fail=0
67782cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67783#! $SHELL
67784# Generated by $as_me.
67785# Run this file to recreate the current configuration.
67786# Compiler output produced by configure, useful for debugging
67787# configure, is in config.log if it exists.
67788
67789debug=false
67790ac_cs_recheck=false
67791ac_cs_silent=false
67792
67793SHELL=\${CONFIG_SHELL-$SHELL}
67794export SHELL
67795_ASEOF
67796cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67797## -------------------- ##
67798## M4sh Initialization. ##
67799## -------------------- ##
67800
67801# Be more Bourne compatible
67802DUALCASE=1; export DUALCASE # for MKS sh
67803if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67804  emulate sh
67805  NULLCMD=:
67806  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67807  # is contrary to our usage.  Disable this feature.
67808  alias -g '${1+"$@"}'='"$@"'
67809  setopt NO_GLOB_SUBST
67810else
67811  case `(set -o) 2>/dev/null` in #(
67812  *posix*) :
67813    set -o posix ;; #(
67814  *) :
67815     ;;
67816esac
67817fi
67818
67819
67820as_nl='
67821'
67822export as_nl
67823# Printing a long string crashes Solaris 7 /usr/bin/printf.
67824as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67825as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67826as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67827# Prefer a ksh shell builtin over an external printf program on Solaris,
67828# but without wasting forks for bash or zsh.
67829if test -z "$BASH_VERSION$ZSH_VERSION" \
67830    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67831  as_echo='print -r --'
67832  as_echo_n='print -rn --'
67833elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67834  as_echo='printf %s\n'
67835  as_echo_n='printf %s'
67836else
67837  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67838    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67839    as_echo_n='/usr/ucb/echo -n'
67840  else
67841    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67842    as_echo_n_body='eval
67843      arg=$1;
67844      case $arg in #(
67845      *"$as_nl"*)
67846	expr "X$arg" : "X\\(.*\\)$as_nl";
67847	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67848      esac;
67849      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67850    '
67851    export as_echo_n_body
67852    as_echo_n='sh -c $as_echo_n_body as_echo'
67853  fi
67854  export as_echo_body
67855  as_echo='sh -c $as_echo_body as_echo'
67856fi
67857
67858# The user is always right.
67859if test "${PATH_SEPARATOR+set}" != set; then
67860  PATH_SEPARATOR=:
67861  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67862    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67863      PATH_SEPARATOR=';'
67864  }
67865fi
67866
67867
67868# IFS
67869# We need space, tab and new line, in precisely that order.  Quoting is
67870# there to prevent editors from complaining about space-tab.
67871# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67872# splitting by setting IFS to empty value.)
67873IFS=" ""	$as_nl"
67874
67875# Find who we are.  Look in the path if we contain no directory separator.
67876as_myself=
67877case $0 in #((
67878  *[\\/]* ) as_myself=$0 ;;
67879  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67880for as_dir in $PATH
67881do
67882  IFS=$as_save_IFS
67883  test -z "$as_dir" && as_dir=.
67884    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67885  done
67886IFS=$as_save_IFS
67887
67888     ;;
67889esac
67890# We did not find ourselves, most probably we were run as `sh COMMAND'
67891# in which case we are not to be found in the path.
67892if test "x$as_myself" = x; then
67893  as_myself=$0
67894fi
67895if test ! -f "$as_myself"; then
67896  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67897  exit 1
67898fi
67899
67900# Unset variables that we do not need and which cause bugs (e.g. in
67901# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67902# suppresses any "Segmentation fault" message there.  '((' could
67903# trigger a bug in pdksh 5.2.14.
67904for as_var in BASH_ENV ENV MAIL MAILPATH
67905do eval test x\${$as_var+set} = xset \
67906  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67907done
67908PS1='$ '
67909PS2='> '
67910PS4='+ '
67911
67912# NLS nuisances.
67913LC_ALL=C
67914export LC_ALL
67915LANGUAGE=C
67916export LANGUAGE
67917
67918# CDPATH.
67919(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67920
67921
67922# as_fn_error STATUS ERROR [LINENO LOG_FD]
67923# ----------------------------------------
67924# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67925# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67926# script with STATUS, using 1 if that was 0.
67927as_fn_error ()
67928{
67929  as_status=$1; test $as_status -eq 0 && as_status=1
67930  if test "$4"; then
67931    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67932    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67933  fi
67934  $as_echo "$as_me: error: $2" >&2
67935  as_fn_exit $as_status
67936} # as_fn_error
67937
67938
67939# as_fn_set_status STATUS
67940# -----------------------
67941# Set $? to STATUS, without forking.
67942as_fn_set_status ()
67943{
67944  return $1
67945} # as_fn_set_status
67946
67947# as_fn_exit STATUS
67948# -----------------
67949# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67950as_fn_exit ()
67951{
67952  set +e
67953  as_fn_set_status $1
67954  exit $1
67955} # as_fn_exit
67956
67957# as_fn_unset VAR
67958# ---------------
67959# Portably unset VAR.
67960as_fn_unset ()
67961{
67962  { eval $1=; unset $1;}
67963}
67964as_unset=as_fn_unset
67965# as_fn_append VAR VALUE
67966# ----------------------
67967# Append the text in VALUE to the end of the definition contained in VAR. Take
67968# advantage of any shell optimizations that allow amortized linear growth over
67969# repeated appends, instead of the typical quadratic growth present in naive
67970# implementations.
67971if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67972  eval 'as_fn_append ()
67973  {
67974    eval $1+=\$2
67975  }'
67976else
67977  as_fn_append ()
67978  {
67979    eval $1=\$$1\$2
67980  }
67981fi # as_fn_append
67982
67983# as_fn_arith ARG...
67984# ------------------
67985# Perform arithmetic evaluation on the ARGs, and store the result in the
67986# global $as_val. Take advantage of shells that can avoid forks. The arguments
67987# must be portable across $(()) and expr.
67988if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67989  eval 'as_fn_arith ()
67990  {
67991    as_val=$(( $* ))
67992  }'
67993else
67994  as_fn_arith ()
67995  {
67996    as_val=`expr "$@" || test $? -eq 1`
67997  }
67998fi # as_fn_arith
67999
68000
68001if expr a : '\(a\)' >/dev/null 2>&1 &&
68002   test "X`expr 00001 : '.*\(...\)'`" = X001; then
68003  as_expr=expr
68004else
68005  as_expr=false
68006fi
68007
68008if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
68009  as_basename=basename
68010else
68011  as_basename=false
68012fi
68013
68014if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
68015  as_dirname=dirname
68016else
68017  as_dirname=false
68018fi
68019
68020as_me=`$as_basename -- "$0" ||
68021$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68022	 X"$0" : 'X\(//\)$' \| \
68023	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
68024$as_echo X/"$0" |
68025    sed '/^.*\/\([^/][^/]*\)\/*$/{
68026	    s//\1/
68027	    q
68028	  }
68029	  /^X\/\(\/\/\)$/{
68030	    s//\1/
68031	    q
68032	  }
68033	  /^X\/\(\/\).*/{
68034	    s//\1/
68035	    q
68036	  }
68037	  s/.*/./; q'`
68038
68039# Avoid depending upon Character Ranges.
68040as_cr_letters='abcdefghijklmnopqrstuvwxyz'
68041as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
68042as_cr_Letters=$as_cr_letters$as_cr_LETTERS
68043as_cr_digits='0123456789'
68044as_cr_alnum=$as_cr_Letters$as_cr_digits
68045
68046ECHO_C= ECHO_N= ECHO_T=
68047case `echo -n x` in #(((((
68048-n*)
68049  case `echo 'xy\c'` in
68050  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
68051  xy)  ECHO_C='\c';;
68052  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
68053       ECHO_T='	';;
68054  esac;;
68055*)
68056  ECHO_N='-n';;
68057esac
68058
68059rm -f conf$$ conf$$.exe conf$$.file
68060if test -d conf$$.dir; then
68061  rm -f conf$$.dir/conf$$.file
68062else
68063  rm -f conf$$.dir
68064  mkdir conf$$.dir 2>/dev/null
68065fi
68066if (echo >conf$$.file) 2>/dev/null; then
68067  if ln -s conf$$.file conf$$ 2>/dev/null; then
68068    as_ln_s='ln -s'
68069    # ... but there are two gotchas:
68070    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
68071    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
68072    # In both cases, we have to default to `cp -pR'.
68073    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
68074      as_ln_s='cp -pR'
68075  elif ln conf$$.file conf$$ 2>/dev/null; then
68076    as_ln_s=ln
68077  else
68078    as_ln_s='cp -pR'
68079  fi
68080else
68081  as_ln_s='cp -pR'
68082fi
68083rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
68084rmdir conf$$.dir 2>/dev/null
68085
68086
68087# as_fn_mkdir_p
68088# -------------
68089# Create "$as_dir" as a directory, including parents if necessary.
68090as_fn_mkdir_p ()
68091{
68092
68093  case $as_dir in #(
68094  -*) as_dir=./$as_dir;;
68095  esac
68096  test -d "$as_dir" || eval $as_mkdir_p || {
68097    as_dirs=
68098    while :; do
68099      case $as_dir in #(
68100      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
68101      *) as_qdir=$as_dir;;
68102      esac
68103      as_dirs="'$as_qdir' $as_dirs"
68104      as_dir=`$as_dirname -- "$as_dir" ||
68105$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68106	 X"$as_dir" : 'X\(//\)[^/]' \| \
68107	 X"$as_dir" : 'X\(//\)$' \| \
68108	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
68109$as_echo X"$as_dir" |
68110    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68111	    s//\1/
68112	    q
68113	  }
68114	  /^X\(\/\/\)[^/].*/{
68115	    s//\1/
68116	    q
68117	  }
68118	  /^X\(\/\/\)$/{
68119	    s//\1/
68120	    q
68121	  }
68122	  /^X\(\/\).*/{
68123	    s//\1/
68124	    q
68125	  }
68126	  s/.*/./; q'`
68127      test -d "$as_dir" && break
68128    done
68129    test -z "$as_dirs" || eval "mkdir $as_dirs"
68130  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
68131
68132
68133} # as_fn_mkdir_p
68134if mkdir -p . 2>/dev/null; then
68135  as_mkdir_p='mkdir -p "$as_dir"'
68136else
68137  test -d ./-p && rmdir ./-p
68138  as_mkdir_p=false
68139fi
68140
68141
68142# as_fn_executable_p FILE
68143# -----------------------
68144# Test if FILE is an executable regular file.
68145as_fn_executable_p ()
68146{
68147  test -f "$1" && test -x "$1"
68148} # as_fn_executable_p
68149as_test_x='test -x'
68150as_executable_p=as_fn_executable_p
68151
68152# Sed expression to map a string onto a valid CPP name.
68153as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
68154
68155# Sed expression to map a string onto a valid variable name.
68156as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
68157
68158
68159exec 6>&1
68160## ----------------------------------- ##
68161## Main body of $CONFIG_STATUS script. ##
68162## ----------------------------------- ##
68163_ASEOF
68164test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
68165
68166cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68167# Save the log message, to keep $0 and so on meaningful, and to
68168# report actual input values of CONFIG_FILES etc. instead of their
68169# values after options handling.
68170ac_log="
68171This file was extended by OpenJDK $as_me jdk9, which was
68172generated by GNU Autoconf 2.69.  Invocation command line was
68173
68174  CONFIG_FILES    = $CONFIG_FILES
68175  CONFIG_HEADERS  = $CONFIG_HEADERS
68176  CONFIG_LINKS    = $CONFIG_LINKS
68177  CONFIG_COMMANDS = $CONFIG_COMMANDS
68178  $ $0 $@
68179
68180on `(hostname || uname -n) 2>/dev/null | sed 1q`
68181"
68182
68183_ACEOF
68184
68185case $ac_config_files in *"
68186"*) set x $ac_config_files; shift; ac_config_files=$*;;
68187esac
68188
68189
68190
68191cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68192# Files that config.status was made for.
68193config_files="$ac_config_files"
68194
68195_ACEOF
68196
68197cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68198ac_cs_usage="\
68199\`$as_me' instantiates files and other configuration actions
68200from templates according to the current configuration.  Unless the files
68201and actions are specified as TAGs, all are instantiated by default.
68202
68203Usage: $0 [OPTION]... [TAG]...
68204
68205  -h, --help       print this help, then exit
68206  -V, --version    print version number and configuration settings, then exit
68207      --config     print configuration, then exit
68208  -q, --quiet, --silent
68209                   do not print progress messages
68210  -d, --debug      don't remove temporary files
68211      --recheck    update $as_me by reconfiguring in the same conditions
68212      --file=FILE[:TEMPLATE]
68213                   instantiate the configuration file FILE
68214
68215Configuration files:
68216$config_files
68217
68218Report bugs to <build-dev@openjdk.java.net>.
68219OpenJDK home page: <http://openjdk.java.net>."
68220
68221_ACEOF
68222cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68223ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
68224ac_cs_version="\\
68225OpenJDK config.status jdk9
68226configured by $0, generated by GNU Autoconf 2.69,
68227  with options \\"\$ac_cs_config\\"
68228
68229Copyright (C) 2012 Free Software Foundation, Inc.
68230This config.status script is free software; the Free Software Foundation
68231gives unlimited permission to copy, distribute and modify it."
68232
68233ac_pwd='$ac_pwd'
68234srcdir='$srcdir'
68235AWK='$AWK'
68236test -n "\$AWK" || AWK=awk
68237_ACEOF
68238
68239cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68240# The default lists apply if the user does not specify any file.
68241ac_need_defaults=:
68242while test $# != 0
68243do
68244  case $1 in
68245  --*=?*)
68246    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68247    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
68248    ac_shift=:
68249    ;;
68250  --*=)
68251    ac_option=`expr "X$1" : 'X\([^=]*\)='`
68252    ac_optarg=
68253    ac_shift=:
68254    ;;
68255  *)
68256    ac_option=$1
68257    ac_optarg=$2
68258    ac_shift=shift
68259    ;;
68260  esac
68261
68262  case $ac_option in
68263  # Handling of the options.
68264  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
68265    ac_cs_recheck=: ;;
68266  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
68267    $as_echo "$ac_cs_version"; exit ;;
68268  --config | --confi | --conf | --con | --co | --c )
68269    $as_echo "$ac_cs_config"; exit ;;
68270  --debug | --debu | --deb | --de | --d | -d )
68271    debug=: ;;
68272  --file | --fil | --fi | --f )
68273    $ac_shift
68274    case $ac_optarg in
68275    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
68276    '') as_fn_error $? "missing file argument" ;;
68277    esac
68278    as_fn_append CONFIG_FILES " '$ac_optarg'"
68279    ac_need_defaults=false;;
68280  --he | --h |  --help | --hel | -h )
68281    $as_echo "$ac_cs_usage"; exit ;;
68282  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
68283  | -silent | --silent | --silen | --sile | --sil | --si | --s)
68284    ac_cs_silent=: ;;
68285
68286  # This is an error.
68287  -*) as_fn_error $? "unrecognized option: \`$1'
68288Try \`$0 --help' for more information." ;;
68289
68290  *) as_fn_append ac_config_targets " $1"
68291     ac_need_defaults=false ;;
68292
68293  esac
68294  shift
68295done
68296
68297ac_configure_extra_args=
68298
68299if $ac_cs_silent; then
68300  exec 6>/dev/null
68301  ac_configure_extra_args="$ac_configure_extra_args --silent"
68302fi
68303
68304_ACEOF
68305cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68306if \$ac_cs_recheck; then
68307  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
68308  shift
68309  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
68310  CONFIG_SHELL='$SHELL'
68311  export CONFIG_SHELL
68312  exec "\$@"
68313fi
68314
68315_ACEOF
68316cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68317exec 5>>config.log
68318{
68319  echo
68320  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
68321## Running $as_me. ##
68322_ASBOX
68323  $as_echo "$ac_log"
68324} >&5
68325
68326_ACEOF
68327cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68328_ACEOF
68329
68330cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68331
68332# Handling of arguments.
68333for ac_config_target in $ac_config_targets
68334do
68335  case $ac_config_target in
68336    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
68337    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
68338    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
68339    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
68340    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
68341
68342  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
68343  esac
68344done
68345
68346
68347# If the user did not use the arguments to specify the items to instantiate,
68348# then the envvar interface is used.  Set only those that are not.
68349# We use the long form for the default assignment because of an extremely
68350# bizarre bug on SunOS 4.1.3.
68351if $ac_need_defaults; then
68352  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
68353fi
68354
68355# Have a temporary directory for convenience.  Make it in the build tree
68356# simply because there is no reason against having it here, and in addition,
68357# creating and moving files from /tmp can sometimes cause problems.
68358# Hook for its removal unless debugging.
68359# Note that there is a small window in which the directory will not be cleaned:
68360# after its creation but before its name has been assigned to `$tmp'.
68361$debug ||
68362{
68363  tmp= ac_tmp=
68364  trap 'exit_status=$?
68365  : "${ac_tmp:=$tmp}"
68366  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
68367' 0
68368  trap 'as_fn_exit 1' 1 2 13 15
68369}
68370# Create a (secure) tmp directory for tmp files.
68371
68372{
68373  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
68374  test -d "$tmp"
68375}  ||
68376{
68377  tmp=./conf$$-$RANDOM
68378  (umask 077 && mkdir "$tmp")
68379} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
68380ac_tmp=$tmp
68381
68382# Set up the scripts for CONFIG_FILES section.
68383# No need to generate them if there are no CONFIG_FILES.
68384# This happens for instance with `./config.status config.h'.
68385if test -n "$CONFIG_FILES"; then
68386
68387
68388ac_cr=`echo X | tr X '\015'`
68389# On cygwin, bash can eat \r inside `` if the user requested igncr.
68390# But we know of no other shell where ac_cr would be empty at this
68391# point, so we can use a bashism as a fallback.
68392if test "x$ac_cr" = x; then
68393  eval ac_cr=\$\'\\r\'
68394fi
68395ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
68396if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
68397  ac_cs_awk_cr='\\r'
68398else
68399  ac_cs_awk_cr=$ac_cr
68400fi
68401
68402echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68403_ACEOF
68404
68405
68406{
68407  echo "cat >conf$$subs.awk <<_ACEOF" &&
68408  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68409  echo "_ACEOF"
68410} >conf$$subs.sh ||
68411  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68412ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68413ac_delim='%!_!# '
68414for ac_last_try in false false false false false :; do
68415  . ./conf$$subs.sh ||
68416    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68417
68418  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68419  if test $ac_delim_n = $ac_delim_num; then
68420    break
68421  elif $ac_last_try; then
68422    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68423  else
68424    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68425  fi
68426done
68427rm -f conf$$subs.sh
68428
68429cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68430cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68431_ACEOF
68432sed -n '
68433h
68434s/^/S["/; s/!.*/"]=/
68435p
68436g
68437s/^[^!]*!//
68438:repl
68439t repl
68440s/'"$ac_delim"'$//
68441t delim
68442:nl
68443h
68444s/\(.\{148\}\)..*/\1/
68445t more1
68446s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68447p
68448n
68449b repl
68450:more1
68451s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68452p
68453g
68454s/.\{148\}//
68455t nl
68456:delim
68457h
68458s/\(.\{148\}\)..*/\1/
68459t more2
68460s/["\\]/\\&/g; s/^/"/; s/$/"/
68461p
68462b
68463:more2
68464s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68465p
68466g
68467s/.\{148\}//
68468t delim
68469' <conf$$subs.awk | sed '
68470/^[^""]/{
68471  N
68472  s/\n//
68473}
68474' >>$CONFIG_STATUS || ac_write_fail=1
68475rm -f conf$$subs.awk
68476cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68477_ACAWK
68478cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68479  for (key in S) S_is_set[key] = 1
68480  FS = ""
68481
68482}
68483{
68484  line = $ 0
68485  nfields = split(line, field, "@")
68486  substed = 0
68487  len = length(field[1])
68488  for (i = 2; i < nfields; i++) {
68489    key = field[i]
68490    keylen = length(key)
68491    if (S_is_set[key]) {
68492      value = S[key]
68493      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68494      len += length(value) + length(field[++i])
68495      substed = 1
68496    } else
68497      len += 1 + keylen
68498  }
68499
68500  print line
68501}
68502
68503_ACAWK
68504_ACEOF
68505cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68506if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68507  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68508else
68509  cat
68510fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68511  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68512_ACEOF
68513
68514# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68515# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68516# trailing colons and then remove the whole line if VPATH becomes empty
68517# (actually we leave an empty line to preserve line numbers).
68518if test "x$srcdir" = x.; then
68519  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
68520h
68521s///
68522s/^/:/
68523s/[	 ]*$/:/
68524s/:\$(srcdir):/:/g
68525s/:\${srcdir}:/:/g
68526s/:@srcdir@:/:/g
68527s/^:*//
68528s/:*$//
68529x
68530s/\(=[	 ]*\).*/\1/
68531G
68532s/\n//
68533s/^[^=]*=[	 ]*$//
68534}'
68535fi
68536
68537cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68538fi # test -n "$CONFIG_FILES"
68539
68540
68541eval set X "  :F $CONFIG_FILES      "
68542shift
68543for ac_tag
68544do
68545  case $ac_tag in
68546  :[FHLC]) ac_mode=$ac_tag; continue;;
68547  esac
68548  case $ac_mode$ac_tag in
68549  :[FHL]*:*);;
68550  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68551  :[FH]-) ac_tag=-:-;;
68552  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68553  esac
68554  ac_save_IFS=$IFS
68555  IFS=:
68556  set x $ac_tag
68557  IFS=$ac_save_IFS
68558  shift
68559  ac_file=$1
68560  shift
68561
68562  case $ac_mode in
68563  :L) ac_source=$1;;
68564  :[FH])
68565    ac_file_inputs=
68566    for ac_f
68567    do
68568      case $ac_f in
68569      -) ac_f="$ac_tmp/stdin";;
68570      *) # Look for the file first in the build tree, then in the source tree
68571	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
68572	 # because $ac_f cannot contain `:'.
68573	 test -f "$ac_f" ||
68574	   case $ac_f in
68575	   [\\/$]*) false;;
68576	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68577	   esac ||
68578	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68579      esac
68580      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68581      as_fn_append ac_file_inputs " '$ac_f'"
68582    done
68583
68584    # Let's still pretend it is `configure' which instantiates (i.e., don't
68585    # use $as_me), people would be surprised to read:
68586    #    /* config.h.  Generated by config.status.  */
68587    configure_input='Generated from '`
68588	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68589	`' by configure.'
68590    if test x"$ac_file" != x-; then
68591      configure_input="$ac_file.  $configure_input"
68592      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68593$as_echo "$as_me: creating $ac_file" >&6;}
68594    fi
68595    # Neutralize special characters interpreted by sed in replacement strings.
68596    case $configure_input in #(
68597    *\&* | *\|* | *\\* )
68598       ac_sed_conf_input=`$as_echo "$configure_input" |
68599       sed 's/[\\\\&|]/\\\\&/g'`;; #(
68600    *) ac_sed_conf_input=$configure_input;;
68601    esac
68602
68603    case $ac_tag in
68604    *:-:* | *:-) cat >"$ac_tmp/stdin" \
68605      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68606    esac
68607    ;;
68608  esac
68609
68610  ac_dir=`$as_dirname -- "$ac_file" ||
68611$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68612	 X"$ac_file" : 'X\(//\)[^/]' \| \
68613	 X"$ac_file" : 'X\(//\)$' \| \
68614	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68615$as_echo X"$ac_file" |
68616    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68617	    s//\1/
68618	    q
68619	  }
68620	  /^X\(\/\/\)[^/].*/{
68621	    s//\1/
68622	    q
68623	  }
68624	  /^X\(\/\/\)$/{
68625	    s//\1/
68626	    q
68627	  }
68628	  /^X\(\/\).*/{
68629	    s//\1/
68630	    q
68631	  }
68632	  s/.*/./; q'`
68633  as_dir="$ac_dir"; as_fn_mkdir_p
68634  ac_builddir=.
68635
68636case "$ac_dir" in
68637.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68638*)
68639  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68640  # A ".." for each directory in $ac_dir_suffix.
68641  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68642  case $ac_top_builddir_sub in
68643  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68644  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68645  esac ;;
68646esac
68647ac_abs_top_builddir=$ac_pwd
68648ac_abs_builddir=$ac_pwd$ac_dir_suffix
68649# for backward compatibility:
68650ac_top_builddir=$ac_top_build_prefix
68651
68652case $srcdir in
68653  .)  # We are building in place.
68654    ac_srcdir=.
68655    ac_top_srcdir=$ac_top_builddir_sub
68656    ac_abs_top_srcdir=$ac_pwd ;;
68657  [\\/]* | ?:[\\/]* )  # Absolute name.
68658    ac_srcdir=$srcdir$ac_dir_suffix;
68659    ac_top_srcdir=$srcdir
68660    ac_abs_top_srcdir=$srcdir ;;
68661  *) # Relative name.
68662    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68663    ac_top_srcdir=$ac_top_build_prefix$srcdir
68664    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68665esac
68666ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68667
68668
68669  case $ac_mode in
68670  :F)
68671  #
68672  # CONFIG_FILE
68673  #
68674
68675_ACEOF
68676
68677cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68678# If the template does not know about datarootdir, expand it.
68679# FIXME: This hack should be removed a few years after 2.60.
68680ac_datarootdir_hack=; ac_datarootdir_seen=
68681ac_sed_dataroot='
68682/datarootdir/ {
68683  p
68684  q
68685}
68686/@datadir@/p
68687/@docdir@/p
68688/@infodir@/p
68689/@localedir@/p
68690/@mandir@/p'
68691case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68692*datarootdir*) ac_datarootdir_seen=yes;;
68693*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68694  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68695$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68696_ACEOF
68697cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68698  ac_datarootdir_hack='
68699  s&@datadir@&$datadir&g
68700  s&@docdir@&$docdir&g
68701  s&@infodir@&$infodir&g
68702  s&@localedir@&$localedir&g
68703  s&@mandir@&$mandir&g
68704  s&\\\${datarootdir}&$datarootdir&g' ;;
68705esac
68706_ACEOF
68707
68708# Neutralize VPATH when `$srcdir' = `.'.
68709# Shell code in configure.ac might set extrasub.
68710# FIXME: do we really want to maintain this feature?
68711cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68712ac_sed_extra="$ac_vpsub
68713$extrasub
68714_ACEOF
68715cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68716:t
68717/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68718s|@configure_input@|$ac_sed_conf_input|;t t
68719s&@top_builddir@&$ac_top_builddir_sub&;t t
68720s&@top_build_prefix@&$ac_top_build_prefix&;t t
68721s&@srcdir@&$ac_srcdir&;t t
68722s&@abs_srcdir@&$ac_abs_srcdir&;t t
68723s&@top_srcdir@&$ac_top_srcdir&;t t
68724s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68725s&@builddir@&$ac_builddir&;t t
68726s&@abs_builddir@&$ac_abs_builddir&;t t
68727s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68728$ac_datarootdir_hack
68729"
68730eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68731  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68732
68733test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68734  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68735  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68736      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68737  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68738which seems to be undefined.  Please make sure it is defined" >&5
68739$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68740which seems to be undefined.  Please make sure it is defined" >&2;}
68741
68742  rm -f "$ac_tmp/stdin"
68743  case $ac_file in
68744  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68745  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68746  esac \
68747  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68748 ;;
68749
68750
68751
68752  esac
68753
68754done # for ac_tag
68755
68756
68757as_fn_exit 0
68758_ACEOF
68759ac_clean_files=$ac_clean_files_save
68760
68761test $ac_write_fail = 0 ||
68762  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68763
68764
68765# configure is writing to config.log, and then calls config.status.
68766# config.status does its own redirection, appending to config.log.
68767# Unfortunately, on DOS this fails, as config.log is still kept open
68768# by configure, so config.status won't be able to write to it; its
68769# output is simply discarded.  So we exec the FD to /dev/null,
68770# effectively closing config.log, so it can be properly (re)opened and
68771# appended to by config.status.  When coming back to configure, we
68772# need to make the FD available again.
68773if test "$no_create" != yes; then
68774  ac_cs_success=:
68775  ac_config_status_args=
68776  test "$silent" = yes &&
68777    ac_config_status_args="$ac_config_status_args --quiet"
68778  exec 5>/dev/null
68779  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68780  exec 5>>config.log
68781  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68782  # would make configure fail if this is the last instruction.
68783  $ac_cs_success || as_fn_exit 1
68784fi
68785if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68786  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68787$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68788fi
68789
68790
68791# After AC_OUTPUT, we need to do final work
68792
68793
68794  # Try to move config.log (generated by autoconf) to the configure-support directory.
68795  if test -e ./config.log; then
68796    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68797  fi
68798
68799  # Rotate our log file (configure.log)
68800  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68801    $RM -f "$OUTPUT_ROOT/configure.log.old"
68802  fi
68803  if test -e "$OUTPUT_ROOT/configure.log"; then
68804    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68805  fi
68806
68807  # Move configure.log from current directory to the build output root
68808  if test -e ./configure.log; then
68809    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68810  fi
68811
68812  # Make the compare script executable
68813  $CHMOD +x $OUTPUT_ROOT/compare.sh
68814
68815
68816# Finally output some useful information to the user
68817
68818  # Finally output some useful information to the user
68819
68820  printf "\n"
68821  printf "====================================================\n"
68822  if test "x$no_create" != "xyes"; then
68823    if test "x$IS_RECONFIGURE" != "xyes"; then
68824      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68825    else
68826      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68827    fi
68828  else
68829    if test "x$IS_RECONFIGURE" != "xyes"; then
68830      printf "A configuration has been successfully checked but not created\n"
68831    else
68832      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68833    fi
68834  fi
68835  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68836    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68837  else
68838    printf "using default settings.\n"
68839  fi
68840
68841  printf "\n"
68842  printf "Configuration summary:\n"
68843  printf "* Debug level:    $DEBUG_LEVEL\n"
68844  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68845  printf "* JDK variant:    $JDK_VARIANT\n"
68846  printf "* JVM variants:   $JVM_VARIANTS\n"
68847  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68848  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68849
68850  printf "\n"
68851  printf "Tools summary:\n"
68852  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68853    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68854  fi
68855  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68856  if test "x$TOOLCHAIN_VERSION" != "x"; then
68857    print_version=" $TOOLCHAIN_VERSION"
68858  fi
68859  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68860  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68861  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68862
68863  printf "\n"
68864  printf "Build performance summary:\n"
68865  printf "* Cores to use:   $JOBS\n"
68866  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68867  if test "x$CCACHE_STATUS" != "x"; then
68868    printf "* ccache status:  $CCACHE_STATUS\n"
68869  fi
68870  printf "\n"
68871
68872  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68873    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68874    printf "will result in longer build times.\n"
68875    printf "\n"
68876  fi
68877
68878  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68879    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68880    printf "These are not respected, and will be ignored. It is recommended\n"
68881    printf "that you clean your environment. The following variables are set:\n"
68882    printf "$FOUND_ALT_VARIABLES\n"
68883    printf "\n"
68884  fi
68885
68886  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68887    printf "WARNING: Your build output directory is not on a local disk.\n"
68888    printf "This will severely degrade build performance!\n"
68889    printf "It is recommended that you create an output directory on a local disk,\n"
68890    printf "and run the configure script again from that directory.\n"
68891    printf "\n"
68892  fi
68893
68894  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68895    printf "WARNING: The result of this configuration has overridden an older\n"
68896    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68897    printf "proper build. Failure to do so might result in strange build problems.\n"
68898    printf "\n"
68899  fi
68900
68901  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68902    printf "WARNING: The result of this configuration was not saved.\n"
68903    printf "You should run without '--no-create | -n' to create the configuration.\n"
68904    printf "\n"
68905  fi
68906
68907
68908
68909  # Locate config.log.
68910  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68911    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68912  elif test -e "./config.log"; then
68913    CONFIG_LOG_PATH="."
68914  fi
68915
68916  if test -e "$CONFIG_LOG_PATH/config.log"; then
68917    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68918    if test $? -eq 0; then
68919      printf "The following warnings were produced. Repeated here for convenience:\n"
68920      # We must quote sed expression (using []) to stop m4 from eating the [].
68921      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68922      printf "\n"
68923    fi
68924  fi
68925
68926